# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
667158 | havij | Toll (BOI17_toll) | C++17 | 330 ms | 524288 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;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
const ll MAXN = 5e4 + 20;
const ll MOD = 1e9 + 7;
const ll INF = 1e17;
#define pb push_back
#define Mp make_pair
#define F first
#define S second
#define Sz(x) int((x).size())
#define endll '\n'
ll dp[10][MAXN], ans[MAXN], n, k;
vector <pii> adj[MAXN], adj2[MAXN];
vector <pair <pii, int>> vec[4 * MAXN];
void find(int ind, int l, int r, int s = 0, int e = (n - 1) / k + 1){
int mid = (s + e) / 2, L = mid * k, R = L + k;
if(l <= R && r >= L) vec[mid].pb(Mp(Mp(l, r), ind)); return;
if(r < L) find(ind, l, r, s, mid);
else find(ind, l, r, mid, e);
}
void upd(int s, int e, bool f){
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... |