# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
209413 | model_code | Mountains (NOI20_mountains) | C++17 | 111 ms | 6264 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;
constexpr int MAXN=300'000;
int n;
struct {
int data_[MAXN+1];
int query(int index){
int ret=0;
for(;index>0;index-=(index&-index)){
ret+=data_[index];
}
return ret;
}
void update(int index){
for(++index;index<=n;index+=(index&-index)){
++data_[index];
}
}
} fw;
pair<long long, int> arr[MAXN];
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin>>n;
assert(3<=n&&n<=MAXN);
for(int i=0;i<n;++i){
cin>>arr[i].first;
assert(0<=arr[i].first&&arr[i].first<=1'000'000'000'000'000'000ll);
arr[i].second=i;
# | 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... |