# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
112013 |
2019-05-17T05:29:15 Z |
lauzm0 |
None (JOI16_memory2) |
C++14 |
|
2 ms |
384 KB |
#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 |
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 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |