Advertisement
skb50bd

UVa 11799 Horror Dash

Aug 28th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int N, T, S, i, max;
  6.     cin >> T;
  7.     for(i = 1; i <= T; i++) {
  8.         cin >> N;
  9.         max = 0;
  10.         for(int j = 0; j < N; j++){
  11.             cin >> S;
  12.             max = (S > max) ? S : max;
  13.         }
  14.         cout << "Case " << i << ": " << max << endl;
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement