04 2022 档案

摘要:设f[v]是以结点v为根的方案数,设左子树的根为x,右子树的根为y,那么如果左右子树完全相同,那么我们交换左右子树对方案没有任何影响,都是: f[v]=f[x]f[y] 如果左右子树不相同,那么则多出f[x]f[y]的贡献,所以方案数为$f[v] = 阅读全文
posted @ 2022-04-28 18:43 Xxaj5 阅读(38) 评论(0) 推荐(0) 编辑
摘要:初速度:v=2Em; 竖直速度:vy=vsin(ans)=gt 水平距离:s=vx2t=vcos(ans)2t=2Esin(2ans)mg #include 阅读全文
posted @ 2022-04-21 11:07 Xxaj5 阅读(21) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 100; int tr[N]; int main() { int n; cin >> n; memset(tr, -1, sizeof(tr)); for (int i = 1; 阅读全文
posted @ 2022-04-21 10:22 Xxaj5 阅读(16) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; using pii = pair<int, int>; const int N = 300; vector<pair<int, int>> g[N]; int have[N]; int pre[N]; int 阅读全文
posted @ 2022-04-21 10:22 Xxaj5 阅读(29) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using ll = long long; const int N = 1E5 + 10; ll stk[N]; ll top; ll x[N], y[ 阅读全文
posted @ 2022-04-20 17:01 Xxaj5 阅读(39) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; const int N = 10010; vector<int> G[N]; bool st[N]; int dist[N]; int res = 1e 阅读全文
posted @ 2022-04-20 15:46 Xxaj5 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 550; using pii = pair<int, int>; struct Node{ int v, length, time; }; vector<Node> g[N]; i 阅读全文
posted @ 2022-04-20 15:22 Xxaj5 阅读(28) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; const int N = 1210, M = 15; int n, m, k, ds; unordered_map<string, int> var; 阅读全文
posted @ 2022-04-19 16:16 Xxaj5 阅读(33) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 1010; bool vis[1300][130][70]; int dx[5] = {-1, 0, 1, 0, 0}, dy[5] = {0, 1, 0, -1, 0}; int 阅读全文
posted @ 2022-04-19 09:07 Xxaj5 阅读(20) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 1010; int f[N]; bool havef[N]; int Size[N]; int find(int x) { if (x != f[x]) f[x] = find(f 阅读全文
posted @ 2022-04-19 08:31 Xxaj5 阅读(22) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 1E5 + 10; int tr[N]; stack<int> stk; int lowbit(int x) { return x & -x; } void add(int x, 阅读全文
posted @ 2022-04-19 08:10 Xxaj5 阅读(32) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; const int N = 10010, M = 110; int f[M]; int n, m; int w[N]; int pre[N]; bool 阅读全文
posted @ 2022-04-18 21:54 Xxaj5 阅读(45) 评论(0) 推荐(0) 编辑
摘要:这题读懂题目之后就发现它很呆 #include <bits/stdc++.h> using namespace std; const int N = 100010, M = 110; vector<int> g[N]; int main() { ios::sync_with_stdio(false) 阅读全文
posted @ 2022-04-16 17:51 Xxaj5 阅读(45) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 10010, M = 110; int main() { int n, m; cin >> n >> m; vector<vector<int>> v(n, vector<int> 阅读全文
posted @ 2022-04-16 17:19 Xxaj5 阅读(41) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 10010; vector<int> g[N]; bool st[N]; int cnt = 0; vector<int> res; vector<int> temp; int d 阅读全文
posted @ 2022-04-16 16:41 Xxaj5 阅读(117) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 110; stack<char> stk[N]; int main() { int n, m, S; cin >> n >> m >> S; for (int i = 1; i < 阅读全文
posted @ 2022-04-16 15:33 Xxaj5 阅读(22) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 210; int w[N][N]; int main() { int n, m; cin >> n >> m; memset(w, -1, sizeof w); while (m- 阅读全文
posted @ 2022-04-16 15:17 Xxaj5 阅读(79) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 50; int tr[N]; int n; void dfs(int cnt) { if (cnt > n) return; dfs(cnt * 2); dfs(cnt * 2 + 阅读全文
posted @ 2022-04-16 14:54 Xxaj5 阅读(23) 评论(0) 推荐(0) 编辑
摘要:重点在阅读理解能力 身份证号必须是18位数字,话说平时咱们身份证也可以带个X啥的啊。 合法状态就是只要身份证合格就行,一开始我还想是它犯病,然后申请了口罩才算一个合法记录。 后边输出状态为1的人,一定要按照每个人犯病顺序输出,也就是说如果某个人一开始没犯病,后边犯病了,那取它在后边的顺序。 这样模拟 阅读全文
posted @ 2022-04-16 11:52 Xxaj5 阅读(28) 评论(1) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int cal(int a, int b, char c) { int t; if (c == '/' && b == 0) t = -1; else if (c == '+') t = a + b; els 阅读全文
posted @ 2022-04-16 10:25 Xxaj5 阅读(22) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 1010; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m, k; cin >> n >> m >> 阅读全文
posted @ 2022-04-13 14:48 Xxaj5 阅读(35) 评论(0) 推荐(0) 编辑
摘要:并没有说根是谁 #include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; const int N = 1E5 + 10; vector<int> g[N]; int depth[N]; bool flag[N] 阅读全文
posted @ 2022-04-13 11:33 Xxaj5 阅读(39) 评论(0) 推荐(0) 编辑
摘要:需要注意的地方: 我们只记录维京人的祖先,除了维京人的其他人不能记录它的祖先 #include <bits/stdc++.h> using namespace std; struct people { string name, familyname; char gender; }; map<stri 阅读全文
posted @ 2022-04-13 10:50 Xxaj5 阅读(45) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; bool isyifu[10010]; bool isunhappy[10010]; bool ishappy[10010]; int tran(int x) { int res = 0; while (x) 阅读全文
posted @ 2022-04-12 17:15 Xxaj5 阅读(76) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示