#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;
}
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
384 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Correct |
2 ms |
256 KB |
Output is correct |
4 |
Correct |
2 ms |
256 KB |
Output is correct |
5 |
Correct |
2 ms |
256 KB |
Output is correct |
6 |
Correct |
2 ms |
256 KB |
Output is correct |
7 |
Correct |
2 ms |
256 KB |
Output is correct |
8 |
Correct |
2 ms |
256 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |