제출 #432718

#제출 시각아이디문제언어결과실행 시간메모리
432718MOUF_MAHMALAT버섯 세기 (IOI20_mushrooms)C++14
0 / 100
1 ms200 KiB
#include "mushrooms.h" #include<bits/stdc++.h> using namespace std; typedef int ll; ll ans=1,x; int count_mushrooms(int n) { for(ll i=1;i<n;i+=2) { x=use_machine({i,0,i+1}); if(x==0) ans+=2; else if(x==1) ans++; } if(n%2==0) ans+=1^use_machine({0,n-1}); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...