Submission #951720

#TimeUsernameProblemLanguageResultExecution timeMemory
951720Trisanu_DasCounting Mushrooms (IOI20_mushrooms)C++17
25 / 100
69 ms596 KiB
#include "mushrooms.h" #include <bits/stdc++.h> #define all(x) x.begin(), x.end() #define chmin(x, v) x = min(x, v) #define chmax(x, v) x = max(x, v) #define pb push_back #define pii pair<int, int> #define sz(x) (int)x.size() #define x first #define y second; //#define int long long using namespace std; int count_mushrooms(int n) { int nb = 0; for (int i = 1; i < n; i += 2){ vector<int> query = {i, 0}; if (i + 1 < n) query.pb(i + 1); nb += use_machine(query); } return n - nb; }
#Verdict Execution timeMemoryGrader output
Fetching results...