hkshakib

Untitled

Feb 8th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4. int main()
  5. {
  6. int n;
  7. cin>>n;
  8. int arr1[n],arr2[n];
  9. for(int i=0;i<n;i++)
  10. {
  11. cin>>arr1[i];
  12. }
  13. for(int i=0;i<n;i++)
  14. {
  15. cin>>arr2[i];
  16. }
  17. int alice=0,bob=0;
  18. for(int i=0;i<n;i++)
  19. {
  20. if(arr1[i]>arr2[i])
  21. alice++;
  22. if(arr1[i]<arr2[i])
  23. bob++;
  24. }
  25. cout<<alice<<" "<<bob<<endl;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment