Submission #526520

# Submission time Handle Problem Language Result Execution time Memory
526520 2022-02-15T06:00:56 Z bebecanvas Lost Array (NOI19_lostarray) C++14
Compilation error
0 ms 0 KB
s = input().split(' ')
 
N = int(s[0])
M = int(s[1])
 
 
x = [1] * 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)
 
for i in x:
    print(i)
    print(" ")

Compilation message

lostarray.cpp:1:1: error: 's' does not name a type
    1 | s = input().split(' ')
      | ^