Submission #311582

#TimeUsernameProblemLanguageResultExecution timeMemory
311582ipaljakCluedo (IOI10_cluedo)C++14
0 / 100
0 ms256 KiB
#include "grader.h" #include "cluedo.h" #include <bits/stdc++.h> using namespace std; vector<int> x[4]; inline void init() { for (int i = 1; i <= 3; ++i) { x[i].clear(); for (int j = 1; j <= 10; ++j) { if (j > 6 && i != 2) break; x[i].push_back(j); } } } void Solve(){ srand(time(NULL)); init(); int g[4]; g[1] = 1 + (rand() % 6), g[2] = 1 + (rand() % 10), g[3] = 1 + (rand() % 6); while (true) { int y = Theory(g[1], g[2], g[3]); printf("%d %d %d %d\n", g[1], g[2], g[3], y); fflush(stdout); if (y == 0) break; x[y].erase(find(x[y].begin(), x[y].end(), g[y])); g[y] = x[y][rand() % (x[y].size())]; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...