# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
161952 | Alexa2001 | Bigger segments (IZhO19_segments) | C++17 | 147 ms | 20984 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 = 5e5 + 5;
typedef long long ll;
ll s[Nmax];
int n, a[Nmax];
pair<int, ll> dp[Nmax];
class AIB
{
int a[Nmax];
int ub(int x) { return (x&(-x)); }
public:
int query(int x)
{
int ans = 0;
for(; x; x-=ub(x)) ans = max(ans, a[x]);
return ans;
}
void update(int x, int y)
{
for(; x<=n; x+=ub(x)) a[x] = max(a[x], y);
}
} aib;
# | 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... |