# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
695070 | vjudge1 | Fountain (eJOI20_fountain) | C++17 | 435 ms | 23116 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 ll long long
#define i128 __int128_t
#define pii pair<int, int>
#define oo 1e9 + 9
using namespace std;
int n;
vector<int> d;
vector<int> c;
vector<vector<int>> par;
vector<vector<ll>> st;
vector<int> msb;
void build(){
msb.resize(n + 1, 0);
for (int i = 2; i <= n; i++)
{
msb[i] = msb[i / 2] + 1;
}
st.resize(msb[n] + 1, vector<ll>(n + 1));
par.resize(msb[n] + 1, vector<int>(n + 1));
stack<int> s;
s.push(n);
for (int i = n; i >= 1; i--)
{
while(d[s.top()] <= d[i] && i != n){
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... |