제출 #1141019

#제출 시각아이디문제언어결과실행 시간메모리
1141019Aliyyiakbar동굴 (IOI13_cave)C++20
0 / 100
2 ms324 KiB
#include "cave.h" #include "bits/stdc++.h" using namespace std; mt19937_64 rng(chrono::steady_clock().now().time_since_epoch().count()); void exploreCave(int n) { int s[n], d[n]; memset(s, 1, sizeof(d)); for (int i = 0; i < n; ++i) { vector<int> v; for (int j = 0; j < n; ++j) { if (!s[j]) continue; v.emplace_back(j); } shuffle(v.begin(), v.end(), rng); for (auto j : v) { s[j] = 0; int query = tryCombination(s); if (query == -1 || query > i) { d[i] = j; break; } s[j] = 1; } } return answer(s, d); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...