# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
986689 | JooDdae | Salesman (IOI09_salesman) | C++17 | 357 ms | 42696 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.
#pragma GCC optimize ("O3")
#pragma GCC target ("avx2")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define mid ((l+r) >> 1)
const int INF = 2e9, N = 5e5+1;
int n, u, d, s, mx[500500], t1[500500], t2[500500];
vector<array<int, 2>> v[500500];
void update(int t[], int b, int x) {
while(b <= N) t[b] = max(t[b], x), b += b & -b;
}
int find(int t[], int b) {
int re = -INF;
while(b) re = max(re, t[b]), b -= b & -b;
return re;
}
int main() {
cin.tie(0)->sync_with_stdio(0);
cin >> n >> u >> d >> s;
for(int i=1;i<=n;i++) {
int t, x, y; cin >> t >> x >> y;
v[t].push_back({x, y});
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |