답안 #517320

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
517320 2022-01-23T03:26:37 Z bebecanvas Lost Array (NOI19_lostarray) C++14
26 / 100
9 ms 1356 KB
#include <bits/stdc++.h>

using namespace std;
#define int long long
#define endl '\n'

signed main(){
 
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    
    int n, m; cin >> n >> m;
    int a[100005]={0};
    
    for(int i=0; i<m; i++){
		int b, c, d; cin >> b >> c >> d;
		a[b]= max(a[b], d);
		a[c]= max(a[c], d);
	}
	
	for(int i=1; i<=n; i++){cout<< a[i] << " ";}
    
    
    
    

	
	
    
  
}


# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1076 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 976 KB Output is correct
4 Correct 1 ms 976 KB Output is correct
5 Correct 1 ms 976 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1076 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 976 KB Output is correct
4 Correct 1 ms 976 KB Output is correct
5 Correct 1 ms 976 KB Output is correct
6 Incorrect 2 ms 1136 KB Output isn't correct
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1076 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 976 KB Output is correct
4 Correct 1 ms 976 KB Output is correct
5 Correct 1 ms 976 KB Output is correct
6 Incorrect 2 ms 1136 KB Output isn't correct
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 1280 KB Output is correct
2 Correct 8 ms 1356 KB Output is correct
3 Correct 9 ms 1232 KB Output is correct
4 Correct 8 ms 1232 KB Output is correct
5 Correct 1 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1076 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 976 KB Output is correct
4 Correct 1 ms 976 KB Output is correct
5 Correct 1 ms 976 KB Output is correct
6 Incorrect 2 ms 1136 KB Output isn't correct
7 Halted 0 ms 0 KB -