Submission #386758

#TimeUsernameProblemLanguageResultExecution timeMemory
386758IloveNCounting Mushrooms (IOI20_mushrooms)C++14
25 / 100
139 ms492 KiB
#include<bits/stdc++.h> #include "mushrooms.h" using namespace std; #define ll long long #define pii pair<int,int> #define pll pair<ll,ll> #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define all(vr) vr.begin(),vr.end() #define vi vector<int> #define vll vector<ll> const int N=1e5+10; int count_mushrooms(int n) { int cnt=1; for (int i=1;i<n;i+=2) { vi vt; vt.eb(i); vt.eb(0); if (i+1<n) vt.eb(i+1); cnt+=vt.size()-1-use_machine(vt); } return cnt; }
#Verdict Execution timeMemoryGrader output
Fetching results...