제출 #1010506

#제출 시각아이디문제언어결과실행 시간메모리
1010506bornag거래 (IZhO13_trading)C++14
0 / 100
2012 ms5868 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long const int maxn = 300007; int n, m; ll li, ri, xi; ll values[maxn]; int main(){ cin >> n >> m; for(int i = 0; i < m; i++){ cin >> li >> ri >> xi; for(int j = li-1; j < ri; j++){ values[j] = max(values[j], xi); xi++; } } for(int i = 0; i < n; i++) cout << values[i] << ' '; }
#Verdict Execution timeMemoryGrader output
Fetching results...