当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5503:EarthCup

题目描述
In the year of 2045,the soccer championship is gradually replaced by Earth Super Soccer Cup(We will call it EarthCup for short later).

For one EarthCup,there are $n(n\leq50000)$ soccer teams participated in. Every two teams will have a game. It means that every team will have $n-1$ games with all the other teams.

In order to make the result clear, it is ruled that if the two teams of a game have the same score when the game ends.Penalty shootout will last until there is a result.

In the EarthCup,every team has a Mark,and will score one point after winning a game and zero after losing a game. The team with the highest mark will be the champion.

In the year of 2333, somebody found that some teams had hired hackers to attack and modified the data of the EarthCup for many years.Maybe because of the great amount of the teams, this serious cheating behavior has not been found during hundreds of years.

To check whether the data was modified, they started to check the "Mark Table" in the past.

But because of the long ages, there were only the final Mark of each team reserved. No one remember the exact result of each game.Now they want to find out some "Mark Table" that must have been modified.

"Must have been modified" means we can not get this "Mark Table" by any exact result of each game according to the rules was given by.
输入解释
There is an positive integer $T(T\leq50)$ standing for the number of testcases.

For each testcase, there is an positive integer $n$ standing for the number of teams participate in EarthCup.

The followed n lines describe the "Mark table". The $ith$ integer ${a}_{i}(0\leq {a}_{i} < n)$ standing for the final Mark of the $ith$ team.


Hint:
For the first testcase:
One possible way is:
$Team1$ won $Team2$ and $Team3$,gained $2$ marks.$Team2$ won $Team3$ but lost the game with $Team1$,gained $1$ mark.$Team3$ lost both games and gained 0.

For the second testcase:
It's obviously impossible that all the teams would win all the games.So it must have been modified.
The Input ${a}_{i}$ is disordered.
输出解释
For each testcase, output "The data have been tampered with!"(without quotation) if it must have been modified,otherwise output "It seems to have no problem."(without quotation).
输入样例
2
3
2
1
0
3
2
2
2
输出样例
It seems to have no problem.
The data have been tampered with!
来自杭电HDUOJ的附加信息
Recommend hujie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5503

最后修改于 2020-10-25T23:23:13+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 131072/131072K(Java/Others)