# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
713075 | lam | Unscrambling a Messy Bug (IOI16_messy) | C++17 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <vector>
#define int long long
#include "messy.h"
using namespace std;
inline bool checkbit(int i, int j)
{
return i>>j&1;
}
inline string tostring(int x, int n)
{
string s="";
for (int i=0; i<n; i++)
{
if (x%2==0) s+='0';
else s+='1';
x/=2;
}
return s;
}
vector<int32_t> restore_permutation(int32_t n, int32_t w, int32_t r) {
string s="";
for (int i=0; i<n; i++) s+='0';
for (int i=n-1; i>=1; i--)
{
s[i] = '1';
add_element(s);
}
compile_set();
vector <int32_t> res(n);
int mask = 0;
for (int it=0; it<n; it++)
{
for (int j=0; j<n; j++)
{
if (checkbit(mask,j)) continue;
mask^=(1<<j);
bool check = check_element(tostring(mask,n));
if (!check)
{
mask^=(1<<j);
continue;
}
for (int j=0; j<n; j++)
if (checkbit(mask,j)) res[j]++;
break;
}
}
return res;
}
컴파일 시 표준 에러 (stderr) 메시지
messy.cpp:2:13: error: 'long' and 'short' specified together 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long' and 'short' specified together 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long' and 'short' specified together 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long' and 'short' specified together 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long' and 'short' specified together 2 | #define int long long | ^~~~ /usr/include/c++/10/bits/stl_function.h: In member function 'constexpr bool std::greater<_Tp*>::operator()(_Tp*, _Tp*) const': messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ /usr/include/c++/10/bits/stl_function.h: In member function 'constexpr bool std::less<_Tp*>::operator()(_Tp*, _Tp*) const': messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ /usr/include/c++/10/bits/stl_function.h: In member function 'constexpr bool std::greater_equal<_Tp*>::operator()(_Tp*, _Tp*) const': messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ /usr/include/c++/10/bits/stl_function.h: In member function 'constexpr bool std::less_equal<_Tp*>::operator()(_Tp*, _Tp*) const': messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ /usr/include/x86_64-linux-gnu/bits/cpu-set.h: At global scope: messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ /usr/include/c++/10/bits/basic_string.h: In static member function 'static long long int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_compare(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type)': messy.cpp:2:13: error: expected primary-expression before 'long' 2 | #define int long long | ^~~~ In file included from /usr/include/c++/10/string:55, from messy.h:4, from messy.cpp:3: /usr/include/c++/10/bits/basic_string.h:410:10: error: expected ';' before 'long' 410 | return int(__d); | ^ | ; /usr/include/c++/10/bits/basic_string.h:410:15: error: conflicting declaration 'long long int __d' 410 | return int(__d); | ^~~ /usr/include/c++/10/bits/basic_string.h:403:24: note: previous declaration as 'const difference_type __d' 403 | const difference_type __d = difference_type(__n1 - __n2); | ^~~ /usr/include/stdlib.h: At global scope: messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:13: error: 'long' and 'short' specified together 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ messy.cpp:2:18: error: 'long long long' is too long for GCC 2 | #defin