제출 #390349

#제출 시각아이디문제언어결과실행 시간메모리
390349MilosMilutinovicCounting Mushrooms (IOI20_mushrooms)C++14
컴파일 에러
0 ms0 KiB
/** * author: milos * created: 16.04.2021 00:04:13 **/ #include <bits/stdc++.h> #include "mushrooms.h" using namespace std; int count_mushrooms(int n) { int ans = 1; for (int i = 1; i < n; i++) { int qs[2]; qs[0] = 0; qs[1] = i; ans += 1 - use_machine(qs); } }

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

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:15:28: error: could not convert '(int*)(& qs)' from 'int*' to 'std::vector<int>'
   15 |     ans += 1 - use_machine(qs);
      |                            ^~
      |                            |
      |                            int*
mushrooms.cpp:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | }
      | ^