链接: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/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/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…
D. Nauuo and Circle •参考资料 [1]:https://www.cnblogs.com/wyxdrqc/p/10990378.html •题意 给出你一个包含 n 个点的树,这 n 个点编号为 1~n: 给出一个圆,圆上放置 n 个位置,第 i 个位置对应树中的某个节点,并且不重复: 求在圆上还原这棵树后,使得边不相交的总方案数: •题解 ①为何每一颗子树一定是连续的一段圆弧? 假设不是连续的圆弧,如图所示: 为了使 x 接到树上,必然会有 x-y 或 x-z 相连的边,这样…
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…
传送门 参考资料 [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…
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. Anton and Chess 题目连接: http://codeforces.com/contest/734/problem/D Description Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the program that plays chess. However, he finds the game on 8 to 8 board to…
题目链接: http://codeforces.com/contest/734/problem/D D. Anton and Chess time limit per test4 secondsmemory limit per test256 megabytes 问题描述 Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the program that pla…