# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
792947 | 1bin | Seats (IOI18_seats) | C++14 | 1720 ms | 56636 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 "seats.h"
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
#define all(v) v.begin(), v.end()
typedef long long ll;
const int b = 1 << 20;
int n, lazy[b * 2], W, v[b * 2];
pair<int, int> seg[b * 2];
vector<int> Y, X;
void upd_lazy(int ix, int l, int r){
if(l < n && seg[ix].first == b) seg[ix] = {0, min(n - 1, r) - l + 1};
if(!lazy[ix]) return;
seg[ix].first += lazy[ix];
if(l ^ r){
lazy[ix * 2] += lazy[ix];
lazy[ix * 2 + 1] += lazy[ix];
}
lazy[ix] = 0;
return;
}
void upd(int ix, int nl, int nr, int l, int r, int v){
upd_lazy(ix, nl, nr);
if(nl > r || nr < l) return;
# | 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... |