• [1270] Lecturefield

  • 时间限制: 10000 ms 内存限制: 65535 K
  • 问题描述
  • Upgrade of the Zhuge Liang words Confucianism upgrade
    Faced with Zhuge Liang words Confucianism of Zero, Three-God wants to upgrade it , just bacause it's such an easy problem and do not suitable for you ~ ~ ~
    Zhuge Liang's IQ is N, every duel will reduce Zhuge liang's IQ ~ ~ ~
    To win for Shu country,Zhuge Liang must win as more enemies as he can,and let the defeated enemies's name order by lexicographic。
  • 输入
  • This problem contains several cases.
    The first line of each case is two integers N and M. (0 < N < 2^32 0 < M < 10000)
    Then follows the M lines.
    Each line is two integers Name and The IQ.(The name is a string of 1 20 letters.0 < IQ < 2^32);
  • 输出
  • Printf the number of Zhugeliang has be win , and all name that has be lost by Geliang Zhu by lexicographic order.
  • 样例输入
  • 100 4
    a 10
    c 20
    b 30
    d 100
  • 样例输出
  • 3
    a
    b
    c
  • 提示
  • 来源
  • three-god
  • 操作

显示春菜