在debug的牛牛很想退休
在debug的牛牛很想退休
全部文章
分类
题解(14)
归档
标签
去牛客网
登录
/
注册
在debug的牛牛很想退休的博客
全部文章
(共29篇)
题解 | #平方和#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param c int整型 * @return bool布尔型 */ #include <math.h> bool square(int c ) { int i, j;...
2023-04-09
0
281
题解 | #二叉树的最大深度#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * ...
2023-04-09
0
282
题解 | #二叉树中和为某一值的路径(一)#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * ...
2023-04-09
0
256
题解 | #【模板】01背包#
#include <cstdio> #include <cstring> #include <iostream> using namespace std; int main(){ int i,j,n,c; int ans1,ans2 = 0; ...
2023-02-16
0
362
题解 | #最长公共子序列(一)#
#include <cstdio> #include <cstring> #include <iostream> using namespace std; int main(){ int m,n,i,j; int L[1001][1001]; ...
2023-02-15
0
365
题解 | #最长上升子序列(一)#
#include <cstdio> int main(){ int n,i,index; scanf("%d",&n);; int a[n]; for(i = 0;i< n;i++) { scanf("%d",&a[i]); ...
2023-02-13
1
440
题解 | #2的幂次方#
#include <string> #include <iostream> using namespace std; string two(int n){ string s; int m[20]; if (n == 0){ s =...
2023-02-03
0
330
题解 | #杨辉三角#
#include <cstdio> int main(){ int n,i,j; int arr[30][30]; scanf("%d",&n); for (i = 0; i < n; ++i) { for (j = 0; j &...
2023-02-03
0
239
题解 | #二叉树#
#include <cstdio> int Tree(int m,int n){ if (m > n){ return 0; } else{ return Tree(2 * m,n) + Tree(2 * m + 1,n) + 1;...
2023-02-03
0
263
题解 | #Fibonacci#
#include <cstdio> int Fabonacci(int n){ if (n == 0){ return 0; } else if (n == 1){ return 1; } else{ retur...
2023-02-03
0
286
首页
上一页
1
2
3
下一页
末页