제출 #499774

#제출 시각아이디문제언어결과실행 시간메모리
499774Khizri버섯 세기 (IOI20_mushrooms)C++17
0 / 100
0 ms200 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; #define pb push_back bool ask(int l,int r){ vector<int>vt; for(int i=l;i<=r;i++){ vt.pb(i); } int x; if(vt.size()>1){ x=use_machine(vt); } else{ x=0; } if(x==0){ return true; } return false; } int count_mushrooms(int n) { int x=1; int ans=1; for(int i=1;i<n;i++){ if(use_machine({i,i-1})){ x=1-x; } ans++; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...