| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 729871 | NeroZein | Homecoming (BOI18_homecoming) | C++17 | 46 ms | 17616 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 "homecoming.h"
#include <bits/stdc++.h>
using namespace std;
long long solve(int N, int K, int *A, int *B) {
int n, k;
n = N, k = K;
vector<int> a(n), b(n);
for (int i = 0; i < n; ++i) {
a[i] = A[i], b[i] = B[i];
}
long long ans = 0;
for (int i = 0; i < n; ++i) {
long long s = a[i];
for (int j = 0; j < k; ++j) {
int cur = (i + j) % n;
s -= b[cur];
}
ans += max(0LL, s);
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
