Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- int main(){
- int n;
- while(n!=0){
- scanf("%d", &n);
- int A=0, B=0;
- for(int i=0; i<n; i++){
- int a, b;
- scanf("%d %d", &a, &b);
- if(a>b){A++;}
- else if(a<b){B++;}
- else if (a==b){A==A, B==B;}
- }
- if(n!=0){printf("%d %d", A, B);}
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement