Codeforces Round #425 (Div. 2) - D】的更多相关文章

题目连接:http://codeforces.com/contest/832/problem/C C. Strange Radiation time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output n people are standing on a coordinate axis in points with positive int…
A 题意:给你n根棍子,两个人每次拿m根你,你先拿,如果该谁拿的时候棍子数<m,这人就输,对手就赢,问你第一个拿的人能赢吗 代码: #include<stdio.h>#define ll long longusing namespace std;ll n,m;int main(){ while(~scanf("%I64d%I64d",&n,&m)) { ll r=n/m; if(r%2==1) printf("YES\n"); el…
Misha and Grisha are funny boys, so they like to use new underground. The underground has n stations connected with n - 1 routes so that each route connects two stations, and it is possible to reach every station from any other. The boys decided to h…
n people are standing on a coordinate axis in points with positive integer coordinates strictly less than 106. For each person we know in which direction (left or right) he is facing, and his maximum speed. You can put a bomb in some point with non-n…
It's hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish them all, so he asks you to help with one.. There is a glob pattern in the statements (a string consis…
It's one more school day now. Sasha doesn't like classes and is always bored at them. So, each day he invents some game and plays in it alone or with friends. Today he invented one simple game to play with Lena, with whom he shares a desk. The rules…
题目链接:http://codeforces.com/contest/832/problem/B B. Petya and Exam time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It's hard times now. Today Petya needs to score 100 points on Informatics…
A. Sasha and Sticks 题目链接:http://codeforces.com/contest/832/problem/A 题目意思:n个棍,双方每次取k个,取得多次数的人获胜,Sasha先取,问Sasha是否可以取胜. 代码: //Author: xiaowuga #include <iostream> #include <algorithm> #include <set> #include <vector> #include <que…
地址:http://codeforces.com/contest/832/problem/B 题目: B. Petya and Exam time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It's hard times now. Today Petya needs to score 100 points on Informati…
地址:http://codeforces.com/contest/832/problem/C 题目: C. Strange Radiation time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output n people are standing on a coordinate axis in points with positive i…