선릉역 1번 출구
baekjoon - 14467 본문
백준 14467 - 소가 길을 건너간 이유
https://www.acmicpc.net/problem/14467
n = int(input()) start = [0] * 11 pos = [0] * 11 count = 0 for i in range(n): num, left_right = map(int, input().split()) if start[num] == 1: if pos[num] != left_right: count += 1 pos[num] = left_right else: start[num] = 1 pos[num] = left_right print(count) |
'Algorithm > Algorithm 문제풀이' 카테고리의 다른 글
baekjoon - 2161 (0) | 2021.10.03 |
---|---|
baekjoon - 15886 (0) | 2021.10.03 |
baekjoon - 15500 (0) | 2021.10.03 |
baekjoon - 1912 (0) | 2021.09.16 |
baekjoon - 14002 (0) | 2021.09.16 |
Comments