# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
604374 | Plurm | Uplifting Excursion (BOI22_vault) | C++11 | 3106 ms | 1788 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;
class negarr {
private:
int data[63750 * 2 + 1];
public:
negarr() { memset(data, 0, sizeof(data)); }
void reset() { fill(data, data + 63750 * 2 + 1, -1000000000); }
int &operator[](int i) { return data[i + 63750]; }
};
negarr a, knapsack;
int main() {
int m;
long long l;
cin >> m >> l;
if (l > 63750 || l < -63750) {
printf("impossible\n");
return 0;
}
knapsack.reset();
knapsack[0] = 0;
for (int i = -m; i <= m; i++) {
cin >> a[i];
for (int rep = 0; rep < a[i]; rep++) {
negarr tmp;
tmp.reset();
for (int id = -63750; id <= 63750; id++) {
if (-63750 <= id + i && id + i <= 63750)
# | 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... |
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |