제출 #1035188

#제출 시각아이디문제언어결과실행 시간메모리
1035188Gray버섯 세기 (IOI20_mushrooms)C++17
25 / 100
77 ms596 KiB
#include "mushrooms.h" #define ff first #define ss second #define ll long long #define ln "\n" using namespace std; int count_mushrooms(int n) { std::vector<int> query; int ans=1; for (ll i=1; i<n; i+=2){ if (i+1<n){ query = {int(i), 0, int(i+1)}; ans+=2-use_machine(query); }else{ query = {(int)i, 0}; ans+=1-use_machine(query); } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...