P26804 [AtCoder] Marks
入门
题目描述

Problem Description

M-kun is a student at Aoki High School. Aoki High School uses an N-term system, dividing the academic year into N terms.
Each term has one final exam, and the score determines the term grade as follows:

  • Grades for terms from 1 to \( K-1 \): Not assigned.
  • Grades for terms from \( K \) to \( N \): The product of the scores from the most recent \( K \) final exams including the current term.

M-kun scored \( A_i \) points in the final exam of the \( i \)-th term.
For each \( i \) satisfying \( K+1 \leq i \leq N \), determine if the grade for the \( i \)-th term is strictly higher than the grade for the \( i-1 \)-th term.

Input Format

The input is given from the standard input in the following format:

\( N \) \( K \) \( A_1 \) \( A_2 \) \( A_3 \) \( \ldots \) \( A_N \)

Output Format

Output \( N-K \) lines.
The \( i \)-th line should contain Yes if the grade for the \( K+i \)-th term is higher than the grade for the \( K+i-1 \)-th term, otherwise No.

Sample Input and Output

Sample Input #1

5 3
96 98 95 100 20

Sample Output #1

Yes
No

Sample Input #2

3 2
1001 869120 1001

Sample Output #2

No

Sample Input #3

15 7
3 1 4 1 5 9 2 6 5 3 5 8 9 7 9

Sample Output #3

Yes
Yes
No
Yes
Yes
No
Yes
Yes

Notes/Hints

Constraints

  • \( 2 \leq N \leq 200000 \)
  • \( 1 \leq K \leq N-1 \)
  • \( 1 \leq A_i \leq 10^{9} \)
  • All inputs are integers

Sample Explanation 1

M-kun's grades for each term are calculated as follows:
- Term 3: \( (96 \times 98 \times 95) = 893760 \)
- Term 4: \( (98 \times 95 \times 100) = 931000 \)
- Term 5: \( (95 \times 100 \times 20) = 190000 \)

Sample Explanation 2

Note that if the grade for term 3 is the same as the grade for term 2, you must output No.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
5 3 96 98 95 100 20
样例输出
Yes No