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

Problem_ID: C
Result: Accepted
Time: 48ms
Memory: 25316kB
Author: 2018212212099
In contest: 1300

x,y=map(int,input().split())
a=[]
for i in range(x):
    a.append(input().split())
y=int(y)
while y:
    b=input()
    for i in range(x):
        if a[i][0]==b:
            c=int(a[i][2])
            break
    if c>=90 and c<=100:
        print("A")
    elif c>=80 and c<90:
        print("B")
    elif c>=70 and c<80:
        print("C")
    elif c>=60 and c<70:
        print("OK")
    else:
        print("ARE YOU PIG?")
    y=y-1