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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "grader.h"
#include "cluedo.h"
bool iu[7], ju[11], ku[7];
void Solve()
{
int i=1, j=1, k=1;
int t=Theory(i, j, k);
iu[1]=true;
ju[1]=true;
ku[1]=true;
while(t!=0)
{
if(t==1)
{
while(iu[i]==true)
i=rand()%6+1;
iu[i]=true;
}
if(t==2)
{
while(ju[j]==true)
j=rand()%10+1;
ju[j]=true;
}
if(t==3)
{
while(ku[k]==true)
k=rand()%10+1;
ku[k]=true;
}
t=Theory(i, j, k);
}
return;
/*
for(int i=1; i<=6; i++)
{
for(int j=1; j<=10; j++)
{
for(int k=1; k<=6; k++)
{
if(Theory(k, j, i)==0)
return;
}
}
}
*/
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |