Start: Nov, 12, 2017 10:00:00
2017秋Python程序设计基础培训第四次作业
End: Nov, 19, 2017 12:00:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 113ms
Memory: 24436kB
Author: zzzhangxd
In contest: 1124

n,m = map(int,input().strip().split())
d = {}
for i in range(n):
    a = input().strip().split()
    d[a[0]] = int(a[2])   #字典赋值 d[name]=值
for j in range(m):
    s = d[input()]
    if s>=90:
        print("A")
    elif s>=80:
        print("B")
    elif s>=70:
        print("C")
    elif s>=60:
        print("OK")
    else:
        print("ARE YOU PIG?")