Submission #971662

# Submission time Handle Problem Language Result Execution time Memory
971662 2024-04-29T07:05:33 Z Halym2007 Bali Sculptures (APIO15_sculpture) C++17
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
#define ll long long
ll a[N];

int main () {
	ll n, A, B, sum = 0;
	cin >> n >> A >> B;
	for (int i = 1; i <= n; ++i) {
		cin >> a[i];
		sum += a[i];
	}
	ll jogap = sum;
	ll sum1 = 0;
	for (int i = 1; i <= n; ++i) {
		sum1 += a[i];
		sum -= a[i];
		jogap = min (jogap, sum | sum1);
	}
	cout << jogap;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -