# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
843726 | mickey080929 | Memory 2 (JOI16_memory2) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Memory2_lib.h"
#include <bits/stdc++.h>
using namespace std;
int ret[110];
int cnt[110];
int chk[110];
vector<int> ans[110];
void Solve(int T, int N) {
int r = 2 * N;
while (true) {
if (r == 2) {
int x = -1, y = -1;
for (int i=0; i<2*N; i++) {
if (!chk[i]) {
if (x == -1) x = i;
else y = i;
}
}
ans[Flip(x, y)] = {x, y};
break;
}
int idx = rand() % r;
int pv;
for (int i=0; i<2*N; i++) {
if (!chk[i]) {
if (idx == 0) {
pv = i;