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 = [69] * N
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)
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
2768 KB |
Output is correct |
2 |
Correct |
14 ms |
2848 KB |
Output is correct |
3 |
Correct |
15 ms |
2828 KB |
Output is correct |
4 |
Correct |
14 ms |
2768 KB |
Output is correct |
5 |
Correct |
13 ms |
2836 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
2768 KB |
Output is correct |
2 |
Correct |
14 ms |
2848 KB |
Output is correct |
3 |
Correct |
15 ms |
2828 KB |
Output is correct |
4 |
Correct |
14 ms |
2768 KB |
Output is correct |
5 |
Correct |
13 ms |
2836 KB |
Output is correct |
6 |
Correct |
53 ms |
3200 KB |
Output is correct |
7 |
Correct |
19 ms |
2988 KB |
Output is correct |
8 |
Execution timed out |
1098 ms |
5756 KB |
Time limit exceeded |
9 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
2768 KB |
Output is correct |
2 |
Correct |
14 ms |
2848 KB |
Output is correct |
3 |
Correct |
15 ms |
2828 KB |
Output is correct |
4 |
Correct |
14 ms |
2768 KB |
Output is correct |
5 |
Correct |
13 ms |
2836 KB |
Output is correct |
6 |
Correct |
53 ms |
3200 KB |
Output is correct |
7 |
Correct |
19 ms |
2988 KB |
Output is correct |
8 |
Execution timed out |
1098 ms |
5756 KB |
Time limit exceeded |
9 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
101 ms |
5120 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
2768 KB |
Output is correct |
2 |
Correct |
14 ms |
2848 KB |
Output is correct |
3 |
Correct |
15 ms |
2828 KB |
Output is correct |
4 |
Correct |
14 ms |
2768 KB |
Output is correct |
5 |
Correct |
13 ms |
2836 KB |
Output is correct |
6 |
Correct |
53 ms |
3200 KB |
Output is correct |
7 |
Correct |
19 ms |
2988 KB |
Output is correct |
8 |
Execution timed out |
1098 ms |
5756 KB |
Time limit exceeded |
9 |
Halted |
0 ms |
0 KB |
- |