#include #include #include using namespace std; int a[302]; int main(){ int i, j, T, n,total; cin >> T; while (T--){ cin >> n; total = 0; for (i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); for (i = 0; i < n; i++){ j = i + 1; while (j