This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "grader.h"
#include "memory.h"
void play() {
char ch;
int flip[25];
bool firstCard = true;
for(int pos = 1;pos <= 50;pos++) {
ch = faceup(pos);
if(firstCard == true) {
if(flip[ch-'A'] != 0) {
faceup(flip[ch-'A']);
}else{
firstCard = false;
}
}else {
if(flip[ch-'A'] != 0) {
faceup(flip[ch-'A']);
faceup(pos);
firstCard = true;
}else {
firstCard = true;
}
}
flip[ch-'A'] = pos;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |