답안 #31570

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
31570 2017-08-30T01:42:32 Z minkank Hacker (BOI15_hac) C++14
0 / 100
89 ms 5920 KB
#include <bits/stdc++.h>
using namespace std;

const int N = 5e5 + 5;

int s[N], a[N], n;

int main() {
    cin >> n;
    for(int i = 1; i <= n; ++i) cin >> a[i], a[i + n] = a[i];
    for(int i = 1; i <= 2 * n; ++i) s[i] = s[i - 1] + a[i];
    int len = (n + 1) / 2, ans = 2e9;
    for(int i = n + 1 - len + 1; i <= n + 1; ++i) ans = min(ans, s[i + len - 1] - s[i - 1]);
    cout << ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 5920 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 5920 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 5920 KB Output is correct
2 Correct 0 ms 5920 KB Output is correct
3 Correct 0 ms 5920 KB Output is correct
4 Correct 19 ms 5920 KB Output is correct
5 Correct 53 ms 5920 KB Output is correct
6 Correct 73 ms 5920 KB Output is correct
7 Runtime error 89 ms 5920 KB Execution killed with signal 11 (could be triggered by violating memory limits)
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 5920 KB Output isn't correct
2 Halted 0 ms 0 KB -