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"
int par[26],tpares;
void play()
{
for(int i=1;tpares<25 and i<=50;i+=2)
{
char c1,c2;
c1=faceup(i);
if(par[c1-'A'+1]==0)
{
par[c1-'A'+1]=i;
c2=faceup(i+1);
if(par[c2-'A'+1]==0)
{
par[c2-'A'+1]=i+1;
}
else
{
if(c1!=c2)
i--;
else
tpares++;
}
}
else
{
c2=faceup(par[c1-'A'+1]);
i--;
tpares++;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |