# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
429904 | APROHACK | Counting Mushrooms (IOI20_mushrooms) | C++14 | 318 ms | 736 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;
#define PB push_back
int count_mushrooms(int n) {
vector<int> rta, m;
int fin = 0;
rta.PB(0);
for(int i = 0 ; i < n-1 ; i++){
if(rta.back()==0)fin++;
int ans;
m.PB(i), m.PB(i+1);
ans = use_machine(m);
if(ans){
rta.PB(abs(rta.back()-1));
}else{
rta.PB(rta.back());
}
m.pop_back();
m.pop_back();
}
if(rta.back()==0)fin++;
return fin;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |