#include using namespace std; using ll=long long; const int INF=1e9; /* Library: https://yukicoder.me/users/24530/ai_code */ int main() { cin.tie(nullptr),cout.tie(nullptr); ios::sync_with_stdio(false); int n,m; cin >> n >> m; vector a(n); for(int i=0; i> a[i]; } sort(a.rbegin(),a.rend()); vector b(m); for(int i=0; i> b[i]; } sort(b.rbegin(),b.rend()); ll kai=0; ll p=0; ll k=0; ll maxw=0; for(int i=0; i