제출 #1134877

#제출 시각아이디문제언어결과실행 시간메모리
1134877TheInvadrLost Array (NOI19_lostarray)C++20
100 / 100
49 ms840 KiB
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int arr[n+1]; for(int i =0;i<n;i++)arr[i+1]=1; for(int i = 0;i<m;i++){ int a,b,c; cin>>a>>b>>c; arr[a]=max(arr[a],c); arr[b]=max(arr[b],c); } for(int i = 0;i<n;i++)cout<<arr[i+1]<<" "; }
#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...