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<bits/stdc++.h>
using namespace std;
void play() {
vector<char> vec(55);
vector<bool> used(51, 0);
for(int i = 1; i <= 50; i++)
{
vec[i] = faceup(i);
if(i%2 == 0 and vec[i] == vec[i-1])
{
used[i] = used[i-1] = true;
}
}
for(int i = 1;i <= 50; i++)
{
for(int j = i+1; j <= 50; j++)
{
if(!used[i] and !used[j] and vec[i] == vec[j])
{
faceup(i), faceup(j);
used[i] = used[j] = true;
break;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |