realywq
realywq
全部文章
分类
归档
标签
去牛客网
登录
/
注册
realywq的博客
全部文章
(共45篇)
题解 | 【模板】并查集
#include <bits/stdc++.h> using namespace std; vector<int> father(500001,0); vector<int> si(500001,1); void init(){ for(int i=0;...
2026-03-04
0
14
题解 | 查找学生信息
#include <bits/stdc++.h> using namespace std; map<string,string> students; int main() { int n; cin>>n; getchar(); ...
2026-02-10
0
26
题解 | 二叉排序树
#include <bits/stdc++.h> using namespace std; struct TreeNode{ int data; TreeNode* left; TreeNode* right; TreeNode(int c):data(...
2026-02-09
0
33
题解 | 二叉排序树
#include <bits/stdc++.h> using namespace std; struct TreeNode{ int data; TreeNode *left; TreeNode *right; TreeNode *parent; ...
2026-02-09
0
35
题解 | 二叉树遍历
#include <iostream> #include <string> using namespace std; struct TreeNode{ char data; TreeNode* left; TreeNode* right; Tr...
2026-02-09
0
36
题解 | 二叉树遍历
#include <bits/stdc++.h> #include <string> using namespace std; struct BiTNode{ char data; BiTNode* left; BiTNode* right; ...
2026-02-08
0
27
题解 | 2的幂次方
#include <iostream> #include <string> using namespace std; //返回没有逆转过的二进制形式,方便solve函数利用i判断指数的实际大小。 string to_binary(int n){ string re...
2026-02-05
0
43
题解 | 二叉树
#include <bits/stdc++.h> using namespace std; int count(int m,int n){ if(m>n) return 0; //无需使用vector存储树的状态,任何大于n的索引,节点均不存在。 return 1+...
2026-02-04
0
31
题解 | 鸡兔同笼
#include <iostream> using namespace std; int main() { int n; while(cin>>n){ int max,min; if(n%2==0) max=n/2; ...
2026-01-31
0
26
题解 | 数字阶梯求和
#include <iostream> #include <string> #include <algorithm> using namespace std; string add(string a,string b){ string res; ...
2026-01-31
0
34
首页
上一页
1
2
3
4
5
下一页
末页