# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
203819 | ho94949 | Candies (JOI18_candies) | C++17 | 261 ms | 14624 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 long long INF = 1e18;
const int MAXN = 262144;
int N;
long long arr[MAXN];
int idx[2*MAXN];
void setv(int a, long long v)
{
arr[a] = v;
idx[a+MAXN] = a;
a += MAXN;
while((a=a/2))
{
if(arr[idx[2*a]] < arr[idx[2*a+1]])
idx[a] = idx[2*a+1];
else
idx[a] = idx[2*a];
}
}
int geti()
{
return idx[1];
}
int main()
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |