# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
872757 | rainboy | Lost Array (NOI19_lostarray) | C11 | 22 ms | 2572 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#define N 100000
int max(int a, int b) { return a > b ? a : b; }
int main() {
static int aa[N];
int n, m, h, i, j, a;
scanf("%d%d", &n, &m);
for (i = 0; i < n; i++)
aa[i] = 1;
for (h = 0; h < m; h++) {
scanf("%d%d%d", &i, &j, &a), i--, j--;
aa[i] = max(aa[i], a), aa[j] = max(aa[j], a);
}
for (i = 0; i < n; i++)
printf("%d ", aa[i]);
printf("\n");
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |