Submission #721005

# Submission time Handle Problem Language Result Execution time Memory
721005 2023-04-10T03:36:46 Z dungnguyenn_05 Cluedo (IOI10_cluedo) C++17
0 / 100
1000 ms 208 KB
#include<bits/stdc++.h>
#include "grader.h"
#include "cluedo.h"
using namespace std;

bool a[20],b[20],c[20];

void Solve()
{
    while(1)
    {
        bool ok=0;

        for(int i1=1;i1<7;i1++)
            if(!a[i1])
            {
                for(int i2=1;i2<11;i2++)
                    if(!b[i2])
                    {
                        for(int i3=1;i3<7;i3++)
                            if(!c[i3])
                            {
                                int val=Theory(i1,i2,i3);
                                if(!val)
                                {
//                                    Solve();
                                    return;
                                }

                                if(val==1)
                                    a[i1]=1;

                                if(val==2)
                                    b[i2]=1;

                                if(val==3)
                                    c[i3]=1;

                                ok=1;
                                break;
                            }

                        if(ok) break;
                    }

                if(ok) break;
            }

    }
}
# Verdict Execution time Memory Grader output
1 Execution timed out 3066 ms 208 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3060 ms 208 KB Time limit exceeded
2 Halted 0 ms 0 KB -