# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
886422 | karimov | Trading (IZhO13_trading) | C++17 | 2051 ms | 5472 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 FAST ios_base::sync_with_stdio(false); cin.tie(NULL);
#define fio(x) freopen(x".in","r",stdin);freopen(x".out","w",stdout)
void YES(bool t=1){std::cout<<(t?"YES\n":"NO\n");}
void NO(bool t=1){YES(!t);}
const int MOD = 1000000007;
//#define int long long
#define pb push_back
#define ll long long
#define all(x) (x).begin(), (x).end()
void solve() {
int n,m;
cin >> n >> m;
vector<int> v(n+1,0);
while(m--) {
int a,b,c;
cin >> a >> b >> c;
for(int i = a; i <= b; i++) {
v[i] = max(v[i],c);
c++;
}
}
for(int i = 1; i <= n; i++)cout<<v[i]<<" ";
}
int main() {
FAST
solve();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |