# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
284336 | Alexa2001 | Matryoshka (JOI16_matryoshka) | C++17 | 341 ms | 16368 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 = 2e5 + 5;
int A[Nmax], B[Nmax], C[Nmax], D[Nmax], ans[Nmax];
vector<int> as;
int n, q;
class AIB
{
int a[Nmax];
int ub(int x)
{
return (x&(-x));
}
public:
int query(int x)
{
x = lower_bound(as.begin(), as.end(), x) - as.begin() + 1;
int ans = 0;
for(; x<=n; x+=ub(x))
ans = max(ans, a[x]);
return ans;
# | 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... |