codeforces gym 100952 A B C D E F G H I J】的更多相关文章

gym 100952 A #include <iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #include<map> #include<queue> #include<stack> #include<vector> #include<set> using namespac…
链接:https://codeforces.com/gym/101606 A - Alien Sunset 暴力枚举小时即可. #include<bits/stdc++.h> using namespace std; ; int n; int h[maxn],r[maxn],s[maxn]; inline bool dark(int id,int time) { if(r[id]<s[id]) { ; ; } if(r[id]>s[id]) { ; ; } } int main()…
题目链接:https://codeforces.com/gym/102392/problem/F 题意:被这题题意坑了很久,大意是说有一棵根为 \(1\) 的树,每个节点初始都是白色, \(Alice\) 能在这棵树的某个节点放下一个棋子,并使得该节点变为黑色,然后从 \(Bob\) 开始,两人能轮流移动这个棋子到当前所在节点的任意一个白色的祖先或者后代节点(不需要相邻的节点),并且将移动到的节点染为黑色.谁先不能移动就输了. 分析:看到这道题,大致就是一个树上的博弈问题.我们一开始读错题意,以…
gym101243 A #include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #include<map> #include<queue> #include<stack> #include<vector> #include<bitset> #include<s…
翻开以前打的 #583,水平不够场上只过了五题.最近来补一下题,来记录我sb的调试过程. 估计我这个水平现场也过不了,因为前面的题已经zz调了好久-- F:就是给你环上一些点,两两配对求距离最小值. 匹配边明显是不能交叉的啊.那就直接转一个环就好了. 考虑计算贡献,盲猜一个点的贡献方向改变不会特别多,观看题解以验证,证明一发,发现猜对了. 很明显,考虑 \(x \leq y\),那么固定 \(y\),一定有一个分界点,使得 \(y - x > m - x + y\). 开一个长度为 \(n\)…
D - Time to go back Gym - 100952D http://codeforces.com/gym/100952/problem/D D. Time to go back time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have been out of Syria for a long time, a…
http://codeforces.com/gym/100952/problem/H H. Special Palindrome time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output A sequence of positive and non-zero integers called palindromic if it can be…
http://codeforces.com/gym/100952/problem/G G. The jar of divisors time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output Alice and Bob play the following game. They choose a number N to play with.…
http://codeforces.com/gym/100952/problem/F F. Contestants Ranking time limit per test 1 second memory limit per test 24 megabytes input standard input output standard output Ahmad is one of the best students in HIAST, and also a very good problems So…
http://codeforces.com/gym/100952/problem/D D. Time to go back time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have been out of Syria for a long time, and you recently decided to come ba…