실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:17:10: error: invalid use of non-static member function ‘std::queue<_Tp, _Sequence>::size_type std::queue<_Tp, _Sequence>::size() const [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::queue<_Tp, _Sequence>::size_type = long unsigned int]’ 17 | cout << q.size << endl; | ~~~~~^~~~~~~~~ In file included from /usr/include/c++/11/queue:64, from Main.cpp:2: /usr/include/c++/11/bits/stl_queue.h:208:7: note: declared here 208 | size() const | ^~~~ Main.cpp:18:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::queue<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 18 | for (int j = q.front(); j <= q.size(); j++) { | ~~^~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.