개발공부/문제풀기

COCI '18 Contest 4 #1 Elder

맙소사 2022. 6. 22. 22:59
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#처음 마법사
wizard = input()
 
#게임횟수
playtime = int(input())
 
#지팡이 지난 횟수
history = 1
 
for i in range(playtime) :
    winner, loser = input().split()
    if loser == wizard :
        wizard = winner
        history += 1
 
print(wizard)
print(history)
cs

 

얼룩소책 문제

어떻게 다들 5점을 받는거지 ...? 다른사람들 코드 보는 기능이 없는 것 같아서 조금 불편하다. 

https://dmoj.ca/problem/coci18c4p1