#include "Memory2_lib.h"
#include <bits/stdc++.h>
using namespace std;
int n;
void f(vector <int> v){
random_shuffle(v.begin(),v.end());
int j=v[v.size()/2];
vector <int> ve,a[51];
for (int i:v)
if (i!=j)
a[Flip(i,j)].push_back(i);
for (int i=0;i<n;i++){
if (a[i].empty())
continue;
if (a[i].size()<3){
cout << "-";
if (a[i].size()==1)
Answer(min(a[i][0],j),max(a[i][0],j),i);
else
Answer(a[i][0],a[i][1],i);
continue;
}
a[i].push_back(j);
f(a[i]);
}
}
void Solve(int T, int N){
vector <int> v;
n=N;
for (int i=0;i<n*2;i++)
v.push_back(i);
f(v);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
Do not print anything on standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Do not print anything on standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Do not print anything on standard output. |
2 |
Halted |
0 ms |
0 KB |
- |