# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
544876 | 4fecta | Candies (JOI18_candies) | C++17 | 183 ms | 16428 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define ld long double
#define pii pair<int, int>
#define f first
#define s second
#define boost() cin.tie(0), cin.sync_with_stdio(0)
const int MN = 200005;
int n, a[MN], vis[MN], ans, take, pre[MN], nxt[MN], len[MN];
struct edge {
int u, v, cost;
};
bool cmp(edge p, edge q) {
return p.cost < q.cost;
}
int32_t main() {
boost();
cin >> n;
n++;
for (int i = 2; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |