이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <vector>
#include "grader.h"
#include "memory.h"
void play() {
std::vector<int> index_of(50, -1);
int next = 1;
for (int correct = 0; correct < 25;) {
int first = faceup(next) - 'A';
if (index_of[first] != -1) {
faceup(index_of[first]);
correct += 1;
next += 1;
} else {
index_of[first] = next;
next += 1;
int second = faceup(next) - 'A';
if (second == first) {
correct += 1;
next += 1;
} else if (index_of[second] != -1) {
faceup(next);
faceup(index_of[second]);
correct += 1;
next += 1;
} else {
index_of[second] = next;
next += 1;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |