Start: Jul, 17, 2019 00:00:00
20190717Python程序设计基础培训扩展练习
End: Jul, 21, 2019 00:00:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 47ms
Memory: 25316kB
Author: 15968366420
In contest: 1296

def dengji(s):
    if 90<=s<=100:
        return "A"
    elif s>=80:
        return "B"
    elif s>=70:
        return "C"
    elif s>=60:
        return "OK"
    else: return "ARE YOU PIG?"
x,y=map(int,input().split())
a=[[0 for j in range(3)] for i in range(x)]
for i in range(x):
    b=list(input().split())
    a[i][0]=int(b[0])
    a[i][1]=b[1]
    a[i][2]=int(b[2])
for i in range(y):
    num=int(input())
    for j in a:
        if j[0]==num:
            print(dengji(j[2]))