# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
320967 |
2020-11-10T11:27:46 Z |
lohacho |
None (JOI16_memory2) |
C++14 |
|
1 ms |
512 KB |
#include "Memory2_lib.h"
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
void Solve(int T, int N){
N *= 2;
int pos[2] = {0, 1};
int pval = Flip(pos[0], pos[1]);
for(int i = 2; i < N; ++i){
int val[2] = {Flip(pos[0], i), Flip(pos[1], i)};
if(val[0] == val[1]){
continue;
}
if(pval == val[0]){
pos[0] = i; pval = val[1];
}
else{
pos[1] = i; pval = val[0];
}
}
int ans[104];
ans[pos[0]] = ans[pos[1]] = pval;
for(int i = 0; i < N; ++i){
if(i == pos[0] || i == pos[1]){
continue;
}
ans[i] = Flip(i, pos[0]);
}
for(int i = 0; i < N; ++i){
if(ans[i] == -1){
continue;
}
for(int j = i + 1; j < N; ++j){
if(ans[i] == ans[j]){
Answer(i, j, ans[i]);
ans[j] = -1;
break;
}
}
}
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Wrong Answer[3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
384 KB |
Output is correct |
4 |
Incorrect |
1 ms |
384 KB |
Wrong Answer[3] |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
512 KB |
Wrong Answer[3] |
2 |
Halted |
0 ms |
0 KB |
- |