# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
671420 | Quan2003 | Global Warming (CEOI18_glo) | C++17 | 692 ms | 34908 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>
#include <iostream>
#include<vector>
using namespace std;
typedef long long ll;
const int sz=5e5+10;
const int sz1=1e6+1;
const int inf=1e9 + 7;
const int mod = 1e9 + 7;
int n,m,k,w;
long long d;
long long a[sz];
long long dp[sz];
long long bit[sz];
long long bit1[sz];
void upd0(int x,int diff){
for (int i = x; i < sz; i |= i + 1)
bit[i]= max(bit[i],(1ll)*diff);
}
long long query0(int x){
long long res = 0;
for (int i = x; i >= 0; i = (i & (i + 1)) - 1)
res = max(res,bit[i]);
return res;
}
void upd1(int x,int diff){
for (int i = x; i < sz; i |= i + 1)
bit1[i]= max(bit[i],(1ll)*diff);
}
long long query1(int x){
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |