• [G] Malphite

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Granite Shield(花岗岩护盾) - Malphite is shielded by a layer of rock which absorbs damage up to 10% of his maximum Health.

    If Malphite has not been hit for 10 seconds, this effect recharges.

    To simply this problem all the calculation will in integer not decimal. For example, 15 / 10 is 1 not 1.5.

  • 输入
  • There are muti-case.
    For each case, the first line contain two integer M (0 < m < 10000), N (0 < N < 10000).
    M means to the maximum health, N is the time Malphite is attacked.
    The following N lines, each line contain two integer Ti ( 0 ≤ Ti ≤ 10000), Di (0 < Di ≤ 100), stands for the attack time and the damage.
  • 输出
  • For each test case, output the Malphite's final health value, if Malphite can't afford all these damage, print "I'm dead!".
  • 样例输入
  • 10 2
    1 3
    4 5
    10 2
    1 3
    11 5
    10 1
    11 11
  • 样例输出
  • 3
    4
    I'm dead!
  • 提示
  • 来源
  • Monkeyde17
  • 操作

显示春菜