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: 48ms
Memory: 25316kB
Author: 18605753875
In contest: 1300

x,y=map(int,input().split())
score_dict={}
for xx in range(x):
    n,m,s=input().split()
    score_dict[n]=int(s)
for yy in range(y):
    roll=input()
    score=score_dict[roll]
    if score>=90:
        print('A')
    elif score>=80:
        print('B')
    elif score>=70:
        print('C')
    elif score>=60:
        print('OK')
    else:
        print('ARE YOU PIG?')