已注销
已注销
全部文章
分类
归档
标签
去牛客网
登录
/
注册
已注销的博客
全部文章
(共21篇)
题解 | #Fibonacci#
#include <iostream> using namespace std; int cal(int n){ if(n == 0) return 0; else if(n == 1) return 1; else return cal(n - 1) + ca...
2023-01-18
0
296
题解 | #吃糖果#
#include <iostream> using namespace std; int dp(int n){ if(n == 1) return 1; else if(n == 2) return 2; else return dp(n - 1) + dp(n...
2023-01-18
0
379
题解 | #Zero-complexity#
#include <iostream> using namespace std; int main() { int num,i; cin >> num; int* stack = new int[num]; for(i = 0;i < ...
2023-01-17
0
295
题解 | #字符串内排序#
#include <iostream> #include <algorithm> using namespace std; bool cmp(char a,char b){ return a < b; } int main() { string st...
2023-01-16
0
361
题解 | #xxx定律#
#include <iostream> using namespace std; int cal(int n){ if(n == 1) return 0; int count = 0; label: if(n %2 == 0){ n = n / ...
2023-01-15
0
301
题解 | #后缀子串排序#
#include <iostream> #include<cstring> #include<algorithm> using namespace std; bool cmp(string a,string b){ return a < b; } ...
2023-01-14
0
336
题解 | #Digital Roots#(利用goto实现)
#include <iostream> using namespace std; int cal(int n){ int root = 0; if(n < 9) return n; label: while(n > 0){ roo...
2023-01-13
1
404
题解 | #Digital Roots#
/* 解释一下题目: 就是给你一个数让你求数的数根!什么叫数根? 比如24这个数的数根,就是把24各个位的数加起来!2+4=6 而且6是个位数,于是它就是24的数根。 然后39这个数一样的方法,3+9=12 此时我们发现12不是个位数,所以它不是数根,继续让它各个 位数相加,1+2=3,3是个位数所...
2023-01-13
1
403
题解 | #神奇的口袋#
#include <iostream> using namespace std; int v[21]; int judge(int index,int remain){ if(remain == 0) return 1; //成功 if(index <= 0) ...
2023-01-12
2
664
题解 | #skew数#
#include <iostream> #include <math.h> using namespace std; int main() { string str; while (cin>>str) { int sum = 0,...
2023-01-11
0
338
首页
上一页
1
2
3
下一页
末页