# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
53327 | Alexa2001 | Cake (CEOI14_cake) | C++17 | 794 ms | 92468 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;
const int Nmax = 250005, Nr = 1e6;
typedef long long ll;
int n, start, x, y, i, Q, End;
int where[Nmax], prv[Nmax], nxt[Nmax];
char tip;
int Cnt[Nmax], A[Nmax];
class AIB
{
int a[Nmax];
int n, lg;
inline int ub(int x) { return (x&(-x)); }
public:
void init(int _n)
{
n = _n;
for(lg = 0; (1<<lg) <= n; ++lg); --lg;
}
int queryMax(int pos)
{
int ans = 0;
for(; pos; pos-=ub(pos)) ans = max(ans, a[pos]);
return ans;
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... |