# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
430146 | dreezy | 버섯 세기 (IOI20_mushrooms) | C++17 | 884 ms | 1566716 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "mushrooms.h"
using namespace std;
#define pb push_back
#define mp make_pair
vector<vector<int>> queries;
int use(int l, int r){
if(queries[l][r]!= -1) return queries[l][r];
vector<int> q;
if(l != 0)
for(int i =l; i<=r; i++) q.pb(i);
else
q.pb(0), q.pb(r);
int res = use_machine(q);
queries[l][r] = res;
return res;
}
int geta(int l, int r, int prevres){
if( l > r) return 0;
if(l == r)
return use(0,l) == 0;
vector<int> inds;
int res;
//cout << l<<", "<<r<<": "<<prevres<<endl;
if(prevres == -1)
res= use(l, r);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |