#include "memory.h"
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
void play() {
map<char, int> found;
queue<pii> q;
int face_up = 0;
for (int i = 1; i <= 50; i++) {
char card = faceup(i);
face_up++;
if (found.find(card) != found.end()) {
if (face_up == 1) {
faceup(found[card]);
face_up++;
} else {
faceup(i);
faceup(found[card]);
}
}
found[card] = i;
face_up %= 2;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |