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 "Memory2_lib.h"
#include <iostream>
#include<vector>
#include<cmath>
using namespace std;
void Solve(int T, int n){
	vector<int>a(2*n);
	for(int i = 0  ; i< 2*n ; i++){
		vector<int>checkodd (n);
		for(int j = 0 ; j<2*n ; j++){
			if(i!=j){
				checkodd[Flip(i,j)]++;
			}
		}
		for(int j  =0 ; j<n ; j++){
			if(checkodd[j]%2==1){
				a[i]=j;
			}
		}
	}
	for(int i = 0 ; i< n ; i++){
		int firstpos=-1 ; int secondpos;
		for(int j = 0 ; j< 2*n ; j++){
			if(a[j]==i &&firstpos==-1){
				firstpos=j;
			}
			else if (a[j]==i){
				secondpos=j;
				Answer(firstpos,secondpos,i);
				break;
			}
		}
	}
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |