zhizhuxialiwen
zhizhuxialiwen
全部文章
分类
题解(52)
归档
标签
去牛客网
登录
/
注册
zhizhuxialiwen的博客
全部文章
(共52篇)
题解 | #迷宫问题#
#include <iostream> #include <vector> #include <map> using namespace std; #define CIN_ARGC 1 #ifdef CIN_ARGC int row = 0; int col ...
C++
2021-11-22
0
300
题解 | #Sudoku#
#include <iostream> #include <vector> #include <set> using namespace std; const int N = 9; int arrVect[N][N]; bool flag = false; ...
C++
2021-11-21
0
276
题解 | #学英语#
#include <iostream> #include <vector> #include <string> using namespace std; /* 思路: 若输入[0, 19],则直接输出。 当输入[20, 99] 十位,若能被10整除,即 30 ...
C++
2021-11-20
0
228
题解 | #称砝码#
#include <iostream> #include <string> #include <vector> #include <unordered_set> using namespace std; /* 思路:n=2, m = {1,2},x...
C++
2021-11-20
0
413
题解 | #统计字符#
#include <iostream> #include <string> using namespace std; /* 思路:根据英文字符、数字、空格、其他进行分别统计 */ void accountCharacters(string strIn) { int...
C++
2021-11-20
0
280
题解 | #判断两个IP是否属于同一子网#
#include <iostream> #include <string> #include <vector> using namespace std; void stringToVector(string strIn, vector<int> ...
C++
2021-11-20
2
245
题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
#include <iostream> #include <iomanip> using namespace std; /* 思路:第一次高度h,反弹高度为h/2;第二次高度h/2,反弹高度h/2*2;第三次高度h/2*2,反弹高度h/2*2*2; 第四次高度h/2*2*...
C++
2021-11-20
0
296
题解 | #统计每个月兔子的总数#
#include <iostream> using namespace std; /* * 斐波那契数列公式(递归):1 1 2 3 5 8 13 ,f(n) = f(n-1) + f(n-2), n > 2 * 思路: 当month<3,则输出;当month>=3...
C++
2021-11-18
0
292
题解 | #蛇形矩阵#
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; #ifdef Serpentine_matrix ...
C++
2021-11-17
3
354
题解 | #图片整理#
#include <iostream> #include <string> #include <algorithm> using namespace std; /* 思路:先数字、大写字母、小写字母分离出来,再分别进行排序,最后进行合并 */ string s...
C++
2021-11-16
0
240
首页
上一页
1
2
3
4
5
6
下一页
末页