Advertisement
MiinaMagdy

11799 - Horror Dash

Sep 1st, 2022
947
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. #define ll long long
  6. #define endl '\n'
  7. #define sz(x) int(x.size())
  8. #define all(x) x.begin(), x.end()
  9.  
  10. int main() {
  11.     ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  12.     int test, cnt = 0;
  13.     cin >> test;
  14.     while (test--) {
  15.         int n;
  16.         cin >> n;
  17.         int Max = -1e9, x;
  18.         for (int i = 0; i < n && cin >> x; i++) Max = max(Max, x);
  19.         cout << "Case " << ++cnt << ": " << Max << endl;
  20.     }
  21.     return 0;
  22. }
  23.  
Tags: UVA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement