• [1180] Appreciate the Landscape

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Ah, the landscape is so beautiful!
    The mountains are arranged one by one.
    Wait! I think the scenery is so familiar! The heights of mountains are the same as the mountains at the beginning!

    Give you the heights of N mountains (1 <= heights <= 95) and give you a number K. You should tell me how many times the heights of mountains will be same as the most front K Mountains.
  • 输入
  • This problem contains several cases.
    The first line of each case is two integers N and K (1 <= K <= N <= 50000).
    Then follow a line with N heights.
  • 输出
  • For each case, you should output how many times the heights of mountains will be same as the most front K Mountains.
  • 样例输入
  • 10 3
    1 2 1 2 1 2 1 2 1 90
    
  • 样例输出
  • 3
    
  • 提示
  • 时间改成1000ms。
  • 来源
  • XadillaX
  • 操作

显示春菜