File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 44
55### 성능 요약
66
7- 메모리: 110068 KB, 시간: 116 ms
7+ 메모리: 110068 KB, 시간: 112 ms
88
99### 분류
1010
1111너비 우선 탐색, 그래프 이론, 그래프 탐색
1212
1313### 제출 일자
1414
15- 2025년 3월 24일 12:46:55
15+ 2025년 3월 30일 14:34:44
1616
1717### 문제 설명
1818
Original file line number Diff line number Diff line change 44adj = {i : i for i in range (1 , 101 )}
55
66for _ in range (N + M ):
7- x , y = map (int , input ().split ())
8- adj [x ] = y
7+ a , b = map (int , input ().split ())
8+ adj [a ] = b
99
10- q = deque ([(1 , 0 )])
1110visited = [False ] * 101
1211visited [1 ] = True
12+ q = deque ([(1 , 0 )])
13+
1314while q :
14- pos , step = q .popleft ()
15+ now , step = q .popleft ()
1516
16- if pos == 100 :
17+ if now == 100 :
1718 print (step )
1819 break
19-
20+
2021 for i in range (1 , 7 ):
21- next = pos + i
22+ next = now + i
2223 if next > 100 :
2324 continue
2425
You can’t perform that action at this time.
0 commit comments