#include <bits/stdc++.h>
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
#define pq priority_queue
#define all(x) begin(x), end(x)
#include <time.h>
#include <cmath>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int i_inf = 1e9;
const ll inf = 1e17;
const ll mod = 1000000007;
const ld eps = 1e-13;
const ld pi = 3.14159265359;
mt19937 _rand(time(NULL));
clock_t timer = clock();
const int mxn = 302;
int n, m, k;
int a[mxn];
int b[mxn];
int dp[mxn][mxn*mxn];
void solve(){
cin >> n >> m >> k;
fr(i, 0, n){
cin >> a[i];
}
fr(i, 0, m){
cin >> b[i];
}
fr(i, 0, n){
if(a[i] < k){
cout<<"Impossible"<<endl;
return;
}
}
fr(i, 1, m+1){
fr(j, 0, mxn*mxn){
dp[i][j] = dp[i-1][j];
if(b[i-1] <= j){
dp[i][j] = max(dp[i][j], dp[i-1][j-b[i-1]]+min(n, b[i-1]));
}
}
}
int sum = 0;
fr(i, 0, n) sum += a[i];
fr(i, 0, mxn*mxn){
if(dp[m][i] >= n*k){
cout<<i-sum<<endl;
return;
}
}
cout<<"Impossible"<<endl;z
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
}
Compilation message
kitchen.cpp: In function 'void solve()':
kitchen.cpp:61:27: error: 'z' was not declared in this scope
cout<<"Impossible"<<endl;z
^