# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
425463 | 2021-06-13T04:06:57 Z | errorgorn | Lost Array (NOI19_lostarray) | C++17 | 37 ms | 2504 KB |
#include <cstdio> #include <algorithm> using namespace std; int n,m,arr[100005]; int main(){ int a,b,c; scanf("%d%d",&n,&m); while (m--){ scanf("%d%d%d",&a,&b,&c); arr[a]=max(arr[a],c); arr[b]=max(arr[b],c); } for (int x=1;x<=n;x++){ (arr[x]==0) ? printf("1\n"):printf("%d\n",arr[x]); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 2 ms | 332 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 4 ms | 460 KB | Output is correct |
9 | Correct | 1 ms | 384 KB | Output is correct |
10 | Correct | 4 ms | 420 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 2 ms | 332 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 4 ms | 460 KB | Output is correct |
9 | Correct | 1 ms | 384 KB | Output is correct |
10 | Correct | 4 ms | 420 KB | Output is correct |
11 | Correct | 1 ms | 204 KB | Output is correct |
12 | Correct | 1 ms | 204 KB | Output is correct |
13 | Correct | 1 ms | 204 KB | Output is correct |
14 | Correct | 1 ms | 288 KB | Output is correct |
15 | Correct | 1 ms | 292 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 332 KB | Output is correct |
2 | Correct | 17 ms | 556 KB | Output is correct |
3 | Correct | 11 ms | 528 KB | Output is correct |
4 | Correct | 7 ms | 424 KB | Output is correct |
5 | Correct | 2 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 2 ms | 332 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 4 ms | 460 KB | Output is correct |
9 | Correct | 1 ms | 384 KB | Output is correct |
10 | Correct | 4 ms | 420 KB | Output is correct |
11 | Correct | 1 ms | 204 KB | Output is correct |
12 | Correct | 1 ms | 204 KB | Output is correct |
13 | Correct | 1 ms | 204 KB | Output is correct |
14 | Correct | 1 ms | 288 KB | Output is correct |
15 | Correct | 1 ms | 292 KB | Output is correct |
16 | Correct | 6 ms | 332 KB | Output is correct |
17 | Correct | 17 ms | 556 KB | Output is correct |
18 | Correct | 11 ms | 528 KB | Output is correct |
19 | Correct | 7 ms | 424 KB | Output is correct |
20 | Correct | 2 ms | 204 KB | Output is correct |
21 | Correct | 18 ms | 1388 KB | Output is correct |
22 | Correct | 19 ms | 1408 KB | Output is correct |
23 | Correct | 24 ms | 1548 KB | Output is correct |
24 | Correct | 32 ms | 1860 KB | Output is correct |
25 | Correct | 37 ms | 2504 KB | Output is correct |