Submission #676482

#TimeUsernameProblemLanguageResultExecution timeMemory
676482penguin133Lost Array (NOI19_lostarray)C++17
100 / 100
83 ms2568 KiB
#include <bits/stdc++.h> using namespace std; int A[200005]; int main(){ int n,m,a,b,c;cin >> n >> m; for(int i=1;i<=m;i++)cin >> a >> b >> c, A[a] = max(A[a], c), A[b] = max(A[b], c); for(int i=1;i<=n;i++)cout << max(1, A[i]) << " " ; }
#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...