feat: new greedy problem formated

This commit is contained in:
2026-02-05 23:10:20 -03:00
parent 0f4e453c07
commit a3f93d2e59
143 changed files with 859320 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 1e4, "t");
inf.readEoln();
int sizesSum = 0;
while (t--) {
int n = inf.readInt(2, 2e5, "n");
ensuref(n % 2 == 0, "Number of participants must be even.");
sizesSum += n;
ensuref(sizesSum <= 2e5, "Sum of array sizes over all test cases must not exceed 200.000.");
inf.readEoln();
for (int i = 0; i < n; i++) {
if (i != 0) inf.readSpace();
inf.readInt(-1e9, 1e9, "ai");
}
inf.readEoln();
}
inf.readEof();
return 0;
}