QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#264847#7740. Puzzle: Question Markucup-team896#AC ✓61ms19700kbC++2311.4kb2023-11-25 15:39:492023-11-25 15:39:50

Judging History

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

  • [2023-11-25 15:39:50]
  • 评测
  • 测评结果:AC
  • 用时:61ms
  • 内存:19700kb
  • [2023-11-25 15:39:49]
  • 提交

answer

/*
 * @Author:             cmk666
 * @Created time:       2023-11-25 14:56:02
 * @Last Modified time: 2023-11-25 15:38:52
 */
#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;
int n, c, ans[2009][2009];
inline void solve(int n, int d = 0)
{
#define a(x, y) ans[x + d][y]
	switch ( n & 3 )
	{
	case 0:
		for ( int i = 1 ; i != n + 1 ; i += 2 ) for ( int j = 1 ; j != n + 1 ; j += 4 )
			a(i, j    ) = a(i, j + 1) = a(i + 1, j    ) = a(i + 1, j + 2) = ++c,
			a(i, j + 2) = a(i, j + 3) = a(i + 1, j + 1) = a(i + 1, j + 3) = ++c;
		break;
	case 1:
		if ( n == 1 ) break;
		if ( n == 5 )
		{
			a(1, 1) = a(1, 3) = a(2, 1) = a(2, 2) = ++c;
			a(1, 2) = a(1, 4) = a(2, 3) = a(2, 4) = ++c;
			a(3, 1) = a(3, 2) = a(4, 2) = a(5, 1) = ++c;
			a(4, 1) = a(4, 3) = a(5, 2) = a(5, 3) = ++c;
			a(2, 5) = a(3, 4) = a(4, 4) = a(4, 5) = ++c;
			break;
		}
		if ( n == 9 )
		{
			a(1, 1) = a(1, 2) = a(2, 1) = a(3, 2) = ++c;
			a(2, 2) = a(3, 1) = a(4, 1) = a(4, 2) = ++c;
			a(1, 3) = a(1, 4) = a(2, 3) = a(2, 5) = ++c;
			a(1, 5) = a(1, 6) = a(2, 4) = a(2, 6) = ++c;
			a(1, 7) = a(1, 8) = a(2, 7) = a(2, 9) = ++c;
			a(1, 9) = a(2, 8) = a(3, 8) = a(3, 9) = ++c;
			a(3, 3) = a(4, 4) = a(5, 3) = a(5, 4) = ++c;
			a(3, 4) = a(3, 5) = a(4, 3) = a(4, 5) = ++c;
			a(3, 6) = a(3, 7) = a(4, 7) = a(5, 6) = ++c;
			a(4, 6) = a(5, 5) = a(6, 5) = a(6, 6) = ++c;
			a(4, 8) = a(4, 9) = a(5, 9) = a(6, 8) = ++c;
			a(5, 7) = a(5, 8) = a(6, 7) = a(6, 9) = ++c;
			a(5, 1) = a(5, 2) = a(6, 1) = a(6, 3) = ++c;
			a(6, 2) = a(6, 4) = a(7, 3) = a(7, 4) = ++c;
			a(7, 1) = a(7, 2) = a(8, 1) = a(9, 2) = ++c;
			a(8, 2) = a(8, 3) = a(9, 1) = a(9, 3) = ++c;
			a(8, 4) = a(8, 5) = a(9, 4) = a(9, 6) = ++c;
			a(7, 5) = a(7, 6) = a(8, 6) = a(9, 5) = ++c;
			a(7, 7) = a(7, 9) = a(8, 8) = a(8, 9) = ++c;
			a(7, 8) = a(8, 7) = a(9, 7) = a(9, 8) = ++c;
			break;
		}
		solve(n - 4, d + 2);
		for ( int i = 1 ; i != n - 4 ; i += 4 )
			a(    1, i    ) = a(    1, i + 1) = a(    2, i    ) = a(    2, i + 2) = ++c,
			a(    1, i + 2) = a(    1, i + 3) = a(    2, i + 1) = a(    2, i + 3) = ++c,
			a(n - 1, i    ) = a(n - 1, i + 1) = a(n    , i    ) = a(n    , i + 2) = ++c,
			a(n - 1, i + 2) = a(n - 1, i + 3) = a(n    , i + 1) = a(n    , i + 3) = ++c,
			a(i    , n - 1) = a(i + 1, n - 1) = a(i    , n    ) = a(i + 2, n    ) = ++c,
			a(i + 2, n - 1) = a(i + 3, n - 1) = a(i + 1, n    ) = a(i + 3, n    ) = ++c;
		for ( int i = 4 ; i != n - 5 ; i += 4 )
			a(i    , n - 3) = a(i + 1, n - 3) = a(i    , n - 2) = a(i + 2, n - 2) = ++c,
			a(i + 2, n - 3) = a(i + 3, n - 3) = a(i + 1, n - 2) = a(i + 3, n - 2) = ++c;
		a(    1, n - 4) = a(    1, n - 3) = a(    2, n - 4) = a(    2, n - 2) = ++c,
		a(    1, n - 2) = a(    2, n - 3) = a(    3, n - 3) = a(    3, n - 2) = ++c,
		a(n - 5, n - 3) = a(n - 5, n - 2) = a(n - 4, n - 3) = a(n - 4, n - 1) = ++c,
		a(n - 4, n - 2) = a(n - 4, n    ) = a(n - 3, n - 1) = a(n - 3, n    ) = ++c,
		a(n - 3, n - 3) = a(n - 3, n - 2) = a(n - 2, n - 2) = a(n - 1, n - 3) = ++c,
		a(n - 2, n - 3) = a(n - 1, n - 4) = a(n    , n - 4) = a(n    , n - 3) = ++c,
		a(n - 2, n - 1) = a(n - 2, n    ) = a(n - 1, n    ) = a(n    , n - 1) = ++c,
		a(n - 1, n - 2) = a(n - 1, n - 1) = a(n    , n - 2) = a(n    , n    ) = ++c;
		break;
	case 2:
		solve(n - 2, d);
		for ( int i = 1 ; i != n - 1 ; i += 4 )
			a(n - 1, i    ) = a(n - 1, i + 1) = a(n    , i    ) = a(n    , i + 2) = ++c,
			a(n - 1, i + 2) = a(n - 1, i + 3) = a(n    , i + 1) = a(n    , i + 3) = ++c,
			a(i    , n - 1) = a(i + 1, n - 1) = a(i    , n    ) = a(i + 2, n    ) = ++c,
			a(i + 2, n - 1) = a(i + 3, n - 1) = a(i + 1, n    ) = a(i + 3, n    ) = ++c;
		break;
	case 3:
		solve(n - 2, d);
		for ( int i = 1 ; i != n - 2 ; i += 4 )
			a(n - 1, i    ) = a(n - 1, i + 1) = a(n    , i    ) = a(n    , i + 2) = ++c,
			a(n - 1, i + 2) = a(n - 1, i + 3) = a(n    , i + 1) = a(n    , i + 3) = ++c,
			a(i    , n - 1) = a(i + 1, n - 1) = a(i    , n    ) = a(i + 2, n    ) = ++c,
			a(i + 2, n - 1) = a(i + 3, n - 1) = a(i + 1, n    ) = a(i + 3, n    ) = ++c;
		a(n - 1, n - 2) = a(n - 1, n - 1) = a(n    , n - 2) = a(n    , n    ) = ++c,
		a(n - 2, n - 1) = a(n - 2, n    ) = a(n - 1, n    ) = a(n    , n - 1) = ++c;
		break;
	}
#undef a
}
inline void work()
{
	read(n), c = 0;
	For(i, 1, n) For(j, 1, n) ans[i][j] = 0;
	solve(n), println(c);
	For(i, 1, n) For(j, 1, n) write(ans[i][j], j == n ? '\n' : ' ');
}
int main() { int t; read(t); For(tt, 1, t) work(); return 0; }
// 想上GM捏 想上GM捏 想上GM捏 想上GM捏 想上GM捏
// 伊娜可爱捏 伊娜贴贴捏

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3652kb

input:

2
3
4

output:

2
0 2 2
1 1 2
1 2 1
4
1 1 2 2
1 2 1 2
3 3 4 4
3 4 3 4

result:

ok Correct. (2 test cases)

Test #2:

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

input:

246
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
...

output:

0
0
0
0 0
0 0
2
0 2 2
1 1 2
1 2 1
4
1 1 2 2
1 2 1 2
3 3 4 4
3 4 3 4
5
1 2 1 2 0
1 1 2 2 5
3 3 0 5 0
4 3 4 5 5
3 4 4 0 0
8
1 1 2 2 7 7
1 2 1 2 7 8
3 3 4 4 8 7
3 4 3 4 8 8
5 5 6 6 0 0
5 6 5 6 0 0
11
1 2 1 2 0 8 8
1 1 2 2 5 8 9
3 3 0 5 0 9 8
4 3 4 5 5 9 9
3 4 4 0 0 11 11
6 6 7 7 10 10 11
6 7 6 7 10 11 ...

result:

ok Correct. (246 test cases)

Test #3:

score: 0
Accepted
time: 37ms
memory: 6244kb

input:

64
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310

output:

15252
14521 14521 14522 14522 14527 14527 14528 14528 14533 14533 14534 14534 14539 14539 14540 14540 14545 14545 14546 14546 14551 14551 14552 14552 14557 14557 14558 14558 14563 14563 14564 14564 14569 14569 14570 14570 14575 14575 14576 14576 14581 14581 14582 14582 14587 14587 14588 14588 14593 ...

result:

ok Correct. (64 test cases)

Test #4:

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

input:

45
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355

output:

24180
23257 23257 23258 23258 23263 23263 23264 23264 23269 23269 23270 23270 23275 23275 23276 23276 23281 23281 23282 23282 23287 23287 23288 23288 23293 23293 23294 23294 23299 23299 23300 23300 23305 23305 23306 23306 23311 23311 23312 23312 23317 23317 23318 23318 23323 23323 23324 23324 23329 ...

result:

ok Correct. (45 test cases)

Test #5:

score: 0
Accepted
time: 40ms
memory: 8916kb

input:

35
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390

output:

31684
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. (35 test cases)

Test #6:

score: 0
Accepted
time: 36ms
memory: 8972kb

input:

30
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420

output:

38220
37057 37057 37058 37058 37063 37063 37064 37064 37069 37069 37070 37070 37075 37075 37076 37076 37081 37081 37082 37082 37087 37087 37088 37088 37093 37093 37094 37094 37099 37099 37100 37100 37105 37105 37106 37106 37111 37111 37112 37112 37117 37117 37118 37118 37123 37123 37124 37124 37129 ...

result:

ok Correct. (30 test cases)

Test #7:

score: 0
Accepted
time: 46ms
memory: 19556kb

input:

2
2000
1000

output:

1000000
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. (2 test cases)

Test #8:

score: 0
Accepted
time: 61ms
memory: 19684kb

input:

2
1999
999

output:

999000
993013 993013 993014 993014 993019 993019 993020 993020 993025 993025 993026 993026 993031 993031 993032 993032 993037 993037 993038 993038 993043 993043 993044 993044 993049 993049 993050 993050 993055 993055 993056 993056 993061 993061 993062 993062 993067 993067 993068 993068 993073 993073...

result:

ok Correct. (2 test cases)

Test #9:

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

input:

2
1998
998

output:

998000
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. (2 test cases)

Test #10:

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

input:

2
1997
997

output:

997002
993013 993013 993014 993014 993019 993019 993020 993020 993025 993025 993026 993026 993031 993031 993032 993032 993037 993037 993038 993038 993043 993043 993044 993044 993049 993049 993050 993050 993055 993055 993056 993056 993061 993061 993062 993062 993067 993067 993068 993068 993073 993073...

result:

ok Correct. (2 test cases)

Test #11:

score: 0
Accepted
time: 41ms
memory: 19508kb

input:

2
1996
996

output:

996004
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. (2 test cases)

Test #12:

score: 0
Accepted
time: 53ms
memory: 19612kb

input:

2
1995
995

output:

995006
989031 989031 989032 989032 989037 989037 989038 989038 989043 989043 989044 989044 989049 989049 989050 989050 989055 989055 989056 989056 989061 989061 989062 989062 989067 989067 989068 989068 989073 989073 989074 989074 989079 989079 989080 989080 989085 989085 989086 989086 989091 989091...

result:

ok Correct. (2 test cases)

Test #13:

score: 0
Accepted
time: 55ms
memory: 19492kb

input:

2
1994
994

output:

994008
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. (2 test cases)

Test #14:

score: 0
Accepted
time: 49ms
memory: 19656kb

input:

2
1993
993

output:

993012
989031 989031 989032 989032 989037 989037 989038 989038 989043 989043 989044 989044 989049 989049 989050 989050 989055 989055 989056 989056 989061 989061 989062 989062 989067 989067 989068 989068 989073 989073 989074 989074 989079 989079 989080 989080 989085 989085 989086 989086 989091 989091...

result:

ok Correct. (2 test cases)

Test #15:

score: 0
Accepted
time: 58ms
memory: 19544kb

input:

2
1992
992

output:

992016
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. (2 test cases)

Test #16:

score: 0
Accepted
time: 54ms
memory: 19628kb

input:

2
1991
991

output:

991020
985057 985057 985058 985058 985063 985063 985064 985064 985069 985069 985070 985070 985075 985075 985076 985076 985081 985081 985082 985082 985087 985087 985088 985088 985093 985093 985094 985094 985099 985099 985100 985100 985105 985105 985106 985106 985111 985111 985112 985112 985117 985117...

result:

ok Correct. (2 test cases)

Extra Test:

score: 0
Extra Test Passed