# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
285522 | lukameladze | Mountains (NOI20_mountains) | C++14 | 539 ms | 15384 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;
long long tree[1000005],j,n,ans,x,y,id,fix[300005],raod;
pair <long long , long long > a[300005];
vector <long long> v;
void inc(int idx, int val)
{
for (int i=idx; i<=n; i+=i&(-i))
{
tree[i]+=val;
}
}
long long getans (int idx)
{
long long pas=0;
for (int i=idx; i>0; i-=i&(-i))
{
pas+=tree[i];
}
return pas;
}
int main()
{
cin>>n;
for (int i=1; i<=n; i++)
{
cin>>a[i].first;
a[i].second=i;
}
sort(a+1,a+n+1);
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... |