RoAlgo Weekly Contest #1 | roboti

This was the problem page during the contest. Access the current page here.
Time limit: 1s Memory limit: 64MB Input: Output:

Task

Sara loves robotics and in the project she is currently running, she built nn robots for which she knows their abilities, expressed in a certain unit of measure. However, KK of them, given by their indices have some vulnerabilties and they may break down, so Sara is now asking you if we take randomly one of the robots with the highest ability, there is a chance of having a vulnerability when testing.

If this happens, print Da (Yes in Romanian), otherwise print Nu (No in Romanian).

Input data

The first line contains two integers, nn and kk.

The second line contains the abilities of the nn robots.

The third line contains the indices of the robots which have vulnerabilities.

Output data

Pe prima linie se va găsi only one message, Da or Nu.

Constraints and clarifications

  • 1KN1001 \leq K \leq N \leq 100
  • 1Ai1001 \leq A_i \leq 100
  • 1BiN1 \leq B_i \leq N, BiBj,1i<jNB_i \neq B_j, \forall 1 \leq i < j \leq N

Example 1

stdin

5 3
6 8 10 7 10
2 3 4

stdout

Da

Explanation

The greatest ability of a robot is 1010. The robots 2,3,42, 3, 4 are vulnerable. Among them, robot 33 has an ability equal to 1010, so there is a possibility that we have a vulnerability when testing one of the robots with maximum ability.

Example 2

stdin

5 2
100 100 100 1 1
5 4

stdout

Nu

Log in or sign up to be able to send submissions!