반응형
n = int(input())
temp=0
temp_counter={}
for i in range(n):
    a,b = map(int,input().split())
    if a in list(temp_counter.keys()):
        if b != temp_counter[a]:
            temp +=1
            temp_counter[a]=b
    else:
        temp_counter[a]=b

print(temp)
반응형

+ Recent posts