Submission #632589

#TimeUsernameProblemLanguageResultExecution timeMemory
632589Green55Counting Mushrooms (IOI20_mushrooms)C++17
25 / 100
106 ms300 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; #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 timeMemoryGrader output
Fetching results...