Problem Link #include <iostream> #include <cstdio> #include <queue> #include <cstring> #include <algorithm> #define sf(i) scanf("%d",&i) #define pf(i) printf("%d ", i) using namespace std; const int N = 10000; int main() { int t, n, k1, k2, k3; int arr[N + 1]; int sum[2015]; int index; long s, val; sf(t); while(t--) { sf(n), sf(k1), sf(k2), sf(k3); priority_queue<long, vector<long>, greater<long>> pq; index = 0; s = 0; for(int i = 0; i < n; i++) { sf(arr[i]); } for(int i = 1; i < n; i++) { ...