# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
31570 |
2017-08-30T01:42:32 Z |
minkank |
Hacker (BOI15_hac) |
C++14 |
|
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;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
5920 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
5920 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
5920 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |