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

x,y = map(int, input().split())
scr = []
sch = []
for i in range(x):
    scr.append(list(input().split()))
for n in scr:
    n[2] = int(n[2])
for i in range(y):
    sch.append(input())


for s in sch:
    for a in scr:
    
        if s == a[0]:
            if a[2] <= 100 and a[2] >= 90:
                print("A")
            elif 80 <= a[2] < 90:
                print("B")
            elif 70 <= a[2] < 80:
                print("C")
            elif 60 <= a[2] < 70:
                print("OK")
            else:
                print("ARE YOU PIG?")