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"
#ifndef EVAL
#include "grader.cpp"
#endif
#include "bits/stdc++.h"
using namespace std;
array<char, 2> ask(array<int, 2> in){
array<char, 2> res;
//~ for(int i=0;i<2;i++) cout<<in[i]<<" ";
//~ cout<<endl;
for(int i=0;i<2;i++){
res[i] = faceup(in[i]);
} return res;
}
void play() {
int n = 50;
vector<char> val(n);
vector<array<int, 2>> in(25, (array<int, 2>){-1, -1});
for(int i=0;i+1<n;i+=2){
array<char, 2> tmp = ask({i+1, i+2});
val[i] = tmp[0], val[i+1] = tmp[1];
}
for(int i=0;i<n;i++){
if(~in[val[i] - 'A'][0]) in[val[i] - 'A'][1] = i + 1;
else in[val[i] - 'A'][0] = i + 1;
}
for(int i=0;i<25;i++){
ask(in[i]);
}
}
/*
AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYY
*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |