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: 74ms
Memory: 25312kB
Author: 13738671695
In contest: 1300

x,y=map(int,input().split())
a=[]
for case in range(x):
    a.append(input().split())
for i in range(y):
    b=input()
    for j in range(len(a)):
        if b==a[j][0]:
            s=int(a[j][2])
            if s>=90 and s<=100:
                print('A')
            elif s>=80 and s<90:
                print('B')
            elif s>=70 and s<80:
                print('C')
            elif s>=60 and s<70:
                print('OK')
            else:
                print('ARE YOU PIG?')