Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long int
- #define double long double
- #define endl '\n'
- const int MOD = 1000000007;
- void solve(){
- int ans = 0;
- int pt = 0;
- for (int i = 1; i <= 22; i++) {
- int a,b;
- cin>>a>>b;
- int points = a + 20*b;
- if (points>pt){
- pt = points;
- ans = i;
- }
- }
- cout<<ans<<endl;
- }
- signed main()
- {
- ios_base::sync_with_stdio(0);
- cin.tie(0);cout.tie(0);
- int t=1;
- cin>>t;
- while(t--){
- solve();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement