Codeforces Round #564 (Div. 1)】的更多相关文章

Codeforces Round #564 (Div. 1) A Nauuo and Cards 首先如果牌库中最后的牌是\(1,2,\cdots, k\),那么就模拟一下能不能每次打出第\(k+i\)张牌. 然后考虑每一张牌打出后还要打多少张牌以及这张牌是什么时候入手的,分别记为\(f_i,g_i\),那么答案就是\(f_i+g_i\)的最大值. #include<bits/stdc++.h> #define qmin(x,y) (x=min(x,y)) #define qmax(x,y)…
链接:https://codeforces.com/contest/1173/problem/C 题意: Nauuo is a girl who loves playing cards. One day she was playing cards but found that the cards were mixed with some empty ones. There are nn cards numbered from 11 to nn, and they were mixed with…
链接:https://codeforces.com/contest/1173/problem/B 题意: Nauuo is a girl who loves playing chess. One day she invented a game by herself which needs nn chess pieces to play on a m×mm×mchessboard. The rows and columns are numbered from 11 to mm. We denote…
链接:https://codeforces.com/contest/1173/problem/A 题意: Nauuo is a girl who loves writing comments. One day, she posted a comment on Codeforces, wondering whether she would get upvotes or downvotes. It's known that there were xx persons who would upvote…
B. Nauuo and Chess 题目链接:http://codeforces.com/contest/1173/problem/B 题目 Nauuo is a girl who loves playing chess. One day she invented a game by herself which needs n chess pieces to play on a m×m chessboard. The rows and columns are numbered from 1 t…
A. Nauuo and Votes 题目链接:http://codeforces.com/contest/1173/problem/A 题目 Nauuo is a girl who loves writing comments. One day, she posted a comment on Codeforces, wondering whether she would get upvotes or downvotes. It's known that there were xpersons…
D. Nauuo and Circle •参考资料 [1]:https://www.cnblogs.com/wyxdrqc/p/10990378.html •题意 给出你一个包含 n 个点的树,这 n 个点编号为 1~n: 给出一个圆,圆上放置 n 个位置,第 i 个位置对应树中的某个节点,并且不重复: 求在圆上还原这棵树后,使得边不相交的总方案数: •题解 ①为何每一颗子树一定是连续的一段圆弧? 假设不是连续的圆弧,如图所示: 为了使 x 接到树上,必然会有 x-y 或 x-z 相连的边,这样…
传送门 参考资料 [1]: the Chinese Editoria A. Nauuo and Votes •题意 x个人投赞同票,y人投反对票,z人不确定: 这 z 个人由你来决定是投赞同票还是反对票: 判断 x 与 y 的相对大小是否确定? •题解 如果 x == y && z == 0,输出 '0': 如果 x-y > z,输出 '+': 如果 y-x > z,输出 '-': 反之,输出 '?': •Code #include<bits/stdc++.h> u…
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate it n = int(raw_input()) s = "" a = ["I hate that ","I love that ", "I hate it","I love it"] for i in ran…
Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/output 1 s, 256 MB    x3384 B Pyramid of Glasses standard input/output 1 s, 256 MB    x1462 C Vasya and String standard input/output 1 s, 256 MB    x1393…