# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
785072 | Alfraganus | 동굴 (IOI13_cave) | C++14 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// #include "cave.h"
#include "graderlib.c"
#include <bits/stdc++.h>
using namespace std;
void exploreCave(int n)
{
int a[n], d[n];
vector<int> used(n, -1);
for (int i = 0; i < n; i++)
{
int l = 0, r = n - 1;
while (l < r)
{
int m = (l + r) >> 1;
for (int j = l; j < r; j++)
{
if (used[j] == -1)
a[j] = 0;
else
a[j] = used[j];
}
for (int j = 0; j < l; j++)
a[j] = used[j];
for (int j = r; j < n; j++)
a[j] = used[j];
int k = tryCombination(a);
if (k == i)
l = m + 1;
else
r = m;
}
d[i] = l;
used[i] = a[i];
}
answer(a, d);
}
컴파일 시 표준 에러 (stderr) 메시지
In file included from cave.cpp:2: graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ graderlib.c:11:4: error: expected unqualified-id before 'while' 11 | } while(0) | ^~~~~ /usr/include/c++/10/bits/basic_ios.h: In member function 'std::basic_ios<_CharT, _Traits>::operator bool() const': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/ios:44, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from cave.cpp:3: /usr/include/c++/10/bits/basic_ios.h:118:23: error: expected ';' before 'do' 118 | { return !this->fail(); } | ^ | ; In file included from cave.cpp:2: /usr/include/c++/10/bits/basic_ios.h: In member function 'bool std::basic_ios<_CharT, _Traits>::operator!() const': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/ios:44, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from cave.cpp:3: /usr/include/c++/10/bits/basic_ios.h:126:22: error: expected ';' before 'do' 126 | { return this->fail(); } | ^ | ; In file included from cave.cpp:2: /usr/include/c++/10/bits/ostream.tcc: In member function 'std::basic_ostream<_CharT, _Traits>::pos_type std::basic_ostream<_CharT, _Traits>::tellp()': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/ostream:784, from /usr/include/c++/10/istream:39, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from cave.cpp:3: /usr/include/c++/10/bits/ostream.tcc:242:15: error: expected ')' before 'do' 242 | if (!this->fail()) | ~ ^ | ) In file included from cave.cpp:2: /usr/include/c++/10/bits/ostream.tcc: In member function 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::seekp(std::basic_ostream<_CharT, _Traits>::pos_type)': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/ostream:784, from /usr/include/c++/10/istream:39, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from cave.cpp:3: /usr/include/c++/10/bits/ostream.tcc:263:15: error: expected ')' before 'do' 263 | if (!this->fail()) | ~ ^ | ) In file included from cave.cpp:2: /usr/include/c++/10/bits/ostream.tcc: In member function 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::seekp(std::basic_ostream<_CharT, _Traits>::off_type, std::ios_base::seekdir)': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/ostream:784, from /usr/include/c++/10/istream:39, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from cave.cpp:3: /usr/include/c++/10/bits/ostream.tcc:295:15: error: expected ')' before 'do' 295 | if (!this->fail()) | ~ ^ | ) In file included from cave.cpp:2: /usr/include/c++/10/bits/istream.tcc: In member function 'std::basic_istream<_CharT, _Traits>::pos_type std::basic_istream<_CharT, _Traits>::tellg()': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/istream:991, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from cave.cpp:3: /usr/include/c++/10/bits/istream.tcc:835:19: error: expected ')' before 'do' 835 | if (!this->fail()) | ~ ^ | ) In file included from cave.cpp:2: /usr/include/c++/10/bits/istream.tcc: In member function 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::seekg(std::basic_istream<_CharT, _Traits>::pos_type)': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/istream:991, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from cave.cpp:3: /usr/include/c++/10/bits/istream.tcc:865:19: error: expected ')' before 'do' 865 | if (!this->fail()) | ~ ^ | ) In file included from cave.cpp:2: /usr/include/c++/10/bits/istream.tcc: In member function 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::seekg(std::basic_istream<_CharT, _Traits>::off_type, std::ios_base::seekdir)': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/istream:991, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from cave.cpp:3: /usr/include/c++/10/bits/istream.tcc:904:19: error: expected ')' before 'do' 904 | if (!this->fail()) | ~ ^ | ) In file included from cave.cpp:2: /usr/include/c++/10/bits/regex.tcc: In member function 'int std::__cxx11::regex_traits< <template-parameter-1-1> >::value(_Ch_type, int) const': graderlib.c:8:23: error: expected unqualified-id before 'do' 8 | #define fail(s, x...) do { \ | ^~ In file included from /usr/include/c++/10/bits/regex.h:2982, from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from cave.cpp:3: /usr/include/c++/10/bits/regex.tcc:348:19: error: expected ';' before 'do' 348 | return __is.fail() ? -1 : __v; | ^ | ; /usr/include/c++/10/bits/regex.tcc:348:26: error: expected ';' before '?' token 348 | return __is.fail() ? -1 : __v; | ^ /usr/include/c++/10/bits/regex.tcc:348:26: error: expected primary-expression before '?' token