Estimated time limit: 0.5 seconds. Memory limit: 128 MB.
The deployed limit is twice the largest per-input median runtime of the reference program on the target judge, rounded up to a multiple of
A revision exercise asks you to find the largest integer in a sequence. The exercise requires recursion for the maximum computation.
Given an integer sequence
The implementation must compute the maximum recursively. Any recursive structure is allowed, including removing one element or splitting an interval. Loops may be used for input. This implementation requirement needs source inspection; output checking alone cannot establish compliance.
The first line contains an integer
Print one integer: the maximum value in the sequence.
5
-10000 -2000 -222222 -161616 -1026
-1026
1
-1000000000
-1000000000
7
3 9 -5 9 0 8 9
9
Every value in Sample 1 is negative, and the maximum is
For all inputs:
| Score | Additional conditions |
|---|---|
| 100% | No additional conditions |