[PTA - grade B - detailed explanation] 1014 - Sherlock Holmes's date - I don't understand the series
Description: the difficulty of this topic is not very high, because the topic has described the ideas almost, but there are some details to pay attention to
Title:
Solution 1: using char array
#include<iostream>
#include<string>
using namespace std;
int main()
{
string s1, s2, s3, s4;
cin >> s1 >> s2 >> s3 ...
Posted by TheSaint97 on Sun, 23 Jan 2022 13:32:47 +0100
Variables and static keywords
1, Variable
Variable: open up a space in memory to store the corresponding value. The value stored in this space can be changed Variable declaration: tell the compiler that there is a variable. The compiler opens up a space in memory. If there is no assignment, the stored value is a random value Variable declaration syntax: type var ...
Posted by Fastback_68 on Sun, 23 Jan 2022 13:03:10 +0100
Minesweeping (recursive implementation version) - Happy New Year
catalogue
thinking
Clear logic.
menu
checkerboard
Initialization of two checkerboards
Lay thunder
mine clearance
Judge whether to win or lose
text.c implementation
game.c implementation
game.h implementation
Detailed explanation of recursive part
thinking Clear logic.
For convenience, it is divided into three files: text ...
Posted by rar_ind on Sun, 23 Jan 2022 10:01:28 +0100
Source code analysis and simple encapsulation of hiredis
hiredis
Hiredis is an open source C library function that provides basic redis operation functions, such as database connection, sending commands, releasing resources, etc
1,hiredis net
hiredis itself is a cross platform code. It is built in c language and can be executed on a variety of platforms. Let's see what his net block has done
#in ...
Posted by Griven on Sun, 23 Jan 2022 04:38:29 +0100
Logu p1518[USACO2.4] Two Tamworth Two
Title Description
Two cattle escaped into the forest. Farmer John began chasing the two cattle with his expertise. Your task is to simulate their behavior (Bull and John).
Follow at 10\times 1010 × 10. In a flat grid. A grid can be an obstacle, two cows (they're all together), or Farmer John. Both cows and Farmer John can be in the same ...
Posted by Derokorian on Sat, 22 Jan 2022 23:46:31 +0100
[c language] recognize string character function + memory function | simulation implementation | strlen strcpy strcat strcmp strstr strtok memcpy memmove memset memcmp
Introduction to character function + memory function
a key
Find string length
strlen String function with unlimited length
strcpy,strcat,strcmp Introduction to string functions with limited length
strncpy,strncat,strncmp String lookup
strstr,strtok Error message report
strerror Memory operation function
memcpy,me ...
Posted by yorktown on Sat, 22 Jan 2022 19:49:06 +0100
C programming - Chapter 2 - learning records of the first day
A 30-and-a-half-year-old man, record his study records. Half of life has passed, but there is nothing. Life has no value and pursuit, and the body is not healthy. Start the first day of life and try again. I hope I can stick to it.
2021 June 20th. Tan Haoqiang Fourth Edition c Language Programming Chapter II learning records.
Then, Ju ...
Posted by JennyG on Sat, 22 Jan 2022 16:45:26 +0100
C language loop structure
Loop structure (composed of loop statements such as while and for)
1, Problem introduction:
Requirements: sum = 1 + 2 + ... + 100
sum = 0;
i = 1;
sum += i;
i++;
sum += i;
i++;
sum += i;
i++;
sum += i;
i++;
sum += i;
i++;
sum += i;
........
/*-> If we do this code manually, it's obvious that you'll go crazy
All right, let the comput ...
Posted by frost on Sat, 22 Jan 2022 13:34:36 +0100
Educational Codeforces Round 121 (Rated for Div. 2)A-C problem solution
Blog home page: https://blog.csdn.net/qq_50285142Welcome to praise 👍 Collection ⭐ , attention ❤ Leaving a message. 📝 Please correct any errors 🎈 Click to receive a large number of learning resources 🎈
A. Equidistant Letters
A string that requires equal distances between the same letters and rearranges them
Find the same letters ...
Posted by mooshuligan on Sat, 22 Jan 2022 12:52:07 +0100
BUPT 2021 autumn calculation introduction eighth experiment
BUPT 2021 autumn calculation introduction eighth experiment
Recursive evaluation one
Experiment 6_ 1_ Recursive evaluation I (100 points) Existing function f(n), n is an integer greater than or equal to 0. f(n) = 0 when n is equal to 0, f(n)=f(n-1) +n when n is greater than 0 3
Note: this problem requires recursive solution, and global varia ...
Posted by NoReason on Sat, 22 Jan 2022 10:46:18 +0100