Advertisement
Josif_tepe

Untitled

Feb 9th, 2024
1,020
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int n;
  6.     cin >> n;
  7.    
  8.     int max_points = 0;
  9.     for(int i = 0; i < n; i += 1) {
  10.         int wins, draws, losses;
  11.         cin >> wins >> draws >> losses;
  12.        
  13.         int points = wins * 3 + draws;
  14.        
  15.         if(points > max_points) {
  16.             max_points = points;
  17.         }
  18.        
  19.     }
  20.     cout << max_points << endl;
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement