Skip to content

Commit d39baf7

Browse files
committed
Create 1728A-ColoredBallsRevisited.cpp
1 parent e469e11 commit d39baf7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

1728A-ColoredBallsRevisited.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <cstdio>
2+
3+
int main(){
4+
5+
long t; scanf("%ld", &t);
6+
while(t--){
7+
long n; scanf("%ld", &n);
8+
long mx(0), ans(0);
9+
for(long p = 1; p <= n; p++){
10+
long x; scanf("%ld", &x);
11+
if(x > mx){mx = x; ans = p;}
12+
}
13+
14+
printf("%ld\n", ans);
15+
}
16+
17+
}

0 commit comments

Comments
 (0)