Advertisement
fahimkamal63

Compute the skills

May 17th, 2019
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main(){
  4.     int t; cin >> t;
  5.     while(t--){
  6.         int a[3], b[3], i;
  7.         for(i = 0; i < 3; i++) cin >> a[i];
  8.         for(i = 0; i < 3; i++) cin >> b[i];
  9.         int score_a = 0, score_b = 0;
  10.         for(i = 0; i < 3; i++){
  11.             if(a[i] < b[i]) score_b++;
  12.             else if(a[i] > b[i]) score_a++;
  13.         }
  14.         cout << score_a << ' ' << score_b << endl;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement