# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
632589 | Green55 | 버섯 세기 (IOI20_mushrooms) | C++17 | 106 ms | 300 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "mushrooms.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define xx first
#define yy second
#define all(v) (v).begin(), (v).end()
#define query use_machine
int n;
int count_mushrooms(int _n) {
n = _n;
int ret = 1;
for(int i=1; i<n; i+=2) {
if(i+1 == n) {
ret += 1 - query({0, n-1});
break;
}
ret += 2 - query({i, 0, i+1});
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |