제출 #247296

#제출 시각아이디문제언어결과실행 시간메모리
247296cheehengMouse (info1cup19_mouse)C++14
13 / 100
9 ms384 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; static const int Nmax = 500; int query(vector<int> q); vector<int> q[51]; int x[51]; void solve(int N){ if(N <= 7){ for(int i = 0; i < 49; i ++){ q[i] = vector<int>(); for(int j = 1; j <= N; j ++){ q[i].push_back(j); } random_shuffle(q[i].begin(), q[i].end()); x[i] = query(q[i]); if(x[i] == N){return;} } vector<int> p; for(int i = 1; i < N+1; i ++){ p.push_back(i); } do{ int match = 1; for(int k = 0; k < 49; k ++){ int score = 0; for(int i = 0; i < N; i ++){ score += (p[i] == q[k][i]); } if(score != x[k]){ match = 0; } } if(match){query(p);return;} }while(next_permutation(p.begin(), p.end())); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...