My issue
I don’t know what is wrong with my code
My code
#include <iostream>
#include <vector>
using namespace std;
int main() {
int t; cin >> t;
while(t--){
int n; cin >> n;
int g = 0;
for(int i = 0; i < 7; i++){
int a;
cin >> a;
if(a > g){
g = a;
}
}
for(int i = 7; i < n; i++){
int a;
cin >> a;
}
cout << g << endl;
}
return 0;
}
Problem Link: BALLOON Problem - CodeChef