ddd
ddd
全部文章
分类
归档
标签
去牛客网
登录
/
注册
ddd的博客
全部文章
(共91篇)
题解 | #xxx定律#
#include <iostream> using namespace std; int main() { int a; while (cin >> a) { // 注意 while 处理多个 case int sum = 0; ...
2023-03-27
0
245
题解 | #后缀子串排序#
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; //降序 //bool cmp(string str1,...
2023-03-27
0
255
题解 | #字符串内排序#
#include <iostream> #include <algorithm> #include <string> using namespace std; bool cmp(char a,char b) { return a<b; } int m...
2023-03-27
0
230
题解 | #Digital Roots#
#include <iostream> using namespace std; // 999 int fun(int num) { while (num >= 10) { int sum = 0; while (num > 0) { ...
2023-03-27
0
267
题解 | #跳台阶扩展问题#
#include <iostream> #include <vector> #include <cmath> using namespace std; //等比数列求和 // 第一层 1 第二层 2 第三层由跳1阶和2阶组成以及跳3阶:4=2^2 第四层 有4+2...
2023-03-26
0
240
题解 | #跳台阶#
#include <iostream> #include <vector> using namespace std; //dp[i-1]:第i个dp数组的值就是斐波那契数列第n个的值 台阶其实就是斐波那契数列 // 第一层 1 第二层 2 第三层由跳1阶和2阶组成 第四层:因...
2023-03-26
0
256
题解 | #斐波那契数列#
#include <iostream> #include <vector> using namespace std; //dp[i-1]:第i个dp数组的值就是斐波那契数列第n个的值 //递归公式:dp[i] = dp[i-2]+dp[i-1] //初始化: dp[0]=1...
2023-03-26
0
313
题解 | #skew数#
#include <iostream> #include <string> #include <cmath>//记得加cmath using namespace std; int main() { int a, b; string str1; ...
2023-03-26
0
239
题解 | #成绩排序#
#include <codecvt> #include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; cla...
2023-03-26
0
255
题解 | #abc#
#include <iostream> using namespace std; int main() { for (int a=0; a<6; a++) { for (int b =0; b<6 ; b++) { for (i...
2023-03-25
0
249
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页