# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1010630 | lrancic | Trading (IZhO13_trading) | C++17 | 2040 ms | 4708 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 <iostream>
#include <vector>
int main() {
int n, m; std::cin >> n >> m;
std::vector<int> prices(n+1);
for (int i = 0; i < m; i++) {
int l, r, x; std::cin >> l >> r >> x;
for (; l <= r; l++, x++) prices[l] = std::max(prices[l], x);
}
for (int i = 1; i <= n; i++) std::cout << prices[i] << ' '; std::cout << '\n';
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |