Submission #1010506

#TimeUsernameProblemLanguageResultExecution timeMemory
1010506bornagTrading (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...