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: 49ms
Memory: 25184kB
Author: 13587685966
In contest: 1296

n,m=map(int,input().split())
d={}
for tcase in range(n):
    a=input().split()
    d[a[0]]=int(a[2])

for tcase in range(m):
    x=d[input()]
    if 90<=x<=100:
        print('A')
    elif 80<=x<=90:
        print('B')
    elif 70<=x<=80:
        print('C')
    elif 60<=x<=70:
        print('OK')
    else:
        print('ARE YOU PIG?')