#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll N, M, W, K, L, ans=0; cin >> N >> M >> W; K = 1< A(N), B(M), C(M), SA(N+1), SB(K), SC(K); for (int i=0; i> A[i]; sort(A.begin(), A.end(), greater()); for (int i=0; i> B[i]; for (int j=0; j> C[j]; for (int i=0; i>j & 1){ SB[i] += B[j]; SC[i] += C[j]; } } } for (int i=0; i