제출 #526517

#제출 시각아이디문제언어결과실행 시간메모리
526517bebecanvasLost Array (NOI19_lostarray)C++14
컴파일 에러
0 ms0 KiB
s = input().split(' ')

N = int(s[0])
M = int(s[1])


x = [0] * N
for i in range(M):
    ans = input().split(' ')
    A = int(ans[0]) - 1
    B = int(ans[1]) - 1
    C = int(ans[2])
    x[A] = max(x[A], C)
    x[B] = max(x[B], C)

    
output = ''
for i in x:
    output = output + str(i) + ' '
print(output)

컴파일 시 표준 에러 (stderr) 메시지

lostarray.cpp:17:10: error: empty character constant
   17 | output = ''
      |          ^~
lostarray.cpp:1:1: error: 's' does not name a type
    1 | s = input().split(' ')
      | ^