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: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: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…