QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#307751 | #8018. 染色 | cmk666 | 100 ✓ | 47ms | 13220kb | C++23 | 7.9kb | 2024-01-19 08:40:44 | 2024-01-19 08:40:45 |
Judging History
answer
/*
* @Author: cmk666
* @Created time: 2024-01-19 08:17:13
* @Last Modified time: 2024-01-19 08:40:32
*/
#pragma GCC optimize("Ofast", "unroll-loops")
#pragma GCC target("avx2", "bmi", "bmi2", "popcnt")
#include<bits/stdc++.h>
#ifdef LOCAL
#include"debug.h"
#else
#define D(...) ((void)0)
#endif
using namespace std; using ll = long long;
#define For(i, j, k) for ( int i = (j) ; i <= (k) ; i++ )
#define Fol(i, j, k) for ( int i = (j) ; i >= (k) ; i-- )
namespace FastIO
{
// ------------------------------
// #define IN_HAS_NEG
// #define OUT_HAS_NEG
// #define CHK_EOF
// #define DISABLE_MMAP
// ------------------------------
#if __cplusplus < 201400
#error Please use C++14 or higher.
#endif
#if __cplusplus > 201700
#define INLINE_V inline
#else
#define INLINE_V
#endif
#if ( defined(LOCAL) || defined(_WIN32) ) && !defined(DISABLE_MMAP)
#define DISABLE_MMAP
#endif
#ifndef DISABLE_MMAP
#include<sys/mman.h>
#endif
#ifdef LOCAL
inline char gc() { return getchar(); }
inline void pc(char c) { putchar(c); }
#else
#ifdef DISABLE_MMAP
INLINE_V constexpr int _READ_SIZE = 1 << 18;
INLINE_V static char _read_buffer[_READ_SIZE], *_read_ptr = nullptr, *_read_ptr_end = nullptr;
inline char gc()
{
if ( __builtin_expect(_read_ptr == _read_ptr_end, false) )
{
_read_ptr = _read_buffer;
_read_ptr_end = _read_buffer + fread(_read_buffer, 1, _READ_SIZE, stdin);
#ifdef CHK_EOF
if ( __builtin_expect(_read_ptr == _read_ptr_end, false) ) return EOF;
#endif
}
return *_read_ptr++;
}
#else
INLINE_V static const char *_read_ptr = (const char *)mmap(nullptr, INT_MAX, 1, 2, 0, 0);
inline char gc() { return *_read_ptr++; }
#endif
INLINE_V constexpr int _WRITE_SIZE = 1 << 18;
INLINE_V static char _write_buffer[_WRITE_SIZE], *_write_ptr = _write_buffer;
inline void pc(char c)
{
*_write_ptr++ = c;
if ( __builtin_expect(_write_buffer + _WRITE_SIZE == _write_ptr, false) )
{
fwrite(_write_buffer, 1, _write_ptr - _write_buffer, stdout);
_write_ptr = _write_buffer;
}
}
INLINE_V struct _auto_flush
{
inline ~_auto_flush() { fwrite(_write_buffer, 1, _write_ptr - _write_buffer, stdout); }
} _auto_flush;
#endif
#ifdef CHK_EOF
inline constexpr bool _isdigit(char c) { return ( c & 16 ) && c != EOF; }
inline constexpr bool _isgraph(char c) { return c > 32 && c != EOF; }
#else
inline constexpr bool _isdigit(char c) { return c & 16; }
inline constexpr bool _isgraph(char c) { return c > 32; }
#endif
template < class T >
INLINE_V constexpr bool _is_integer = numeric_limits < T >::is_integer;
template < class T >
INLINE_V constexpr bool _is_signed = numeric_limits < T >::is_signed;
template < class T >
INLINE_V constexpr bool _is_unsigned = _is_integer < T > && !_is_signed < T >;
template <> INLINE_V constexpr bool _is_integer < __int128 > = true;
template <> INLINE_V constexpr bool _is_integer < __uint128_t > = true;
template <> INLINE_V constexpr bool _is_signed < __int128 > = true;
template <> INLINE_V constexpr bool _is_unsigned < __uint128_t > = true;
#undef INLINE_V
inline void read(char &c) { do c = gc(); while ( !_isgraph(c) ); }
inline void read_cstr(char *s)
{
char c = gc(); while ( !_isgraph(c) ) c = gc();
while ( _isgraph(c) ) *s++ = c, c = gc();
*s = 0;
}
inline void read(string &s)
{
char c = gc(); s.clear(); while ( !_isgraph(c) ) c = gc();
while ( _isgraph(c) ) s.push_back(c), c = gc();
}
#ifdef IN_HAS_NEG
template < class T, enable_if_t < _is_signed < T >, int > = 0 >
inline void read(T &x)
{
char c = gc(); bool f = true; x = 0;
while ( !_isdigit(c) ) { if ( c == 45 ) f = false; c = gc(); }
if ( f ) while ( _isdigit(c) ) x = x * 10 + ( c & 15 ), c = gc();
else while ( _isdigit(c) ) x = x * 10 - ( c & 15 ), c = gc();
}
template < class T, enable_if_t < _is_unsigned < T >, int > = 0 >
#else
template < class T, enable_if_t < _is_integer < T >, int > = 0 >
#endif
inline void read(T &x)
{
char c = gc(); while ( !_isdigit(c) ) c = gc();
x = 0; while ( _isdigit(c) ) x = x * 10 + ( c & 15 ), c = gc();
}
inline void write(char c) { pc(c); }
inline void write_cstr(const char *s) { while ( *s ) pc(*s++); }
inline void write(const string &s) { for ( char c : s ) pc(c); }
#ifdef OUT_HAS_NEG
template < class T, enable_if_t < _is_signed < T >, int > = 0 >
inline void write(T x)
{
char buffer[numeric_limits < T >::digits10 + 1]; int digits = 0;
if ( x >= 0 ) do buffer[digits++] = ( x % 10 ) | 48, x /= 10; while ( x );
else { pc(45); do buffer[digits++] = -( x % 10 ) | 48, x /= 10; while ( x ); }
while ( digits ) pc(buffer[--digits]);
}
template < class T, enable_if_t < _is_unsigned < T >, int > = 0 >
#else
template < class T, enable_if_t < _is_integer < T >, int > = 0 >
#endif
inline void write(T x)
{
char buffer[numeric_limits < T >::digits10 + 1]; int digits = 0;
do buffer[digits++] = ( x % 10 ) | 48, x /= 10; while ( x );
while ( digits ) pc(buffer[--digits]);
}
template < int N > struct _tuple_io_helper
{
template < class ...T >
static inline void _read(tuple < T... > &x)
{ _tuple_io_helper < N - 1 >::_read(x), read(get < N - 1 > (x)); }
template < class ...T >
static inline void _write(const tuple < T... > &x)
{ _tuple_io_helper < N - 1 >::_write(x), pc(32), write(get < N - 1 > (x)); }
};
template <> struct _tuple_io_helper < 1 >
{
template < class ...T >
static inline void _read(tuple < T... > &x) { read(get < 0 > (x)); }
template < class ...T >
static inline void _write(const tuple < T... > &x) { write(get < 0 > (x)); }
};
template < class ...T >
inline void read(tuple < T... > &x) { _tuple_io_helper < sizeof...(T) >::_read(x); }
template < class ...T >
inline void write(const tuple < T... > &x) { _tuple_io_helper < sizeof...(T) >::_write(x); }
template < class T1, class T2 >
inline void read(pair < T1, T2 > &x) { read(x.first), read(x.second); }
template < class T1, class T2 >
inline void write(const pair < T1, T2 > &x) { write(x.first), pc(32), write(x.second); }
template < class T1, class ...T2 >
inline void read(T1 &x, T2 &...y) { read(x), read(y...); }
template < class ...T >
inline void read_cstr(char *x, T *...y) { read_cstr(x), read_cstr(y...); }
template < class T1, class ...T2 >
inline void write(const T1 &x, const T2 &...y) { write(x), write(y...); }
template < class ...T >
inline void write_cstr(const char *x, const T *...y) { write_cstr(x), write_cstr(y...); }
template < class T >
inline void print(const T &x) { write(x); }
inline void print_cstr(const char *x) { write_cstr(x); }
template < class T1, class ...T2 >
inline void print(const T1 &x, const T2 &...y) { print(x), pc(32), print(y...); }
template < class ...T >
inline void print_cstr(const char *x, const T *...y) { print_cstr(x), pc(32), print_cstr(y...); }
inline void println() { pc(10); }
inline void println_cstr() { pc(10); }
template < class ...T >
inline void println(const T &...x) { print(x...), pc(10); }
template < class ...T >
inline void println_cstr(const T *...x) { print_cstr(x...), pc(10); }
}
using namespace FastIO;
int x;
template < int N > inline void slv(int n)
{
if ( N != n ) return slv<min(1 << 11, N << 1)>(n);
static bitset < N > a[N], b[N];
For(i, 0, N - 1) For(j, 0, N - 1) { read(x); if ( x ) a[i].set(j); }
for ( int d = N >> 2 ; d ; d >>= 1 )
{
For(i, 0, N - 1) b[i] = a[i];
For(i, 0, N - 1) a[i] ^= b[( i - d ) & ( N - 1 )] ^ b[( i + d ) & ( N - 1 )]
^ ( ( b[i] << d ) | ( b[i] >> ( N - d ) ) )
^ ( ( b[i] >> d ) | ( b[i] << ( N - d ) ) );
}
x = 0;
For(i, 0, N - 1) x += a[i].count();
println(x);
For(i, 0, N - 1) for ( int j = a[i]._Find_first() ; j != N ; j = a[i]._Find_next(j) )
println(i, j);
}
int main() { return read(x), slv<2>(1 << x), 0; }
// 想上GM捏 想上GM捏 想上GM捏 想上GM捏 想上GM捏
// 伊娜可爱捏 伊娜贴贴捏
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 5
Accepted
time: 0ms
memory: 3692kb
input:
2 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0
output:
7 0 0 1 0 1 3 2 1 3 1 3 2 3 3
result:
ok n=4
Test #2:
score: 5
Accepted
time: 0ms
memory: 3736kb
input:
2 0 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1
output:
8 0 0 1 3 2 0 2 2 2 3 3 0 3 1 3 3
result:
ok n=4
Test #3:
score: 5
Accepted
time: 0ms
memory: 3664kb
input:
2 1 1 1 0 0 1 0 0 1 0 1 0 0 1 0 1
output:
8 0 1 0 3 1 0 1 2 2 0 2 2 2 3 3 3
result:
ok n=4
Test #4:
score: 5
Accepted
time: 0ms
memory: 3752kb
input:
2 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 0
output:
10 0 1 0 3 1 1 1 2 1 3 2 0 2 1 2 3 3 0 3 3
result:
ok n=4
Test #5:
score: 5
Accepted
time: 0ms
memory: 3700kb
input:
4 0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 1 1 1 0 1 1 1 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 1 ...
output:
133 0 1 0 2 0 6 0 9 0 11 0 12 0 13 0 14 0 15 1 1 1 5 1 6 1 9 1 11 1 12 1 13 1 14 1 15 2 1 2 2 2 6 2 8 2 9 2 10 2 12 2 14 2 15 3 0 3 1 3 3 3 8 3 11 3 12 3 15 4 1 4 2 4 3 4 5 4 6 4 7 4 11 4 14 5 2 5 3 5 5 5 7 5 9 5 11 5 12 5 13 6 1 6 4 6 5 6 6 6 8 6 11 6 13 6 14 7 2 7 4 7 6 7 8 7 9 7 10 7 11 7 15 8 1 ...
result:
ok n=16
Test #6:
score: 5
Accepted
time: 0ms
memory: 3756kb
input:
4 1 0 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 ...
output:
120 0 5 0 7 0 8 0 9 0 12 1 0 1 3 1 10 1 12 1 13 2 1 2 2 2 6 2 11 3 0 3 1 3 2 3 4 3 5 3 7 3 10 3 12 4 0 4 5 4 7 4 13 4 14 5 0 5 1 5 3 5 4 5 5 5 6 5 7 5 14 6 4 6 5 6 8 6 12 6 13 6 14 7 0 7 1 7 2 7 3 7 4 7 5 7 6 7 7 7 9 7 10 7 11 7 13 7 15 8 1 8 5 8 8 8 10 8 11 8 14 8 15 9 1 9 2 9 4 9 8 9 10 9 12 9 14 ...
result:
ok n=16
Test #7:
score: 5
Accepted
time: 0ms
memory: 3740kb
input:
4 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 1 1 1 0 ...
output:
123 0 0 0 1 0 3 0 7 0 14 1 2 1 3 1 8 1 9 1 12 2 2 2 3 2 5 2 6 2 8 2 11 2 14 3 0 3 1 3 2 3 3 3 5 3 7 3 9 3 10 3 12 3 14 4 0 4 1 4 3 4 6 4 7 4 8 4 14 4 15 5 7 5 9 5 14 5 15 6 1 6 5 6 6 6 8 6 9 6 12 7 0 7 2 7 7 7 8 7 10 7 11 8 2 8 4 8 7 8 9 8 10 8 13 8 15 9 0 9 2 9 5 9 6 9 7 9 9 9 12 9 15 10 0 10 1 10 ...
result:
ok n=16
Test #8:
score: 5
Accepted
time: 0ms
memory: 3840kb
input:
7 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 0 1 0 0 1 ...
output:
8269 0 1 0 3 0 4 0 6 0 8 0 9 0 10 0 12 0 14 0 15 0 16 0 17 0 18 0 20 0 21 0 22 0 27 0 28 0 33 0 35 0 37 0 38 0 39 0 41 0 42 0 47 0 48 0 50 0 53 0 56 0 57 0 58 0 71 0 72 0 76 0 78 0 79 0 80 0 81 0 82 0 83 0 86 0 89 0 92 0 93 0 94 0 98 0 99 0 100 0 102 0 106 0 108 0 110 0 117 0 119 0 120 0 121 0 123 0...
result:
ok n=128
Test #9:
score: 5
Accepted
time: 1ms
memory: 3748kb
input:
7 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 ...
output:
8192 0 0 0 5 0 6 0 7 0 8 0 9 0 11 0 12 0 13 0 15 0 16 0 20 0 24 0 28 0 29 0 30 0 31 0 32 0 35 0 36 0 37 0 39 0 45 0 48 0 51 0 52 0 55 0 56 0 57 0 62 0 64 0 65 0 68 0 70 0 75 0 76 0 77 0 78 0 80 0 81 0 82 0 84 0 85 0 86 0 88 0 89 0 94 0 97 0 103 0 104 0 105 0 106 0 107 0 109 0 112 0 113 0 114 0 115 0...
result:
ok n=128
Test #10:
score: 5
Accepted
time: 1ms
memory: 3776kb
input:
7 1 0 1 1 1 0 0 0 1 1 0 0 1 1 0 0 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 ...
output:
8280 0 0 0 1 0 3 0 4 0 6 0 9 0 11 0 14 0 20 0 21 0 23 0 24 0 25 0 26 0 28 0 29 0 31 0 34 0 38 0 40 0 45 0 52 0 53 0 54 0 55 0 56 0 60 0 61 0 64 0 65 0 66 0 69 0 70 0 71 0 72 0 74 0 75 0 78 0 80 0 81 0 89 0 90 0 92 0 94 0 95 0 97 0 98 0 100 0 102 0 106 0 113 0 114 0 119 0 120 0 121 0 122 0 125 0 126 ...
result:
ok n=128
Test #11:
score: 5
Accepted
time: 35ms
memory: 13068kb
input:
11 1 1 0 1 1 1 1 0 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 0 0 0 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1...
output:
2099200 0 1 0 3 0 4 0 5 0 6 0 7 0 8 0 11 0 16 0 19 0 21 0 27 0 29 0 30 0 31 0 34 0 35 0 38 0 40 0 41 0 42 0 46 0 47 0 53 0 59 0 61 0 62 0 63 0 64 0 65 0 67 0 68 0 73 0 83 0 84 0 86 0 87 0 89 0 92 0 94 0 95 0 99 0 100 0 101 0 103 0 108 0 109 0 110 0 113 0 115 0 117 0 118 0 119 0 124 0 127 0 129 0 131...
result:
ok n=2048
Test #12:
score: 5
Accepted
time: 45ms
memory: 13136kb
input:
11 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1...
output:
2114816 0 1 0 2 0 4 0 8 0 12 0 13 0 14 0 16 0 18 0 23 0 24 0 27 0 29 0 33 0 37 0 38 0 42 0 43 0 45 0 46 0 47 0 48 0 49 0 50 0 51 0 54 0 56 0 57 0 58 0 63 0 65 0 68 0 69 0 70 0 71 0 73 0 75 0 80 0 81 0 82 0 85 0 92 0 93 0 94 0 97 0 98 0 102 0 104 0 105 0 107 0 111 0 112 0 113 0 116 0 117 0 119 0 121 ...
result:
ok n=2048
Test #13:
score: 5
Accepted
time: 39ms
memory: 13220kb
input:
11 1 0 1 0 1 0 0 0 0 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 0 0 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 0 1 1 0 0 1 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 0 0 1 0 1 0...
output:
2094848 0 1 0 2 0 3 0 7 0 10 0 11 0 13 0 14 0 17 0 18 0 19 0 20 0 23 0 24 0 26 0 27 0 28 0 31 0 33 0 34 0 35 0 38 0 39 0 41 0 43 0 44 0 45 0 47 0 51 0 53 0 59 0 60 0 61 0 66 0 68 0 69 0 73 0 74 0 75 0 79 0 81 0 84 0 86 0 88 0 90 0 92 0 93 0 94 0 96 0 99 0 100 0 101 0 102 0 104 0 105 0 108 0 110 0 11...
result:
ok n=2048
Test #14:
score: 5
Accepted
time: 31ms
memory: 13136kb
input:
11 1 1 0 1 1 1 0 0 1 0 1 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 0 0 0 1...
output:
2131968 0 3 0 6 0 8 0 10 0 11 0 12 0 13 0 14 0 18 0 19 0 21 0 22 0 24 0 26 0 28 0 30 0 33 0 34 0 37 0 39 0 40 0 41 0 42 0 43 0 44 0 46 0 47 0 48 0 50 0 56 0 57 0 58 0 59 0 60 0 62 0 64 0 69 0 71 0 73 0 75 0 76 0 77 0 78 0 79 0 81 0 85 0 91 0 92 0 95 0 96 0 97 0 98 0 99 0 100 0 102 0 104 0 105 0 108 ...
result:
ok n=2048
Test #15:
score: 5
Accepted
time: 39ms
memory: 13096kb
input:
11 1 1 0 0 0 0 1 0 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 0 1 1 0 1 1 1 0 1 1 1 1 1 1 0 0 0 1 0 1 1 0 1 1 1 1 1 1 0 1 0 0...
output:
2099200 0 0 0 1 0 3 0 5 0 6 0 8 0 9 0 11 0 15 0 19 0 20 0 21 0 23 0 24 0 25 0 27 0 28 0 29 0 30 0 31 0 32 0 36 0 38 0 39 0 40 0 42 0 46 0 48 0 49 0 51 0 52 0 55 0 57 0 59 0 61 0 62 0 64 0 65 0 66 0 67 0 68 0 69 0 71 0 73 0 74 0 77 0 78 0 79 0 80 0 85 0 92 0 93 0 94 0 95 0 96 0 99 0 101 0 102 0 105 0...
result:
ok n=2048
Test #16:
score: 5
Accepted
time: 31ms
memory: 13136kb
input:
11 1 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 1...
output:
2112256 0 0 0 1 0 5 0 6 0 8 0 9 0 12 0 13 0 15 0 20 0 21 0 23 0 25 0 28 0 29 0 30 0 32 0 35 0 36 0 37 0 39 0 40 0 41 0 42 0 43 0 45 0 46 0 48 0 54 0 56 0 57 0 60 0 62 0 63 0 64 0 65 0 66 0 68 0 73 0 74 0 75 0 78 0 79 0 87 0 88 0 90 0 91 0 93 0 96 0 100 0 101 0 102 0 103 0 107 0 111 0 112 0 114 0 116...
result:
ok n=2048
Test #17:
score: 5
Accepted
time: 38ms
memory: 13192kb
input:
11 0 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0...
output:
2092288 0 2 0 3 0 8 0 9 0 10 0 12 0 13 0 14 0 16 0 17 0 20 0 21 0 22 0 27 0 29 0 30 0 32 0 34 0 35 0 37 0 39 0 42 0 45 0 46 0 47 0 49 0 51 0 58 0 62 0 63 0 64 0 71 0 73 0 74 0 76 0 79 0 81 0 83 0 84 0 85 0 89 0 90 0 91 0 95 0 96 0 97 0 99 0 100 0 101 0 109 0 111 0 113 0 114 0 115 0 119 0 121 0 124 0...
result:
ok n=2048
Test #18:
score: 5
Accepted
time: 43ms
memory: 13136kb
input:
11 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 1 0 1 1 1 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 0 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1...
output:
2081792 0 2 0 7 0 8 0 9 0 11 0 14 0 15 0 18 0 19 0 20 0 21 0 22 0 24 0 25 0 27 0 28 0 29 0 30 0 32 0 35 0 36 0 42 0 43 0 44 0 45 0 46 0 48 0 49 0 53 0 54 0 55 0 57 0 59 0 60 0 61 0 64 0 65 0 67 0 68 0 71 0 72 0 73 0 74 0 76 0 77 0 78 0 79 0 81 0 83 0 84 0 85 0 89 0 90 0 94 0 95 0 96 0 97 0 99 0 102 ...
result:
ok n=2048
Test #19:
score: 5
Accepted
time: 39ms
memory: 13056kb
input:
11 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 1 1 1 0 1 1 1 0...
output:
2088960 0 0 0 1 0 2 0 4 0 5 0 7 0 8 0 10 0 12 0 14 0 15 0 16 0 19 0 25 0 26 0 29 0 30 0 32 0 33 0 39 0 40 0 42 0 43 0 44 0 45 0 46 0 47 0 49 0 51 0 53 0 56 0 57 0 58 0 60 0 62 0 63 0 65 0 66 0 67 0 69 0 70 0 72 0 73 0 74 0 75 0 78 0 80 0 82 0 86 0 88 0 89 0 91 0 92 0 93 0 96 0 99 0 100 0 102 0 103 0...
result:
ok n=2048
Test #20:
score: 5
Accepted
time: 47ms
memory: 13132kb
input:
11 0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 1 1 0...
output:
2093568 0 0 0 3 0 5 0 6 0 7 0 8 0 9 0 10 0 12 0 16 0 18 0 22 0 24 0 25 0 27 0 31 0 32 0 35 0 37 0 38 0 44 0 47 0 50 0 51 0 52 0 53 0 58 0 59 0 62 0 65 0 67 0 68 0 69 0 71 0 73 0 75 0 79 0 81 0 82 0 83 0 84 0 86 0 91 0 92 0 95 0 97 0 102 0 105 0 106 0 109 0 110 0 111 0 112 0 113 0 118 0 119 0 123 0 1...
result:
ok n=2048