실행 실패 (제출 코드 컴파일 에러)
Main.cpp:6:14: error: ‘int time’ redeclared as different kind of entity 6 | int N, K, L, time, ended; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h:35, from /usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h:148, from /usr/include/c++/11/ext/atomicity.h:35, from /usr/include/c++/11/bits/ios_base.h:39, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:2: /usr/include/time.h:76:15: note: previous declaration ‘time_t time(time_t*)’ 76 | extern time_t time (time_t *__timer) __THROW; | ^~~~ Main.cpp: In function ‘void init()’: Main.cpp:27:9: error: reference to ‘rotate’ is ambiguous 27 | rotate.push({a, b}); | ^~~~~~ In file included from /usr/include/c++/11/deque:62, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:1405:5: note: candidates are: ‘template<class _FIter> constexpr _FIter std::_V2::rotate(_FIter, _FIter, _FIter)’ 1405 | rotate(_ForwardIterator __first, _ForwardIterator __middle, | ^~~~~~ Main.cpp:13:24: note: ‘std::queue<std::pair<int, char> > rotate’ 13 | queue<pair<int, char>> rotate; | ^~~~~~ Main.cpp: In function ‘void rotation()’: Main.cpp:59:27: error: reference to ‘rotate’ is ambiguous 59 | pair<int, char> cur = rotate.front(); | ^~~~~~ In file included from /usr/include/c++/11/deque:62, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:1405:5: note: candidates are: ‘template<class _FIter> constexpr _FIter std::_V2::rotate(_FIter, _FIter, _FIter)’ 1405 | rotate(_ForwardIterator __first, _ForwardIterator __middle, | ^~~~~~ Main.cpp:13:24: note: ‘std::queue<std::pair<int, char> > rotate’ 13 | queue<pair<int, char>> rotate; | ^~~~~~ Main.cpp:60:5: error: reference to ‘rotate’ is ambiguous 60 | rotate.pop(); | ^~~~~~ In file included from /usr/include/c++/11/deque:62, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:1405:5: note: candidates are: ‘template<class _FIter> constexpr _FIter std::_V2::rotate(_FIter, _FIter, _FIter)’ 1405 | rotate(_ForwardIterator __first, _ForwardIterator __middle, | ^~~~~~ Main.cpp:13:24: note: ‘std::queue<std::pair<int, char> > rotate’ 13 | queue<pair<int, char>> rotate; | ^~~~~~ Main.cpp: In function ‘void solve()’: Main.cpp:74:9: warning: ISO C++ forbids incrementing a pointer of type ‘time_t (*)(time_t*) noexcept’ {aka ‘long int (*)(long int*) noexcept’} [-Wpointer-arith] 74 | time++; | ^~~~ Main.cpp:74:9: error: lvalue required as increment operand Main.cpp:77:21: error: reference to ‘rotate’ is ambiguous 77 | if (time == rotate.front().first) | ^~~~~~ In file included from /usr/include/c++/11/deque:62, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:1405:5: note: candidates are: ‘template<class _FIter> constexpr _FIter std::_V2::rotate(_FIter, _FIter, _FIter)’ 1405 | rotate(_ForwardIterator __first, _ForwardIterator __middle, | ^~~~~~ Main.cpp:13:24: note: ‘std::queue<std::pair<int, char> > rotate’ 13 | queue<pair<int, char>> rotate; | ^~~~~~ Main.cpp:80:13: warning: the address of ‘time_t time(time_t*)’ will never be NULL [-Waddress] 80 | cout << time; | ^~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.