# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
390877 | AlexPop28 | 버섯 세기 (IOI20_mushrooms) | C++14 | 13 ms | 456 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEFINE
const int K = 4;
#else
const int K = 100; // de ce puii mei baga duplicate pt 141 da pt 100 merge perfect
#endif
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int count_mushrooms(int n) {
if (n <= 2 * 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);
vector<int> pos_a, pos_b;
auto Get = [&]() {
int pos = rng() % n;
while (val[pos] >= 0) pos = rng() % n;
return pos;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |