# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
390864 | AlexPop28 | 버섯 세기 (IOI20_mushrooms) | C++14 | 2 ms | 200 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEFINE
const int K = 2;
#else
const int K = 141;
#endif
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int count_mushrooms(int n) {
if (n <= K) {
int ans = 0;
for (int i = 1; i < n; ++i) {
vector<int> curr = {0, i};
ans += use_machine(curr);
}
return n - ans;
}
vector<int> val(n, -1);
val[0] = 0;
auto Get = [&]() {
int pos = rng() % n;
while (val[pos] >= 0) pos = rng() % n;
return pos;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |