제출 #421822

#제출 시각아이디문제언어결과실행 시간메모리
421822Mohammed_Atalah버섯 세기 (IOI20_mushrooms)C++17
10 / 100
264 ms552 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; int count_mushrooms(int n) { vector<int> indices; for (int i = 0; i < n; i++) { indices.push_back(i); } if (use_machine(indices) == 0) { return n; } int bs = 0; for (int i = 1; i < n; i++) { std::vector<int> v; v.push_back(0); v.push_back(i); if (use_machine(v) == 1) { bs++; } } return n - bs; }
#Verdict Execution timeMemoryGrader output
Fetching results...