Submission #111966

# Submission time Handle Problem Language Result Execution time Memory
111966 2019-05-17T02:24:28 Z TexTang None (JOI16_memory2) C++14
0 / 100
2 ms 256 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){
					if(Flip(i,j) == p && !visited[i] && !visited[j]){
						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 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 -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Wrong Answer[2]
2 Halted 0 ms 0 KB -