# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1099342 | andreiqwer | Cluedo (IOI10_cluedo) | C++17 | 0 ms | 0 KiB |
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[6], ju[10], ku[6];
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)
}
/*
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;
}
}
}
*/
}