제출 #1360385

#제출 시각아이디문제언어결과실행 시간메모리
1360385AgageldiCluedo (IOI10_cluedo)C++20
0 / 100
1089 ms412 KiB
#include "bits/stdc++.h"
// #include "grader.cpp"
#include "grader.h"
#include "cluedo.h"
using namespace std;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

int a[5];

int getRand(int l, int r){
   return l + rng() % (r - l + 1);
}
void Solve() {
   a[1] = a[2] = a[3] = 0;
   while(1) {
      int x = getRand(1,6);
      int y = getRand(1,6);
      int z = getRand(1,6);
      while(a[x] == 1) x = getRand(1,6);
      while(a[y] == 1) y = getRand(1,10);
      while(a[z] == 1) z = getRand(1,6);
      int vl = Theory(x, y, z);
      if(!vl) return;
      if(vl == 1) {
         a[x] = 1;
      }
      if(vl == 2) {
         a[y] = 1;
      }
      if(vl == 3) {
         a[z] = 1;
      }
   }
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…