제출 #720431

#제출 시각아이디문제언어결과실행 시간메모리
720431nguyentunglam버섯 세기 (IOI20_mushrooms)C++17
10 / 100
212 ms336 KiB
#include "mushrooms.h" #include<bits/stdc++.h> using namespace std; int count_mushrooms(int n) { int type = 1, cur = 0; vector<int> v = {0}; int res = 1; for(int i = 1; i < n; i++) { v.push_back(i); if (!use_machine(v)) res++; v.pop_back(); } return res; }

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

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:6:9: warning: unused variable 'type' [-Wunused-variable]
    6 |     int type = 1, cur = 0;
      |         ^~~~
mushrooms.cpp:6:19: warning: unused variable 'cur' [-Wunused-variable]
    6 |     int type = 1, cur = 0;
      |                   ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...