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"
#include <vector>
#include <iostream>
using namespace std;
void play() {
vector<int> left(26,-1);
vector<int> right(26,-1);
vector<bool> solved(26,false);
for (int i=0;i<25;i++) {
char a = faceup((i*2)+1);
char b = faceup((i*2)+2);
// cout << (i*2)+1 << " " << (i*2)+2 << " " << a << " " << b << endl;
if(left[a-'A'] != -1){
right[a-'A'] = (i*2)+1;
}else{
left[a-'A'] = (i*2)+1;
}
if(left[b-'A'] != -1){
right[b-'A'] = (i*2)+2;
}else{
left[b-'A'] = (i*2)+2;
}
if(a==b){
solved[a-'A'] = true;
}
}
// for(int i = 0;i < 26;i++){
// cout << left[i] << " " << right[i] << " " << solved[i] << endl;
// }
for(int i = 0;i < 26;i++){
if(solved[i] == 0){
faceup(left[i]);
faceup(right[i]);
solved[i] = true;
// cout << left[i] << " " << right[i] << endl;
}
}
// for(int i = 0;i < 26;i++){
// cout << left[i] << " " << right[i] << " " << solved[i] << endl;
// }
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |