勤劳的小蜗牛许愿简历通过
勤劳的小蜗牛许愿简历通过
全部文章
分类
归档
标签
去牛客网
登录
/
注册
勤劳的小蜗牛许愿简历通过的博客
全部文章
(共67篇)
题解 | #快速乘#
#include <iostream> #include<algorithm> using namespace std; typedef long long LL; int qmul(int a, int b, int p){ LL res = 0; whil...
2024-11-01
0
38
题解 | #快速幂#
#include <iostream> #include<algorithm> using namespace std; typedef long long LL; int qmi(int a, int b, int p){ int res = 1; wh...
2024-11-01
0
27
题解 | #汉诺塔问题#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @return string字符串vector ...
2024-11-01
0
47
题解 | #汉诺塔问题#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @return string字符串vector ...
2024-10-31
0
29
题解 | #kotori和素因子#
#include<iostream>#include<set>using namespace std;int n;int a[1010];int INF = 1e8;int sum;bool primer(int x){ for(int i = 2; i * i <...
2024-10-25
0
39
题解 | #岛屿数量#
#include <vector> class Solution { public: void dfs(vector<vector<char>>& grid, int i, int j){ int n = grid.size();...
2024-10-25
0
45
题解 | #走迷宫#
#include <iostream> #include<queue> #include<cstring> #include<algorithm> using namespace std; typedef pair<int, int> PI...
2024-10-25
0
41
题解 | #【模板】堆#
#include<algorithm> #include<iostream> using namespace std; const int N = 100010; int siz, h[N]; void up(int u){ while(u > 1 &...
2024-10-24
0
30
题解 | #从中序与后序遍历序列构造二叉树#
// 通过后序遍历序列可以确定树的根节点,然后利用中序遍历将树分为左子树和右子树,递归地构建整棵树 #include <unordered_map> #include <vector> class Solution { public: TreeNode* TreeHe...
2024-10-24
0
59
题解 | #实现二叉树先序,中序和后序遍历#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2024-10-24
0
36
首页
上一页
1
2
3
4
5
6
7
下一页
末页