Advertisement
Jayss8

WCIPEG Max Flow (C++)

Jul 7th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int t, n, a, b;
  8.  
  9.     cin >> t;
  10.  
  11.     for (int i = 0; i < t; i++)
  12.     {
  13.         cin >> n;
  14.         b = 0;
  15.  
  16.         for (int f = 0; f < n; f++)
  17.         {
  18.             cin >> a;
  19.             if (a > b)
  20.             {
  21.                 b = a;
  22.             }
  23.         }
  24.         cout << b << endl;
  25.     }
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement