#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; int sum_goods = 0; int sum_cap = 0; vector<int> goods(n,0); vector<int> cap(n,0); for(int i = 0;i < n; i++){ cin >> goods[i]; s...