# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
713073 | lam | Unscrambling a Messy Bug (IOI16_messy) | C++14 | Compilation error | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}
Compilation message (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