# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
256615 |
2020-08-03T02:13:16 Z |
super_j6 |
Hacker (BOI15_hac) |
C++14 |
|
54 ms |
10360 KB |
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second
const int mxn = 1000001;
int n;
ll a[mxn];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for(int i = 1; i <= n; i++){
cin >> a[i];
a[n + i] = a[i];
a[i] += a[i - 1];
}
ll ret = 1000000000000000;
for(int i = n + 1; i <= n + (n + 1) / 2; i++){
a[i] += a[i - 1];
ret = min(ret, a[i] - a[i - (n + 1) / 2]);
}
cout << ret << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
0 ms |
384 KB |
Output is correct |
3 |
Correct |
1 ms |
384 KB |
Output is correct |
4 |
Correct |
8 ms |
1920 KB |
Output is correct |
5 |
Correct |
16 ms |
4224 KB |
Output is correct |
6 |
Correct |
23 ms |
5368 KB |
Output is correct |
7 |
Correct |
31 ms |
6392 KB |
Output is correct |
8 |
Correct |
54 ms |
10360 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |