编程介的小学生 2017-05-21 09:27 采纳率: 20.5%
浏览 991
已采纳

War

Problem Description
War is the reciprical and violent application of force between hostile political entities aimed at bringing about a desired political end-state via armed conflict. War is an interaction in which two or more militaries have a “struggle of wills”. When qualified as a civil war, it is a dispute inherent to a given society, and its nature is in the conflict over modes of governance rather than sovereignty. War is not considered to be the same as mere occupation,murder or genocide because of the reciprical nature of the violent struggle, and the organized nature of the units involved.
War is also a cultural entity, and its practice is not linked to any single type of political organisation or society. Rather, as discussed by John Keegan in his “History Of Warfare”, war is a universal phenomenon whose form and scope is defined by the society that wages it.

  Today we don't want to talk about war, rather than , I want you to tell me which year there was no war.

Input
For each test case, first input one integer N(1<= N <= 100), then two integers p and q (-6000000 <= p <= q <= 6000000) represent the starting year and the ending year in this case. Followed by N wars.
Each war described as follows:
Ai Bi Ni (A,B is integer, p <= A, B <= q, Ni is a String which is the ith war's name )
Represent that the ith War took place between year A and year B.

Output
Output one number represent which year there was no war in the range p and q, if there are not only one year, output the maximum year which there was no war. If all the year had war, just output "Badly!".

Sample Input
3
100 200
100 120 RtWar
110 140 WeWar
141 199 QqWar
1
-600 600
-600 600 Cool War

Sample Output
200
Badly!

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-05-23 17:42
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog