# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72757 | FLDutchman | Ancient Books (IOI17_books) | C++14 | 4 ms | 980 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 "books.h"
#include <bits/stdc++.h>
using namespace std;
typedef int INT;
#define fst first
#define snd second
#define FOR(i,l,r) for(int i = (l); i < (r); i++)
#define pb push_back
#define int long long
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
int N;
vi p;
vi color;
vii interval;
vii segments;
void expand(int &l, int &r){
//cout << "expanding " << l << " " << r << endl;
int gl = l-1, gr = r+1;
while(l != gl || r != gr){
//cout << l << " " << r << endl;
//cout << gl << " " << gr << endl;
if(l != gl) {l--; gl = min(gl, interval[color[l]].fst); gr = max(gr, interval[color[l]].snd);}
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... |