# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
874625 | josanneo22 | Pairs (IOI07_pairs) | C++17 | 42 ms | 9884 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.
/*
Problem: IOI 2007 Pairs
When: 2023-11-16 14:54:19
Author: Ning07
*/
#include<bits/stdc++.h>
using namespace std;
using i64=long long;
constexpr int NN=2e5;
int N,B,M,D,a[NN],x[NN],y[NN];
void solve1(){
for(int i=0;i<N;i++){
std::cin>>a[i];
}
sort(a,a+N);
i64 ans=0;
for(int i=0;i<N;i++){
int lst=lower_bound(a,a+N,a[i]-D)-a;
ans+=i-lst;
}
std::cout<<ans<<'\n';
}
i64 tr[NN<<1];
void update(int x,i64 v){
x+=NN;
for(;x;x/=2){ tr[x]+=v;}
}
# | 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... |
# | 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... |