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: 66ms
Memory: 25320kB
Author: 13372527218
In contest: 1296

x,y = map(int,input().split())
dic = {}
for i in range(x):
    n,m,s = input().split()
    dic[n] = [m,int(s)]

for i in range(y):
    a = input()
    score = dic[a][1]
    if 90<=score<=100:
        print("A")
    elif 80<=score<90:
        print("B")
    elif 70<=score<80:
        print("C")
    elif 60<=score<70:
        print("OK")
    elif score<60:
        print("ARE YOU PIG?")