# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
835688 | BT21tata | 버섯 세기 (IOI20_mushrooms) | C++17 | 7 ms | 316 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "mushrooms.h"
#include<bits/stdc++.h>
#define pb push_back
using namespace std;
const int BLOCK=251;
vector<int>a, b;
int count_mushrooms(int n)
{
a.pb(0);
if(n<=220)
{
for(int i=1; i<n; i++)
{
int cnt=use_machine({0, i});
if(cnt) b.pb(i);
else a.pb(i);
}
return a.size();
}
if(use_machine({0, 1})) b.pb(1);
else a.pb(1);
if(use_machine({0, 2})) b.pb(2);
else a.pb(2);
for(int i=3; i<BLOCK; i+=2)
{
if(a.size()>=2)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |