Submission #1098256

#TimeUsernameProblemLanguageResultExecution timeMemory
1098256SSKMFCluedo (IOI10_cluedo)C++17
100 / 100
8 ms344 KiB
#include <bits/stdc++.h>
#include "grader.h"
#include "cluedo.h"
using namespace std;

void Solve ()
{
    mt19937 generator(chrono::steady_clock::now().time_since_epoch().count());
    vector <int> valoare({1 , 1 , 1}) , candidati({2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10});
    while (int rezultat = Theory(valoare[0] , valoare[1] , valoare[2])) {
        if (rezultat != 2)
            { valoare[rezultat - 1]++; }
        else
        {
            const int locatie = generator() % candidati.size();
            valoare[1] = candidati[locatie];
            candidati.erase(candidati.begin() + locatie);
        }
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...