#C10600. Determine Challenge Winners

    ID: 39824 Type: Default 1000ms 256MiB

Determine Challenge Winners

Determine Challenge Winners

You are given N participants and M challenges. Each challenge has a time limit. For each participant, you are provided with the time taken to complete each challenge. A participant is considered to have successfully completed all challenges if for every challenge, their time is less than or equal to the corresponding time limit.

Your task is to determine the list of participant numbers (1-indexed) who have met the time limit for all challenges. If none of the participants qualify, output No Winners.

Note: The participant numbers should be printed in increasing order. If using formulas, note that the check can be expressed as:

\( \text{participant}_i \text{ qualifies if } \forall j \; (t_{ij} \leq L_j) \)

inputFormat

The input is given via standard input and has the following format:

  • The first line contains two integers N and M, where N is the number of participants and M is the number of challenges.
  • The second line contains M integers, representing the time limits for each challenge.
  • Each of the next N lines contains M integers. The i-th of these lines represents the times taken by the i-th participant to complete each challenge.

outputFormat

Print a single line to standard output.

  • If there is at least one participant who qualifies, print their participant numbers (starting from 1) separated by a space.
  • If no participant qualifies, print No Winners.
## sample
3 4
10 12 20 15
8 10 18 12
9 11 25 14
12 14 19 13
1

</p>