# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
966428 | oviyan_gandhi | Examination (JOI19_examination) | C++17 | 3080 ms | 10636 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>
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
using namespace std;
using namespace __gnu_pbds;
typedef pair<int, int> pii;
typedef tree<pii, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> oset;
#define N 100000
#define S 320
pii s[N]; // {s, t}
struct Query {
int x, y, c, i;
bool operator < (const Query &o) const {
if (x/S != o.x/S) return x > o.x;
return y < o.y;
}
};
Query qu[N];
int ans[N];
set<pii> st, disc; // {t, i}
oset sc; // {s + t, i}
int32_t main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, q; cin >> n >> q;
for (int i = 0; i < n; i++)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |