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 <iostream>
#include <algorithm>
using namespace std;
int N;
int X[10000007];
int Y[10000007];
int ans;
bool comp(int a, int b){
return Y[a]>Y[b];
}
int main(){
cin>>N;
for(int i=0;i<N;i++)
cin>>X[i]>>Y[i];
for(int i=0;i<N;i++)
for(int j=0;j<N;j++)
if(i!=j and abs(X[i]-X[j])<=Y[j]-Y[i]){
ans++;
break;
}
cout<<N-ans;
}
# | 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... |