Advertisement
Ankit_132

A

Feb 21st, 2024
855
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define int long long int
  5. #define double long double
  6. #define endl '\n'
  7.  
  8. const int MOD = 1000000007;
  9.  
  10. void solve(){
  11.     int ans = 0;
  12.     int pt = 0;
  13.     for (int i = 1; i <= 22; i++) {
  14.         int a,b;
  15.         cin>>a>>b;
  16.         int points = a + 20*b;
  17.         if (points>pt){
  18.             pt = points;
  19.             ans = i;
  20.         }
  21.     }
  22.     cout<<ans<<endl;
  23. }
  24.  
  25. signed main()
  26. {
  27.     ios_base::sync_with_stdio(0);
  28.     cin.tie(0);cout.tie(0);
  29.  
  30.     int t=1;
  31.     cin>>t;
  32.     while(t--){
  33.         solve();
  34.     }
  35.  
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement