Submission #304424

#TimeUsernameProblemLanguageResultExecution timeMemory
304424arnold518Counting Mushrooms (IOI20_mushrooms)C++14
25 / 100
123 ms256 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; int N; int query(vector<int> V) { return use_machine(V); } int count_mushrooms(int _N) { N=_N; int ans=1; for(int i=1; i+1<N; i+=2) { ans+=2-query({i, 0, i+1}); } if(N%2==0) ans+=1-query({0, N-1}); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...