| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1345111 | thaibaotran555 | JJOOII 2 (JOI20_ho_t2) | C++20 | 0 ms | 356 KiB |
#include <bits/stdc++.h>
using namespace std;
const string NAME = "test";
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define maxN 2000
#define TEST 100
long long rnd(long long l, long long r)
{
return abs((long long)rng() % (r-l+1)) + l;
}
void genTest()
{
ofstream inp((NAME + ".INP").c_str());
int n = rnd(3, maxN);
int k = rnd(1, n/3);
char c[3] = {'J', 'O', 'I'};
string cur;
for(int i = 0; i < n; i++)
{
int tmp = rnd(0, 2);
cur += c[tmp];
}
inp << n << " " << k << '\n';
inp << cur;
}
bool genCheck()
{
ifstream out1((NAME + ".OUT").c_str());
ifstream out2((NAME + ".ANS").c_str());
int ans1, ans2;
out1 >> ans1;
out2 >> ans2;
return ans1 == ans2;
}
int main()
{
for(int i = 1; i <= TEST; i++)
{
genTest();
system(".\\main.exe");
system(".\\brute.exe");
if(genCheck())
cout << "Test " << i << ": AC\n";
else
{
cout << "Test " << i << ": WA\n";
exit(0);
}
}
return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
