제출 #346036

#제출 시각아이디문제언어결과실행 시간메모리
346036poom2904버섯 세기 (IOI20_mushrooms)C++14
0 / 100
0 ms364 KiB
#include "mushrooms.h" int count_mushrooms(int n) { std::vector<int> m; int ans=1; for (int i=1;i<n-1+(n&1);i+=2) { m={i,0,i+1}; ans+=2-use_machine(m); } if(n&1==0) { m={n-1,0}; ans+=1-use_machine(m); } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:11:11: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   11 |     if(n&1==0)
      |          ~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...