QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#287990#7688. Alea Iacta Estcmk666AC ✓44ms18968kbC++239.8kb2023-12-21 14:13:362023-12-21 14:13:36

Judging History

你现在查看的是最新测评结果

  • [2023-12-21 14:13:36]
  • 评测
  • 测评结果:AC
  • 用时:44ms
  • 内存:18968kb
  • [2023-12-21 14:13:36]
  • 提交

answer

/*
 * @Author:             cmk666
 * @Created time:       2023-12-21 13:04:50
 * @Last Modified time: 2023-12-21 14:10:22
 */
#pragma GCC optimize("Ofast", "unroll-loops")
#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;
struct poly
{
	vector < int > f;
	inline poly(int n, int v = 0) : f(n, v) {}
	inline int &operator[](int x) { return f[x]; }
	inline poly &rsz(int n) { f.resize(n); return *this; }
	inline poly &skp(int x)
	{
		for ( int i = 0 ; i < (int)f.size() ; i += x ) f[i] = 1;
		return *this;
	}
	inline poly &mul(int x)
	{
		Fol(i, (int)f.size() - 1, x) f[i] -= f[i - x];
		For(i, 1, (int)f.size() - 1) f[i] += f[i - 1];
		return *this;
	}
	inline poly &div(int x)
	{
		Fol(i, (int)f.size() - 1, 1) f[i] -= f[i - 1];
		For(i, x, (int)f.size() - 1) f[i] += f[i - x];
		return *this;
	}
	inline void out()const
	{
		write(accumulate(f.begin(), f.end(), 0));
		For(i, 0, (int)f.size() - 1) For(j, 1, f[i]) write(' ', i + 1);
		println();
	}
}; int n, m, p, q; ll o;
inline auto factorize(int x)
{
	vector < pair < int, int > > ret;
	for ( int i = 2 ; i * i <= x ; i++ ) if ( !( x % i ) )
		for ( ret.emplace_back(i, 1) ; !( ( x /= i ) % i ) ; ret.back().second++ );
	if ( x > 1 ) ret.emplace_back(x, 1);
	return ret;
}
inline void work()
{
	read(n, m);
	if ( n > m ) swap(n, m);
	Fol(i, (int)sqrtl((ll)n * m), n + 1) if ( !( (ll)n * m % i ) )
	{
		q = __gcd(i, m), p = (ll)n * q / i,
		poly(n, 1).rsz(n + m).div(p).mul(q).out(), poly(m, 1).div(q).mul(p).out(); return;
	}
	if ( n == 1 ) { poly(n, 2).out(), poly(m, 1).out(); return; }
	auto fn = factorize(n);
	if ( (int)fn.size() > 1 )
	{
		p = fn[0].first, q = fn[1].first, poly(n).skp(p * q).mul(p).mul(q).out(),
		poly(p * q).skp(p).div(q).rsz(m + p * q).mul(m).out(); return;
	}
	auto fm = factorize(m);
	if ( (int)fm.size() > 1 && fm[0].first * fm[1].first <= n )
	{
		p = fm[0].first, q = fm[1].first, poly(m).skp(p * q).mul(p).mul(q).out(),
		poly(p * q).skp(p).div(q).rsz(n + p * q).mul(n).out(); return;
	}
	auto [pn, cn] = fn[0];
	for ( auto [pm, cm] : fm ) if ( pn == pm && ( cn > 1 || cm > 1 ) )
	{
		poly f(( cn < cm ? n : m ) * pn);
		for ( int i = 0 ; i < ( cn < cm ? n : m ) ; i += pn ) For(j, 0, pn - 1) f[i + j * pn]++;
		f.out(), poly(cn > cm ? n : m).skp(pn * pn).mul(pn).mul(pn).out(); return;
	}
	if ( (int)fm.size() > 1 )
	{
		poly f(m); p = fm[0].first, q = fm[1].first, f.skp(q).rsz(n + m).div(p).mul(n);
		if ( *min_element(f.f.begin(), f.f.end()) >= 0 )
		{
			poly g(m); For(i, 0, p - 1) For(j, 0, q - 1) g[i + j]++;
			f.out(), g.out(); return;
		}
	}
	Fol(i, n - 1, 1) if ( !( (ll)n * m % i ) )
	{
		if ( ( o = (ll)n * m / i ) + i >= n + n + m ) break;
		p = __gcd(n, (int)o), q = (ll)m * p / o,
		poly(n, 1).div(p).mul(q).out(), poly(m, 1).rsz(m + p).div(q).mul(p).out(); return;
	}
	poly(n, 2).out(), poly(m, 1).out();
}
int main() { int t; read(t); For(tt, 1, t) work(); return 0; }
// 想上GM捏 想上GM捏 想上GM捏 想上GM捏 想上GM捏
// 伊娜可爱捏 伊娜贴贴捏

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3488kb

input:

3
2 8
1 9
2 9

output:

4 1 2 3 4
4 1 2 5 6
3 1 2 3
3 1 4 7
3 1 2 3
6 1 2 4 5 7 8

result:

ok Correct. (3 test cases)

Test #2:

score: 0
Accepted
time: 3ms
memory: 3816kb

input:

1
40013 40013

output:

80026 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 ...

result:

ok Correct. (1 test case)

Test #3:

score: 0
Accepted
time: 1ms
memory: 3764kb

input:

1
40013 1

output:

2 1 1
40013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...

result:

ok Correct. (1 test case)

Test #4:

score: 0
Accepted
time: 0ms
memory: 3752kb

input:

1
2 40013

output:

4 1 1 2 2
40013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98...

result:

ok Correct. (1 test case)

Test #5:

score: 0
Accepted
time: 1ms
memory: 3820kb

input:

1
3 40013

output:

6 1 1 2 2 3 3
40013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 9...

result:

ok Correct. (1 test case)

Test #6:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

1
4 40013

output:

8 1 1 2 2 3 3 4 4
40013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 ...

result:

ok Correct. (1 test case)

Test #7:

score: 0
Accepted
time: 44ms
memory: 11272kb

input:

1
999983 999983

output:

1999966 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 5...

result:

ok Correct. (1 test case)

Test #8:

score: 0
Accepted
time: 15ms
memory: 7148kb

input:

1
1 999983

output:

2 1 1
999983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99...

result:

ok Correct. (1 test case)

Test #9:

score: 0
Accepted
time: 15ms
memory: 7216kb

input:

1
2 999983

output:

4 1 1 2 2
999983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 9...

result:

ok Correct. (1 test case)

Test #10:

score: 0
Accepted
time: 15ms
memory: 7144kb

input:

1
999983 3

output:

6 1 1 2 2 3 3
999983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ...

result:

ok Correct. (1 test case)

Test #11:

score: 0
Accepted
time: 18ms
memory: 7168kb

input:

1
999983 4

output:

8 1 1 2 2 3 3 4 4
999983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95...

result:

ok Correct. (1 test case)

Test #12:

score: 0
Accepted
time: 28ms
memory: 11240kb

input:

1
1000000 1000000

output:

1000000 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 10...

result:

ok Correct. (1 test case)

Test #13:

score: 0
Accepted
time: 12ms
memory: 10872kb

input:

1
1000000 1

output:

1000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #14:

score: 0
Accepted
time: 7ms
memory: 10944kb

input:

1
1000000 2

output:

1250 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #15:

score: 0
Accepted
time: 7ms
memory: 10820kb

input:

1
3 1000000

output:

1600 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #16:

score: 0
Accepted
time: 6ms
memory: 10872kb

input:

1
4 1000000

output:

2000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #17:

score: 0
Accepted
time: 14ms
memory: 18924kb

input:

1
988027 988027

output:

988027 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15...

result:

ok Correct. (1 test case)

Test #18:

score: 0
Accepted
time: 12ms
memory: 10584kb

input:

1
988027 1

output:

991 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #19:

score: 0
Accepted
time: 11ms
memory: 10904kb

input:

1
2 988027

output:

997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #20:

score: 0
Accepted
time: 3ms
memory: 10656kb

input:

1
3 988027

output:

997 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #21:

score: 0
Accepted
time: 11ms
memory: 10604kb

input:

1
4 988027

output:

1982 1 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53...

result:

ok Correct. (1 test case)

Test #22:

score: 0
Accepted
time: 24ms
memory: 18924kb

input:

1
995779 995779

output:

995779 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15...

result:

ok Correct. (1 test case)

Test #23:

score: 0
Accepted
time: 4ms
memory: 10840kb

input:

1
1 995779

output:

983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #24:

score: 0
Accepted
time: 11ms
memory: 10924kb

input:

1
995779 2

output:

1013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #25:

score: 0
Accepted
time: 3ms
memory: 10872kb

input:

1
995779 3

output:

1013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #26:

score: 0
Accepted
time: 7ms
memory: 10888kb

input:

1
995779 4

output:

1966 1 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53...

result:

ok Correct. (1 test case)

Test #27:

score: 0
Accepted
time: 26ms
memory: 9112kb

input:

1
720720 720720

output:

720720 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 1...

result:

ok Correct. (1 test case)

Test #28:

score: 0
Accepted
time: 9ms
memory: 8808kb

input:

1
720720 1

output:

840 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #29:

score: 0
Accepted
time: 7ms
memory: 8836kb

input:

1
2 720720

output:

1170 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #30:

score: 0
Accepted
time: 8ms
memory: 8764kb

input:

1
3 720720

output:

1456 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #31:

score: 0
Accepted
time: 0ms
memory: 8756kb

input:

1
4 720720

output:

1680 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #32:

score: 0
Accepted
time: 6ms
memory: 9376kb

input:

1
524288 524288

output:

524288 1 3 3 5 5 7 7 9 9 11 11 13 13 15 15 17 17 19 19 21 21 23 23 25 25 27 27 29 29 31 31 33 33 35 35 37 37 39 39 41 41 43 43 45 45 47 47 49 49 51 51 53 53 55 55 57 57 59 59 61 61 63 63 65 65 67 67 69 69 71 71 73 73 75 75 77 77 79 79 81 81 83 83 85 85 87 87 89 89 91 91 93 93 95 95 97 97 99 99 101 1...

result:

ok Correct. (1 test case)

Test #33:

score: 0
Accepted
time: 6ms
memory: 7212kb

input:

1
1 524288

output:

512 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #34:

score: 0
Accepted
time: 3ms
memory: 7172kb

input:

1
2 524288

output:

1024 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #35:

score: 0
Accepted
time: 3ms
memory: 7244kb

input:

1
3 524288

output:

1024 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #36:

score: 0
Accepted
time: 3ms
memory: 7152kb

input:

1
524288 4

output:

1024 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #37:

score: 0
Accepted
time: 15ms
memory: 11808kb

input:

1
531441 531441

output:

531441 1 4 4 7 7 7 10 10 10 13 13 13 16 16 16 19 19 19 22 22 22 25 25 25 28 28 28 31 31 31 34 34 34 37 37 37 40 40 40 43 43 43 46 46 46 49 49 49 52 52 52 55 55 55 58 58 58 61 61 61 64 64 64 67 67 67 70 70 70 73 73 73 76 76 76 79 79 79 82 82 82 85 85 85 88 88 88 91 91 91 94 94 94 97 97 97 100 100 100...

result:

ok Correct. (1 test case)

Test #38:

score: 0
Accepted
time: 3ms
memory: 7180kb

input:

1
1 531441

output:

729 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #39:

score: 0
Accepted
time: 6ms
memory: 7172kb

input:

1
2 531441

output:

729 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #40:

score: 0
Accepted
time: 6ms
memory: 7184kb

input:

1
531441 3

output:

729 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #41:

score: 0
Accepted
time: 6ms
memory: 7192kb

input:

1
531441 4

output:

1458 1 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53...

result:

ok Correct. (1 test case)

Test #42:

score: 0
Accepted
time: 15ms
memory: 7304kb

input:

1
510510 510510

output:

510510 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 1...

result:

ok Correct. (1 test case)

Test #43:

score: 0
Accepted
time: 6ms
memory: 6964kb

input:

1
510510 1

output:

714 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #44:

score: 0
Accepted
time: 6ms
memory: 6916kb

input:

1
510510 2

output:

1001 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #45:

score: 0
Accepted
time: 2ms
memory: 6916kb

input:

1
3 510510

output:

1190 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1 test case)

Test #46:

score: 0
Accepted
time: 6ms
memory: 6904kb

input:

1
4 510510

output:

1428 1 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53...

result:

ok Correct. (1 test case)

Test #47:

score: 0
Accepted
time: 10ms
memory: 5456kb

input:

1
279936 279936

output:

279936 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 1...

result:

ok Correct. (1 test case)

Test #48:

score: 0
Accepted
time: 2ms
memory: 5032kb

input:

1
279936 1

output:

486 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #49:

score: 0
Accepted
time: 0ms
memory: 5372kb

input:

1
279936 2

output:

729 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #50:

score: 0
Accepted
time: 0ms
memory: 5348kb

input:

1
279936 3

output:

864 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #51:

score: 0
Accepted
time: 0ms
memory: 5072kb

input:

1
4 279936

output:

972 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1 test case)

Test #52:

score: 0
Accepted
time: 12ms
memory: 10196kb

input:

1
871933 871933

output:

871933 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15...

result:

ok Correct. (1 test case)

Test #53:

score: 0
Accepted
time: 11ms
memory: 9824kb

input:

1
871933 1

output:

101 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
...

result:

ok Correct. (1 test case)

Test #54:

score: 0
Accepted
time: 7ms
memory: 9844kb

input:

1
2 871933

output:

202 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...

result:

ok Correct. (1 test case)

Test #55:

score: 0
Accepted
time: 11ms
memory: 9896kb

input:

1
3 871933

output:

303 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 37 37...

result:

ok Correct. (1 test case)

Test #56:

score: 0
Accepted
time: 7ms
memory: 9796kb

input:

1
4 871933

output:

404 1 2 2 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 29...

result:

ok Correct. (1 test case)

Test #57:

score: 0
Accepted
time: 13ms
memory: 11276kb

input:

1
1000000 999999

output:

999999 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 9 22 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 30 43 44 44 45 45 45 46 46 46 47 47 47 48 48 48 49 49 49 50 50 51 64 65 65 66 66 66 67 67 67 68 68 68 69 69 69 70 70 70 71 71 72 85 86 86 87 87 87 88 88 88 89 89 89 90 90 90 91 91 91 92 92 93...

result:

ok Correct. (1 test case)

Test #58:

score: 0
Accepted
time: 27ms
memory: 11260kb

input:

1
1000000 999998

output:

999998 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 74 75 75 76 76 77 77 78 78 79 79 80 80 81 81 82 82 83 83 8...

result:

ok Correct. (1 test case)

Test #59:

score: 0
Accepted
time: 15ms
memory: 11256kb

input:

1
1000000 999983

output:

1000000 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 10...

result:

ok Correct. (1 test case)

Test #60:

score: 0
Accepted
time: 19ms
memory: 14644kb

input:

1
1000000 900000

output:

937500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...

result:

ok Correct. (1 test case)

Test #61:

score: 0
Accepted
time: 25ms
memory: 13036kb

input:

1
500000 1000000

output:

640000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...

result:

ok Correct. (1 test case)

Test #62:

score: 0
Accepted
time: 22ms
memory: 13132kb

input:

1
524288 1000000

output:

655360 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...

result:

ok Correct. (1 test case)

Test #63:

score: 0
Accepted
time: 21ms
memory: 9408kb

input:

6
1 4
531441 999983
2 2
1 1
1 6
4 3

output:

2 1 2
2 1 3
1062882 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 5...

result:

ok Correct. (6 test cases)

Test #64:

score: 0
Accepted
time: 25ms
memory: 9464kb

input:

7
1 1
7 6
1 1
3 3
1 1
4 4
999983 524288

output:

2 1 1
1 1
6 1 2 2 3 3 4
7 1 3 4 5 6 7 9
2 1 1
1 1
6 1 1 2 2 3 3
3 1 2 3
2 1 1
1 1
4 1 3 3 5
4 1 2 2 3
1048576 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 3...

result:

ok Correct. (7 test cases)

Test #65:

score: 0
Accepted
time: 24ms
memory: 9964kb

input:

42
4698 12061
519 18
4 11
1 1
1 1
30 105
106 18
53 45
14230 7541
15 15
36035 39105
7430 11797
101 269
1 1
11 39
12 12
1677 1550
38 54
15974 33669
4 3
14928 32774
27 20
1354 2368
7 49
1 1
1 11
1 1
37 192
1604 1970
135 114
22095 16791
12317 28762
524288 531441
125 18
35746 16893
921 3453
344 42
70290 ...

output:

5481 1 2 3 4 5 6 7 7 8 9 10 11 12 13 13 14 15 16 17 18 19 19 20 21 22 23 24 25 25 26 27 28 29 30 31 31 32 33 34 35 36 37 37 38 39 40 41 42 43 43 44 45 46 47 48 49 49 50 51 52 53 54 55 55 56 57 58 59 60 61 61 62 63 64 65 66 67 67 68 69 70 71 72 73 73 74 75 76 77 78 79 79 80 81 82 83 84 85 85 86 87 88...

result:

ok Correct. (42 test cases)

Test #66:

score: 0
Accepted
time: 24ms
memory: 10176kb

input:

9
1 1
1 1
1 1
2 2
1 2
999983 720720
1 1
8 4
1 1

output:

2 1 1
1 1
2 1 1
1 1
2 1 1
1 1
1 1
4 1 2 2 3
2 1 1
2 1 2
720720 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81...

result:

ok Correct. (9 test cases)

Test #67:

score: 0
Accepted
time: 25ms
memory: 9160kb

input:

38
1427 1873
2 4
1537 896
1 1
1750 1553
1 1
5610 31561
35 2
332 354
6 173
4 6
181 71
3647 3589
6 1
5331 3265
48 965
111270 88190
8097 3502
2 1
17 30
30 50
3 2
1801 1152
720720 720703
101 101
70821 44842
2 3
70 316
1 8
7 7
739 1024
4 21
586 12898
1 2
257 132
19172 1718
5283 5970
2 2

output:

2854 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...

result:

ok Correct. (38 test cases)

Test #68:

score: 0
Accepted
time: 32ms
memory: 10172kb

input:

8
1 1
999983 720703
2 2
3 3
1 1
3 4
5 4
1 1

output:

2 1 1
1 1
1441406 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 ...

result:

ok Correct. (8 test cases)

Test #69:

score: 0
Accepted
time: 32ms
memory: 14972kb

input:

29
1 1
41 42
2 22
1220 451
8 2
58 94
2 4
1 1
255 179
5 1
3514 591
3 4
22 4
232 702
1 2
358 320
2768 497
928 525
2 51
1 9
85 207
41 47
221 174
5 5
988027 986040
1251 80
217 220
2 11
1 1

output:

2 1 1
1 1
42 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40
41 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 43
4 1 2 2 3
11 1 3 5 7 9 11 13 15 17 19 21
671 1 2 3 4 5...

result:

ok Correct. (29 test cases)

Test #70:

score: 0
Accepted
time: 33ms
memory: 18968kb

input:

25
84 35
1 1
110 118
1163 724
1 2
1 1
19 6
38 55
62 50
4 151
5866 4399
2 3
5 3
13 13
986039 988027
1 1
184 869
255 717
1 1
67 57
6 15
21 24
4 3
2474 284
258 145

output:

49 1 2 3 4 5 6 6 7 7 8 9 10 11 11 12 12 13 14 15 16 16 17 17 18 19 20 21 21 22 22 23 24 25 26 26 27 27 28 29 30 31 31 32 32 33 34 35 36 37
60 1 2 3 4 5 8 9 10 11 12 15 16 17 18 19 22 23 24 25 26 29 30 31 32 33 36 37 38 39 40 43 44 45 46 47 50 51 52 53 54 57 58 59 60 61 64 65 66 67 68 71 72 73 74 75 ...

result:

ok Correct. (25 test cases)

Test #71:

score: 0
Accepted
time: 29ms
memory: 14908kb

input:

34
59 174
406 33
1 1
7 7
16 11
1 1
2 6
168 897
9 10
442 292
1 1
86 120
821 424
40 14
68 2758
367 449
3 4
148 243
20 4
184 142
1 2
2 1
1 9
107 129
173 636
6 2
3 14
1531 405
131 142
633 2649
23 59
18 50
988027 986023
57 144

output:

87 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
118 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...

result:

ok Correct. (34 test cases)

Test #72:

score: 0
Accepted
time: 24ms
memory: 18904kb

input:

28
708 966
59 13
6 10
6 16
30 38
9 2
2 2
8 8
1 142
10 20
5 20
393 77
230 465
210 9
622 329
1276 1402
1 1
72 380
3 1
264 364
880 679
1 1
11 42
21 27
986041 988027
2175 468
2680 427
66 1038

output:

826 1 2 3 4 5 6 7 8 9 10 11 12 13 13 14 14 15 16 17 18 19 20 21 22 23 24 25 25 26 26 27 28 29 30 31 32 33 34 35 36 37 37 38 38 39 40 41 42 43 44 45 46 47 48 49 49 50 50 51 52 53 54 55 56 57 58 59 60 61 61 62 62 63 64 65 66 67 68 69 70 71 72 73 73 74 74 75 76 77 78 79 80 81 82 83 84 85 85 86 86 87 88...

result:

ok Correct. (28 test cases)

Test #73:

score: 0
Accepted
time: 35ms
memory: 14052kb

input:

4
1 1
2 3
999995 799991
1 1

output:

2 1 1
1 1
4 1 1 2 2
3 1 2 3
1599982 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 ...

result:

ok Correct. (4 test cases)

Test #74:

score: 0
Accepted
time: 28ms
memory: 14212kb

input:

6
1 1
1 1
1 1
1 1
1 1
999995 799992

output:

2 1 1
1 1
2 1 1
1 1
2 1 1
1 1
2 1 1
1 1
2 1 1
1 1
799996 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 ...

result:

ok Correct. (6 test cases)

Test #75:

score: 0
Accepted
time: 24ms
memory: 14192kb

input:

5
2 2
1 1
1 1
1 1
799993 999995

output:

1 1
4 1 2 2 3
2 1 1
1 1
2 1 1
1 1
2 1 1
1 1
799993 1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146 151 156 161 166 171 176 181 186 191 196 201 206 211 216 221 226 231 236 241 246 251 256 261 266 271 276 281 286 291 296 301 306 311 316 321 326 331 336...

result:

ok Correct. (5 test cases)

Test #76:

score: 0
Accepted
time: 26ms
memory: 7556kb

input:

47
1 1
22 26
2883 3705
3 21
3184 132
287 521
4024 8251
5411 995
262144 524288
13 7
108 160
10999 146603
5695 4137
211 130
64 542
2 6
91 10
159 223
27 46
4 3
37992 10217
1292 1509
130194 143457
3924 1771
53 76
68 137
15 12
6 6
1 1
1264 307
13283 76
62 15
1 1
5 9
1295 1592
6 2
352 288
1 1
10526 25592
...

output:

2 1 1
1 1
22 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12
26 1 3 5 7 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 28 30 32 34 36
2945 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5...

result:

ok Correct. (47 test cases)

Test #77:

score: 0
Accepted
time: 18ms
memory: 8000kb

input:

47
678 953
1 2
3 3
235 36
1 2
75364 55166
1 1
9 4
1820 6589
131072 524288
7 405
14421 13529
170 131
89 306
4404 1036
1 8
3068 1609
1 1
8 52
388 244
13 4
8097 42399
6 2
4444 2321
8564 21145
3 5
322 520
16341 12885
80 320
28 13
10352 6091
11 11
27056 17200
8413 2337
2 40
12424 10239
41839 29920
2 2
30...

output:

678 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 100 ...

result:

ok Correct. (47 test cases)

Test #78:

score: 0
Accepted
time: 16ms
memory: 7784kb

input:

45
2522 2234
19 11
30 2
21 34
2166 2909
7572 17298
44 31
5 5
793 1866
2 2
177147 531441
1 1
229 20
5908 1062
2276 5573
51677 26191
138 132
15 10
7469 112499
348 191
107537 130218
2 1
66902 38459
3 3
52 17
22 13
34346 22431
1 3
206 322
1 1
335 661
4 4
9 1
1 1
2 4
7 10
620 2357
8921 5587
124 97
557 11...

output:

2234 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 ...

result:

ok Correct. (45 test cases)

Test #79:

score: 0
Accepted
time: 11ms
memory: 8136kb

input:

40
1 1
1 1
143997 127776
27 24
325 12426
5080 15238
23 23
124 54
28 85
2512 51088
59 10
15672 9833
761 1454
387 465
5728 5858
3613 2964
138 114
50274 144792
4 5
2 11
745 686
1 1
3 3
7 3
59049 531441
1331 947
1511 5217
8067 1526
2208 4545
32965 50506
142 29
32 25
61 126
4 20
5 5
900 1171
36 36
1326 2...

output:

2 1 1
1 1
2 1 1
1 1
127776 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93...

result:

ok Correct. (40 test cases)

Test #80:

score: 0
Accepted
time: 16ms
memory: 11168kb

input:

25
1 2
2 1
1 1
8 14
4 3
16 16
5 1
1 1
121 379
793 154
103 74
926 144
75 89
13 8
19 15
994009 997
230 254
1 1
148 254
8 11
2668 2557
343 220
14 7
6 2
73 25

output:

2 1 1
2 1 2
2 1 1
2 1 2
2 1 1
1 1
14 1 3 3 5 5 7 7 9 9 11 11 13 13 15
8 1 2 2 3 5 6 6 7
2 1 2
6 1 2 3 3 4 5
16 1 3 3 5 5 7 7 9 9 11 11 13 13 15 15 17
16 1 2 2 3 5 6 6 7 9 10 10 11 13 14 14 15
2 1 1
5 1 2 3 4 5
2 1 1
1 1
242 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 1...

result:

ok Correct. (25 test cases)

Test #81:

score: 0
Accepted
time: 8ms
memory: 11008kb

input:

26
58 9
642 392
1 1
1 3
106 28
1 1
1 1
38 5
1266 2765
1 3
4 2
16 16
699 728
315 366
371 15
32 44
44 59
988027 997
2 2
13 21
1 10
5301 1300
8 5
399 259
849 240
56 177

output:

18 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10
29 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57
428 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 ...

result:

ok Correct. (26 test cases)

Test #82:

score: 0
Accepted
time: 15ms
memory: 11204kb

input:

25
2 1
11 9
566 503
1 1
7 8
446 872
2123 1740
25 5
60 146
32 67
341 281
4127 834
1 1
879 608
2 20
1 1
991 988027
38 28
37 53
667 398
782 654
541 190
699 505
2 2
1 1

output:

2 1 1
2 1 2
18 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9
11 1 2 3 4 5 6 7 8 9 10 11
503 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 1...

result:

ok Correct. (25 test cases)

Test #83:

score: 0
Accepted
time: 17ms
memory: 10952kb

input:

30
353 150
426 161
1676 837
6 9
997 980051
1368 4284
55 14
1202 216
115 146
108 287
21 16
6835 3320
1370 2364
413 452
6 16
36 12
490 267
30 44
1 1
4 4
3 7
412 130
486 352
1 1
6 7
3 3
149 119
18 26
21 100
57 45

output:

150 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 100 ...

result:

ok Correct. (30 test cases)

Test #84:

score: 0
Accepted
time: 16ms
memory: 10924kb

input:

37
176 121
42 23
3637 1131
1 1
1 1
324 76
4 2
28 29
2015 459
1 50
1574 238
19 10
1 10
94 943
264 92
37 66
887 790
206 60
7 1
11 9
983 974153
111 139
7 8
19 17
1 1
332 487
6883 694
3 11
6 2
2 1
7 5
110 97
4 30
4383 7603
124 132
141 108
2 1

output:

176 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 67 68 68 69 69 70 70 71 71 72 72 73 73 74 74 75 75 76 76 77 77 78 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 9...

result:

ok Correct. (37 test cases)

Test #85:

score: 0
Accepted
time: 3ms
memory: 10736kb

input:

30
1089 6672
1056 120
51 75
71 65
1 1
3 7
2 3
162 7774
17960 4597
183 169
9 13
9425 661
618 913
267 152
477 2084
1 1
3 5
36001 2632
985 19
87 52
1 1
100 81
1670 1480
12 2
97 912673
23 26
1 1
139 750
802 680
145 382

output:

2502 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (30 test cases)

Test #86:

score: 0
Accepted
time: 11ms
memory: 10584kb

input:

41
63 41
109 7
14 48
466 7394
554 532
217 156
4685 11172
1911 1551
16 16
2 2
223 449
50 66
1 1
6 89
53 11
752 971
2 1
9409 912673
11 68
3 3
1096 3795
1693 828
4 4
13702 39283
1 9
284 672
3671 1823
64 157
4 3
1 1
5379 1404
3951 509
227 81
34 5
8 12
3 40
1 1
1 1
40 200
157 1027
1811 3978

output:

63 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 9 22 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 30 43 44 44 45 45 45 46 46 46 47 47 47 48 48 48 49 49 49 50 50 51
41 1 4 7 8 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 43 44 46 47 50 53
14 1 1 ...

result:

ok Correct. (41 test cases)

Test #87:

score: 0
Accepted
time: 11ms
memory: 11136kb

input:

12
1 1
2 1
5 7
28 36
1 1
1 1
3 8
1 3
9 5
1 1
999929 1259
2 2

output:

2 1 1
1 1
2 1 1
2 1 2
10 1 1 2 2 3 3 4 4 5 5
7 1 2 3 4 5 6 7
28 1 2 2 3 3 4 4 5 5 6 6 7 7 8 15 16 16 17 17 18 18 19 19 20 20 21 21 22
36 1 3 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 40 42
2 1 1
1 1
2 1 1
1 1
4 1 2 3 4
6 1 2 3 5 6 7
2 1 1
3 1 2 3
3 1...

result:

ok Correct. (12 test cases)

Test #88:

score: 0
Accepted
time: 17ms
memory: 5840kb

input:

41
30944 15179
8 75
597 3531
1 6
12 1
44 146
19749 22875
43190 12781
1471 2110
32 79
631 9
1477 1259
287454 289410
87221 92189
3 3
1816 2636
729 601
25 50
1 1
14381 70906
15281 10085
15 13
5733 8032
1 1
121693 145733
69749 23909
306 97
1 12
4785 5741
19 37
2 2
272 155
2 1
191 65
6723 13361
43893 561...

output:

15472 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...

result:

ok Correct. (41 test cases)

Test #89:

score: 0
Accepted
time: 15ms
memory: 13112kb

input:

25
277 17
1 1
1 2
2 6
1245 196
53 12
2 2
82 145
3 8
5 4
1 30
1 1
33 33
253 448
109 138
290 327
1 2
2 1
11 11
256 356
1 2
994009 524288
137 127
1 1
1863 2759

output:

34 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17
277 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73...

result:

ok Correct. (25 test cases)

Test #90:

score: 0
Accepted
time: 28ms
memory: 14988kb

input:

29
20 15
798 397
4 4
1 1
982081 994009
7 1
56 85
133 79
1 1
2 1
48 36
381 372
1 1
170 61
220 685
2 2
2356 296
252 442
3 2
618 325
84 71
65 38
2 1
10 11
2 7
18 2
1 3
4 7
25 37

output:

15 1 2 2 3 3 3 4 4 4 5 5 5 6 6 7
20 1 4 6 7 9 10 11 12 13 14 15 16 17 18 19 20 22 23 25 28
399 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 7...

result:

ok Correct. (29 test cases)

Test #91:

score: 0
Accepted
time: 23ms
memory: 12832kb

input:

36
4289 2120
47 32
18 25
126 67
62 192
59 1
168 360
821 3643
1500 1073
12 11
601 375
1656 1038
9 14
728 613
1 2
1 1
2 4
1 1
4758 2969
24037 12901
2 18
70 115
406 25
11993 10613
29 54
1 1
923521 524288
7 8
310 42
197 142
20 32
8063 14598
5274 1531
278 171
39 166
974 46

output:

2120 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 101 1...

result:

ok Correct. (36 test cases)

Test #92:

score: 0
Accepted
time: 33ms
memory: 12724kb

input:

31
9810 15970
764 741
6 6
1 1
13 2
63 153
79 79
78 14
11315 2838
923521 531441
13480 13770
1646 890
137 136
9 8
22 15
180 340
36 33
1909 4131
1703 1400
2 2
3 1
1 1
2026 1169
129 1400
6712 2708
4914 396
2 6
22 307
1 1
7169 10933
1 1

output:

10900 1 2 3 4 5 6 7 8 9 10 10 11 12 13 14 15 16 17 18 19 19 20 21 22 23 24 25 26 27 28 28 29 30 31 32 33 34 35 36 37 37 38 39 40 41 42 43 44 45 46 46 47 48 49 50 51 52 53 54 55 55 56 57 58 59 60 61 62 63 64 64 65 66 67 68 69 70 71 72 73 73 74 75 76 77 78 79 80 81 82 82 83 84 85 86 87 88 89 90 91 91 ...

result:

ok Correct. (31 test cases)

Test #93:

score: 0
Accepted
time: 24ms
memory: 11888kb

input:

36
3 3
230 1476
1 1
6 1
3688 33321
152 168
731 1509
74 115
1 29
1 4
2062 1542
2064 2576
32 29
14883 7639
988 4463
80 75
2 2
912673 279841
139 51
2713 7207
501 148
51 2
25 30
11517 14325
14 16
1 1
331 161
882 639
1 1
1807 1180
2 6
2 2
666 86
6 52
210 239
341 128

output:

6 1 1 2 2 3 3
3 1 2 3
552 1 2 3 4 5 6 6 7 7 8 8 9 9 10 10 11 11 11 12 12 12 13 13 14 14 15 15 16 16 16 17 17 17 18 18 19 19 20 20 21 21 21 22 22 22 23 23 24 24 25 25 26 26 26 27 27 27 28 28 29 29 30 30 31 31 31 32 32 32 33 33 34 34 35 35 36 36 36 37 37 37 38 38 39 39 40 40 41 41 41 42 42 42 43 43 44...

result:

ok Correct. (36 test cases)

Test #94:

score: 0
Accepted
time: 21ms
memory: 10724kb

input:

36
27328 32141
372 585
9 19
2348 400
26750 20719
28 16
203 239
4 3
11 11
1 1
18292 52201
3 1
17865 11540
1 4
92 70
304 460
1 1
2 2
1189 7441
7364 2071
44 31
5 4
180 320
38510 28928
122 115
5 5
2548 935
37188 78751
1 1
1090 4114
4569 165
653 810
1 6
6734 15086
371293 707281
269 190

output:

27328 1 2 2 3 3 4 4 5 5 6 6 7 7 8 15 16 16 17 17 18 18 19 19 20 20 21 21 22 29 30 30 31 31 32 32 33 33 34 34 35 35 36 43 44 44 45 45 46 46 47 47 48 48 49 49 50 57 58 58 59 59 60 60 61 61 62 62 63 63 64 71 72 72 73 73 74 74 75 75 76 76 77 77 78 85 86 86 87 87 88 88 89 89 90 90 91 91 92 99 100 100 101...

result:

ok Correct. (36 test cases)

Test #95:

score: 0
Accepted
time: 21ms
memory: 10024kb

input:

40
862 952
22 1
205 156
336 474
35 26
5121 1557
5 3
846 318
10310 17851
27 96
1589 227
77 158
2 2
141 2783
5 5
41 55
7822 3420
28 27
2 3
265 67
2372 18
1 1
1856 2770
62685 3910
571787 524288
4799 38454
2096 18681
2 2
4222 6522
947 1929
11674 6145
198204 20142
6 2
1102 779
1 1
8 13
24 32
33 141
24924...

output:

862 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...

result:

ok Correct. (40 test cases)

Test #96:

score: 0
Accepted
time: 29ms
memory: 11012kb

input:

41
5 14
14 52
75469 71109
2 2
1 1
631 904
74 106
524288 704969
1002 688
16436 4768
2 3
1 1
21854 13565
306 320
41 210
3163 8216
755 352
1 1
5454 11191
4 2
1 1
158 185
23 143
1 1
31941 32979
89 50
11 12
29757 18535
730 813
173 206
6 2
1444 3823
4771 305
1 1
44 2
88 68
4 1
5347 5434
7 18
28008 78378
9...

output:

7 1 2 3 4 5 6 7
10 1 2 3 4 5 8 9 10 11 12
26 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
28 1 2 3 4 5 6 7 8 9 10 11 12 13 14 27 28 29 30 31 32 33 34 35 36 37 38 39 40
71109 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 ...

result:

ok Correct. (41 test cases)

Test #97:

score: 0
Accepted
time: 20ms
memory: 12956kb

input:

34
98 163
4 6
14 11
82 1
13821 21255
10 22
15 4
15 2
1 1
4423 2780
1479 1680
3 2
14556 438
156 354
2 1
28 64
1 1
354 1278
22874 32321
968 550
10 7
1563 879
934 292
823543 707281
2218 1576
102 47
4 9
9 44
45724 63765
746 4924
152 65
25510 11120
2 2
1 1

output:

98 1 2 2 3 3 4 4 5 5 6 6 7 7 8 15 16 16 17 17 18 18 19 19 20 20 21 21 22 29 30 30 31 31 32 32 33 33 34 34 35 35 36 43 44 44 45 45 46 46 47 47 48 48 49 49 50 57 58 58 59 59 60 60 61 61 62 62 63 63 64 71 72 72 73 73 74 74 75 75 76 76 77 77 78 85 86 86 87 87 88 88 89 89 90 90 91 91 92
163 1 3 5 7 8 9 1...

result:

ok Correct. (34 test cases)

Test #98:

score: 0
Accepted
time: 26ms
memory: 13952kb

input:

36
2 119
27 17
6 2
1 1
1 1
1 13
26 31
155 157
912673 823543
1 2
3643 2665
16102 17734
13798 9749
476 476
6663 3820
6 19
3 7
1 1
2 2
7 130
1387 703
272 220
2939 2777
13 1
3 4
48 28
35 29
7 7
1 1
35896 18754
284 72
1 1
1032 3033
127 176
146 399
2 1

output:

14 1 2 2 3 3 4 4 5 5 6 6 7 7 8
17 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113
9 1 2 3 4 5 6 7 8 9
51 1 2 3 4 5 6 7 8 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 28 29 30 31 32 33 34 35
3 1 2 3
4 1 2 4 5
2 1 1
1 1
2 1 1
1 1
2 1 1
13 1...

result:

ok Correct. (36 test cases)

Test #99:

score: 0
Accepted
time: 28ms
memory: 11640kb

input:

40
858 537
42 163
250 365
2693 400
174 228
257 430
49 78
5891 2416
14939 453
1 1
524288 786431
11 6
5 2
3 3
43 261
61758 8780
19 192
3208 3154
64877 44965
5313 3399
10 20
18111 25542
9 7
46 52
9610 3756
1 1
3593 2031
44 215
6877 9773
15 2
65 26
140 665
2370 2673
1 1
34 35
1 1
3 1
3 4
1 1
13 17

output:

537 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 37 37...

result:

ok Correct. (40 test cases)

Test #100:

score: 0
Accepted
time: 16ms
memory: 5684kb

input:

44
2 1
447 544
4270 2693
936 618
18 24
68 190
2 3
664 1307
3 3
278721 63772
82 67
66840 36321
2036 1918
25 46
39 6
1 1
7 48
27758 18781
1061 1385
14 14
16536 2830
19028 45407
3 7
2 7
6 1
191002 30138
2706 690
1545 23255
21518 19702
288 555
3 6
2204 2868
1474 9846
4 2
2965 2989
197668 162174
13121 19...

output:

2 1 1
2 1 2
447 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36...

result:

ok Correct. (44 test cases)

Test #101:

score: 0
Accepted
time: 19ms
memory: 3828kb

input:

4000
44 72
176 47
488 420
89 102
212 35
164 61
140 66
260 277
10 368
310 115
11 341
7 190
156 239
19 28
65 109
127 124
369 87
405 221
195 150
141 338
16 7
107 200
60 462
100 237
452 426
487 255
86 37
71 23
489 217
285 103
327 67
248 294
115 51
100 216
198 247
89 311
74 174
223 169
60 140
57 464
210 ...

output:

48 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 23 24 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
66 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 49 50 51 52 53 54 55 56 57 58 59 60 ...

result:

ok Correct. (4000 test cases)

Test #102:

score: 0
Accepted
time: 23ms
memory: 3904kb

input:

3000
388 14
189 94
450 293
396 119
220 606
315 643
132 385
426 448
22 261
649 537
112 221
64 55
126 632
18 62
476 494
332 298
290 454
276 292
311 361
55 191
542 431
246 53
66 1
215 600
19 309
56 17
63 13
195 491
470 436
102 41
543 532
444 622
602 549
355 88
286 318
234 15
9 4
4 397
101 112
398 563
1...

output:

56 1 2 2 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 16 16 17
97 1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101 105 109 113 117 121 125 129 133 137 141 145 149 153 157 161 165 169 173 177 181 ...

result:

ok Correct. (3000 test cases)

Test #103:

score: 0
Accepted
time: 22ms
memory: 3860kb

input:

2500
308 379
182 193
494 380
43 69
198 97
91 91
386 168
136 57
367 464
764 545
124 177
337 43
234 185
633 557
114 2
224 130
402 503
176 90
1 12
410 118
3 487
406 692
65 4
742 638
24 43
12 11
207 42
389 546
8 9
401 656
21 59
801 801
154 140
442 51
24 20
485 228
98 39
127 41
275 39
23 447
513 671
121 ...

output:

308 1 2 2 3 3 4 4 5 5 6 6 7 7 8 15 16 16 17 17 18 18 19 19 20 20 21 21 22 29 30 30 31 31 32 32 33 33 34 34 35 35 36 43 44 44 45 45 46 46 47 47 48 48 49 49 50 57 58 58 59 59 60 60 61 61 62 62 63 63 64 71 72 72 73 73 74 74 75 75 76 76 77 77 78 85 86 86 87 87 88 88 89 89 90 90 91 91 92 99 100 100 101 1...

result:

ok Correct. (2500 test cases)

Test #104:

score: 0
Accepted
time: 13ms
memory: 3876kb

input:

2000
336 302
244 75
463 393
716 478
15 431
108 148
47 19
312 962
191 665
533 45
704 60
304 554
494 49
194 612
921 903
627 181
244 497
620 268
298 792
11 5
219 124
68 62
65 129
107 781
786 608
187 450
325 490
207 16
362 790
684 397
307 743
257 888
392 519
379 330
135 248
878 612
2 153
581 136
158 325...

output:

302 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...

result:

ok Correct. (2000 test cases)

Test #105:

score: 0
Accepted
time: 22ms
memory: 3824kb

input:

1500
234 402
374 748
1089 613
24 80
251 1179
861 1014
675 206
41 326
265 1085
1240 933
267 1282
120 197
75 963
580 173
149 503
144 312
83 97
1141 155
81 448
165 1189
495 249
999 1084
910 526
1290 254
16 173
862 347
773 825
282 1018
15 24
10 23
893 538
198 1110
250 459
463 729
233 436
446 979
186 666...

output:

268 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok Correct. (1500 test cases)

Test #106:

score: 0
Accepted
time: 17ms
memory: 3828kb

input:

1000
1026 1995
2 22
1219 113
238 682
859 798
146 98
184 1771
676 1664
329 456
918 1734
1033 20
13 17
31 193
311 1016
1397 1940
6 205
820 60
1425 1541
113 499
411 175
2 288
779 1669
1013 942
115 680
165 91
1062 671
543 290
180 343
134 225
993 1176
33 50
1247 1764
508 402
276 1047
3362 1791
1384 32
58...

output:

1330 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (1000 test cases)

Test #107:

score: 0
Accepted
time: 14ms
memory: 3900kb

input:

750
2373 1215
2551 377
20 493
372 1235
763 1195
1486 2603
747 578
640 967
197 400
1674 2167
318 396
1296 1308
85 655
1403 2305
1917 1697
823 1314
1496 1265
1729 2081
1284 255
2286 1635
536 665
679 651
240 2019
235 723
958 1066
18 62
392 190
2320 2463
614 167
472 147
559 1008
634 1370
1365 1641
1020 ...

output:

1695 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (750 test cases)

Test #108:

score: 0
Accepted
time: 15ms
memory: 3844kb

input:

500
1669 719
570 443
1001 2226
2998 2993
2855 2719
2789 1464
2777 2088
1179 699
2984 3781
699 269
3295 1149
842 215
2181 2141
462 380
2176 130
2205 692
2304 549
198 455
3666 2882
1335 2884
1857 1270
1777 1295
1387 271
311 333
2184 1311
2620 2182
841 1621
3490 1568
1231 2181
2595 3082
169 296
1585 86...

output:

1438 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...

result:

ok Correct. (500 test cases)

Test #109:

score: 0
Accepted
time: 17ms
memory: 3904kb

input:

250
268 333
418 540
6371 4690
15 4202
3466 2578
230 372
5190 5798
4363 5184
692 1769
5403 6362
2518 4632
5122 5292
1014 7741
37 372
8444 3420
107 6815
3260 2772
2074 2093
4862 1855
3967 7728
564 674
792 5880
160 1493
1779 2939
6601 1638
148 5543
1128 4050
6878 2606
4334 3595
6438 6596
3899 4865
152 ...

output:

268 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...

result:

ok Correct. (250 test cases)

Test #110:

score: 0
Accepted
time: 19ms
memory: 3904kb

input:

125
2849 10070
3126 7163
2047 3662
7796 8049
1212 49
7581 2808
9611 8688
5301 6143
108 1203
2255 3081
5385 8747
3872 2726
10406 6220
9531 7875
338 650
3002 2737
13341 2596
888 581
1134 12966
183 6831
4857 2146
6945 7814
13443 10817
5230 14462
96 140
6992 4737
11537 9024
12483 4846
12305 891
4433 164...

output:

5035 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (125 test cases)

Test #111:

score: 0
Accepted
time: 19ms
memory: 4048kb

input:

100
7159 2157
10415 970
19324 14008
298 4233
11641 12770
509 5637
2934 8915
6288 4722
14070 6323
3 30
8477 6877
16101 2505
13403 1764
2902 18181
1640 1184
4079 1667
73 17661
3654 7083
3739 6190
996 20110
1430 1200
3046 16934
18529 16916
4336 6334
7479 5381
16875 18790
12833 3403
9179 12996
1338 9652...

output:

2157 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 37 3...

result:

ok Correct. (100 test cases)

Test #112:

score: 0
Accepted
time: 16ms
memory: 4160kb

input:

50
12203 5744
43643 8540
16948 45662
4488 6743
10974 18625
21080 6312
38714 12746
5762 5889
27726 40541
7736 15631
10081 495
8896 3395
2403 2263
15548 3396
26888 19708
7995 11096
24581 26912
1298 11574
14811 39892
41820 28794
7626 10232
23981 4796
17976 15632
4627 38160
969 15431
19523 19747
2665 23...

output:

5744 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 ...

result:

ok Correct. (50 test cases)

Test #113:

score: 0
Accepted
time: 13ms
memory: 4972kb

input:

25
68773 78158
258 17659
6289 54936
13341 17981
60070 72947
7969 4604
15536 14866
2323 2802
1185 859
36081 73850
104704 25723
23678 30268
29910 65257
63653 13136
31941 13139
953 3239
81349 9896
13331 25528
5849 16938
2479 20737
76785 9067
3739 33179
18498 28963
13434 2242
3614 61002

output:

68773 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15 ...

result:

ok Correct. (25 test cases)

Test #114:

score: 0
Accepted
time: 24ms
memory: 5408kb

input:

10
49504 1041
19068 183591
113321 86560
48049 105109
139970 102484
286 30518
133051 119913
146298 172121
7422 137
65393 46486

output:

7072 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

result:

ok Correct. (10 test cases)

Test #115:

score: 0
Accepted
time: 22ms
memory: 7212kb

input:

5
277262 181058
63727 372609
108285 88494
31228 125539
116305 4605

output:

181058 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...

result:

ok Correct. (5 test cases)

Test #116:

score: 0
Accepted
time: 12ms
memory: 9128kb

input:

2
521875 319971
123 478125

output:

319971 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 37...

result:

ok Correct. (2 test cases)

Test #117:

score: 0
Accepted
time: 22ms
memory: 11884kb

input:

1
1000000 199252

output:

436000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...

result:

ok Correct. (1 test case)

Test #118:

score: 0
Accepted
time: 22ms
memory: 3840kb

input:

4000
77 93
264 120
348 323
71 222
100 19
231 92
86 173
172 76
296 243
174 326
209 107
190 177
195 6
14 343
278 151
342 276
253 294
198 96
147 189
207 342
10 256
179 52
143 170
178 158
85 130
160 271
122 305
16 74
350 199
302 128
142 69
95 23
246 66
232 14
312 37
199 9
282 222
71 197
166 12
304 121
1...

output:

77 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 9 9 9 9 9 9 9 10 10 10 10 10 10 10 11 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13 13 13 14 14 14 14 15 15 15 16 16 17
93 1 8 12 15 19 22 23 26 29 30 33 34 36 37 40 41 43 44 45 47 48 50 51 52 54 55 56 57 58 59 61 62 63 64 65 66...

result:

ok Correct. (4000 test cases)

Test #119:

score: 0
Accepted
time: 21ms
memory: 3848kb

input:

4000
9 256
29 268
320 288
347 344
219 105
339 109
111 262
187 265
12 142
59 49
125 83
116 196
314 205
177 112
341 348
316 239
180 153
119 116
175 321
227 179
347 263
98 304
308 261
52 27
42 237
149 55
279 279
100 170
110 63
284 34
99 267
147 337
198 90
249 319
191 342
332 316
283 156
56 29
72 62
55 ...

output:

48 1 2 3 4 4 5 5 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 18 18 19 19 20 21 22
48 1 2 3 17 18 19 33 34 35 49 50 51 65 66 67 81 82 83 97 98 99 113 114 115 129 130 131 145 146 147 161 162 163 177 178 179 193 194 195 209 210 211 225 226 227 241 242 243
...

result:

ok Correct. (4000 test cases)

Test #120:

score: 0
Accepted
time: 21ms
memory: 3856kb

input:

4000
336 5
204 23
60 200
219 330
327 5
180 39
136 251
32 253
216 4
129 133
282 193
134 1
99 153
69 187
219 58
152 211
294 124
130 156
5 190
105 157
330 207
87 51
278 199
20 346
143 73
197 76
138 295
190 348
151 66
142 30
26 190
175 293
113 86
272 335
318 247
309 173
234 86
263 110
196 24
224 254
9 7...

output:

40 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 7 7 7 7 7 8 8 8 8 8 9 9 9 9 10 10 10 11 11 12
42 1 9 17 25 33 41 49 57 65 73 81 89 97 105 113 121 129 137 145 153 161 169 177 185 193 201 209 217 225 233 241 249 257 265 273 281 289 297 305 313 321 329
68 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2...

result:

ok Correct. (4000 test cases)

Test #121:

score: 0
Accepted
time: 21ms
memory: 3924kb

input:

4000
249 73
204 154
33 205
43 334
252 311
92 208
198 41
288 271
94 248
281 195
152 276
157 102
139 104
42 158
341 119
101 33
124 116
284 347
233 172
19 22
93 253
146 190
58 87
256 350
104 338
289 95
148 202
254 272
301 270
310 141
37 17
201 303
44 124
270 185
139 231
68 90
42 135
83 257
109 302
46 3...

output:

83 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
219 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21...

result:

ok Correct. (4000 test cases)

Test #122:

score: 0
Accepted
time: 14ms
memory: 3912kb

input:

4000
61 322
285 335
113 160
182 217
345 199
247 51
44 91
277 11
137 221
37 255
44 298
144 263
200 343
140 26
36 165
160 22
348 189
174 75
217 17
10 345
76 98
234 288
177 237
302 189
64 41
204 35
285 269
26 142
11 240
159 133
312 204
125 334
62 295
227 228
5 33
283 126
149 257
39 113
156 149
76 240
2...

output:

122 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...

result:

ok Correct. (4000 test cases)

Test #123:

score: 0
Accepted
time: 17ms
memory: 3896kb

input:

4000
23 126
248 283
33 192
271 332
236 297
91 179
95 47
143 246
224 289
271 6
284 305
204 187
240 133
278 34
4 263
229 122
250 278
54 96
12 99
184 2
259 223
170 170
117 145
258 116
208 57
311 18
94 228
312 78
326 177
207 2
125 75
8 306
277 324
176 327
133 133
59 26
250 54
98 302
318 130
92 327
318 2...

output:

46 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24
63 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 ...

result:

ok Correct. (4000 test cases)

Test #124:

score: 0
Accepted
time: 14ms
memory: 3884kb

input:

4000
106 49
211 53
9 173
166 58
78 49
24 149
173 304
305 135
77 201
305 79
172 134
94 295
85 140
107 53
338 136
69 134
288 109
185 25
122 58
148 157
253 318
137 64
3 348
48 312
295 341
86 12
334 82
52 62
118 63
100 302
210 325
85 105
30 255
88 173
132 231
175 262
323 10
72 321
6 187
42 106
218 342
1...

output:

53 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
98 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 54 55 ...

result:

ok Correct. (4000 test cases)

Test #125:

score: 0
Accepted
time: 18ms
memory: 3836kb

input:

4000
191 134
47 218
50 133
301 156
225 214
240 163
314 343
320 183
24 324
213 75
329 344
79 237
71 7
135 104
293 172
213 309
130 137
8 76
309 145
231 342
112 250
62 230
32 170
12 337
221 239
64 347
270 325
12 95
116 260
229 284
83 48
89 146
251 196
31 134
180 277
222 29
264 117
87 8
180 31
348 129
2...

output:

134 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...

result:

ok Correct. (4000 test cases)

Test #126:

score: 0
Accepted
time: 22ms
memory: 3896kb

input:

4000
102 30
256 208
177 181
341 288
237 271
8 180
161 2
263 51
210 266
29 6
232 82
156 277
43 110
172 22
89 14
140 314
167 182
179 56
70 156
318 324
151 192
314 80
32 95
23 247
247 121
144 14
191 175
275 205
322 5
164 274
257 120
334 65
155 172
201 305
198 267
275 10
254 307
155 127
2 336
189 80
15 ...

output:

51 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
60 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 ...

result:

ok Correct. (4000 test cases)

Test #127:

score: 0
Accepted
time: 21ms
memory: 3916kb

input:

4000
24 22
312 9
223 173
63 142
255 108
173 150
95 52
287 334
258 325
7 225
184 326
19 226
161 138
61 318
161 175
174 338
91 304
56 131
156 161
165 161
112 211
83 36
299 50
333 98
71 271
229 316
70 282
136 260
311 317
221 144
70 231
249 242
95 224
67 349
337 283
105 271
86 157
135 252
73 121
193 98
...

output:

22 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12
24 1 3 5 7 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 28 30 32 34
52 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
54 1 2 3 4 5 6 7 8 9 53 54 5...

result:

ok Correct. (4000 test cases)

Test #128:

score: 0
Accepted
time: 17ms
memory: 3944kb

input:

4000
119 199
53 209
315 113
313 249
71 79
158 332
243 167
11 196
113 298
147 39
295 160
35 277
135 72
106 199
234 144
218 228
331 184
49 141
140 193
5 309
254 274
147 133
39 300
90 58
58 80
213 138
185 77
112 49
121 347
38 219
7 38
286 17
346 153
173 146
24 302
84 192
261 84
329 96
120 62
276 2
135 ...

output:

119 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 9 9 9 9 9 9 9 10 10 10 10 10 10 10 11 11 11 11 11 11 11 12 12 12 12 12 12 12 13 13 13 13 13 13 13 14 14 14 14 14 14 14 15 15 15 15 15 15 15 16 16 16 16 16 16 16 17 17 17 17 17 17 17 18 18 18 18 18 18 19 19 19 19 19 20 20 20 20...

result:

ok Correct. (4000 test cases)

Test #129:

score: 0
Accepted
time: 17ms
memory: 3848kb

input:

4000
57 326
271 53
193 152
64 96
339 200
114 169
79 25
327 206
229 99
208 121
96 30
163 288
253 269
4 255
109 62
266 301
292 196
127 337
173 283
335 55
117 144
303 110
99 119
148 66
279 58
125 225
115 330
346 30
187 239
257 213
24 168
346 241
272 184
279 101
177 90
186 34
346 17
119 269
123 326
245 ...

output:

114 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...

result:

ok Correct. (4000 test cases)

Test #130:

score: 0
Accepted
time: 18ms
memory: 3900kb

input:

4000
45 104
51 234
62 240
213 143
320 323
43 336
276 88
278 306
221 167
166 306
117 38
67 10
259 285
91 190
344 325
57 75
62 310
233 116
273 308
81 22
248 337
348 319
63 181
70 265
57 177
123 56
147 11
190 144
350 66
312 241
119 41
291 249
344 287
79 38
35 27
275 275
27 300
277 245
281 241
33 56
123...

output:

65 1 2 3 4 5 6 7 8 9 10 10 11 11 12 12 13 13 14 15 16 17 18 19 19 20 20 21 21 22 22 23 24 25 26 27 28 28 29 29 30 30 31 31 32 33 34 35 36 37 37 38 38 39 39 40 40 41 42 43 44 45 46 47 48 49
72 1 2 3 4 5 6 7 8 9 14 15 16 17 18 19 20 21 22 27 28 29 30 31 32 33 34 35 40 41 42 43 44 45 46 47 48 53 54 55 ...

result:

ok Correct. (4000 test cases)

Test #131:

score: 0
Accepted
time: 17ms
memory: 3872kb

input:

4000
47 289
213 206
264 187
1 315
78 59
263 69
334 248
69 24
216 79
275 111
101 326
121 47
207 299
147 123
28 239
229 184
108 288
201 139
200 229
248 317
146 346
232 317
284 277
299 133
217 240
55 68
36 201
41 154
240 107
76 142
100 112
120 86
34 64
336 166
86 232
195 311
251 342
67 219
350 255
7 14...

output:

94 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47
289 1 2 3 4 5 6 7 8 9 10 11 12 13...

result:

ok Correct. (4000 test cases)

Test #132:

score: 0
Accepted
time: 17ms
memory: 3912kb

input:

4000
125 142
166 165
305 177
27 153
313 105
346 284
303 4
95 45
5 249
73 268
246 341
307 115
84 284
172 79
16 99
71 314
116 50
321 306
25 74
276 301
127 278
72 115
50 82
326 255
166 241
72 344
247 26
315 143
7 267
100 272
343 205
243 337
298 84
78 107
63 322
339 85
48 276
86 128
175 273
229 232
64 3...

output:

125 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 127 1...

result:

ok Correct. (4000 test cases)

Test #133:

score: 0
Accepted
time: 21ms
memory: 3832kb

input:

4000
290 233
266 14
178 200
350 108
25 73
134 128
310 320
337 229
82 328
201 34
255 41
321 273
284 316
145 287
46 8
26 179
254 237
4 232
24 236
317 244
8 51
344 73
173 158
158 97
141 83
188 221
39 108
73 149
77 132
11 146
203 235
22 343
153 147
39 202
3 56
268 50
17 83
159 313
122 296
183 4
302 210
...

output:

290 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 101 10...

result:

ok Correct. (4000 test cases)

Test #134:

score: 0
Accepted
time: 18ms
memory: 3920kb

input:

4000
271 204
334 5
224 165
256 234
306 276
77 288
324 236
158 240
136 292
5 104
135 100
235 150
278 33
251 137
264 237
70 346
97 13
278 331
19 186
156 116
11 241
128 103
220 96
281 178
338 257
83 114
36 346
169 149
68 124
156 294
103 110
258 9
101 132
110 73
97 14
160 148
85 151
291 126
255 72
157 2...

output:

204 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 100 ...

result:

ok Correct. (4000 test cases)

Test #135:

score: 0
Accepted
time: 21ms
memory: 3836kb

input:

4000
27 267
259 166
235 202
57 185
187 123
37 242
322 314
277 126
322 75
265 139
143 74
242 96
185 267
32 181
53 177
103 344
209 330
258 41
37 18
15 341
220 175
318 322
137 270
340 151
81 270
313 24
10 213
305 234
103 52
152 226
148 290
123 229
232 50
272 233
187 288
311 343
227 83
303 114
320 125
2...

output:

81 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 29
89 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 ...

result:

ok Correct. (4000 test cases)

Test #136:

score: 0
Accepted
time: 14ms
memory: 3848kb

input:

4000
184 72
110 238
67 179
321 148
31 69
24 176
50 184
291 239
285 43
219 101
328 319
273 177
224 84
52 238
72 21
240 216
189 11
291 332
148 247
87 86
335 215
53 81
19 91
162 99
284 233
92 222
201 219
25 302
181 274
167 264
207 222
134 211
117 254
211 93
111 180
286 88
216 332
204 130
220 233
54 148...

output:

96 1 2 3 4 5 6 7 7 8 8 9 10 11 12 13 13 14 14 15 16 17 18 19 19 20 20 21 22 23 24 25 25 26 26 27 28 29 30 31 31 32 32 33 34 35 36 37 37 38 38 39 40 41 42 43 43 44 44 45 46 47 48 49 49 50 50 51 52 53 54 55 55 56 56 57 58 59 60 61 61 62 62 63 64 65 66 67 67 68 68 69 70 71 72 73 74
138 1 2 3 4 5 6 9 10...

result:

ok Correct. (4000 test cases)

Test #137:

score: 0
Accepted
time: 14ms
memory: 3876kb

input:

4000
250 39
62 220
62 175
191 199
296 72
267 29
213 101
181 181
70 27
222 313
132 76
301 22
316 107
176 129
28 99
236 113
24 66
33 162
70 303
208 207
334 143
126 203
280 316
33 16
149 236
126 122
110 242
11 261
309 165
125 130
27 76
56 185
13 180
252 23
193 292
178 171
57 65
258 208
333 91
148 225
2...

output:

78 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40
125 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 ...

result:

ok Correct. (4000 test cases)

Test #138:

score: 0
Accepted
time: 21ms
memory: 3840kb

input:

4000
139 254
112 243
47 145
127 325
270 242
223 258
19 37
137 147
205 101
9 345
127 245
278 279
100 59
219 8
270 15
12 80
31 177
204 267
170 213
238 333
287 246
136 255
248 295
159 186
348 1
264 247
326 276
7 106
230 145
268 221
169 217
313 307
4 286
257 137
344 147
156 226
320 144
230 194
344 108
3...

output:

139 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 128 129 130 131 132 133 134 135 136 137 138 139 141 143 145 147 149 151 153 155 157 159 161 163...

result:

ok Correct. (4000 test cases)

Test #139:

score: 0
Accepted
time: 17ms
memory: 3912kb

input:

4000
253 27
98 170
118 114
186 233
152 97
269 107
159 160
285 104
306 120
153 107
116 9
248 215
126 197
56 95
334 198
88 244
109 122
79 60
292 25
10 275
174 222
132 85
203 253
187 81
136 125
163 292
126 262
72 13
269 168
40 251
80 227
306 259
219 93
281 135
8 1
45 22
108 331
27 293
135 66
81 307
4 1...

output:

69 1 2 3 4 5 6 7 8 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 34 35 36 37 38 39 40 41
99 1 2 3 4 5 6 7 8 9 24 25 26 27 28 29 30 31 32 47 48 49 50 51 52 53 54 55 70 71 72 73 74 75 76 77 ...

result:

ok Correct. (4000 test cases)

Test #140:

score: 0
Accepted
time: 21ms
memory: 3832kb

input:

4000
194 201
77 161
302 194
316 314
141 266
238 232
153 48
117 151
9 100
329 11
69 59
335 200
316 169
67 90
179 340
305 172
115 237
42 1
205 287
112 152
119 8
114 233
233 241
24 52
184 60
268 71
158 285
300 202
73 87
241 55
183 15
331 15
79 312
153 285
174 79
125 331
271 85
180 179
227 206
140 93
15...

output:

194 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...

result:

ok Correct. (4000 test cases)

Test #141:

score: 0
Accepted
time: 22ms
memory: 3924kb

input:

4000
125 151
278 227
62 33
159 75
223 302
39 80
307 99
35 24
151 173
122 113
308 10
27 115
6 43
157 164
328 116
307 302
87 260
173 50
23 61
107 232
134 8
53 13
215 296
336 277
299 240
176 243
282 30
281 105
147 26
187 43
28 196
337 267
349 30
56 229
315 105
24 269
21 256
68 127
190 228
339 170
191 2...

output:

250 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53...

result:

ok Correct. (4000 test cases)

Test #142:

score: 0
Accepted
time: 22ms
memory: 3880kb

input:

4000
106 59
149 318
50 289
55 186
237 8
195 155
309 261
195 99
171 288
53 158
136 264
186 93
93 177
173 164
95 336
109 334
227 141
86 203
269 39
265 162
286 81
300 240
28 235
16 213
107 123
232 125
299 321
345 11
274 199
250 70
216 216
8 61
70 207
215 108
7 262
193 156
331 178
296 93
144 10
336 218
...

output:

59 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 54 55 56 57 58 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111
106 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 ...

result:

ok Correct. (4000 test cases)

Test #143:

score: 0
Accepted
time: 22ms
memory: 3888kb

input:

4000
261 342
218 37
310 93
26 58
215 326
236 4
242 157
229 39
281 303
80 94
321 64
2 321
201 114
145 203
252 130
274 271
330 279
344 283
311 142
326 69
153 135
76 246
171 294
12 40
245 316
145 242
249 36
323 323
19 200
258 323
19 236
166 64
223 37
258 25
246 215
99 64
57 9
187 188
298 266
250 21
129...

output:

261 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 31 88 89 89 90 90 90 91 91 91 92 92 92 93 93 93 94 94 94 95 95...

result:

ok Correct. (4000 test cases)

Test #144:

score: 0
Accepted
time: 22ms
memory: 3956kb

input:

4000
78 30
226 49
315 50
34 258
165 319
71 31
222 72
281 211
338 339
104 193
311 152
83 188
23 338
225 104
80 39
258 217
151 279
176 205
212 100
334 213
171 246
221 44
313 210
318 137
55 241
43 333
84 42
346 181
202 315
88 104
65 280
6 12
49 88
277 134
32 350
18 25
90 135
71 262
11 268
249 336
34 17...

output:

45 1 2 3 3 4 5 5 6 7 7 8 9 9 10 11 11 12 13 13 14 15 15 16 17 17 18 19 19 20 21 21 22 23 23 24 25 25 26 27 27 28 29 29 30 31
52 1 2 4 5 7 8 10 11 13 14 16 17 19 20 22 23 25 26 28 29 31 32 34 35 37 38 40 41 43 44 46 47 49 50 52 53 55 56 58 59 61 62 64 65 67 68 70 71 73 74 76 77
98 1 2 2 3 3 4 4 5 5 6...

result:

ok Correct. (4000 test cases)

Test #145:

score: 0
Accepted
time: 14ms
memory: 3888kb

input:

4000
130 177
188 7
185 76
320 103
72 170
192 329
341 330
227 23
328 44
260 62
35 202
256 25
347 280
346 143
245 190
63 105
203 225
108 277
219 251
41 6
333 81
225 314
118 258
168 331
109 336
282 210
291 73
220 103
308 301
309 200
64 135
129 256
323 341
137 188
307 270
208 101
130 234
124 37
295 166
...

output:

130 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 101 10...

result:

ok Correct. (4000 test cases)

Test #146:

score: 0
Accepted
time: 18ms
memory: 3880kb

input:

4000
189 262
74 254
299 81
272 265
257 115
100 154
236 191
2 293
184 133
208 205
266 171
34 266
26 12
264 346
206 212
106 211
211 282
87 227
21 178
7 260
161 253
237 295
185 231
226 36
347 192
49 305
31 300
229 297
282 150
149 227
117 193
9 121
103 86
52 200
41 236
46 20
291 156
215 272
137 282
202 ...

output:

189 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 9 22 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 30 43 44 44 45 45 45 46 46 46 47 47 47 48 48 48 49 49 49 50 50 51 64 65 65 66 66 66 67 67 67 68 68 68 69 69 69 70 70 70 71 71 72 85 86 86 87 87 87 88 88 88 89 89 89 90 90 90 91 91 91 92 92 93 10...

result:

ok Correct. (4000 test cases)

Test #147:

score: 0
Accepted
time: 13ms
memory: 3788kb

input:

4000
87 174
181 192
261 346
62 170
243 313
221 26
14 165
90 45
213 60
202 33
202 166
121 19
33 318
21 207
80 104
17 311
73 97
101 261
30 47
160 167
73 43
274 295
233 341
177 189
2 349
118 34
271 134
200 151
325 125
21 347
251 183
226 47
149 151
332 259
165 71
156 106
241 90
119 20
295 232
311 174
12...

output:

87 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 31
174 1 4 7 10 13 16 19 22 25 28 30 31 33 34 36 37 39 40 42 43...

result:

ok Correct. (4000 test cases)

Test #148:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

10
335 135
135 250
138 25
75 272
231 17
271 168
188 46
56 308
277 236
274 80

output:

201 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 69 70 71 72 73 74 75 76 77 78 79 80...

result:

ok Correct. (10 test cases)

Extra Test:

score: 0
Extra Test Passed