제출 #923037

#제출 시각아이디문제언어결과실행 시간메모리
923037tvladm2009Cluedo (IOI10_cluedo)C++17
0 / 100
0 ms356 KiB
#include "grader.h" #include "cluedo.h" #include <iostream> #include <complex> #include <vector> #include <string> #include <algorithm> #include <cstdio> #include <numeric> #include <cstring> #include <ctime> #include <cstdlib> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <list> #include <cmath> #include <bitset> #include <cassert> #include <queue> #include <stack> #include <deque> #include <random> using namespace std; template<typename T1, typename T2> inline void chkmin(T1 &a, T2 b) {if (a > b) a = b;} template<typename T1, typename T2> inline void chkmax(T1 &a, T2 b) {if (a < b) a = b;} #define files(FILENAME) read(FILENAME); write(FILENAME) #define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin) #define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout) #define all(c) (c).begin(), (c).end() #define sz(c) (int)(c).size() #define left left228 #define right right228 #define y1 y1228 #define mp make_pair #define pb push_back #define y2 y2228 #define rank rank228 using ll = long long; using ld = long double; const string FILENAME = "input"; void Solve() { vector<bool> a(7, 0), b(11, 0), c(7, 0); int q = 20; while (q--) { vector<int> v; for (int i = 1; i <= 6; i++) { for (int j = 1; j <= 10; j++) { for (int k = 1; k <= 6; k++) { if (a[i] == 0 || b[j] == 0 || c[k] == 0) { v.pb(i); v.pb(j); v.pb(k); break; } } if (sz(v)) { break; } } if (sz(v)) { break; } } if (v.empty()) { break; } int x = Theory(v[0], v[1], v[2]); if (x == 0) { return; } if (x == 1) { a[v[0]] = 1; } if (x == 2) { b[v[1]] = 1; } if (x == 3) { c[v[2]] = 1; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...