# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
255598 | karma | Bigger segments (IZhO19_segments) | C++14 | 129 ms | 46296 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 emplace_back
#define ll long long
#define fi first
#define se second
#define mp make_pair
//#define int int64_t
using namespace std;
const int N = int(5e5) + 7;
const int inf = 2e9 + 1;
typedef pair<ll, ll> pii;
ll s[N], ff;
int f[N], n;
struct TVector {
vector<pii> f;
void push(pii cur) {
while(f.size() && f.back().fi >= cur.fi) f.pop_back();
if(f.empty() || f.back().se < cur.se) f.pb(cur);
}
pii get(pii cur) {
return *prev(lower_bound(f.begin(), f.end(), cur));
}
} g, q[N];
int32_t main() {
ios_base::sync_with_stdio(0);
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... |