feat: new problem being formated.

This commit is contained in:
2026-04-28 23:01:57 -03:00
parent 9c0eca4a3f
commit 1045a54db2
15 changed files with 6473 additions and 0 deletions

8
ra-preguicosa/src/ac.cpp Normal file
View File

@@ -0,0 +1,8 @@
#include <bits/stdc++.h>
using namespace std;
int main(){
return 0;
}

View File

@@ -0,0 +1,12 @@
#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
setName("Set the name of your checker here");
registerTestlibCmd(argc, argv);
return 0;
}

View File

@@ -0,0 +1,83 @@
#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MIN_N = 0;
const int MAX_N = 100;
const int rnd_test_n = 100;
template <typename T> void append(vector<T> &dest, const vector<T> &orig) {
dest.insert(dest.end(), orig.begin(), orig.end());
}
string output_tc(int x, int y) {
ostringstream oss;
oss << x << " " << y << endl;
return oss.str();
}
vector<string> generate_sample_tests() {
vector<string> tests;
tests.push_back(output_tc(1, 1));
tests.push_back(output_tc(2, 2));
tests.push_back(output_tc(0, 0));
return tests;
}
vector<string> generate_manual_tests() {
vector<string> tests;
tests.push_back(output_tc(100, 0));
tests.push_back(output_tc(0, 100));
return tests;
}
string rnd_test(int i){
int min_n = MIN_N;
int max_n = MAX_N;
if(i<rnd_test_n / 3){
max_n = 5;
}
else if(i<rnd_test_n / 2){
max_n = 20;
}
int x = rnd.next(min_n, max_n);
int y = rnd.next(min_n, max_n);
return(output_tc(x, y));
}
vector<string> generate_random_tests() {
vector<string> tests;
for (int i = 0; i < rnd_test_n; i++){
tests.push_back(rnd_test(i));
}
return tests;
}
string extreme_test_1(){
return(output_tc(100, 100));
}
vector<string> generate_extreme_tests(){
vector<string> tests;
tests.push_back(extreme_test_1());
return tests;
}
int main(int argc, char *argv[]) {
registerGen(argc, argv, 1);
vector<string> tests;
size_t test = 0;
append(tests, generate_sample_tests());
append(tests, generate_manual_tests());
append(tests, generate_random_tests());
append(tests, generate_extreme_tests());
for (const auto &t : tests) {
startTest(++test);
cout << t;
}
return 0;
}

View File

@@ -0,0 +1 @@
generator

5963
ra-preguicosa/src/testlib.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
while (true) {
int C = inf.readInt(1, 1000, "C");
inf.readSpace();
int R = inf.readInt(1, 1000, "R");
inf.readEoln();
if (C == 0 && R == 0) break;
int Cf, Rf, Ct, Rt;
Cf = inf.readInt(1, C, "Cf");
inf.readSpace();
Rf = inf.readInt(1, R, "Rf");
inf.readSpace();
Ct = inf.readInt(1, C, "Ct");
inf.readSpace();
Rt = inf.readInt(1, R, "Rt");
inf.readEoln();
int W = inf.readInt(0, 1000, "W");
inf.readEoln();
for (int i = 0; i < W; i++) {
int C1, C2, R1, R2;
C1 = inf.readInt(1, C, "C1");
inf.readSpace();
C2 = inf.readInt(1, C, "C2");
inf.readSpace();
R1 = inf.readInt(1, R, "R1");
inf.readSpace();
R2 = inf.readInt(1, R, "R2");
inf.readEoln();
}
}
inf.readEof();
return 0;
}