# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
137700 | MAMBA | Ancient Books (IOI17_books) | C++17 | 324 ms | 36264 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;
#define pb push_back
#define rep(i , j , k) for(int i = j; i < (int)k; i++)
typedef long long ll;
const int N = 1e6 + 10;
int par[N];
ll le[N], ri[N], arr[N];
int getPar(int v) {
return v == par[v] ? v : par[v] = getPar(par[v]);
}
inline bool merge(int u , int v) {
if ((u = getPar(u)) == (v = getPar(v)))
return false;
par[v] = u;
return true;
}
inline void smax(ll &a, ll b) {
if (a < b) a = b;
}
# | 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... |