博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Hdu5873——Football Games(模拟)
阅读量:2343 次
发布时间:2019-05-10

本文共 2202 字,大约阅读时间需要 7 分钟。

Problem Description

A mysterious country will hold a football world championships—Abnormal Cup, attracting football teams and fans from all around the world. This country is so mysterious that none of the information of the games will be open to the public till the end of all the matches. And finally only the score of each team will be announced.

At the first phase of the championships, teams are divided into M groups using the single round robin rule where one and only one game will be played between each pair of teams within each group. The winner of a game scores 2 points, the loser scores 0, when the game is tied both score 1 point. The schedule of these games are unknown, only the scores of each team in each group are available.

When those games finished, some insider revealed that there were some false scores in some groups. This has aroused great concern among the pubic, so the the Association of Credit Management (ACM) asks you to judge which groups’ scores must be false.

Input

Multiple test cases, process till end of the input.

For each case, the first line contains a positive integers M, which is the number of groups.

The i-th of the next M lines begins with a positive integer Bi representing the number of teams in the i-th group, followed by Bi nonnegative integers representing the score of each team in this group.

number of test cases <= 10

M<= 100
B[i]<= 20000
score of each team <= 20000

Output

For each test case, output M lines. Output F" (without quotes) if the scores in the i-th group must be false, outputT” (without quotes) otherwise. See samples for detail.

Sample Input

2
3 0 5 1
2 1 1

Sample Output

F
T

很迷的一道题,首先是坑爹的输入,然后我们想出了五个限制条件,没过,我就改改改,莫名其妙又过了,再把当初的代码交一遍,TMD也过了!

#include 
#include
#include
#include
#include
#include
#include
#include
#include
#define INF 0x3f3f3f3f#define MAXN 200005#define Mod 10001using namespace std;int main(){ int t,n; while(scanf("%d",&t)!=EOF) { while(t--) { scanf("%d",&n); int x,sum=0,maxsum=0,zero=0,maxa=0,odd=0; for(int i=0;i
1) puts("F"); else if(zero>1) puts("F"); else if(maxa>2*(n-1)) puts("F"); else if(odd%2) puts("F"); else puts("T"); } } return 0;}

转载地址:http://apcvb.baihongyu.com/

你可能感兴趣的文章
多线程入门教程(三)线程控制
查看>>
多线程入门教程(四)线程间通信
查看>>
多线程入门教程(五)MFC的多线程
查看>>
多线程入门教程(六)综合实例
查看>>
C/C++ 多线程学习心得
查看>>
C/C++四种退出线程的方法
查看>>
多线程编程要点
查看>>
c++CreateEvent函数在多线程中使用及实例
查看>>
c++多线程同步(1)
查看>>
Windows 下 C/C++ 多线程编程入门参考范例
查看>>
浅析stack around the variable was corrupted
查看>>
RGB与YUV转换
查看>>
YUV转RGB的相关函数
查看>>
ES(Elasticsearch)排序与相关性
查看>>
ES(Elasticsearch)分片内部原理
查看>>
Java IO(概述)
查看>>
Java IO(文件、管道、字节和字符数组)
查看>>
Java IO(流、Reader And Writer、异常处理)
查看>>
Java IO(RandomAccessFile、File、PipedInputStream、PipedOutputStream)
查看>>
Java NIO(二) Channel
查看>>