52Ulpianus
52Ulpianus
全部文章
分类
归档
标签
去牛客网
登录
/
注册
52Ulpianus的博客
全部文章
(共24篇)
题解 | #统计同成绩学生人数#
#include <iostream> using namespace std; int calSame(int n,int* A,int key){ int count = 0, i; for(i = 0;i < n; i++){ if(A[i]...
2023-01-19
0
368
题解 | #字符串排序#
#include <iostream> #include <string> #include <algorithm> using namespace std; bool cmp(char a, char b){ return a < b; } i...
2023-01-18
0
336
题解 | #最大公约数#辗转相除法
#include <iostream> #include <algorithm> using namespace std; int maxDivisor(int n1,int n2){ int mod; int maxn = max(n1, n2); ...
2023-01-18
0
223
题解 | #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
264
题解 | #吃糖果#
#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
322
题解 | #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
257
题解 | #字符串内排序#
#include <iostream> #include <algorithm> using namespace std; bool cmp(char a,char b){ return a < b; } int main() { string st...
2023-01-16
0
323
题解 | #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
266
题解 | #后缀子串排序#
#include <iostream> #include<cstring> #include<algorithm> using namespace std; bool cmp(string a,string b){ return a < b; } ...
2023-01-14
0
295
题解 | #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
345
首页
上一页
1
2
3
下一页
末页