# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
340156 | GioChkhaidze | Segments (IZhO18_segments) | C++14 | 2280 ms | 7624 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>
#define pb push_back
using namespace std;
const int N = 2e5 + 5;
const int Sq = 1300;
int A[N], B[N], C[N];
int n, u, t, bl, lastans;
int sq = 1500;
struct st { int x; };
bool operator<(const st& a,const st& b) {
return C[a.x] < C[b.x];
}
struct {
vector < st > u, c, ol;
vector < int > L[N / Sq], R[N / Sq];
void insert(st id) {
u.pb(id);
if (u.size() == sq) {
vector < st > c;
c.reserve(u.size() + ol.size());
sort(u.begin(), u.end());
merge(u.begin(), u.end(), ol.begin(), ol.end(), back_inserter(c));
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |