HDU多校Round 7】的更多相关文章

Solved:2 rank:141 D. Parentheses Matrix n,m有一个小于6的时候是一种构造方法 答案是n + (m - 2) / 2 (n > m) 都大于6的时候 可以在外面先填一圈 然后没两行间错开 答案是 n + m - 4 #include <bits/stdc++.h> using namespace std; int main() { int T; scanf("%d", &T); while(T--) { int n, m…
Solved:2 rank:293 J. Sequense 不知道自己写的什么东西 以后整数分块直接用 n / (n / i)表示一个块内相同n / i的最大i #include <bits/stdc++.h> using namespace std; typedef long long ll; ; ll A, B, C, D, P, n; struct martix { ll c[][]; }; martix mul(martix A, martix B) { martix res; mem…
Solved:2 rank:452 I. Werewolf 没有铁人 找铁狼 如果一个环中只有一条狼人边那个人就是铁狼 说铁狼是好人的人也是铁狼 #include <bits/stdc++.h> using namespace std; int tmp, ans, lang; ]; struct node { int to, nex, ty; }E[]; ]; ]; ]; ]; void dfs(int x, int fa) { col[x] = tmp; int c = head[x]; f…
Solved:3 rank:71 E. Everything Has Changed #include <bits/stdc++.h> using namespace std; const double PI = acos(-1.0); int main() { int T; scanf("%d", &T); while(T--) { int m; double R; scanf("%d%lf", &m, &R); double…
Solved:3 rank:405................................. B. Harvest of Apples 知道了S(n,m) 可以o(1)的求S(n - 1, m),S(n + 1,m),S(n,m - 1),S(n,m + 1)  天秀莫队 #include <stdio.h> #include <algorithm> #include <iostream> using namespace std; typedef long lo…
Solved:4 rank:268 C. Dynamic Graph Matching  状压DP一下 #include <stdio.h> #include <algorithm> #include <algorithm> #include <string.h> using namespace std; typedef long long ll; ; ll dp[ << ]; ll ans[]; << ]; void work()…
Solved:5 rank:172 A.Maximum Multiple #include <stdio.h> #include <algorithm> #include <iostream> using namespace std; typedef long long ll; int main() { int T; scanf("%d", &T); while(T--) { int n; scanf("%d", &…
Sequence  Accepts: 59  Submissions: 650  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others) Problem Description \ \ \ \    Holion August will eat every thing he has found. \ \ \ \    Now there are many foods,but he does…
King's Game  Accepts: 249  Submissions: 671  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others) 问题描述 为了铭记历史,国王准备在阅兵的间隙玩约瑟夫游戏.它召来了 n(1\le n\le 5000)n(1≤n≤5000) 个士兵,逆时针围成一个圈,依次标号 1, 2, 3 ... n1,2,3...n. 第一轮第一个人从 11 开始报数,报…
King's Phone  Accepts: 310  Submissions: 2980  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others) 问题描述 阅兵式上,国王见到了很多新奇东西,包括一台安卓手机.他很快对手机的图形解锁产生了兴趣. 解锁界面是一个 3 \times 33×3 的正方形点阵,第一行的三个点标号 1, 2, 31,2,3,第二行的三个点标号 4, 5, 64,5…