# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
798103 |
2023-07-30T11:15:10 Z |
tch1cherin |
Hacker (BOI15_hac) |
C++17 |
|
0 ms |
212 KB |
// Proof by AC
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N);
for (int &v : A) {
cin >> v;
}
for (int i = 0; i < N; i++) {
A.push_back(A[i]);
}
vector<int> pref(2 * N);
for (int i = 0; i < 2 * N - 1; i++) {
pref[i + 1] = pref[i] + A[i];
}
vector<int> S;
for (int i = (N + 1) / 2; i < N + (N + 1) / 2; i++) {
S.push_back(pref[i] - pref[i - (N + 1) / 2]);
}
sort(S.rbegin(), S.rend());
cout << S[N / 2] << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |