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: 48ms
Memory: 25312kB
Author: 13587528131
In contest: 1296

x,y=map(int,input().split())
lst=[]
for i in range(x):
    lst.append(input().split())
for i in range(y):
    s=input()
    for i in range(x):
        if s==lst[i][0]:
            if int(lst[i][2])>=90:
                print("A")
            elif int(lst[i][2])>=80:
                print("B")
            elif int(lst[i][2])>=70:
                print("C")
            elif int(lst[i][2])>=60:
                print("OK")
            else:
                print("ARE YOU PIG?")
            break