# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
401347 | idontreallyknow | Kitchen (BOI19_kitchen) | C++17 | 356 ms | 115360 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;
template <typename T> bool chkmax(T &x,T y){return x<y?x=y,true:false;}
template <typename T> bool chkmin(T &x,T y){return x>y?x=y,true:false;}
const int mx = 305, inf = 1e9+5;
int a[mx], b[mx], good[mx*mx], mi[mx][mx*mx], tot;
bitset<mx*mx> bs[mx];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n,m,k;
cin >> n >> m >> k;
bool ok = true;
for (int q = 1; q <= n; q++) {
cin >> a[q];
tot += a[q];
if (a[q] < k) ok = false;
}
vector<int> small, large;
for (int q = 1; q <= m; q++) {
cin >> b[q];
if (b[q] < n) small.push_back(b[q]);
else large.push_back(b[q]);
}
if (!ok) {
cout << "Impossible\n";
return 0;
}
good[0] = 1;
for (int q : small) {
# | 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... |