Submission #526525

#TimeUsernameProblemLanguageResultExecution timeMemory
526525HoneybeeLost Array (NOI19_lostarray)Cpython 3
52 / 100
1089 ms16432 KiB
s = input().split(' ') N = int(s[0]) M = int(s[1]) x = [1] * N 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[A] = max(x[A], C) x[B] = max(x[B], C) output = '' for i in x: output = output + str(i) + ' ' print(output)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...