# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1133205 | StefanSebez | Counting Mushrooms (IOI20_mushrooms) | C++20 | 1943 ms | 783260 KiB |
#include <bits/stdc++.h>
#include "mushrooms.h"
using namespace std;
#define fi first
#define se second
#define pb push_back
#define ll long long
#define ld long double
mt19937 rng(time(0));
int K=82;
short dp[20001][20001];
int count_mushrooms(int n){
int res=0;
vector<int>ind[2];ind[0].pb(0);
/*int i=1;
for(;i<min(3,n);i++){
vector<int>temp={0,i};
if(use_machine(temp)==0) ind[0].pb(i);
else ind[1].pb(i);
}
while(i+1<n&&max(ind[0].size(),ind[1].size())<K){
if(ind[0].size()>=2){
vector<int>temp={i,ind[0][0],i+1,ind[0][1]};
int x=use_machine(temp);
if(x==3) ind[1].pb(i),ind[1].pb(i+1);
if(x==2) ind[0].pb(i),ind[1].pb(i+1);
if(x==1) ind[1].pb(i),ind[0].pb(i+1);
if(x==0) ind[0].pb(i),ind[0].pb(i+1);
}
else{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |