# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
908928 | daoquanglinh2007 | Segments (IZhO18_segments) | C++17 | 5101 ms | 22724 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 pii pair <int, int>
#define fi first
#define se second
#define mp make_pair
#define isz(a) (int)(a).size()
const int NM = 2e5, BL = 2e4, S = 450, inf = 2e9+11;
int n, t, type[NM+5], a[NM+5], b[NM+5], id[NM+5], k[NM+5], lastans = 0;
int num = 0, l[NM+5], r[NM+5];
bool del[NM+5];
int sz, sz1, sz2;
vector <pii> v;
vector <int> arr, arr1, arr2;
vector <pii> f[NM+5], g[NM+5], sf[S+5], sg[S+5];
int cnt[NM+5];
void update(vector <pii> f[NM+5], vector <pii> sf[S+5], int x, int y){
if (f[x].empty()) f[x].push_back(mp(y, 1));
else if (f[x].back().fi < y) f[x].push_back(mp(y, f[x].back().se+1));
else f[x].back().se++;
int sx = x/S;
if (sf[sx].empty()) sf[sx].push_back(mp(y, 1));
else if (sf[sx].back().fi < y) sf[sx].push_back(mp(y, sf[sx].back().se+1));
else sf[sx].back().se++;
}
# | 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... |