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: 45ms
Memory: 25316kB
Author: 18989493100
In contest: 1296


x,y=map(int,input().split())

d={}
for i in range(x):
    a=input().split()
    d[a[0]]=int(a[2])
for j in range(y):
    s=d[input()]
    if 90<=s<=100:
        print('A')
    elif 80<=s<90:
        print('B')
    elif 70<=s<80:
        print('C')
    elif 60<=s<70:
        print('OK')
    else:
        print('ARE YOU PIG?')