CodeForces 157A Game Outcome】的更多相关文章

A. Game Outcome time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Sherlock Holmes and Dr. Watson played some game on a checkered board n × n in size. During the game they put numbers on the…
Predict Outcome of the Game Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 451C Description There are n games in a football tournament. Three teams are participating in it. Currently k …
题目链接:http://codeforces.com/contest/451/problem/C 解题报告:三个球队之间一共有n场比赛,现在已经进行了k场,不知道每个球队的胜场是多少,如三个球队的胜场分别为a,b,c,那么已知的是: |a - b | = d1 |b -c | = d2 输入n,k,d1,d2,要你判断有没有可能让三个球队最后的胜场数相同. 只要分四种情况就可以求出a,b,c分别是多少,然后判断是不是满足: n % 3 == 0 a,b,c都小于n / 3 a >= 0 &&…
题目链接:http://codeforces.com/problemset/problem/451/C 题目意思:有3支球队(假设编号为1.2.3),总共要打 n 场比赛,已知已经错过这n场比赛中的 k 场,但从 k 场比赛中可以获取一些信息:设w1表示 k 场比赛中编号为1的球队赢了w1场比赛(w2.w3 类似),绝对值 |w1-w2| = d1,  |w2-w3| = d2,问能否通过设置n-k 的 赛果来使得n场比赛都打完后,编号为1的球队的胜利次数 == 编号为2的球队的胜利次数  ==…
这是做的最好的一次了一共做了4道题  嘻嘻~ A - Game Outcome Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 157A Description Sherlock Holmes and Dr. Watson played some game on a checkered board n × n in siz…
C. Predict Outcome of the Game 题目连接: http://codeforces.com/contest/451/problem/C Description There are n games in a football tournament. Three teams are participating in it. Currently k games had already been played. You are an avid football fan, but…
解题报告 http://blog.csdn.net/juncoder/article/details/38102391 题意: n场比赛当中k场是没看过的,对于这k场比赛,a,b,c三队赢的场次的关系是a队与b队的绝对值差d1,b队和c队绝对值差d2,求能否使三支球队的赢的场次同样. 思路: |B-A|=d1 |C-B|=d2 A+B+C=k 这样就有4种情况,各自是: B>A&&C<B B>A&&C>B B<A&&C<B…
Codeforces Round #258 (Div. 2) Predict Outcome of the Game C. Predict Outcome of the Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n games in a football tournament. Three…
A. Anton and Danik 题目连接: http://codeforces.com/contest/734/problem/A Description Anton likes to play chess, and so does his friend Danik. Once they have played n games in a row. For each game it's known who was the winner - Anton or Danik. None of th…
[codeforces 293]A. Weird Game 试题描述 Yaroslav, Andrey and Roman can play cubes for hours and hours. But the game is for three, so when Roman doesn't show up, Yaroslav and Andrey play another game. Roman leaves a word for each of them. Each word consist…