이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |