제출 #501155

#제출 시각아이디문제언어결과실행 시간메모리
501155MrVroom999Nizin (COCI16_nizin)Pypy 3
70 / 100
144 ms65540 KiB
N = int(input()) arr = list(map(int, input().split())) k, i, j = 0, 0, N - 1 while i < j: if arr[i] == arr[j]: i += 1 j -= 1 elif arr[i] < arr[j]: arr[i + 1] += arr[i] i += 1 k += 1 else: arr[j - 1] += arr[j] j -= 1 k += 1 print(k)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...