제출 #703123

#제출 시각아이디문제언어결과실행 시간메모리
703123PenguinsAreCute콤보 (IOI18_combo)C++17
30 / 100
40 ms552 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string p = ""; char c[4]; c[0] = 'A'; c[1] = 'B'; c[2] = 'X'; c[3] = 'Y'; for(int j = 0; j < 4; j++) { if(j == 0) p += c[j]; else p[0] = c[j]; if(j == 3 || press(p) == 1) { if(j != 3) swap(c[j], c[3]); break; } } srand(4206969420); for(int i = 1; i < N; i++) { for(int j = 1; j < 3; j++) { int k = rand() % (j + 1); if(k != j) swap(c[j], c[k]); } for(int j = 0; j < 3; j++) { if(j == 0) p += c[j]; else p[i] = c[j]; if(j == 2 || press(p) == i + 1) break; } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...