# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
111967 |
2019-05-17T02:27:42 Z |
TexTang |
None (JOI16_memory2) |
C++14 |
|
3 ms |
384 KB |
#include "Memory2_lib.h"
#include <iostream>
using namespace std;
void Solve(int T, int N){
pair <int,int> a[N];
bool visited[2*N];
for(int i = 0;i < 2*N;i++) visited[i] = false;
for(int p = N - 1;p >= 0;p--){
for(int i = 0;i < 2*N;i++){
for(int j = 0;j < 2*N;j++){
if(i != j && !visited[i] && !visited[j]){
if(Flip(i,j) == p){
a[p].first = i;
a[p].second = j;
visited[i] = true;
visited[j] = true;
i = 2*N;
break;
}
}
}
}
}
for(int i = 0;i < N;i++){
//cout << a[i].first << a[i].second << i << endl;
Answer(a[i].first, a[i].second, i);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
256 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
384 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |