Submission #526523

# Submission time Handle Problem Language Result Execution time Memory
526523 2022-02-15T06:07:49 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])
 
querys = []
 
for i in range(M):
    ans = input().split(' ')
    A = int(ans[0]) - 1
    B = int(ans[1]) - 1
    C = int(ans[2])
    querys.append([A, B, C])
 
x = []
for i in range(N):
	x.append(1)
 
for i in querys:
    x[i[0]] = max(x[i[0]], i[2])
    x[i[1]] = max(x[i[1]], i[2])
    
output = ''
for i in x:
    output = output + str(i) + ' '
print(output)

Compilation message

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