Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include <iostream>
- using namespace std;
- int x[201],y[201];
- int main(){
- int n,p=0,l=0,v=0,ni=0,cnt=0;
- cin>>n;
- for(int i=1;i<=n;i++){
- cin>>x[i]>>y[i];
- }
- for(int i=1;i<=n;i++){
- for(int j=1;j<=n;j++){
- if(x[j]==x[i] && y[j]>y[i]){
- v=1;
- }
- if(x[j]==x[i] && y[j]<y[i]){
- ni=1;
- }
- if(x[j]>x[i] && y[j]==y[i]){
- p=1;
- }
- if(x[j]<x[i] && y[j]==y[i]){
- l=1;
- }
- }
- if(l==1 && p==1 && ni==1 && v==1){
- cnt++;
- }
- l=0;
- p=0;
- ni=0;
- v=0;
- }
- cout<<cnt;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement