# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1010506 | bornag | Trading (IZhO13_trading) | C++14 | 2012 ms | 5868 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |