#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
vector<int>a(n),b(n);
int x=0,y=0;
for(int i=0;i<n;i++){
cin>>a[i]>>b[i];
if(a[i]==1&&b[i]==1){
x++;
}
if(a[i]==-1 && b[i]==-1){
y++;
}
}
cout<<x<<" "<<y<<endl;
}
if input is
2
-1 -1
0 0
why is output not 0 0?I can’t understand what is happening help me please.
New contributor
Thumma Tejdeep ee21b150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.