This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "chameleon.h"
#include <vector>
using namespace std;
void Solve(int N)
{
vector<bool>matched(2*N + 1,0);
for (int a = 1; a <= (2 * N); a++)
{
if (matched[a])
{
continue;
}
for (int b = (a + 1); b <= (2 * N); b++)
{
if (matched[b])
{
continue;
}
vector<int>vec = {a,b};
if (Query(vec) == 1)
{
Answer(a,b);
matched[a] = true;
matched[b] = true;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |