Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int t, n, a, b;
- cin >> t;
- for (int i = 0; i < t; i++)
- {
- cin >> n;
- b = 0;
- for (int f = 0; f < n; f++)
- {
- cin >> a;
- if (a > b)
- {
- b = a;
- }
- }
- cout << b << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement