QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#531454#2555. Two BulletsKinNaAC ✓1902ms209864kbC++205.8kb2024-08-24 20:39:142024-08-24 20:39:14

Judging History

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

  • [2024-08-24 20:39:14]
  • 评测
  • 测评结果:AC
  • 用时:1902ms
  • 内存:209864kb
  • [2024-08-24 20:39:14]
  • 提交

answer

/**
 * 论文题 :
 * ·首先,找到一个特殊的拓扑序。像一般的拓扑排序那样,每次删去一个入度为0的点并加到拓扑序中。
 * 	但此处,如果有多个入度为 0 的点,设 N(v) 为v的入边被删除的时间的集合。
 * 	我们将每个 N(v) 中的元素降序排列后寻找字典序最小的 N(v) (换句话说,尽可能早地被减小入度的 v ),
 * 	并在这一轮中选择 v.
 * ·然后,逆着拓扑序反着求答案。每次取两个在拓扑序中最靠后的,出度为 0 的点删去,并加到答案的前端。
*/

#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#include <queue>
using namespace std;
using PII = pair <int, int>;
const int N = 1e5 + 10;
const int inf = 0x3f3f3f3f;

inline int R() {
	int x = 0; char c = getchar(); while (!isdigit(c)) c = getchar();
	while (isdigit(c)) x = x * 10 + c - '0', c = getchar(); return x;
}

int n;

struct BIT {
	int t[N];
	void upd(int x, int v) {while (x) {t[x] = max(t[x], v); x -= x & -x;}}
	int qry(int x) {int res = 0; while (x <= n) {res = max(res, t[x]); x += x & -x;} return res;}
} bit;

struct SegInSeg {
	struct Node {int mx, ls, rs;} t[N * 700]; int tot;
		#define mid (l + r >> 1)
		#define lrt (t[rt].ls)
		#define rrt (t[rt].rs)
		int Rt[N << 2];
		void upd_(int p, int v, int l, int r, int &rt) {
			if (!rt) rt = ++tot;
			if (l == r) {t[rt].mx = v; return ;}
			if (p <= mid) upd_(p, v, l, mid, lrt);
			else upd_(p, v, mid + 1, r, rrt);
			t[rt].mx = max(t[lrt].mx, t[rrt].mx);
		}
		void upd_(int p, int v, int rt) {upd_(p, v, 1, n, Rt[rt]);}

		int qry_(int ll, int rr, int l, int r, int rt) {
			if (ll > rr || !rt) return 0;
			if (ll <= l && r <= rr) return t[rt].mx;
			if (rr <= mid) return qry_(ll, rr, l, mid, lrt);
			if (mid < ll) return qry_(ll, rr, mid + 1, r, rrt);
			return max(qry_(ll, rr, l, mid, lrt), qry_(ll, rr, mid + 1, r, rrt));
		}
		int qry_(int l, int r, int rt) {return qry_(l, r, 1, n, Rt[rt]);}
		#undef mid
		#undef lrt
		#undef rrt
	#define mid (l + r >> 1)
	#define lrt (rt << 1)
	#define rrt (rt << 1 | 1)
	void upd(int x, int y, int v, int l = 1, int r = n, int rt = 1) {
		upd_(y, v, rt);
		if (l == r) return ;
		if (x <= mid) upd(x, y, v, l, mid, lrt);
		else upd(x, y, v, mid + 1, r, rrt);
	}

	int qry(int xl, int xr, int yl, int yr, int l = 1, int r = n, int rt = 1) {
		if (xl > xr || yl > yr) return 0;
		if (xl <= l && r <= xr) return qry_(yl, yr, rt);
		if (xr <= mid) return qry(xl, xr, yl, yr, l, mid, lrt);
		if (mid < xl) return qry(xl, xr, yl, yr, mid + 1, r, rrt);
		return max(qry(xl, xr, yl, yr, l, mid, lrt), qry(xl, xr, yl, yr, mid + 1, r, rrt));
	}
	#undef mid
	#undef lrt
	#undef rrt
} sis;

int h[N], a[N], b[N];
int level[N];

vector <PII> ans;
priority_queue <int> q;

struct Seg {
	struct Node {int mn; bool vis, tag;} t[N << 2];
	#define mid (l + r >> 1)
	#define lrt (rt << 1)
	#define rrt (rt << 1 | 1)

	void build(int l = 1, int r = n, int rt = 1) {
		if (l == r) {t[rt].mn = h[l]; return ;}
		build(l, mid, lrt); build(mid + 1, r, rrt);
		t[rt].mn = min(t[lrt].mn, t[rrt].mn);
	}

	/**
	 * @brief: 找 h[x] 前的第一个大于等于 h[x] 的数
	*/
	int prv(int x, int l = 1, int r = n, int rt = 1) {
		if (t[rt].mn >= h[x]) return 0;
		if (l == r) return l;
		if (x <= mid) return prv(x, l, mid, lrt);
		int res = prv(x, mid + 1, r, rrt);
		if (!res) res = prv(x, l, mid, lrt);
		return res;
	}

	// ---

	void pushdown(int rt) {
		if (t[rt].tag) {
			t[lrt].vis = t[rrt].vis = 0;
			t[lrt].tag = t[rrt].tag = 1;
			t[rt].tag = 0;
		}
	}

	/**
	 * @brief: 删除区间的 vis 标记
	*/
	void undo(int ll, int rr, int l = 1, int r = n, int rt = 1) {
		t[rt].vis = 0;
		if (ll <= l && r <= rr) {t[rt].tag = 1; return ;}
		pushdown(rt);
		if (ll <= mid) undo(ll, rr, l, mid, lrt);
		if (mid < rr) undo(ll, rr, mid + 1, r, rrt);
	}

	// 同下
	void erase(int x, int l, int r, int rt) {
		if (l == r) {t[rt].mn = inf; return ;}
		if (x <= mid) erase(x, l, mid, lrt);
		else erase(x, mid + 1, r, rrt);
		t[rt].mn = min(t[lrt].mn, t[rrt].mn);
	}
	/**
	 * @brief: 从序列中删除 h[x] (体现为 h[x] 置 inf), 并删除 (prv(x), x] 的标记 (使之可搜索)
	*/
	void erase(int x) {undo(prv(x) + 1, x); erase(x, 1, n, 1);}

	// 同下
	void search(vector <int> &res, int rmn, int l, int r, int rt) {
		if (t[rt].mn >= rmn || t[rt].vis) return ;
		t[rt].vis = 1;
		if (l == r) {res.push_back(l); return ;}
		pushdown(rt);
		search(res, rmn, mid + 1, r, rrt);
		search(res, min(rmn, t[rrt].mn), l, mid, lrt);
	}
	/**
	 * @brief: 查询后缀最小值
	*/
	vector <int> search() {vector <int> res; search(res, inf, 1, n, 1); return res;}

	#undef mid
	#undef lrt
	#undef rrt
} seg;

int main() {
	n = R();
	for (int i = 1; i <= n; ++i) {
		h[i] = R();
		level[i] = bit.qry(h[i] + 1);
		bit.upd(h[i], level[i] + 1);
		a[i] = i;
	}
	sort(a + 1, a + n + 1, [](int x, int y) {
		return level[x] < level[y];
	});
	for (int l = 1, r; l <= n; l = r + 1) {
		r = l;
		while (r < n && level[a[r + 1]] == level[a[l]]) ++r;
		sort(a + l, a + r + 1, [](int x, int y) {
			bool flag = 0;
			if (x > y) swap(x, y), flag = 1;
			int X = sis.qry(1, x - 1, h[x] + 1, h[y]), Y = sis.qry(x + 1, y - 1, h[y] + 1, n);
			return X ^ Y ? (X < Y) ^ flag : 0;
		});
		for (int i = l; i <= r; ++i) sis.upd(a[i], h[a[i]], i);
	}
	for (int i = 1; i <= n; ++i)
		b[a[i]] = i;
	seg.build();
	while (1) {
		auto res = seg.search();
		for (auto i : res) q.push(b[i]);
		if (q.empty()) break;
		int x = q.top(); q.pop(); seg.erase(a[x]);
		int y = x;
		if (!q.empty()) y = q.top(), q.pop(), seg.erase(a[y]);
		ans.push_back({h[a[x]], h[a[y]]});
	}
	reverse(ans.begin(), ans.end());
	printf("%d\n", ans.size());
	for (auto i : ans)
		printf("%d %d\n", i.first, i.second);
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

8
4 3 8 2 1 7 6 5

output:

4
8 4
7 3
6 2
5 1

result:

ok da

Test #2:

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

input:

8
5 6 7 1 2 8 3 4

output:

4
6 5
8 7
2 1
4 3

result:

ok da

Test #3:

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

input:

4
1 2 4 3

output:

2
4 1
3 2

result:

ok da

Test #4:

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

input:

2
1 2

output:

1
2 1

result:

ok da

Test #5:

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

input:

2
2 1

output:

2
2 2
1 1

result:

ok da

Test #6:

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

input:

3
1 2 3

output:

2
1 1
3 2

result:

ok da

Test #7:

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

input:

3
1 3 2

output:

2
3 3
2 1

result:

ok da

Test #8:

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

input:

3
2 1 3

output:

2
2 2
1 3

result:

ok da

Test #9:

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

input:

3
2 3 1

output:

2
3 2
1 1

result:

ok da

Test #10:

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

input:

3
3 1 2

output:

2
3 3
2 1

result:

ok da

Test #11:

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

input:

3
3 2 1

output:

3
3 3
2 2
1 1

result:

ok da

Test #12:

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

input:

4
1 2 3 4

output:

2
2 1
4 3

result:

ok da

Test #13:

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

input:

4
1 2 4 3

output:

2
4 1
3 2

result:

ok da

Test #14:

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

input:

4
1 3 2 4

output:

2
3 1
2 4

result:

ok da

Test #15:

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

input:

4
1 3 4 2

output:

2
4 3
2 1

result:

ok da

Test #16:

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

input:

4
1 4 2 3

output:

2
4 1
3 2

result:

ok da

Test #17:

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

input:

4
1 4 3 2

output:

3
4 4
3 3
2 1

result:

ok da

Test #18:

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

input:

4
2 1 3 4

output:

2
3 2
1 4

result:

ok da

Test #19:

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

input:

4
2 1 4 3

output:

2
4 2
3 1

result:

ok da

Test #20:

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

input:

4
2 3 1 4

output:

2
3 2
1 4

result:

ok da

Test #21:

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

input:

4
2 3 4 1

output:

3
2 2
4 3
1 1

result:

ok da

Test #22:

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

input:

4
2 4 1 3

output:

2
4 2
1 3

result:

ok da

Test #23:

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

input:

4
2 4 3 1

output:

3
4 4
3 2
1 1

result:

ok da

Test #24:

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

input:

4
3 1 2 4

output:

2
4 3
2 1

result:

ok da

Test #25:

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

input:

4
3 1 4 2

output:

2
4 3
2 1

result:

ok da

Test #26:

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

input:

4
3 2 1 4

output:

3
3 3
2 2
1 4

result:

ok da

Test #27:

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

input:

4
3 2 4 1

output:

3
3 3
2 4
1 1

result:

ok da

Test #28:

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

input:

4
3 4 1 2

output:

2
4 3
2 1

result:

ok da

Test #29:

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

input:

4
3 4 2 1

output:

3
4 3
2 2
1 1

result:

ok da

Test #30:

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

input:

4
4 1 2 3

output:

3
4 4
1 1
3 2

result:

ok da

Test #31:

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

input:

4
4 1 3 2

output:

3
4 4
3 3
2 1

result:

ok da

Test #32:

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

input:

4
4 2 1 3

output:

3
4 4
2 2
1 3

result:

ok da

Test #33:

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

input:

4
4 2 3 1

output:

3
4 4
3 2
1 1

result:

ok da

Test #34:

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

input:

4
4 3 1 2

output:

3
4 4
3 3
2 1

result:

ok da

Test #35:

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

input:

4
4 3 2 1

output:

4
4 4
3 3
2 2
1 1

result:

ok da

Test #36:

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

input:

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

output:

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

result:

ok da

Test #37:

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

input:

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

output:

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

result:

ok da

Test #38:

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

input:

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

output:

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

result:

ok da

Test #39:

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

input:

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

output:

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

result:

ok da

Test #40:

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

input:

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

output:

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

result:

ok da

Test #41:

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

input:

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

output:

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

result:

ok da

Test #42:

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

input:

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

output:

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

result:

ok da

Test #43:

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

input:

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

output:

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

result:

ok da

Test #44:

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

input:

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

output:

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

result:

ok da

Test #45:

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

input:

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

output:

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

result:

ok da

Test #46:

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

input:

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

output:

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

result:

ok da

Test #47:

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

input:

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

output:

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

result:

ok da

Test #48:

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

input:

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

output:

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

result:

ok da

Test #49:

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

input:

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

output:

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

result:

ok da

Test #50:

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

input:

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

output:

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

result:

ok da

Test #51:

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

input:

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

output:

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

result:

ok da

Test #52:

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

input:

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

output:

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

result:

ok da

Test #53:

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

input:

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

output:

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

result:

ok da

Test #54:

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

input:

495
237 201 155 129 345 454 113 11 492 357 300 295 198 442 14 79 288 431 343 64 285 101 316 15 34 293 3 393 384 47 296 402 488 328 128 409 110 72 249 115 386 450 167 214 489 227 172 220 336 59 206 315 278 63 395 478 490 165 164 303 449 145 31 418 119 179 373 320 93 255 183 38 58 491 375 416 430 326 ...

output:

248
492 492
237 494
454 495
489 345
490 488
201 491
357 493
450 442
486 478
487 485
300 155
475 431
449 476
483 484
129 477
402 295
409 393
465 343
418 473
482 430
113 480
288 198
395 384
316 386
471 468
427 416
474 481
11 472
79 14
328 285
373 336
293 375
457 296
412 470
421 423
479 415
101 64
320 ...

result:

ok da

Test #55:

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

input:

495
492 491 487 481 495 494 493 480 490 478 489 488 477 486 485 475 472 484 483 471 468 482 479 466 465 463 476 461 460 459 474 457 473 455 454 470 469 453 452 467 450 449 464 462 448 447 458 456 443 451 446 442 445 437 436 435 434 433 429 444 427 426 441 440 439 424 423 438 421 419 416 432 413 431 ...

output:

250
495 495
494 492
493 491
490 487
489 481
488 480
486 478
485 477
475 484
472 483
471 482
468 479
466 466
465 465
463 476
461 461
460 460
459 474
457 473
455 470
454 469
453 467
452 464
450 462
449 458
448 456
447 451
446 443
442 445
437 444
436 441
435 440
434 439
433 438
432 429
431 427
430 426
...

result:

ok da

Test #56:

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

input:

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

output:

248
47 47
405 407
398 399
396 397
391 392
111 40
48 112
119 114
408 120
126 123
44 127
129 43
110 132
39 133
34 35
137 136
355 33
381 383
379 380
376 378
373 374
390 372
367 368
364 365
143 360
353 354
409 350
424 426
422 423
420 421
418 419
272 411
56 15
20 53
17 24
13 173
178 10
157 12
180 9
183 2...

result:

ok da

Test #57:

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

input:

496
237 201 155 129 345 454 113 11 492 357 300 295 198 442 14 79 288 431 343 64 285 101 316 15 34 293 3 393 384 47 296 402 488 328 128 409 110 72 249 115 386 450 167 214 489 227 172 220 336 59 206 315 278 63 395 478 490 165 164 303 449 145 31 418 119 179 373 320 93 255 183 38 58 491 375 416 496 326 ...

output:

248
345 237
496 454
201 492
494 495
489 488
490 491
357 442
493 155
478 450
485 487
431 486
129 300
476 475
483 449
477 484
402 393
343 409
113 295
473 465
480 418
384 482
386 395
198 316
11 288
468 427
416 471
474 481
328 472
373 336
293 375
14 296
285 79
423 421
470 457
415 412
315 479
355 320
326...

result:

ok da

Test #58:

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

input:

496
493 491 486 496 481 495 494 492 490 489 473 488 487 472 469 468 485 484 483 464 482 480 463 479 478 477 460 458 476 475 457 456 474 471 455 454 470 453 452 467 449 448 447 446 466 437 465 436 433 432 430 428 462 426 461 425 424 421 420 419 459 417 416 451 410 450 409 408 407 445 405 444 443 442 ...

output:

262
496 496
495 495
494 493
492 491
490 490
489 489
488 488
487 486
485 485
484 481
483 473
482 472
480 469
479 468
478 464
477 463
460 476
458 475
457 474
456 471
455 455
454 470
453 453
452 467
449 449
448 448
447 447
446 466
437 465
436 436
433 433
432 432
430 430
428 462
426 461
425 425
424 424
...

result:

ok da

Test #59:

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

input:

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

output:

248
58 88
485 56
110 92
104 107
100 101
96 476
55 94
89 90
86 484
85 477
14 478
24 26
19 21
494 493
496 16
396 29
390 392
297 300
391 294
289 290
186 288
287 393
285 394
1 284
67 281
81 83
76 77
74 75
68 70
60 480
482 59
475 147
134 133
136 463
464 462
139 461
140 459
142 457
143 456
455 131
111 149...

result:

ok da

Test #60:

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

input:

497
237 201 155 129 345 454 113 11 492 357 300 295 198 442 14 79 288 431 343 64 285 101 316 15 34 293 3 393 384 47 296 402 488 328 128 409 110 72 249 115 386 450 167 214 489 227 172 220 336 59 206 315 278 63 395 478 490 165 164 303 449 145 31 418 119 179 373 320 93 255 183 38 58 491 375 416 496 326 ...

output:

249
497 497
454 345
492 237
201 496
491 490
489 488
357 442
495 494
450 155
431 478
485 300
487 486
129 493
476 475
402 449
409 393
295 343
483 484
113 477
473 465
384 418
386 395
198 316
480 288
11 482
468 427
416 471
336 328
375 373
296 293
14 79
481 285
472 474
423 421
470 457
415 412
320 315
363...

result:

ok da

Test #61:

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

input:

497
496 492 490 489 497 495 494 493 488 486 485 484 480 478 491 487 475 483 474 482 471 468 465 464 460 459 481 458 457 456 479 477 455 453 476 473 450 444 443 440 472 439 470 469 435 433 467 432 430 466 429 463 462 428 461 425 420 419 454 418 452 451 416 449 415 413 412 448 409 402 401 400 447 399 ...

output:

259
496 497
495 492
494 490
493 489
488 488
486 486
485 485
484 484
480 491
478 487
475 483
474 482
471 471
468 468
465 465
464 464
460 460
459 481
458 458
457 479
456 477
455 476
453 473
450 472
444 470
443 469
440 467
439 466
435 463
433 462
432 461
430 454
429 452
428 451
425 449
420 448
419 447
...

result:

ok da

Test #62:

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

input:

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

output:

249
98 98
489 61
111 490
129 130
120 125
117 118
112 113
104 59
488 102
89 91
87 88
32 18
31 496
26 30
21 25
495 19
397 17
316 317
309 312
305 306
391 389
303 199
392 301
300 394
16 295
486 294
180 82
79 80
77 78
72 485
69 85
67 68
456 63
149 148
168 150
464 465
472 173
463 458
151 154
152 153
473 4...

result:

ok da

Test #63:

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

input:

498
237 201 155 129 345 454 113 11 492 357 300 295 198 442 14 79 288 431 343 64 285 101 316 15 34 293 3 393 384 47 296 402 488 328 128 409 110 72 249 115 386 450 167 214 489 227 172 220 336 59 206 315 278 63 395 478 490 165 164 303 449 145 31 418 119 179 373 320 93 255 183 38 58 491 375 416 496 326 ...

output:

249
345 496
492 454
237 498
491 494
489 490
442 488
497 357
450 201
485 478
431 486
495 300
155 487
476 475
483 449
477 484
393 402
343 409
493 295
465 129
418 473
482 480
395 384
316 386
198 288
427 113
471 468
481 416
472 474
336 328
375 373
296 293
11 285
14 79
423 421
470 457
415 412
315 479
355...

result:

ok da

Test #64:

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

input:

498
496 495 494 493 498 497 489 492 491 488 485 490 487 482 486 484 481 479 478 475 483 474 480 477 476 473 471 464 472 462 470 469 459 458 456 468 467 454 466 453 465 450 448 446 463 461 460 445 440 457 455 437 452 434 451 449 433 432 431 428 427 425 447 444 443 442 422 441 419 439 438 436 418 435 ...

output:

272
496 496
495 495
494 498
493 497
492 492
491 489
488 490
487 487
486 485
484 482
481 481
479 483
478 480
477 475
476 474
473 473
472 471
470 470
469 469
468 468
467 467
466 464
465 462
463 459
461 458
460 456
457 454
455 453
452 450
451 448
449 446
447 445
444 444
443 443
442 440
441 437
439 434
...

result:

ok da

Test #65:

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

input:

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

output:

249
484 55
63 485
59 61
477 56
102 103
99 100
98 475
94 97
93 65
91 478
85 88
81 84
494 497
27 28
22 24
286 21
259 261
302 288
297 300
293 294
369 290
180 370
378 375
17 287
381 285
281 282
80 67
76 481
75 482
70 72
480 69
469 161
470 455
456 118
144 105
461 123
141 142
121 119
156 137
107 117
159 4...

result:

ok da

Test #66:

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

input:

499
237 201 155 129 345 454 113 11 492 357 300 295 198 442 14 79 288 431 343 64 285 101 316 15 34 293 3 393 384 47 296 402 488 328 128 409 110 72 249 115 386 450 167 214 489 227 172 220 336 59 206 315 278 63 395 478 490 165 164 303 449 145 31 418 119 179 373 320 93 255 183 38 58 491 375 416 496 326 ...

output:

250
237 237
345 498
492 454
496 499
497 201
488 489
491 490
357 442
155 494
450 495
431 478
485 300
487 486
493 129
476 475
402 449
409 393
295 343
483 484
113 477
473 465
384 418
386 395
198 316
480 288
11 482
468 427
416 471
336 328
375 373
296 293
79 14
481 285
472 474
423 421
470 457
415 412
320...

result:

ok da

Test #67:

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

input:

499
498 496 492 499 497 495 494 493 491 489 486 484 481 490 488 487 478 485 483 474 465 482 464 480 463 461 460 479 477 459 476 456 475 455 473 472 471 470 453 469 452 451 448 447 468 467 446 445 466 439 434 433 462 458 457 454 450 449 432 444 443 430 442 441 428 440 438 437 427 422 436 421 420 418 ...

output:

266
498 499
497 496
495 495
494 494
493 492
491 491
490 489
488 488
487 486
485 484
483 483
482 481
480 480
479 478
477 477
476 474
475 465
473 464
472 463
471 461
470 460
469 459
468 456
467 455
466 453
462 452
458 451
457 448
454 447
450 446
449 445
444 444
443 439
442 434
441 433
440 432
438 430
...

result:

ok da

Test #68:

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

input:

499
5 7 11 12 13 1 17 18 20 22 24 2 3 25 26 27 4 29 31 6 32 33 8 9 10 14 15 34 35 16 19 21 23 28 41 30 36 37 42 45 38 39 46 49 40 50 51 43 52 44 47 48 54 59 53 65 55 67 68 71 56 57 74 75 78 79 58 81 86 87 88 89 60 91 61 98 99 100 102 103 112 62 113 63 114 64 115 116 66 117 69 120 70 121 72 122 124 7...

output:

250
98 98
112 484
116 474
475 115
476 114
477 113
103 51
100 102
52 99
89 91
22 88
31 498
27 29
25 26
24 499
20 32
322 81
408 323
325 324
328 326
330 406
331 405
67 332
18 86
79 478
75 78
71 74
87 68
65 480
54 59
483 482
137 164
144 143
117 145
155 467
160 159
465 153
162 463
461 163
459 468
166 456...

result:

ok da

Test #69:

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

input:

500
237 201 155 129 345 454 113 11 492 357 300 295 198 442 14 79 288 431 343 64 285 101 316 15 34 293 3 393 384 47 296 402 488 328 128 409 110 72 249 115 386 450 167 214 489 227 172 220 336 59 206 315 278 63 395 478 490 165 164 303 449 145 31 418 119 179 373 320 93 255 183 38 58 491 375 416 496 326 ...

output:

250
345 496
237 454
500 492
201 494
490 491
488 489
442 357
498 499
450 155
485 478
300 486
497 431
475 129
449 476
483 484
295 477
393 402
343 409
487 495
465 113
418 473
482 480
288 198
395 384
316 386
11 493
468 427
416 471
472 474
14 79
328 285
373 336
293 375
481 296
421 423
470 457
415 412
101...

result:

ok da

Test #70:

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

input:

500
499 500 495 490 498 489 497 496 488 486 484 482 478 477 476 475 494 493 470 492 491 469 468 467 487 463 458 485 483 481 450 444 442 480 479 441 474 473 472 440 439 438 437 471 436 435 466 434 430 465 429 428 425 424 423 464 422 421 462 461 460 459 419 417 415 457 413 456 455 454 453 452 411 410 ...

output:

254
499 500
498 495
497 490
496 489
488 488
486 486
484 484
482 482
478 478
477 494
476 493
475 492
470 491
469 487
468 485
467 483
463 481
458 480
450 479
444 474
442 473
441 472
440 471
439 466
438 465
437 464
436 462
435 461
434 460
430 459
429 457
428 456
425 455
424 454
423 453
422 452
421 451
...

result:

ok da

Test #71:

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

input:

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

output:

250
133 75
33 127
102 121
35 120
138 104
36 71
400 139
404 403
407 405
31 37
146 140
147 101
99 78
149 79
155 153
56 184
368 65
359 358
362 360
364 363
367 366
397 420
374 370
382 381
390 385
435 115
431 432
427 430
424 425
422 423
4 421
414 417
409 410
10 12
181 183
91 180
92 90
1 178
174 13
168 15...

result:

ok da

Test #72:

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

input:

7495
4964 650 6871 129 3768 1551 6223 3875 6536 6438 5015 2528 1952 6441 3809 5102 4857 1821 343 4675 5029 7078 5456 3073 5001 5755 7275 3342 384 1608 1397 4856 1282 6194 878 4679 3536 6512 520 5397 2350 3380 1127 3969 2691 227 7293 3378 2728 3182 4059 6851 6641 900 2747 7195 4531 165 6187 4029 522 ...

output:

3748
7495 7495
7275 6871
7078 4964
7396 7459
7293 7485
7494 7491
6223 6536
3768 650
7365 7415
7343 7328
7466 7469
7195 7443
7493 6851
7486 7492
6438 6441
3875 6512
1551 129
7216 7360
7464 7468
7362 7447
6858 7404
6641 7065
7490 7489
7471 7472
7475 7484
5102 5015
5456 5755
7136 6194
7182 7168
7324 74...

result:

ok da

Test #73:

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

input:

7495
7495 7490 7488 7486 7494 7481 7480 7478 7477 7475 7463 7460 7459 7493 7492 7458 7491 7489 7487 7485 7457 7455 7484 7483 7454 7453 7452 7450 7448 7482 7444 7442 7440 7435 7479 7431 7476 7474 7426 7473 7423 7422 7421 7418 7472 7471 7470 7469 7468 7467 7414 7413 7411 7409 7408 7405 7466 7465 7403 ...

output:

3773
7495 7495
7490 7490
7488 7488
7486 7494
7481 7481
7480 7480
7478 7493
7477 7492
7475 7491
7463 7489
7460 7487
7459 7485
7458 7484
7457 7483
7455 7482
7454 7479
7453 7476
7452 7474
7450 7473
7448 7472
7444 7471
7442 7470
7440 7469
7435 7468
7431 7467
7426 7466
7423 7465
7422 7464
7421 7462
7418 ...

result:

ok da

Test #74:

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

input:

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

output:

3748
1818 1818
1801 1800
668 1805
1810 1808
667 1813
1815 1787
665 1816
1817 663
662 1799
1819 661
1821 654
651 653
1761 1773
683 684
1764 1762
3829 1766
5831 5833
5828 5830
5906 5888
5902 5903
5899 5900
5894 5898
5891 5893
5885 1767
5881 5882
5878 5879
5868 5873
666 5867
1790 1789
1798 1797
618 600...

result:

ok da

Test #75:

score: 0
Accepted
time: 51ms
memory: 15228kb

input:

7496
4964 650 6871 129 3768 1551 6223 3875 6536 6438 5015 2528 1952 6441 3809 5102 4857 1821 343 4675 5029 7078 5456 3073 5001 5755 7275 3342 384 1608 1397 4856 1282 6194 878 4679 3536 6512 520 5397 2350 3380 1127 3969 2691 227 7293 3378 2728 3182 4059 6851 6641 900 2747 7195 4531 165 6187 4029 522 ...

output:

3748
4964 6871
7293 7275
7459 7495
7396 7496
7485 7078
6536 6223
3768 650
7494 7195
7415 7491
7343 7365
6851 7328
7466 7469
3875 7443
6441 6438
129 6512
6858 1551
7493 7492
7360 7486
7216 7065
7468 6641
7447 7464
7404 7362
5102 5015
5755 5456
6704 6194
7489 7490
7471 7472
7484 7475
7136 7168
7463 71...

result:

ok da

Test #76:

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

input:

7496
7493 7496 7495 7490 7494 7489 7492 7491 7484 7476 7488 7487 7473 7471 7470 7468 7467 7465 7462 7456 7486 7455 7453 7451 7485 7446 7483 7482 7481 7480 7479 7478 7477 7445 7444 7475 7439 7435 7474 7472 7433 7432 7469 7430 7429 7428 7466 7464 7463 7427 7461 7460 7423 7422 7420 7459 7458 7418 7415 ...

output:

3779
7496 7496
7495 7495
7494 7493
7492 7490
7491 7489
7488 7488
7487 7487
7486 7486
7485 7484
7483 7483
7482 7482
7481 7481
7480 7480
7479 7479
7478 7476
7477 7473
7475 7471
7474 7470
7472 7468
7469 7467
7466 7465
7464 7464
7463 7462
7461 7461
7460 7460
7459 7459
7458 7456
7457 7455
7454 7453
7452 ...

result:

ok da

Test #77:

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

input:

7496
4 8 9 14 16 1 19 2 3 5 6 20 21 23 7 25 32 10 33 34 35 36 38 11 39 12 40 13 15 17 43 45 46 47 18 48 51 54 22 58 61 24 62 67 68 26 27 28 72 29 73 75 76 80 30 81 31 37 41 42 82 83 44 85 49 87 50 91 100 52 53 55 56 57 101 103 104 105 106 59 107 109 112 60 63 64 114 122 65 124 66 126 69 70 71 74 127...

output:

3748
5864 599
5857 5858
5852 5855
5847 5850
1806 5844
1794 1793
1797 603
3865 602
596 1798
590 593
1802 1801
1789 1805
1809 1808
585 588
5819 1811
5840 5842
5837 5838
5834 5836
5830 5833
5843 5829
5824 5826
5821 5822
5817 1813
5815 5816
5886 5865
5883 5884
5875 5876
5872 5873
5866 5867
1783 1854
178...

result:

ok da

Test #78:

score: 0
Accepted
time: 59ms
memory: 16356kb

input:

7497
4964 650 6871 129 3768 1551 6223 3875 6536 6438 5015 2528 1952 6441 3809 5102 4857 1821 343 4675 5029 7078 5456 3073 5001 5755 7275 3342 384 1608 1397 4856 1282 6194 878 4679 3536 6512 520 5397 2350 3380 1127 3969 2691 227 7293 3378 2728 3182 4059 6851 6641 900 2747 7195 4531 165 6187 4029 522 ...

output:

3749
7495 7495
7497 7293
7459 7078
4964 7275
6871 7396
7494 7485
7496 7491
7195 7415
7365 650
7343 7328
6536 6223
3768 6851
7466 7469
7492 7443
7493 7486
129 6858
7065 7360
3875 7216
6441 6438
6641 6512
7468 1551
7447 7464
7404 7362
7490 7489
7472 7471
7475 7484
7136 6704
7182 7168
5102 5015
5755 54...

result:

ok da

Test #79:

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

input:

7497
7493 7490 7489 7488 7487 7486 7497 7485 7496 7482 7495 7481 7480 7479 7478 7494 7492 7477 7470 7491 7469 7484 7483 7476 7468 7475 7466 7462 7474 7461 7473 7458 7457 7455 7472 7454 7453 7450 7447 7471 7445 7467 7465 7444 7464 7443 7442 7440 7463 7439 7460 7459 7438 7437 7435 7430 7456 7452 7427 ...

output:

3790
7493 7493
7490 7490
7489 7489
7488 7488
7487 7487
7486 7497
7485 7496
7482 7495
7481 7481
7480 7494
7479 7492
7478 7491
7477 7484
7470 7483
7469 7476
7468 7475
7466 7466
7462 7474
7461 7473
7458 7458
7457 7457
7455 7472
7454 7454
7453 7453
7450 7471
7447 7467
7445 7465
7444 7464
7443 7443
7442 ...

result:

ok da

Test #80:

score: 0
Accepted
time: 30ms
memory: 11124kb

input:

7497
4 1 7 11 14 15 18 22 2 23 3 5 26 34 35 6 8 36 38 9 10 12 13 39 40 43 44 45 16 17 47 48 49 19 50 57 59 60 20 21 24 25 62 27 28 64 67 68 29 30 31 71 76 77 79 32 81 33 82 84 85 86 87 88 37 41 90 92 93 95 42 96 97 103 105 46 51 52 53 107 108 109 110 54 55 111 112 113 56 115 58 61 63 117 65 118 119 ...

output:

3749
901 901
1361 399
397 2047
2050 2049
2054 2051
900 1353
601 1359
393 394
1358 893
2056 725
368 1342
2077 1345
603 364
2079 909
362 1344
2065 360
5898 5899
5893 5895
1756 5892
1760 2058
2059 1356
390 391
2061 1546
388 369
902 392
1355 386
382 724
1752 1754
378 602
898 904
421 598
2020 1348
728 42...

result:

ok da

Test #81:

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

input:

7498
4964 650 6871 129 3768 1551 6223 3875 6536 6438 5015 2528 1952 6441 3809 5102 4857 1821 343 4675 5029 7078 5456 3073 5001 5755 7275 3342 384 1608 1397 4856 1282 6194 878 4679 3536 6512 520 5397 2350 3380 1127 3969 2691 227 7293 3378 2728 3182 4059 6851 6641 900 2747 7195 4531 165 6187 4029 522 ...

output:

3749
7078 7459
7495 7485
4964 7497
7498 7275
6871 7396
7415 7293
7469 7466
7494 7443
650 7491
7365 7496
7328 7343
6223 6536
7195 3768
7464 6851
7468 7447
7492 7404
129 7486
7360 7493
7216 7362
6438 6441
3875 6512
6858 1551
6641 7065
7397 7463
7489 7363
7471 7490
7475 7472
7324 7484
7226 7285
7136 73...

result:

ok da

Test #82:

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

input:

7498
7495 7494 7492 7488 7498 7497 7487 7486 7485 7496 7484 7483 7493 7491 7482 7490 7480 7489 7478 7477 7473 7472 7469 7481 7465 7464 7479 7476 7475 7463 7462 7459 7458 7474 7457 7456 7471 7470 7454 7452 7450 7447 7446 7468 7467 7444 7443 7439 7466 7438 7461 7437 7460 7455 7435 7434 7453 7433 7431 ...

output:

3768
7495 7495
7494 7494
7492 7498
7488 7497
7487 7487
7486 7486
7485 7496
7484 7493
7483 7491
7482 7490
7480 7489
7478 7478
7477 7477
7473 7473
7472 7481
7469 7479
7465 7476
7464 7475
7463 7463
7462 7462
7459 7459
7458 7474
7457 7471
7456 7470
7454 7454
7452 7452
7450 7450
7447 7468
7446 7467
7444 ...

result:

ok da

Test #83:

score: 0
Accepted
time: 38ms
memory: 12660kb

input:

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

output:

3749
572 1718
570 1765
566 567
563 1766
1767 562
601 1770
608 611
1764 1716
606 1720
1723 1722
604 1725
1729 1728
1771 1730
1731 598
1736 1735
5936 584
5934 5935
5932 5
5927 5930
5923 5924
5917 5919
1757 5916
1737 585
582 583
1749 581
1751 1750
1754 1753
580 1756
1743 579
578 1758
518 552
1823 517
1...

result:

ok da

Test #84:

score: 0
Accepted
time: 50ms
memory: 16600kb

input:

7499
4964 650 6871 129 3768 1551 6223 3875 6536 6438 5015 2528 1952 6441 3809 5102 4857 1821 343 4675 5029 7078 5456 3073 5001 5755 7275 3342 384 1608 1397 4856 1282 6194 878 4679 3536 6512 520 5397 2350 3380 1127 3969 2691 227 7293 3378 2728 3182 4059 6851 6641 900 2747 7195 4531 165 6187 4029 522 ...

output:

3750
7485 7485
7293 7275
7396 7078
7497 7459
7499 4964
7495 6871
7469 7466
7328 7195
7365 7343
7443 7415
7498 650
6223 6536
3768 6851
7491 7494
7447 7464
6858 7468
7216 7065
7404 7360
129 7362
6438 7496
6512 6441
6641 3875
7492 1551
7463 7486
7136 6704
7182 7168
7363 7397
7285 7324
7341 7226
5015 74...

result:

ok da

Test #85:

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

input:

7499
7498 7499 7491 7497 7496 7487 7495 7494 7485 7481 7479 7493 7492 7490 7489 7477 7488 7476 7471 7486 7470 7484 7464 7483 7463 7482 7460 7480 7459 7478 7475 7454 7452 7474 7473 7472 7451 7450 7449 7448 7446 7469 7468 7467 7466 7465 7443 7462 7438 7461 7458 7457 7456 7428 7455 7426 7425 7424 7423 ...

output:

3766
7498 7499
7497 7497
7496 7496
7495 7495
7494 7494
7493 7493
7492 7491
7490 7490
7489 7489
7488 7487
7486 7485
7484 7484
7483 7481
7482 7479
7480 7477
7478 7476
7475 7475
7474 7474
7473 7471
7472 7470
7469 7464
7468 7463
7467 7460
7466 7459
7465 7454
7462 7452
7461 7451
7458 7450
7457 7449
7456 ...

result:

ok da

Test #86:

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

input:

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

output:

3750
6888 6888
6861 1444
1447 1446
1452 1450
1364 1392
1369 1367
1372 1371
1380 1373
1382 6862
1386 1384
1389 1387
1391 6887
6885 6942
1396 1393
6883 6884
1427 6882
1323 6923
1432 1325
6877 1413
1419 1417
1421 6876
1424 1422
6875 1426
1430 1399
6873 6874
1412 1431
1437 1436
1439 6870
1440 6868
1442 ...

result:

ok da

Test #87:

score: 0
Accepted
time: 52ms
memory: 16372kb

input:

7500
4964 650 6871 129 3768 1551 6223 3875 6536 6438 5015 2528 1952 6441 3809 5102 4857 1821 343 4675 5029 7078 5456 3073 5001 5755 7275 3342 384 1608 1397 4856 1282 6194 878 4679 3536 6512 520 5397 2350 3380 1127 3969 2691 227 7293 3378 2728 3182 4059 6851 6641 900 2747 7195 4531 165 6187 4029 522 ...

output:

3750
7459 7275
7396 7485
4964 7078
7499 7497
7500 7293
6871 7495
7466 7415
7443 7469
7343 7328
650 7365
7498 7195
7491 7494
6536 6223
6851 3768
7447 7464
7404 7468
7360 7216
129 7362
7065 6858
7492 7496
3875 7486
6441 6438
1551 6512
7463 6641
7363 7397
7168 7136
7324 7182
7226 7285
6704 7341
7489 74...

result:

ok da

Test #88:

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

input:

7500
7500 7498 7499 7497 7492 7490 7488 7485 7481 7479 7476 7471 7496 7470 7469 7495 7494 7466 7493 7491 7460 7489 7459 7458 7456 7455 7487 7453 7486 7450 7447 7484 7446 7443 7440 7436 7435 7483 7482 7430 7424 7423 7422 7480 7421 7478 7418 7416 7477 7413 7475 7411 7474 7473 7472 7468 7410 7467 7408 ...

output:

3788
7500 7500
7499 7498
7497 7497
7496 7496
7495 7495
7494 7494
7493 7492
7491 7490
7489 7488
7487 7487
7486 7485
7484 7484
7483 7483
7482 7481
7480 7479
7478 7478
7477 7476
7475 7475
7474 7471
7473 7470
7472 7469
7468 7468
7467 7466
7465 7465
7464 7460
7463 7459
7462 7458
7461 7456
7457 7455
7454 ...

result:

ok da

Test #89:

score: 0
Accepted
time: 30ms
memory: 13120kb

input:

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

output:

3750
2056 2063
931 930
2060 2059
1491 2062
475 935
1485 1490
470 2054
473 469
2064 468
464 467
2065 937
1483 2066
1502 925
489 2036
2038 921
5853 5879
5830 5834
5825 5829
5821 5823
5819 5820
5892 5872
5887 5888
2043 5883
5876 5878
5874 5875
5871 6
5868 5870
5861 5866
5856 5857
2067 5855
1462 2090
14...

result:

ok da

Test #90:

score: 0
Accepted
time: 1902ms
memory: 209852kb

input:

99995
64268 66535 9758 42907 84212 83488 27748 86198 80658 11614 93419 2528 96160 79473 83517 43109 37111 46603 93665 54540 84236 62717 24719 57225 8333 15728 40821 31719 13096 75018 76890 46244 75863 59618 67460 10326 84775 11276 83363 72071 9353 94316 9469 3969 78568 53071 96835 50125 2728 46756 5...

output:

49998
93419 93419
98466 97967
96835 64268
96160 99984
99991 99995
86198 99961
84212 98550
99987 99994
99980 66535
93665 94316
98979 99959
99956 99751
97606 99830
96267 97158
83517 83488
99989 99993
99985 99981
42907 9758
99968 99979
94142 99978
84236 94028
87183 84775
99957 99958
99678 98264
99796 9...

result:

ok da

Test #91:

score: 0
Accepted
time: 219ms
memory: 103832kb

input:

99995
99992 99990 99995 99994 99989 99993 99985 99991 99979 99974 99970 99988 99987 99986 99969 99984 99965 99983 99982 99964 99981 99962 99961 99960 99958 99955 99980 99953 99978 99951 99977 99976 99950 99975 99948 99946 99939 99973 99936 99935 99930 99928 99972 99924 99971 99968 99923 99922 99920 ...

output:

50171
99995 99995
99994 99992
99993 99990
99991 99989
99988 99988
99987 99987
99986 99985
99984 99984
99983 99983
99982 99982
99981 99981
99980 99979
99978 99978
99977 99977
99976 99976
99975 99974
99973 99970
99972 99969
99971 99965
99968 99964
99967 99962
99966 99961
99963 99960
99959 99958
99957 ...

result:

ok da

Test #92:

score: 0
Accepted
time: 773ms
memory: 103340kb

input:

99995
4 5 6 8 10 1 11 2 3 14 16 19 21 7 22 9 24 26 27 12 29 31 35 43 13 47 15 17 48 18 51 20 23 25 28 52 53 55 30 56 58 32 60 61 33 34 36 63 37 38 64 65 39 66 70 40 72 77 86 88 89 41 42 44 45 46 91 49 93 94 95 98 100 50 101 54 102 103 57 59 62 67 104 108 68 112 116 117 118 119 69 120 71 73 74 123 12...

output:

49998
17650 17650
17638 91691
17642 91687
17644 17643
91686 17645
17696 17646
17649 17647
91683 91692
17651 91680
17655 91677
17656 91673
17659 17658
91628 91619
17672 17681
91666 91667
91664 17673
17662 91663
17680 17675
91658 91660
17682 17728
17685 17684
17689 91656
17694 17691
17633 91685
17636 ...

result:

ok da

Test #93:

score: 0
Accepted
time: 1835ms
memory: 209608kb

input:

99996
64268 66535 9758 42907 84212 83488 27748 86198 80658 11614 93419 2528 96160 79473 83517 43109 37111 46603 93665 54540 84236 62717 24719 57225 8333 15728 40821 31719 13096 75018 76890 46244 75863 59618 67460 10326 84775 11276 83363 72071 9353 94316 9469 3969 78568 53071 96835 50125 2728 46756 5...

output:

49998
66535 99994
98466 97967
96835 84212
98550 86198
96160 93419
99996 99987
99984 99961
64268 99991
83488 99995
97606 97158
94316 96267
83517 93665
99751 99959
98979 99830
99980 99956
99985 99981
9758 42907
99989 99993
94028 80658
94211 94142
84236 84775
99958 87183
99678 99957
99923 98264
99978 9...

result:

ok da

Test #94:

score: 0
Accepted
time: 230ms
memory: 102516kb

input:

99996
99996 99994 99993 99992 99990 99995 99988 99991 99981 99989 99978 99975 99987 99974 99986 99973 99970 99985 99984 99983 99982 99980 99968 99979 99967 99964 99963 99960 99959 99956 99977 99976 99972 99971 99955 99954 99969 99966 99950 99948 99943 99941 99965 99940 99938 99962 99936 99933 99961 ...

output:

50088
99996 99996
99994 99994
99993 99993
99992 99995
99991 99990
99989 99988
99987 99987
99986 99981
99985 99978
99984 99975
99983 99974
99982 99973
99980 99970
99968 99979
99967 99967
99964 99964
99963 99977
99960 99976
99959 99972
99956 99971
99955 99969
99954 99966
99950 99950
99948 99965
99943 ...

result:

ok da

Test #95:

score: 0
Accepted
time: 798ms
memory: 103952kb

input:

99996
4 1 2 5 7 3 6 10 8 9 16 17 18 11 20 12 13 14 21 15 27 28 30 31 32 19 22 23 33 37 38 40 41 24 25 42 43 44 47 26 29 48 34 35 50 36 39 53 45 59 46 62 49 51 63 69 70 52 54 73 55 75 82 83 89 96 56 97 98 99 57 100 58 101 107 60 109 110 112 61 64 65 66 113 114 67 116 120 122 130 68 131 71 137 72 74 7...

output:

49998
17773 91336
17781 17774
91310 17783
17749 91308
91341 5057
17746 17744
97715 17747
97706 5056
91332 17748
5043 5055
17751 17750
5048 5050
97709 91328
91267 17900
17904 17901
17907 91266
17770 91265
91324 91326
97707 91317
17761 17760
17765 17762
17766 97710
17755 17767
5045 91315
17799 91312
5...

result:

ok da

Test #96:

score: 0
Accepted
time: 1762ms
memory: 209664kb

input:

99997
64268 66535 9758 42907 84212 83488 27748 86198 80658 11614 93419 2528 96160 79473 83517 43109 37111 46603 93665 54540 84236 62717 24719 57225 8333 15728 40821 31719 13096 75018 76890 46244 75863 59618 67460 10326 84775 11276 83363 72071 9353 94316 9469 3969 78568 53071 96835 50125 2728 46756 5...

output:

49999
96835 96835
98550 64268
86198 84212
96160 93419
99991 97967
99987 66535
99984 98466
99997 99961
99994 99995
93665 83488
83517 94316
42907 9758
97606 97158
99980 96267
98979 99981
99830 99751
99956 99959
99985 99996
99989 99993
84775 80658
94028 84236
87183 94142
94211 27748
99968 99979
98264 9...

result:

ok da

Test #97:

score: 0
Accepted
time: 226ms
memory: 102652kb

input:

99997
99993 99989 99988 99997 99996 99987 99995 99983 99982 99994 99992 99991 99981 99979 99990 99978 99977 99976 99974 99986 99985 99972 99970 99984 99980 99975 99968 99973 99971 99967 99963 99962 99956 99969 99966 99965 99964 99961 99960 99955 99954 99952 99959 99951 99948 99958 99946 99957 99953 ...

output:

50114
99993 99997
99989 99996
99988 99995
99987 99994
99983 99992
99982 99991
99981 99981
99979 99990
99978 99986
99977 99985
99976 99984
99974 99980
99972 99975
99970 99973
99968 99971
99967 99969
99966 99966
99965 99963
99964 99962
99961 99961
99960 99956
99955 99955
99954 99954
99952 99959
99951 ...

result:

ok da

Test #98:

score: 0
Accepted
time: 727ms
memory: 104276kb

input:

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

output:

49999
17966 17966
18266 18262
18269 18268
18273 18270
18277 18275
18281 18280
17996 18282
17969 18260
17975 17972
17978 17977
17980 17979
17984 17983
17988 17985
18311 18233
18315 18313
18317 18316
18319 18318
18321 18320
18231 18255
18236 17989
18238 18237
18242 18239
18244 18243
18248 18245
18131 ...

result:

ok da

Test #99:

score: 0
Accepted
time: 1773ms
memory: 209708kb

input:

99998
64268 66535 9758 42907 84212 83488 27748 86198 80658 11614 93419 2528 96160 79473 83517 43109 37111 46603 93665 54540 84236 62717 24719 57225 8333 15728 40821 31719 13096 75018 76890 46244 75863 59618 67460 10326 84775 11276 83363 72071 9353 94316 9469 3969 78568 53071 96835 50125 2728 46756 5...

output:

49999
99984 66535
99961 99998
98550 64268
97967 98466
96160 96835
84212 86198
99980 93419
99991 99995
99987 99997
99751 99994
99959 99830
98979 99956
42907 9758
97158 97606
94316 96267
83488 93665
99968 83517
99979 99978
99981 99996
99989 99993
99678 99985
99958 99957
99796 99923
94028 98264
94211 9...

result:

ok da

Test #100:

score: 0
Accepted
time: 228ms
memory: 103256kb

input:

99998
99996 99994 99998 99997 99991 99995 99989 99993 99992 99988 99986 99985 99982 99980 99990 99979 99987 99984 99983 99978 99977 99973 99972 99971 99969 99981 99976 99975 99968 99966 99974 99965 99959 99970 99958 99967 99957 99956 99954 99951 99950 99949 99948 99964 99963 99962 99947 99946 99945 ...

output:

50122
99998 99998
99997 99996
99995 99994
99993 99991
99992 99989
99988 99988
99986 99986
99985 99990
99982 99987
99980 99984
99979 99983
99978 99978
99977 99977
99973 99973
99972 99981
99971 99976
99969 99975
99968 99968
99966 99974
99965 99965
99959 99970
99958 99967
99957 99957
99956 99956
99954 ...

result:

ok da

Test #101:

score: 0
Accepted
time: 805ms
memory: 102744kb

input:

99998
2 1 4 6 3 5 8 12 7 17 9 18 20 22 25 26 28 10 34 35 11 13 40 14 43 46 15 16 19 47 48 21 51 52 53 23 55 24 57 27 29 30 31 59 32 63 65 66 68 33 69 36 70 71 37 72 74 38 39 75 41 77 42 79 81 83 85 86 89 44 90 91 45 49 92 95 96 98 50 100 104 54 56 58 107 109 110 60 61 111 113 62 115 64 118 123 125 6...

output:

49999
4932 91513
17900 4930
17906 17902
17908 17907
91634 17909
4928 91514
17899 17913
97710 4927
91511 17916
17919 17917
91745 17388
5144 17381
91503 17382
17921 4921
17922 4920
17924 4916
4914 91509
91510 17926
91744 91504
17927 4913
91502 97712
17931 17930
17932 97714
97708 17910
91751 17898
1736...

result:

ok da

Test #102:

score: 0
Accepted
time: 1792ms
memory: 209612kb

input:

99999
64268 66535 9758 42907 84212 83488 27748 86198 80658 11614 93419 2528 96160 79473 83517 43109 37111 46603 93665 54540 84236 62717 24719 57225 8333 15728 40821 31719 13096 75018 76890 46244 75863 59618 67460 10326 84775 11276 83363 72071 9353 94316 9469 3969 78568 53071 96835 50125 2728 46756 5...

output:

50000
66535 66535
99998 99984
64268 99961
99999 98550
97967 98466
96160 96835
86198 93419
99980 84212
99997 99994
99991 99987
99751 99995
99956 99959
99830 98979
9758 42907
97606 97158
94316 96267
83488 93665
99968 83517
99979 99978
99981 99996
99993 99985
99678 99989
99957 99958
98264 99923
94142 9...

result:

ok da

Test #103:

score: 0
Accepted
time: 233ms
memory: 102976kb

input:

99999
99997 99999 99995 99987 99986 99984 99998 99978 99977 99976 99996 99975 99994 99993 99971 99969 99992 99965 99991 99990 99962 99989 99960 99988 99985 99983 99982 99957 99953 99981 99950 99980 99949 99979 99946 99974 99973 99972 99943 99970 99968 99942 99967 99966 99964 99963 99961 99959 99941 ...

output:

50253
99999 99999
99998 99997
99996 99995
99994 99994
99993 99993
99992 99992
99991 99991
99990 99990
99989 99987
99988 99986
99985 99984
99983 99978
99982 99977
99981 99976
99980 99975
99979 99971
99974 99969
99973 99965
99972 99962
99970 99960
99968 99957
99967 99953
99966 99950
99964 99949
99963 ...

result:

ok da

Test #104:

score: 0
Accepted
time: 747ms
memory: 105584kb

input:

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

output:

50000
18172 18172
18046 18044
18049 18047
18053 18051
18063 18057
18164 18200
18170 18166
18173 18042
18185 18183
18192 18187
18196 18194
18159 18197
18204 18201
18100 18008
18106 18103
18111 18108
18031 18114
18002 18001
18004 18003
18010 18206
18014 18013
18025 18020
18029 18028
18036 18116
18041 ...

result:

ok da

Test #105:

score: 0
Accepted
time: 1831ms
memory: 209864kb

input:

100000
64268 66535 9758 42907 84212 83488 27748 86198 80658 11614 93419 2528 96160 79473 83517 43109 37111 46603 93665 54540 84236 62717 24719 57225 8333 15728 40821 31719 13096 75018 76890 46244 75863 59618 67460 10326 84775 11276 83363 72071 9353 94316 9469 3969 78568 53071 96835 50125 2728 46756 ...

output:

50000
100000 96160
64268 99998
99999 99961
98466 93419
98550 86198
84212 97967
96835 99984
94316 66535
99994 93665
99991 99987
99995 99997
99830 99751
98979 99956
97606 99959
83488 97158
99980 83517
9758 96267
94028 42907
84236 94142
87183 84775
99985 99981
99993 99996
99678 99989
99796 99923
99957 ...

result:

ok da

Test #106:

score: 0
Accepted
time: 206ms
memory: 102068kb

input:

100000
99999 100000 99995 99998 99986 99984 99981 99974 99972 99997 99971 99967 99996 99965 99957 99956 99994 99955 99993 99992 99991 99990 99954 99989 99953 99952 99988 99987 99947 99940 99939 99938 99937 99985 99983 99982 99980 99927 99926 99979 99920 99978 99977 99976 99918 99975 99973 99970 9996...

output:

50194
99999 100000
99998 99998
99997 99997
99996 99995
99994 99994
99993 99993
99992 99992
99991 99991
99990 99990
99989 99989
99988 99988
99987 99986
99985 99984
99983 99983
99982 99981
99980 99980
99979 99979
99978 99978
99977 99977
99976 99974
99975 99972
99973 99971
99970 99970
99969 99969
99968...

result:

ok da

Test #107:

score: 0
Accepted
time: 764ms
memory: 103152kb

input:

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

output:

50000
18746 18734
26239 26238
18741 5646
18737 26241
26244 11405
26247 5645
26237 26248
26250 11423
11393 5642
11391 18788
18786 26155
26156 5686
26252 26157
26261 26212
18733 11425
26253 5641
18732 26258
26259 11427
5685 26260
18731 5638
11430 26264
5637 18729
26265 11431
26243 5636
26184 11420
568...

result:

ok da

Test #108:

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

input:

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

output:

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

result:

ok da

Test #109:

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

input:

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

output:

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

result:

ok da

Test #110:

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

input:

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

output:

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

result:

ok da

Test #111:

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

input:

500
498 497 500 499 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 ...

output:

498
500 498
499 497
496 496
495 495
494 494
493 493
492 492
491 491
490 490
489 489
488 488
487 487
486 486
485 485
484 484
483 483
482 482
481 481
480 480
479 479
478 478
477 477
476 476
475 475
474 474
473 473
472 472
471 471
470 470
469 469
468 468
467 467
466 466
465 465
464 464
463 463
462 462
...

result:

ok da

Test #112:

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

input:

500
497 500 494 498 499 493 495 496 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 ...

output:

496
497 500
499 498
496 494
493 495
492 492
491 491
490 490
489 489
488 488
487 487
486 486
485 485
484 484
483 483
482 482
481 481
480 480
479 479
478 478
477 477
476 476
475 475
474 474
473 473
472 472
471 471
470 470
469 469
468 468
467 467
466 466
465 465
464 464
463 463
462 462
461 461
460 460
...

result:

ok da

Test #113:

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

input:

500
500 498 499 497 495 493 494 496 490 491 488 492 489 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 ...

output:

495
500 500
499 498
497 497
496 495
494 493
490 490
491 492
489 488
487 487
486 486
485 485
484 484
483 483
482 482
481 481
480 480
479 479
478 478
477 477
476 476
475 475
474 474
473 473
472 472
471 471
470 470
469 469
468 468
467 467
466 466
465 465
464 464
463 463
462 462
461 461
460 460
459 459
...

result:

ok da

Test #114:

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

input:

500
499 500 498 496 495 497 494 493 492 489 490 491 487 488 485 486 484 483 481 482 480 477 479 476 478 474 475 471 473 472 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 ...

output:

490
499 500
498 498
496 496
495 497
494 494
493 493
492 492
490 490
489 491
488 487
486 485
484 484
483 483
482 481
480 480
479 477
476 478
475 474
473 473
472 471
470 470
469 469
468 468
467 467
466 466
465 465
464 464
463 463
462 462
461 461
460 460
459 459
458 458
457 457
456 456
455 455
454 454
...

result:

ok da

Test #115:

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

input:

500
500 499 498 497 496 495 494 493 492 491 490 489 488 487 485 484 486 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 ...

output:

486
500 500
499 499
498 498
497 497
496 496
495 495
494 494
493 493
492 492
491 491
490 490
489 489
488 488
487 487
485 485
484 486
483 483
482 482
481 481
480 480
479 479
478 478
477 477
476 476
475 475
474 474
473 473
472 472
471 471
470 470
469 469
468 468
467 467
466 466
465 465
464 464
463 463
...

result:

ok da

Test #116:

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

input:

7500
7498 7497 7500 7499 7496 7495 7494 7493 7492 7491 7490 7489 7488 7487 7486 7485 7484 7483 7482 7481 7480 7479 7478 7477 7476 7475 7474 7473 7472 7471 7470 7469 7468 7467 7466 7465 7464 7463 7462 7461 7460 7459 7458 7457 7456 7455 7454 7453 7452 7451 7450 7449 7448 7447 7446 7445 7444 7443 7442 ...

output:

7498
7500 7498
7499 7497
7496 7496
7495 7495
7494 7494
7493 7493
7492 7492
7491 7491
7490 7490
7489 7489
7488 7488
7487 7487
7486 7486
7485 7485
7484 7484
7483 7483
7482 7482
7481 7481
7480 7480
7479 7479
7478 7478
7477 7477
7476 7476
7475 7475
7474 7474
7473 7473
7472 7472
7471 7471
7470 7470
7469 ...

result:

ok da

Test #117:

score: 0
Accepted
time: 5ms
memory: 11480kb

input:

7500
7497 7500 7494 7498 7499 7493 7495 7496 7492 7491 7490 7489 7488 7487 7486 7485 7484 7483 7482 7481 7480 7479 7478 7477 7476 7475 7474 7473 7472 7471 7470 7469 7468 7467 7466 7465 7464 7463 7462 7461 7460 7459 7458 7457 7456 7455 7454 7453 7452 7451 7450 7449 7448 7447 7446 7445 7444 7443 7442 ...

output:

7496
7497 7500
7499 7498
7496 7494
7493 7495
7492 7492
7491 7491
7490 7490
7489 7489
7488 7488
7487 7487
7486 7486
7485 7485
7484 7484
7483 7483
7482 7482
7481 7481
7480 7480
7479 7479
7478 7478
7477 7477
7476 7476
7475 7475
7474 7474
7473 7473
7472 7472
7471 7471
7470 7470
7469 7469
7468 7468
7467 ...

result:

ok da

Test #118:

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

input:

7500
7500 7498 7499 7497 7495 7493 7494 7496 7490 7491 7488 7492 7489 7487 7486 7485 7484 7483 7482 7481 7480 7479 7478 7477 7476 7475 7474 7473 7472 7471 7470 7469 7468 7467 7466 7465 7464 7463 7462 7461 7460 7459 7458 7457 7456 7455 7454 7453 7452 7451 7450 7449 7448 7447 7446 7445 7444 7443 7442 ...

output:

7495
7500 7500
7499 7498
7497 7497
7496 7495
7494 7493
7490 7490
7491 7492
7489 7488
7487 7487
7486 7486
7485 7485
7484 7484
7483 7483
7482 7482
7481 7481
7480 7480
7479 7479
7478 7478
7477 7477
7476 7476
7475 7475
7474 7474
7473 7473
7472 7472
7471 7471
7470 7470
7469 7469
7468 7468
7467 7467
7466 ...

result:

ok da

Test #119:

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

input:

7500
7499 7500 7498 7496 7495 7497 7494 7493 7492 7489 7490 7491 7487 7488 7485 7486 7484 7483 7481 7482 7480 7477 7479 7476 7478 7474 7475 7471 7473 7472 7470 7469 7468 7467 7466 7465 7464 7463 7462 7461 7460 7459 7458 7457 7456 7455 7454 7453 7452 7451 7450 7449 7448 7447 7446 7445 7444 7443 7442 ...

output:

7490
7499 7500
7498 7498
7496 7496
7495 7497
7494 7494
7493 7493
7492 7492
7490 7490
7491 7489
7488 7487
7486 7485
7484 7484
7483 7483
7482 7481
7480 7480
7479 7477
7476 7478
7475 7474
7473 7473
7472 7471
7470 7470
7469 7469
7468 7468
7467 7467
7466 7466
7465 7465
7464 7464
7463 7463
7462 7462
7461 ...

result:

ok da

Test #120:

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

input:

7500
7500 7498 7499 7497 7496 7495 7494 7493 7492 7491 7490 7489 7488 7487 7486 7485 7484 7483 7482 7481 7480 7479 7478 7477 7476 7475 7474 7473 7472 7471 7470 7469 7468 7467 7466 7465 7464 7463 7462 7461 7460 7459 7458 7457 7456 7455 7454 7453 7452 7451 7450 7449 7448 7447 7446 7445 7444 7443 7442 ...

output:

7484
7500 7500
7499 7498
7497 7497
7496 7496
7495 7495
7494 7494
7493 7493
7492 7492
7491 7491
7490 7490
7489 7489
7488 7488
7487 7487
7486 7486
7485 7485
7484 7484
7483 7483
7482 7482
7481 7481
7480 7480
7479 7479
7478 7478
7477 7477
7476 7476
7475 7475
7474 7474
7473 7473
7472 7472
7471 7471
7470 ...

result:

ok da

Test #121:

score: 0
Accepted
time: 168ms
memory: 88444kb

input:

100000
99998 99997 100000 99999 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 9995...

output:

99998
100000 99998
99999 99997
99996 99996
99995 99995
99994 99994
99993 99993
99992 99992
99991 99991
99990 99990
99989 99989
99988 99988
99987 99987
99986 99986
99985 99985
99984 99984
99983 99983
99982 99982
99981 99981
99980 99980
99979 99979
99978 99978
99977 99977
99976 99976
99975 99975
99974...

result:

ok da

Test #122:

score: 0
Accepted
time: 167ms
memory: 90388kb

input:

100000
99997 100000 99994 99998 99999 99993 99995 99996 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 9995...

output:

99996
99997 100000
99999 99998
99996 99994
99993 99995
99992 99992
99991 99991
99990 99990
99989 99989
99988 99988
99987 99987
99986 99986
99985 99985
99984 99984
99983 99983
99982 99982
99981 99981
99980 99980
99979 99979
99978 99978
99977 99977
99976 99976
99975 99975
99974 99974
99973 99973
99972...

result:

ok da

Test #123:

score: 0
Accepted
time: 172ms
memory: 88372kb

input:

100000
100000 99998 99999 99997 99995 99993 99994 99996 99990 99991 99988 99992 99989 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 9995...

output:

99995
100000 100000
99999 99998
99997 99997
99996 99995
99994 99993
99990 99990
99991 99992
99989 99988
99987 99987
99986 99986
99985 99985
99984 99984
99983 99983
99982 99982
99981 99981
99980 99980
99979 99979
99978 99978
99977 99977
99976 99976
99975 99975
99974 99974
99973 99973
99972 99972
9997...

result:

ok da

Test #124:

score: 0
Accepted
time: 161ms
memory: 88392kb

input:

100000
99999 100000 99998 99996 99995 99997 99994 99993 99992 99989 99990 99991 99987 99988 99985 99986 99984 99983 99981 99982 99980 99977 99979 99976 99978 99974 99975 99971 99973 99972 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 9995...

output:

99990
99999 100000
99998 99998
99996 99996
99995 99997
99994 99994
99993 99993
99992 99992
99990 99990
99991 99989
99988 99987
99986 99985
99984 99984
99983 99983
99982 99981
99980 99980
99977 99979
99976 99978
99974 99975
99973 99973
99972 99971
99970 99970
99969 99969
99968 99968
99967 99967
99966...

result:

ok da

Test #125:

score: 0
Accepted
time: 159ms
memory: 88400kb

input:

100000
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 9995...

output:

99984
100000 100000
99999 99999
99998 99998
99997 99997
99996 99996
99995 99995
99994 99994
99993 99993
99992 99992
99991 99991
99990 99990
99989 99989
99988 99988
99987 99987
99986 99986
99985 99985
99984 99984
99983 99983
99982 99982
99981 99981
99980 99980
99979 99979
99978 99978
99977 99977
9997...

result:

ok da

Test #126:

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

input:

500
498 499 500 496 495 497 494 493 492 491 489 490 488 487 484 485 486 483 482 481 480 478 479 475 476 477 474 472 473 471 470 468 469 467 466 464 463 465 462 461 459 460 457 458 456 455 454 452 453 449 451 450 448 445 447 443 446 444 442 441 440 439 437 436 438 434 433 435 432 429 431 428 430 426 ...

output:

364
499 499
500 498
496 496
495 497
494 494
493 493
492 492
491 491
490 489
488 488
487 487
484 484
486 485
483 483
482 482
481 481
480 480
479 478
475 475
477 476
474 474
473 472
471 471
470 470
469 468
467 467
466 466
464 464
463 465
462 462
461 461
460 459
458 457
456 456
455 455
454 454
453 452
...

result:

ok da

Test #127:

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

input:

7500
7498 7500 7499 7496 7494 7497 7495 7493 7492 7490 7491 7489 7488 7486 7487 7485 7483 7482 7484 7481 7480 7478 7479 7477 7476 7475 7474 7472 7473 7470 7471 7469 7468 7467 7466 7465 7463 7464 7462 7460 7461 7459 7457 7458 7456 7455 7454 7453 7450 7452 7451 7449 7448 7447 7445 7446 7444 7443 7442 ...

output:

5701
7500 7500
7499 7498
7497 7496
7495 7494
7493 7493
7492 7492
7490 7491
7489 7489
7488 7488
7486 7487
7485 7485
7483 7483
7482 7484
7481 7481
7480 7480
7479 7478
7477 7477
7476 7476
7475 7475
7474 7474
7472 7473
7471 7470
7469 7469
7468 7468
7467 7467
7466 7466
7465 7465
7464 7463
7462 7462
7461 ...

result:

ok da

Test #128:

score: 0
Accepted
time: 146ms
memory: 89952kb

input:

100000
100000 99997 99999 99998 99995 99996 99994 99993 99992 99989 99991 99990 99988 99987 99986 99985 99984 99982 99983 99981 99979 99980 99978 99977 99975 99976 99974 99972 99973 99971 99969 99970 99968 99966 99967 99965 99963 99962 99964 99961 99959 99960 99958 99957 99956 99955 99954 99953 9995...

output:

79636
100000 100000
99999 99999
99998 99997
99995 99996
99994 99994
99993 99993
99992 99992
99991 99991
99990 99989
99988 99988
99987 99987
99986 99986
99985 99985
99984 99984
99983 99982
99981 99981
99979 99980
99978 99978
99977 99977
99975 99976
99974 99974
99973 99972
99971 99971
99970 99969
9996...

result:

ok da

Test #129:

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

input:

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

output:

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

result:

ok da

Test #130:

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

input:

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

output:

250
6 21
8 7
10 9
12 11
14 13
33 15
18 17
20 19
22 5
25 23
28 26
30 29
32 31
99 16
101 100
53 102
39 38
41 40
43 42
45 44
48 47
50 124
52 51
54 103
57 55
59 58
62 61
64 63
49 65
3 2
88 4
73 72
75 74
77 76
79 78
98 80
84 83
86 85
71 87
90 89
92 91
94 93
96 95
81 97
407 406
409 408
104 119
106 105
108...

result:

ok da

Test #131:

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

input:

7500
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:

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

result:

ok da

Test #132:

score: 0
Accepted
time: 376ms
memory: 87892kb

input:

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

output:

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

result:

ok da

Test #133:

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

input:

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

output:

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

result:

ok da

Test #134:

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

input:

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

output:

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

result:

ok da

Test #135:

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

input:

500
497 499 498 500 494 496 493 495 492 490 491 489 485 487 488 486 483 484 482 481 480 477 479 478 473 474 475 476 472 469 470 471 466 465 468 467 463 464 461 462 457 460 458 459 454 455 453 456 450 451 452 449 447 445 446 448 442 444 443 441 439 437 440 438 435 434 433 436 431 430 432 429 428 426 ...

output:

263
497 499
498 500
496 494
493 495
492 492
491 490
489 489
488 487
486 485
483 484
482 482
481 481
480 480
479 479
478 477
474 473
476 475
472 472
471 471
470 469
468 466
467 465
464 463
462 461
460 457
459 458
454 455
453 456
450 450
452 451
449 449
448 447
446 445
444 444
443 442
441 441
439 440
...

result:

ok da

Test #136:

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

input:

500
497 496 500 498 499 491 494 493 495 492 486 487 490 488 489 483 481 482 484 485 476 480 477 478 479 472 473 475 474 471 467 469 468 466 470 462 463 465 461 464 458 460 459 457 456 451 453 454 452 455 446 448 447 449 450 441 442 443 444 445 437 440 436 438 439 431 434 435 433 432 428 430 429 426 ...

output:

294
497 497
496 500
498 499
494 494
493 495
492 491
486 486
490 487
489 488
484 484
483 485
481 482
480 480
477 476
479 478
475 472
474 473
471 471
469 469
468 467
466 470
462 462
465 463
461 464
460 460
459 458
457 457
456 456
451 451
454 453
452 455
446 446
448 450
447 449
442 442
444 443
441 445
...

result:

ok da

Test #137:

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

input:

500
500 498 497 499 496 493 492 494 491 495 490 486 489 488 487 484 482 483 481 485 479 477 480 476 478 473 474 471 472 475 469 467 466 468 470 465 463 464 461 462 459 460 457 458 456 453 455 454 451 452 448 450 449 447 446 444 445 442 441 443 438 439 437 440 436 433 435 432 431 434 428 429 430 426 ...

output:

310
500 500
498 498
497 499
496 496
493 493
492 494
491 495
490 490
489 489
488 488
487 486
484 484
483 482
481 485
479 479
477 480
476 478
473 473
475 474
472 471
469 469
467 470
466 468
465 465
463 464
462 461
460 459
458 457
456 456
455 455
454 453
452 451
450 450
449 448
447 447
446 446
445 444
...

result:

ok da

Test #138:

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

input:

500
495 496 497 498 499 500 489 490 493 492 491 494 483 487 484 485 486 488 477 478 480 479 482 481 471 473 475 476 474 472 465 467 470 468 469 466 459 460 461 464 462 463 453 454 457 456 458 455 447 448 451 452 449 450 441 443 442 444 446 445 435 437 439 440 436 438 429 432 430 434 433 431 423 424 ...

output:

254
495 496
499 500
498 497
493 490
492 489
491 494
487 483
484 488
486 485
480 482
477 478
479 481
476 475
474 473
472 471
470 467
469 468
466 465
461 460
459 464
463 462
457 453
456 458
455 454
452 451
447 448
450 449
443 441
446 444
445 442
437 435
440 439
436 438
434 429
433 432
431 430
428 423
...

result:

ok da

Test #139:

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

input:

500
496 495 500 498 499 497 490 489 492 493 491 494 484 483 487 486 485 488 477 482 478 481 479 480 471 476 474 472 473 475 465 470 469 467 468 466 459 463 464 460 461 462 453 458 457 456 454 455 448 449 447 450 452 451 442 443 441 445 444 446 436 437 438 440 439 435 430 429 431 433 432 434 424 425 ...

output:

271
500 496
498 499
497 495
492 490
494 493
491 489
487 484
486 488
485 483
482 477
481 478
480 479
476 471
475 474
473 472
470 470
469 469
467 468
466 465
464 463
460 459
462 461
458 458
457 457
456 453
455 454
452 448
449 450
447 451
443 442
446 445
444 441
440 440
436 438
439 437
435 435
433 434
...

result:

ok da

Test #140:

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

input:

500
496 498 495 497 500 499 490 494 491 493 492 489 484 487 485 488 483 486 478 481 482 477 479 480 472 476 475 471 473 474 466 470 465 467 468 469 460 462 459 461 463 464 454 458 453 455 457 456 448 450 447 452 451 449 442 444 446 441 443 445 436 437 440 435 439 438 430 434 432 429 431 433 424 427 ...

output:

279
496 498
497 500
499 495
494 494
493 490
492 491
489 489
487 484
485 488
483 486
482 481
480 478
477 479
476 476
475 475
473 472
471 474
470 466
468 467
465 469
464 463
460 462
459 461
458 454
457 455
456 453
452 448
451 450
449 447
446 442
445 444
441 443
440 436
439 437
438 435
434 430
433 432
...

result:

ok da

Test #141:

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

input:

500
497 496 498 500 495 499 491 492 489 493 494 490 485 486 488 484 487 483 479 480 478 482 481 477 473 472 475 476 471 474 467 465 470 469 468 466 461 462 464 463 460 459 455 454 456 457 458 453 449 447 451 450 448 452 443 441 442 445 446 444 437 435 438 436 439 440 431 433 429 432 434 430 425 424 ...

output:

265
498 497
496 500
495 499
492 491
494 493
490 489
485 485
488 486
484 487
483 483
482 482
480 479
478 481
477 477
475 473
472 476
471 474
470 470
469 469
468 467
466 465
464 461
463 462
460 460
459 459
455 455
457 456
454 458
453 453
451 452
450 449
448 447
446 443
442 445
444 441
438 437
440 439
...

result:

ok da

Test #142:

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

input:

500
498 496 495 499 497 500 491 494 489 493 490 492 486 484 483 488 487 485 479 482 481 478 480 477 474 471 472 475 476 473 467 469 470 468 465 466 462 459 464 461 460 463 455 457 454 458 456 453 449 452 451 447 450 448 443 446 441 442 445 444 437 423 426 422 436 434 431 430 433 424 435 429 440 438 ...

output:

276
500 498
496 499
495 497
494 491
489 493
490 492
488 486
487 484
485 483
482 482
481 479
478 480
477 477
475 474
471 476
473 472
469 470
468 467
466 465
464 462
461 459
460 463
455 455
458 457
456 454
453 453
452 452
451 451
450 449
448 447
446 443
441 445
444 442
437 440
438 439
423 426
422 436
...

result:

ok da

Test #143:

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

input:

500
498 497 496 500 499 495 492 491 493 489 494 490 486 485 483 488 484 487 480 481 482 478 479 477 474 472 476 473 475 471 468 467 470 465 469 466 462 464 463 459 461 460 456 458 453 455 454 457 450 448 451 452 447 449 444 442 446 445 441 443 438 440 437 436 439 435 432 430 434 433 431 429 426 425 ...

output:

291
498 498
497 500
496 499
495 495
492 493
491 494
490 489
488 486
487 485
484 483
480 480
482 481
479 478
477 477
474 474
472 476
473 475
471 471
470 468
469 467
466 465
464 464
463 462
461 461
460 459
458 456
455 457
454 453
451 450
448 452
447 449
446 444
445 442
441 443
440 438
437 437
436 439
...

result:

ok da

Test #144:

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

input:

500
499 497 495 496 500 498 493 490 494 489 491 492 487 485 486 488 484 483 481 477 480 478 482 479 475 472 476 473 474 471 469 465 468 466 467 470 463 461 462 459 460 464 457 455 454 456 458 453 451 447 452 450 448 449 445 443 441 444 446 442 439 436 435 440 437 438 433 430 434 432 431 429 427 423 ...

output:

282
500 499
498 497
496 495
494 493
492 490
489 491
487 488
486 485
484 484
483 483
482 481
480 477
479 478
475 475
472 476
474 473
471 471
469 470
465 468
467 466
464 463
462 461
460 459
457 457
455 458
454 456
453 453
452 451
450 447
449 448
446 445
444 443
442 441
439 440
437 436
435 438
434 433
...

result:

ok da

Test #145:

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

input:

500
499 498 497 496 495 500 494 489 492 491 493 490 487 488 485 484 486 483 482 477 479 481 478 480 475 476 473 474 471 472 470 465 466 469 467 468 464 460 459 461 462 463 458 453 456 457 455 454 451 452 447 448 449 450 445 446 442 444 443 441 439 438 437 435 436 440 434 430 432 431 429 433 427 428 ...

output:

325
499 499
498 498
497 497
496 496
495 500
494 494
492 492
491 493
490 489
488 487
485 485
484 486
483 483
482 482
477 477
481 479
478 480
476 475
474 473
472 471
470 470
465 465
466 469
468 467
464 464
460 460
462 463
459 461
458 458
457 456
455 455
454 453
452 451
448 447
450 449
446 445
444 444
...

result:

ok da

Test #146:

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

input:

500
500 497 499 496 498 495 494 491 492 490 489 493 488 485 487 483 484 486 482 481 477 479 478 480 476 473 471 474 475 472 470 467 465 466 468 469 464 461 462 460 463 459 458 457 454 453 455 456 452 449 447 448 451 450 446 445 444 443 442 441 440 439 437 438 435 436 434 432 429 431 433 430 428 426 ...

output:

350
500 500
499 497
496 498
495 495
494 494
492 491
490 490
489 493
488 488
487 487
486 485
484 483
482 482
481 481
479 477
478 480
476 476
473 473
475 474
472 471
470 470
469 469
467 468
466 465
464 464
462 461
460 463
459 459
458 458
457 457
455 454
453 456
452 452
449 449
448 451
450 447
446 446
...

result:

ok da

Test #147:

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

input:

500
494 495 497 500 498 499 496 487 488 490 491 493 492 489 480 481 484 486 482 483 485 473 474 476 478 475 479 477 466 467 470 472 469 468 471 459 460 461 463 465 462 464 452 453 456 454 455 458 457 445 446 447 451 448 450 449 438 439 441 442 443 444 440 431 432 433 435 437 436 434 424 425 428 426 ...

output:

285
495 495
497 500
499 498
496 494
487 487
493 490
492 491
489 488
480 480
486 481
485 484
482 483
473 473
476 474
479 478
477 475
466 466
472 470
469 467
468 471
460 460
463 461
459 465
462 464
452 452
456 453
454 458
457 455
445 445
447 451
450 446
449 448
438 438
442 441
444 443
440 439
435 435
...

result:

ok da

Test #148:

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

input:

500
494 496 495 500 497 499 498 487 489 488 492 493 490 491 480 481 485 483 486 482 484 473 474 478 476 475 477 479 466 467 471 469 472 470 468 459 460 465 462 464 463 461 452 453 458 455 456 454 457 445 446 450 447 449 451 448 438 439 443 440 444 442 441 431 432 436 437 435 434 433 424 425 430 428 ...

output:

287
496 496
500 494
499 495
498 497
487 487
492 489
488 493
491 490
480 480
485 481
483 486
482 484
473 473
478 474
476 479
475 477
466 466
472 471
470 469
468 467
465 465
464 460
463 462
461 459
452 452
458 453
456 455
454 457
446 446
450 451
449 445
448 447
438 438
444 443
442 439
441 440
436 437
...

result:

ok da

Test #149:

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

input:

500
494 496 498 500 499 497 495 487 489 490 488 493 491 492 480 482 485 484 481 486 483 473 475 478 477 476 474 479 466 468 469 471 470 467 472 459 461 462 463 460 465 464 452 454 455 458 453 456 457 445 447 449 451 450 446 448 438 440 442 439 444 441 443 431 433 432 437 435 436 434 424 426 429 425 ...

output:

285
500 500
499 498
497 496
495 494
487 487
490 489
488 493
492 491
480 480
485 482
484 486
483 481
478 478
477 473
476 475
474 479
472 472
468 471
470 469
467 466
459 459
462 461
465 463
464 460
452 452
458 454
457 455
453 456
445 445
451 447
450 449
446 448
438 438
442 440
439 444
441 443
437 437
...

result:

ok da

Test #150:

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

input:

500
494 496 499 500 495 497 498 487 489 492 493 490 491 488 480 483 482 485 481 484 486 473 476 474 477 475 478 479 466 469 467 471 472 470 468 459 462 461 464 460 465 463 452 454 458 457 455 456 453 445 447 451 450 449 448 446 438 441 440 442 439 443 444 431 434 432 433 437 435 436 424 426 430 427 ...

output:

286
496 496
499 500
498 494
495 497
493 493
492 489
491 490
488 487
480 480
485 483
482 486
481 484
473 473
477 476
478 479
475 474
466 466
472 471
470 469
468 467
465 465
464 462
461 459
460 463
458 458
457 454
456 455
453 452
451 451
450 450
449 449
448 447
446 445
438 438
442 441
440 443
439 444
...

result:

ok da

Test #151:

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

input:

500
494 497 498 495 496 500 499 487 490 492 493 488 489 491 480 483 485 486 482 484 481 473 476 479 474 477 478 475 466 469 470 468 472 467 471 459 462 463 460 464 465 461 452 455 458 456 453 454 457 445 448 449 446 450 447 451 438 441 442 440 444 443 439 431 434 435 433 432 436 437 424 427 429 426 ...

output:

285
497 497
500 494
499 498
495 496
487 487
493 492
491 490
489 488
483 483
486 485
482 484
481 480
473 473
479 476
478 477
475 474
466 466
470 469
468 472
467 471
462 462
464 463
459 465
461 460
455 455
452 458
457 456
454 453
445 445
450 451
448 449
447 446
441 441
444 442
443 440
439 438
434 434
...

result:

ok da

Test #152:

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

input:

500
494 498 496 495 499 500 497 487 491 488 493 490 492 489 480 484 482 485 486 481 483 473 477 475 479 478 476 474 466 470 469 467 471 468 472 465 458 457 464 460 462 459 461 463 456 449 453 451 450 452 455 454 442 446 443 447 448 444 445 435 438 441 439 440 436 437 428 432 429 433 431 434 430 421 ...

output:

287
498 498
500 494
496 499
495 497
491 491
487 493
490 492
489 488
480 480
485 484
482 486
481 483
479 479
478 477
476 475
474 473
466 466
472 470
469 471
468 467
465 465
464 458
463 457
460 462
459 461
456 456
449 449
455 453
452 451
450 454
442 442
447 446
443 448
445 444
435 435
441 438
440 439
...

result:

ok da

Test #153:

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

input:

500
494 499 495 497 498 496 500 487 491 492 490 488 489 493 480 484 486 482 485 483 481 473 478 474 476 475 477 479 466 470 472 467 468 469 471 459 463 464 461 460 462 465 452 456 455 458 454 457 453 445 449 450 451 448 446 447 438 442 444 440 439 443 441 431 435 436 433 437 432 434 424 428 429 430 ...

output:

287
499 499
500 494
497 498
496 495
487 487
492 491
490 493
489 488
486 486
485 484
483 482
481 480
473 473
478 479
476 474
475 477
466 466
472 470
467 471
469 468
459 459
464 463
461 465
460 462
456 456
455 458
454 457
453 452
450 450
449 451
448 445
447 446
438 438
444 442
440 443
439 441
437 437
...

result:

ok da

Test #154:

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

input:

500
494 499 497 496 500 498 495 487 492 491 489 488 493 490 480 485 481 486 483 482 484 473 478 474 479 476 477 475 466 471 468 472 469 470 467 459 464 462 461 460 463 465 452 457 454 453 455 456 458 445 450 447 446 449 451 448 438 443 440 442 444 439 441 431 436 435 432 434 437 433 424 429 427 430 ...

output:

285
499 499
497 500
496 498
495 494
492 492
491 487
489 493
488 490
486 486
480 485
483 481
482 484
473 473
479 478
477 476
475 474
471 471
468 472
470 469
467 466
464 464
462 459
461 465
460 463
452 452
458 457
455 454
453 456
451 451
450 445
449 447
448 446
438 438
444 443
440 442
439 441
436 436
...

result:

ok da

Test #155:

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

input:

500
494 499 498 496 500 495 497 487 493 488 489 491 490 492 480 486 481 484 483 482 485 473 478 479 474 477 476 475 466 472 467 469 468 470 471 459 464 465 463 462 460 461 452 457 458 456 455 454 453 445 451 446 448 447 450 449 438 443 442 444 439 441 440 431 436 435 433 434 437 432 424 429 430 427 ...

output:

291
499 499
498 500
496 494
495 497
493 493
488 487
491 492
490 489
486 486
484 480
483 485
482 481
479 478
477 477
476 473
475 474
472 472
467 466
470 469
468 471
465 464
463 463
462 459
461 460
458 457
456 456
455 455
454 454
453 452
451 451
446 445
450 448
449 447
443 443
442 444
441 438
440 439
...

result:

ok da

Test #156:

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

input:

500
494 500 499 495 497 496 498 487 493 490 488 492 489 491 480 486 483 485 482 484 481 473 479 475 477 478 474 476 466 472 470 469 468 471 467 459 465 463 460 461 464 462 452 458 456 457 453 455 454 445 451 448 447 450 446 449 438 444 440 443 441 442 439 431 437 435 432 436 433 434 424 430 426 428 ...

output:

293
500 500
499 494
497 495
496 498
493 493
490 487
488 492
489 491
486 486
485 483
482 484
481 480
479 479
475 473
478 477
474 476
472 472
470 470
469 469
468 471
467 466
465 465
463 459
460 464
462 461
458 458
457 456
455 452
454 453
451 451
448 445
447 450
446 449
444 444
443 440
442 441
439 438
...

result:

ok da

Test #157:

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

input:

500
494 500 499 498 495 496 497 488 487 490 493 492 491 489 481 480 483 486 485 482 484 473 479 478 475 476 474 477 467 466 468 470 471 469 472 460 459 462 461 465 463 464 453 452 455 458 456 457 454 445 451 450 449 448 446 447 439 438 441 444 440 443 442 431 437 436 433 432 435 434 424 430 429 426 ...

output:

299
500 500
499 499
498 498
496 494
495 497
493 493
492 488
491 490
489 487
481 481
486 483
485 480
482 484
479 479
478 473
476 475
474 477
467 467
468 472
471 470
469 466
460 460
465 462
461 459
464 463
453 453
458 455
457 456
454 452
451 451
450 450
449 449
448 445
447 446
439 439
444 441
443 438
...

result:

ok da

Test #158:

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

input:

500
495 494 499 498 496 497 500 488 487 492 490 493 489 491 481 480 484 486 483 485 482 474 473 477 478 475 476 479 467 466 472 468 469 471 470 460 459 463 461 465 462 464 456 451 457 449 458 453 452 450 454 455 443 442 447 444 448 445 446 436 435 441 439 438 440 437 429 428 434 431 432 430 433 422 ...

output:

286
495 495
500 499
498 494
496 497
492 492
488 493
491 490
489 487
481 481
486 484
483 485
482 480
477 477
478 479
475 474
473 476
467 467
466 472
471 468
470 469
460 460
465 463
461 459
462 464
457 456
451 458
454 453
452 455
450 449
447 447
443 448
445 444
442 446
441 441
439 436
438 440
437 435
...

result:

ok da

Test #159:

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

input:

500
495 496 494 497 500 498 499 488 489 491 493 487 492 490 481 482 483 480 486 485 484 474 475 477 476 478 473 479 467 468 469 471 466 472 470 460 461 463 464 462 465 459 453 454 452 457 456 458 455 446 447 445 451 448 449 450 439 440 438 443 441 444 442 432 433 434 435 436 431 437 425 426 428 424 ...

output:

285
496 496
500 497
498 495
494 499
488 488
493 489
492 491
490 487
482 482
483 486
485 481
484 480
474 474
477 475
476 478
473 479
472 472
468 471
467 469
466 470
461 460
464 463
462 465
459 459
453 453
457 454
456 458
455 452
447 447
446 451
449 448
445 450
440 440
443 444
441 439
438 442
433 433
...

result:

ok da

Test #160:

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

input:

500
495 496 500 494 499 497 498 488 489 491 493 492 490 487 481 483 480 482 486 485 484 474 475 478 476 477 473 479 467 468 472 469 471 470 466 460 462 459 464 463 461 465 453 454 457 455 452 458 456 446 447 451 450 448 449 445 439 440 442 444 443 438 441 432 433 437 434 431 436 435 427 430 428 424 ...

output:

286
496 496
500 495
494 499
498 497
493 488
492 491
490 489
487 487
481 481
486 483
485 482
484 480
474 474
478 475
477 476
473 479
472 467
471 468
470 469
466 466
462 462
465 464
463 460
461 459
453 453
457 454
455 458
452 456
451 446
450 447
449 448
445 445
439 439
444 440
443 442
438 441
437 437
...

result:

ok da

Test #161:

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

input:

500
495 497 496 500 499 494 498 488 490 492 491 487 489 493 481 483 485 482 486 484 480 474 476 477 473 478 479 475 467 469 470 471 468 472 466 460 462 461 459 464 465 463 453 455 456 457 458 454 452 446 448 450 449 451 447 445 439 441 443 442 440 444 438 432 434 433 435 437 431 436 425 427 428 426 ...

output:

285
497 497
500 495
499 496
494 498
490 490
493 492
491 488
487 489
486 483
481 485
484 482
480 480
476 476
478 479
474 477
473 475
469 467
471 470
468 472
466 466
462 462
464 465
461 460
459 463
456 455
458 457
454 453
452 452
451 450
449 448
447 446
445 445
443 439
442 441
440 444
438 438
437 437
...

result:

ok da

Test #162:

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

input:

500
495 498 496 494 497 499 500 488 491 487 490 492 489 493 481 483 486 482 484 480 485 474 477 475 478 476 479 473 467 470 466 471 472 468 469 460 463 459 461 464 465 462 453 455 458 452 454 456 457 446 449 445 447 448 450 451 439 441 444 443 440 438 442 432 434 437 435 436 433 431 425 428 426 424 ...

output:

286
498 498
500 499
496 495
494 497
488 488
492 491
490 493
489 487
483 483
481 486
482 484
480 485
477 474
479 478
476 475
473 473
472 472
470 471
469 467
466 468
460 460
464 463
461 465
462 459
453 453
458 455
456 457
452 454
446 446
450 449
447 451
445 448
444 444
443 441
440 439
438 442
437 434
...

result:

ok da

Test #163:

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

input:

500
495 498 499 500 494 497 496 488 491 492 487 493 490 489 481 484 485 480 482 486 483 474 477 476 475 473 478 479 467 470 472 466 469 471 468 460 463 464 462 465 461 459 453 456 455 452 454 457 458 446 449 450 445 447 448 451 439 442 443 441 444 438 440 432 435 437 431 434 433 436 425 428 429 427 ...

output:

286
498 498
499 500
497 495
496 494
491 491
493 492
490 488
489 487
484 484
485 486
482 481
480 483
477 477
476 474
475 479
473 478
467 467
472 470
469 471
468 466
464 463
462 465
461 460
459 459
453 453
457 456
455 458
452 454
446 446
449 450
447 451
445 448
439 439
443 442
441 444
438 440
437 437
...

result:

ok da

Test #164:

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

input:

500
495 499 497 494 496 498 500 488 492 490 489 493 491 487 481 485 482 486 483 480 484 474 478 475 476 473 477 479 467 471 468 469 470 472 466 460 464 461 459 465 463 462 453 457 452 454 458 455 456 446 450 445 449 447 451 448 439 443 441 440 438 444 442 432 436 433 434 435 431 437 425 429 426 428 ...

output:

286
499 499
500 495
497 498
494 496
488 492
490 493
489 491
487 487
481 481
486 485
483 482
480 484
474 474
479 478
476 475
473 477
471 467
468 472
470 469
466 466
460 460
465 464
463 461
462 459
453 453
458 457
452 454
456 455
451 451
450 446
445 449
448 447
443 443
441 439
440 444
438 442
436 436
...

result:

ok da

Test #165:

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

input:

500
495 499 498 497 500 494 496 488 493 487 489 490 492 491 481 485 486 480 484 482 483 474 478 477 476 479 475 473 467 471 470 468 466 469 472 460 464 462 463 461 459 465 453 457 456 458 455 452 454 446 450 451 449 447 448 445 439 443 442 441 438 444 440 432 436 434 435 437 433 431 425 429 428 426 ...

output:

290
499 499
498 495
497 500
494 496
493 493
489 488
492 490
491 487
481 481
486 485
480 484
482 483
478 478
477 477
476 479
475 474
473 473
471 471
470 467
468 472
466 469
464 464
462 463
461 460
459 465
457 457
456 458
455 453
452 454
451 450
449 446
448 447
445 445
443 443
442 439
441 444
440 438
...

result:

ok da

Test #166:

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

input:

500
491 499 493 498 497 492 500 494 495 496 485 490 487 484 488 486 489 478 483 477 482 480 481 479 471 476 472 473 470 475 474 464 469 467 463 466 465 468 457 462 459 461 458 456 460 450 455 451 449 454 453 452 443 448 445 444 447 446 442 436 441 439 437 435 438 440 429 434 428 433 432 430 431 422 ...

output:

289
491 499
498 500
497 493
495 494
492 496
490 490
487 485
489 488
486 484
483 483
482 478
481 480
479 477
476 476
472 471
475 473
474 470
469 469
467 464
466 468
465 463
462 462
459 461
458 457
456 460
455 455
454 450
453 451
452 449
448 443
447 445
446 444
442 442
441 441
439 436
437 440
435 438
...

result:

ok da

Test #167:

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

input:

500
495 500 498 496 499 494 497 488 493 491 490 489 492 487 481 486 484 482 485 483 480 474 479 477 476 478 475 473 467 472 470 469 466 471 468 461 459 462 460 463 465 464 454 452 455 453 457 458 456 446 451 450 449 448 445 447 439 444 442 443 441 438 440 432 437 436 431 435 434 433 425 430 428 429 ...

output:

302
500 500
498 495
496 499
494 497
493 493
491 491
490 488
489 492
487 487
486 481
484 485
483 482
480 480
479 479
477 477
476 478
475 474
473 473
472 472
470 467
469 471
468 466
461 461
463 462
459 465
464 460
454 454
458 455
452 457
456 453
451 451
450 450
449 449
448 446
445 447
444 444
443 442
...

result:

ok da

Test #168:

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

input:

500
496 494 497 499 495 498 500 489 487 492 490 493 488 491 482 480 486 481 484 483 485 475 473 477 474 478 479 476 468 466 470 471 472 467 469 461 459 463 464 460 462 465 454 452 456 455 453 458 457 447 445 450 449 446 451 448 440 438 442 441 443 439 444 433 431 434 435 432 436 437 426 424 429 425 ...

output:

285
496 496
499 497
494 500
495 498
489 489
493 492
490 487
488 491
482 482
480 486
485 484
483 481
475 475
478 479
473 477
476 474
468 468
471 470
466 472
467 469
461 461
464 465
459 463
460 462
454 454
458 456
455 452
453 457
447 447
450 451
449 445
448 446
440 440
443 442
441 444
439 438
436 436
...

result:

ok da

Test #169:

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

input:

500
496 494 500 498 499 495 497 489 488 487 492 490 491 493 482 481 483 480 485 484 486 475 474 473 476 478 479 477 468 467 466 472 471 470 469 461 460 462 463 464 459 465 454 453 455 458 457 456 452 447 445 451 450 448 446 449 440 439 441 443 438 444 442 433 432 434 431 437 436 435 426 425 428 424 ...

output:

287
496 496
494 500
498 499
495 497
489 489
493 492
490 488
487 491
482 482
486 483
481 485
480 484
475 475
478 476
474 479
473 477
472 472
471 468
470 467
469 466
461 461
463 462
460 464
459 465
458 454
457 455
456 453
452 452
451 451
450 447
448 445
446 449
440 440
443 441
439 444
438 442
433 433
...

result:

ok da

Test #170:

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

input:

500
496 495 500 498 494 499 497 489 488 492 490 493 491 487 482 481 486 480 484 483 485 475 474 479 477 478 476 473 468 467 470 472 466 469 471 461 460 464 463 462 465 459 454 453 456 455 458 452 457 447 446 451 445 448 449 450 440 439 444 441 438 442 443 433 432 436 435 431 437 434 426 425 430 429 ...

output:

286
496 496
495 500
498 499
497 494
492 489
488 493
491 490
487 487
482 482
481 486
484 485
483 480
479 475
478 477
476 474
473 473
468 468
472 470
471 467
466 469
464 461
463 465
462 460
459 459
458 458
454 456
453 455
452 457
447 447
446 451
449 448
445 450
440 440
439 444
442 441
438 443
433 433
...

result:

ok da

Test #171:

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

input:

500
496 497 495 494 499 498 500 489 490 488 487 491 493 492 482 483 484 480 485 486 481 475 476 474 478 473 479 477 468 469 470 471 472 466 467 461 462 459 463 460 465 464 454 455 452 458 453 456 457 447 448 449 451 445 446 450 440 441 442 444 439 443 438 433 434 431 437 435 436 432 426 427 425 430 ...

output:

286
497 497
500 496
495 499
494 498
490 490
489 491
488 493
487 492
483 483
485 486
482 484
481 480
476 476
475 479
474 478
473 477
468 468
470 469
472 471
467 466
461 461
463 465
464 462
460 459
454 454
458 455
456 452
453 457
449 449
448 451
450 447
446 445
441 440
444 442
439 443
438 438
437 437
...

result:

ok da

Test #172:

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

input:

500
496 498 494 499 495 500 497 491 492 486 489 490 487 488 485 493 484 479 480 483 477 481 482 478 472 474 470 473 475 471 476 465 466 468 463 464 469 467 458 459 461 462 457 456 460 451 453 449 452 455 450 454 444 445 448 447 446 442 443 437 438 440 435 441 439 436 430 431 434 433 432 429 428 423 ...

output:

291
498 498
500 496
494 499
497 495
492 491
486 486
490 489
488 487
485 493
484 484
479 479
483 480
482 481
478 477
472 472
475 474
473 476
471 470
465 465
468 466
464 469
467 463
461 459
458 462
457 457
456 460
451 451
455 453
449 452
450 454
448 448
447 444
446 445
443 442
437 437
441 440
439 438
...

result:

ok da

Test #173:

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

input:

500
496 498 499 494 497 495 500 489 491 492 488 490 487 493 482 484 481 483 486 480 485 475 477 476 478 474 473 479 468 470 467 469 471 466 472 461 463 462 464 459 465 460 454 456 452 458 455 453 457 447 449 448 446 451 450 445 440 442 443 438 439 444 441 433 435 436 431 437 434 432 426 428 429 425 ...

output:

288
498 498
499 496
497 500
495 494
489 489
492 491
488 490
487 493
482 482
486 484
481 483
480 485
477 475
476 478
474 474
473 479
468 468
470 471
467 469
466 472
461 461
463 465
462 464
460 459
454 454
458 456
455 452
453 457
449 451
448 447
446 450
445 445
440 440
443 442
438 444
441 439
435 435
...

result:

ok da

Test #174:

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

input:

500
496 498 499 500 495 497 494 489 491 493 490 488 487 492 482 485 481 483 480 484 486 475 478 473 479 477 476 474 468 471 466 472 469 467 470 461 464 460 459 462 465 463 454 456 458 453 455 452 457 447 449 451 450 445 446 448 440 443 439 442 438 441 444 433 436 431 432 435 437 434 426 428 430 425 ...

output:

288
496 498
499 500
495 497
494 494
493 491
490 489
488 488
487 492
482 482
485 486
481 483
480 484
478 479
477 477
476 475
474 473
468 468
472 471
469 466
467 470
461 461
464 465
460 462
459 463
454 454
458 456
453 455
452 457
451 451
450 449
448 447
446 445
440 440
444 443
439 442
438 441
437 437
...

result:

ok da

Test #175:

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

input:

500
496 499 495 500 494 497 498 489 492 493 487 488 490 491 482 485 484 486 483 480 481 475 478 474 479 473 477 476 468 471 472 466 469 467 470 461 464 463 465 459 460 462 454 457 458 453 456 452 455 447 450 448 446 449 451 445 440 443 444 439 441 438 442 433 436 437 431 434 435 432 426 429 430 425 ...

output:

291
499 499
500 496
497 495
494 498
492 492
489 493
491 490
488 487
485 485
484 486
483 482
481 480
475 475
479 478
477 474
476 473
468 468
472 471
470 469
467 466
464 464
463 465
462 461
459 460
454 454
458 457
453 456
452 455
450 447
448 451
446 449
445 445
440 440
444 443
439 441
438 442
433 433
...

result:

ok da

Test #176:

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

input:

500
496 500 495 499 494 498 497 489 492 493 490 491 488 487 482 486 480 481 484 483 485 475 479 476 474 477 478 473 468 472 469 466 470 471 467 461 465 459 464 460 462 463 454 458 452 455 456 457 453 447 450 451 449 446 448 445 440 444 439 438 443 442 441 433 437 431 434 432 436 435 426 430 425 424 ...

output:

289
500 500
499 496
498 495
497 494
489 489
493 492
491 490
488 488
487 487
486 486
484 482
480 485
483 481
479 475
477 476
474 478
473 473
472 472
469 468
471 470
467 466
465 465
464 461
462 459
460 463
458 458
455 454
457 456
453 452
450 451
449 447
446 448
445 445
444 444
443 440
442 439
441 438
...

result:

ok da

Test #177:

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

input:

500
497 494 495 498 499 496 500 489 493 490 491 487 492 488 482 486 483 485 480 481 484 476 473 474 477 478 479 475 468 472 471 466 469 470 467 461 465 464 463 460 462 459 458 457 450 456 449 451 455 453 452 454 445 442 443 444 448 447 446 437 441 440 439 435 436 438 430 434 433 429 431 428 432 424 ...

output:

305
497 497
498 500
494 499
496 495
493 493
491 489
490 492
488 487
486 486
485 482
484 483
481 480
476 476
478 477
473 479
475 474
472 472
471 468
470 469
467 466
465 465
464 464
463 461
460 462
459 459
458 458
457 457
456 450
455 451
453 449
452 454
445 445
442 448
447 443
446 444
441 441
440 440
...

result:

ok da

Test #178:

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

input:

500
497 494 498 496 500 495 499 490 487 491 492 488 493 489 483 480 481 486 485 484 482 476 473 474 477 479 478 475 469 466 470 472 467 468 471 462 459 461 464 465 460 463 455 452 456 458 457 454 453 448 445 449 446 450 447 451 441 438 442 439 444 443 440 434 431 432 435 437 433 436 427 424 429 425 ...

output:

285
497 497
500 498
496 494
495 499
490 490
492 491
487 493
489 488
486 486
485 483
484 480
482 481
476 476
479 477
478 473
475 474
469 469
472 470
471 466
468 467
462 462
465 464
461 459
460 463
458 455
457 456
454 454
453 452
448 448
449 451
445 450
447 446
441 441
444 442
443 438
440 439
434 434
...

result:

ok da

Test #179:

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

input:

500
497 495 494 496 499 500 498 490 488 489 487 493 492 491 483 480 486 482 481 485 484 476 473 479 475 474 477 478 469 467 466 468 470 472 471 462 459 465 463 464 461 460 455 452 458 453 457 456 454 448 446 445 451 450 449 447 441 439 438 440 442 443 444 434 431 437 436 435 432 433 427 425 424 429 ...

output:

286
499 499
497 500
495 498
494 496
490 490
488 493
492 489
491 487
486 486
485 483
482 480
481 484
476 476
473 479
475 477
474 478
470 470
469 472
467 471
466 468
465 462
464 463
461 461
460 459
458 458
457 455
456 452
454 453
451 451
450 448
449 446
447 445
443 443
441 444
439 442
438 440
437 437
...

result:

ok da

Test #180:

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

input:

500
497 495 498 496 494 500 499 490 488 492 493 491 489 487 483 481 484 485 482 486 480 476 474 475 477 478 479 473 469 467 468 471 472 466 470 462 460 464 463 461 459 465 455 453 454 457 456 458 452 448 446 449 451 450 445 447 441 439 440 444 442 443 438 434 432 435 431 437 433 436 427 425 426 428 ...

output:

285
498 498
497 500
496 495
494 499
493 492
491 490
489 488
487 487
486 484
483 485
482 481
480 480
477 476
479 478
475 474
473 473
469 469
472 471
467 468
466 470
464 464
463 462
461 460
459 465
458 455
454 457
456 453
452 452
448 448
451 449
450 446
445 447
441 444
442 443
439 440
438 438
434 434
...

result:

ok da

Test #181:

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

input:

500
497 496 495 498 500 494 499 490 489 488 487 491 493 492 483 481 486 482 484 480 485 474 478 472 476 475 479 477 473 470 471 466 465 464 469 463 468 467 459 458 456 457 460 462 461 452 451 449 453 455 454 450 445 443 448 446 444 447 442 438 437 435 440 441 439 436 431 430 428 433 434 429 432 424 ...

output:

286
497 497
496 498
495 500
494 499
490 490
489 491
488 493
487 492
483 483
481 486
482 484
480 485
478 474
476 479
475 477
473 472
470 471
466 466
465 469
464 468
463 467
459 459
460 462
461 458
456 457
452 452
453 455
454 451
450 449
448 445
446 443
444 447
442 442
440 440
438 441
437 439
436 435
...

result:

ok da

Test #182:

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

input:

500
497 496 500 495 498 499 494 490 489 491 492 487 493 488 483 482 484 480 486 485 481 476 475 477 474 479 473 478 469 468 470 466 471 467 472 462 461 464 463 459 465 460 455 454 457 456 458 453 452 448 447 451 445 449 446 450 441 440 443 442 439 444 438 434 433 437 431 436 432 435 427 426 428 425 ...

output:

291
500 497
499 496
495 498
494 494
490 490
492 491
489 493
488 487
483 483
486 484
485 482
481 480
476 476
475 477
474 479
473 478
469 469
471 470
468 472
467 466
462 462
465 464
463 461
460 459
455 455
458 457
456 454
453 453
452 452
448 448
447 451
449 450
446 445
443 441
442 440
439 444
438 438
...

result:

ok da

Test #183:

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

input:

500
497 498 494 495 500 496 499 490 491 488 493 489 492 487 483 484 480 481 485 482 486 476 477 473 475 474 478 479 469 470 466 471 467 472 468 462 463 459 461 464 465 460 455 456 452 458 457 453 454 449 450 451 444 443 448 447 445 446 442 438 439 436 441 435 440 437 431 432 429 430 434 433 428 424 ...

output:

287
498 498
497 500
494 499
496 495
491 490
488 493
489 492
487 487
483 483
486 484
481 485
482 480
476 476
478 477
475 479
474 473
469 469
471 470
466 472
468 467
462 462
464 463
461 465
460 459
455 455
456 458
452 457
454 453
449 449
450 451
448 444
447 443
446 445
442 442
438 438
441 439
440 436
...

result:

ok da

Test #184:

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

input:

500
497 498 500 499 494 495 496 490 492 487 489 488 493 491 483 484 485 480 482 481 486 476 477 479 475 474 473 478 469 470 472 467 468 471 466 462 463 465 464 460 459 461 455 456 457 453 452 458 454 448 450 445 449 451 446 447 441 443 438 440 442 444 439 434 435 436 437 432 431 433 427 429 424 425 ...

output:

294
500 498
499 497
495 495
496 494
490 490
493 492
489 487
488 491
483 483
484 485
482 486
481 480
476 476
477 479
475 475
474 474
473 478
472 469
471 470
468 467
466 466
465 462
464 463
460 460
459 461
455 455
457 456
453 458
452 454
448 448
451 450
445 449
447 446
441 441
444 443
440 442
439 438
...

result:

ok da

Test #185:

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

input:

500
497 499 496 495 498 494 500 490 492 489 488 493 491 487 483 485 484 481 480 486 482 476 478 474 473 477 479 475 469 471 468 472 470 466 467 462 464 461 459 463 460 465 455 457 453 452 454 458 456 448 450 447 446 445 451 449 441 443 442 440 438 444 439 434 436 432 433 437 431 435 423 426 425 424 ...

output:

290
497 499
496 496
495 498
494 500
492 490
489 493
488 491
487 487
485 485
484 483
481 486
480 482
476 476
479 478
474 477
473 475
469 469
472 471
470 468
466 467
462 462
465 464
461 463
460 459
455 455
457 458
454 453
452 456
450 448
447 447
446 451
445 449
443 443
442 441
440 444
439 438
434 434
...

result:

ok da

Test #186:

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

input:

500
497 499 500 495 494 498 496 490 493 487 489 492 488 491 483 486 480 481 482 485 484 476 479 474 475 477 473 478 469 471 470 472 466 468 467 462 464 465 463 461 460 459 455 458 452 456 453 457 454 448 450 451 447 446 445 449 441 444 439 442 440 443 438 434 437 431 432 433 435 436 427 429 428 430 ...

output:

291
499 499
500 497
495 498
494 496
493 493
492 490
489 487
488 491
486 486
485 483
481 482
484 480
479 479
477 476
475 474
473 478
471 469
470 472
468 468
467 466
465 464
463 462
461 461
460 460
459 459
458 458
456 455
452 457
454 453
448 448
451 450
447 447
446 446
445 449
444 441
443 442
440 439
...

result:

ok da

Test #187:

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

input:

500
497 500 498 499 495 494 496 490 493 492 487 491 489 488 483 486 482 481 480 484 485 476 479 475 477 474 473 478 469 472 470 471 468 467 466 462 465 463 461 459 464 460 455 458 454 452 453 457 456 448 451 447 450 445 446 449 441 444 442 440 438 439 443 434 437 432 436 431 433 435 427 430 426 424 ...

output:

295
497 500
498 499
495 495
494 496
493 493
492 492
491 490
489 489
488 487
486 483
482 482
481 484
480 485
479 476
475 477
474 474
473 478
472 469
471 470
468 468
467 467
466 466
465 465
463 462
461 464
460 459
458 458
457 455
456 454
453 452
451 451
450 448
449 447
446 445
444 444
442 441
440 443
...

result:

ok da

Test #188:

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

input:

500
498 494 495 497 500 499 496 491 487 489 488 492 490 493 484 480 483 482 481 486 485 477 473 476 474 479 475 478 470 466 469 468 472 467 471 463 459 461 460 465 462 464 456 452 453 457 454 455 458 449 445 448 447 450 446 451 441 444 443 442 439 438 440 434 437 436 435 433 432 431 428 424 426 430 ...

output:

295
498 498
494 500
499 497
496 495
491 491
493 492
489 487
488 490
484 484
483 486
482 480
481 485
477 477
473 479
478 476
475 474
470 470
469 472
468 466
467 471
463 463
459 465
464 461
460 462
456 456
457 458
452 453
454 455
449 449
448 451
447 450
446 445
444 444
443 443
442 441
439 439
438 440
...

result:

ok da

Test #189:

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

input:

500
498 494 500 495 499 497 496 491 488 487 489 493 490 492 484 480 485 486 483 481 482 477 474 473 475 476 479 478 470 466 472 467 469 468 471 463 459 462 465 460 461 464 456 452 457 455 453 454 458 449 445 450 447 448 451 446 442 438 443 439 440 444 441 435 431 437 433 436 432 434 428 424 429 427 ...

output:

287
500 500
499 498
497 494
496 495
491 491
488 493
492 489
487 490
485 485
484 486
483 480
482 481
477 477
474 479
476 475
473 478
472 472
471 470
469 466
468 467
463 463
459 465
464 462
461 460
456 456
457 458
455 452
454 453
449 449
451 450
448 447
446 445
443 443
442 444
439 438
441 440
435 435
...

result:

ok da

Test #190:

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

input:

500
498 495 497 500 494 496 499 491 488 487 493 492 489 490 484 481 482 483 486 485 480 477 474 476 475 473 479 478 470 467 471 466 469 472 468 463 460 461 464 459 465 462 456 453 454 455 452 458 457 449 446 448 445 450 451 447 442 439 438 443 440 441 444 435 432 433 437 436 431 434 428 425 427 429 ...

output:

285
498 498
495 500
499 497
494 496
491 491
488 493
487 492
489 490
486 484
482 481
485 483
480 480
477 477
476 479
475 474
473 478
470 470
472 471
469 467
468 466
463 463
464 465
461 460
459 462
456 456
453 458
455 454
452 457
449 449
451 450
448 446
445 447
442 442
444 443
440 439
438 441
435 435
...

result:

ok da

Test #191:

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

input:

500
498 495 500 496 497 499 494 491 488 492 493 489 490 487 484 482 480 481 485 483 486 477 474 479 473 475 476 478 470 468 466 472 467 469 471 463 460 465 464 462 461 459 456 453 457 455 458 452 454 449 446 451 450 447 445 448 442 440 438 443 439 444 441 435 432 436 433 437 434 431 428 425 430 429 ...

output:

288
498 500
495 499
497 496
494 494
491 493
488 492
490 489
487 487
484 484
485 486
483 482
480 481
477 477
474 479
475 478
473 476
470 470
468 472
469 471
467 466
465 465
464 463
462 462
461 460
459 459
456 456
457 458
455 453
452 454
451 451
450 449
447 446
445 448
442 442
444 443
441 440
439 438
...

result:

ok da

Test #192:

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

input:

500
498 496 499 495 500 494 497 491 489 488 492 490 487 493 484 482 485 481 486 483 480 477 475 479 473 474 478 476 470 468 469 467 472 471 466 463 461 460 465 462 464 459 456 454 455 457 458 452 453 449 447 450 445 448 451 446 442 440 444 438 441 439 443 435 433 434 432 436 437 431 428 426 425 429 ...

output:

290
498 498
496 499
495 500
494 497
491 491
489 492
488 490
487 493
486 484
482 485
481 483
480 480
477 477
475 479
473 478
476 474
472 470
469 468
467 471
466 466
465 463
464 461
460 462
459 459
456 456
458 457
455 454
453 452
450 450
449 451
448 447
446 445
442 442
440 444
441 443
439 438
435 437
...

result:

ok da

Test #193:

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

input:

500
498 497 495 494 499 500 496 491 490 488 489 493 487 492 484 482 486 481 483 485 480 477 476 474 475 478 473 479 470 469 466 472 471 468 467 463 462 460 465 461 459 464 456 455 453 452 457 454 458 449 448 445 447 450 446 451 442 441 438 443 440 444 439 435 434 432 433 431 436 437 428 427 425 429 ...

output:

287
498 498
497 499
495 500
494 496
491 491
490 493
489 488
487 492
484 486
482 485
481 483
480 480
477 477
476 478
475 474
473 479
472 470
471 469
468 468
467 466
463 463
462 465
461 460
459 464
456 456
455 458
453 457
452 454
449 449
448 451
447 450
446 445
442 442
441 443
440 444
439 438
435 435
...

result:

ok da

Test #194:

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

input:

500
498 497 499 496 500 495 494 491 490 493 492 489 487 488 484 483 485 481 486 482 480 477 476 479 478 474 475 473 470 469 471 467 466 468 472 463 462 461 464 465 460 459 456 455 454 458 457 453 452 449 448 451 446 445 450 447 442 441 443 444 439 438 440 435 434 436 431 433 432 437 428 427 429 426 ...

output:

305
498 498
497 499
496 500
495 495
494 494
493 491
492 490
489 489
488 487
484 485
483 486
482 481
480 480
479 477
478 476
475 474
473 473
470 470
469 471
467 472
466 468
463 463
462 464
461 465
460 460
459 459
456 456
455 458
454 457
453 453
452 452
449 449
448 451
446 450
445 447
443 442
441 444
...

result:

ok da

Test #195:

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

input:

500
498 499 494 497 500 496 495 491 492 489 487 493 490 488 484 485 480 482 481 483 486 477 478 475 473 476 474 479 470 471 468 467 466 469 472 463 464 460 465 462 461 459 456 457 453 454 458 455 452 449 450 447 446 448 445 451 442 443 438 441 439 440 444 435 436 432 431 433 437 434 428 429 426 427 ...

output:

288
498 499
497 500
496 496
495 494
491 491
493 492
490 489
488 487
484 484
486 485
483 482
481 480
477 477
479 478
476 475
474 473
471 470
468 468
467 472
466 469
463 463
465 464
462 462
461 460
459 459
457 456
453 458
455 454
452 452
449 450
447 447
446 448
445 451
442 442
444 443
441 438
440 439
...

result:

ok da

Test #196:

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

input:

500
498 499 497 500 496 494 495 491 492 493 489 490 488 487 484 485 486 483 480 481 482 477 479 473 475 478 474 476 470 471 469 468 466 467 472 463 465 459 462 460 461 464 456 458 452 454 453 457 455 449 450 448 447 446 445 451 442 443 444 438 439 441 440 435 436 437 431 434 432 433 428 429 430 425 ...

output:

304
498 499
497 500
496 496
495 494
491 491
493 492
490 489
488 488
487 487
484 484
486 485
483 483
480 480
482 481
479 479
478 477
475 473
474 476
471 470
469 469
468 472
467 466
465 465
464 463
462 459
461 460
458 458
457 456
454 452
453 455
450 449
448 448
447 447
446 446
445 451
442 442
444 443
...

result:

ok da

Test #197:

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

input:

500
498 500 495 497 496 494 499 491 493 488 487 492 490 489 484 486 483 482 485 480 481 477 479 475 473 478 474 476 470 472 468 467 471 469 466 463 465 461 460 464 459 462 456 458 453 457 455 454 452 449 451 447 446 445 448 450 442 444 439 443 440 438 441 435 437 434 431 436 432 433 428 430 427 426 ...

output:

293
498 500
497 497
496 495
494 499
493 493
492 491
490 488
489 487
486 484
483 483
482 485
481 480
479 479
478 477
476 475
474 473
472 470
468 471
467 469
466 466
465 463
461 461
460 464
459 462
458 458
457 456
455 455
454 453
452 452
451 449
447 447
446 450
445 448
444 444
443 442
440 439
438 441
...

result:

ok da

Test #198:

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

input:

500
499 494 495 500 498 497 496 492 487 489 488 491 490 493 484 486 485 482 483 481 480 478 473 475 474 476 479 477 470 472 471 466 467 469 468 464 459 461 462 465 463 460 457 452 454 455 458 453 456 449 451 448 450 445 446 447 442 444 443 441 440 439 438 436 431 432 434 437 433 435 428 430 429 424 ...

output:

299
500 499
498 498
497 494
496 495
492 492
487 493
491 489
490 488
486 486
485 484
483 482
481 481
480 480
478 478
473 479
476 475
474 477
472 472
471 470
469 466
468 467
464 464
462 465
463 461
460 459
457 457
452 458
455 454
453 456
451 449
448 450
445 445
447 446
444 444
443 442
441 441
440 440
...

result:

ok da

Test #199:

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

input:

500
499 494 497 496 500 495 498 488 486 493 485 487 484 489 491 492 490 482 477 480 481 478 483 479 475 470 473 471 472 474 476 468 463 465 469 464 467 466 461 456 459 458 460 462 457 454 449 451 455 452 450 453 447 442 448 443 445 444 446 440 435 439 437 438 436 441 433 428 432 431 429 430 434 426 ...

output:

289
499 499
497 500
496 494
495 498
488 493
491 489
486 492
485 487
484 490
482 482
480 483
477 481
479 478
475 475
470 476
474 473
472 471
468 468
463 469
467 465
466 464
461 461
459 462
458 460
457 456
454 454
451 455
452 449
450 453
447 447
442 448
445 443
444 446
440 440
439 441
438 437
436 435
...

result:

ok da

Test #200:

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

input:

500
499 495 496 494 497 500 498 492 488 489 490 487 493 491 485 481 482 486 484 480 483 478 474 475 477 473 476 479 471 466 472 470 467 468 469 464 460 461 463 459 465 462 457 453 455 452 458 456 454 450 446 448 445 449 451 447 443 439 438 442 444 441 440 436 432 434 431 433 437 435 429 425 426 427 ...

output:

286
499 499
495 500
496 497
494 498
492 492
488 493
490 489
487 491
485 485
481 486
484 482
480 483
478 478
474 479
475 477
473 476
472 471
470 470
467 466
469 468
464 464
461 465
463 460
459 462
457 457
453 458
456 455
454 452
450 450
446 451
449 448
447 445
443 443
442 444
441 439
440 438
436 436
...

result:

ok da

Test #201:

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

input:

500
499 495 498 497 494 500 496 492 488 493 489 487 491 490 485 481 486 483 482 484 480 478 474 479 476 477 473 475 471 467 470 472 466 469 468 464 460 465 459 462 461 463 457 453 458 454 452 455 456 450 447 445 448 446 449 451 443 439 441 444 438 442 440 436 432 434 437 435 431 433 429 425 427 430 ...

output:

290
499 499
498 500
497 495
494 496
492 492
488 493
491 489
490 487
485 486
483 481
482 484
480 480
478 478
474 479
477 476
473 475
471 471
470 472
469 467
468 466
464 464
460 465
463 462
461 459
457 457
453 458
454 456
452 455
450 450
447 451
449 448
446 445
443 443
439 444
442 441
440 438
436 436
...

result:

ok da

Test #202:

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

input:

500
499 496 497 495 500 498 494 492 489 487 490 493 488 491 485 482 480 484 483 481 486 478 475 477 473 474 479 476 471 468 467 470 472 466 469 464 461 462 459 460 463 465 457 454 455 456 453 452 458 450 447 446 449 451 448 445 443 440 441 444 439 438 442 436 433 434 437 435 432 431 429 426 428 424 ...

output:

290
500 499
497 496
495 498
494 494
492 492
489 493
491 490
488 487
485 485
484 486
483 482
481 480
478 478
477 479
476 475
474 473
471 471
468 472
467 470
466 469
464 464
463 465
462 461
460 459
457 457
454 454
456 455
453 453
452 458
451 450
449 447
448 446
445 445
444 443
441 440
439 439
438 442
...

result:

ok da

Test #203:

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

input:

500
499 497 494 498 500 496 495 492 489 493 490 487 491 488 485 482 486 484 483 481 480 478 476 473 475 474 479 477 471 468 472 467 466 469 470 464 461 463 460 465 462 459 457 455 452 453 454 458 456 450 447 449 451 448 445 446 443 441 438 442 440 444 439 436 434 431 433 435 432 437 429 427 424 428 ...

output:

291
499 500
498 497
496 496
495 494
492 492
489 493
491 490
488 487
485 486
484 484
483 482
481 481
480 480
478 478
476 479
475 477
474 473
471 471
468 472
467 470
466 469
465 464
463 461
460 462
459 459
457 457
455 458
452 456
454 453
450 450
449 451
448 447
446 445
443 443
442 441
440 444
439 438
...

result:

ok da

Test #204:

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

input:

500
499 497 498 500 495 496 494 492 490 491 489 487 493 488 485 483 481 482 486 480 484 478 476 479 473 475 477 474 471 469 470 466 468 467 472 464 462 461 465 463 459 460 457 455 454 452 456 458 453 450 448 446 451 445 447 449 443 441 444 438 439 440 442 436 434 433 432 437 431 435 429 427 425 430 ...

output:

301
499 500
498 497
496 495
494 494
492 492
490 491
489 493
488 487
485 485
483 486
481 482
480 484
478 478
476 479
475 477
474 473
471 471
470 469
468 472
467 466
464 464
462 465
461 463
460 459
457 457
455 458
454 456
453 452
450 450
448 451
446 449
445 447
443 443
441 444
438 442
440 439
436 436
...

result:

ok da

Test #205:

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

input:

500
499 498 494 500 495 496 497 492 490 493 488 487 489 491 485 484 481 483 480 482 486 478 477 473 474 476 479 475 471 470 467 466 472 469 468 464 463 459 462 461 460 465 457 456 452 453 458 454 455 450 448 451 449 446 447 445 443 442 438 440 441 439 444 436 435 431 432 437 434 433 429 427 430 428 ...

output:

301
499 499
498 500
495 494
497 496
492 492
490 493
488 491
487 489
485 485
484 486
483 481
480 482
478 478
477 479
476 473
475 474
471 471
470 472
469 467
468 466
464 464
463 463
462 462
461 465
460 459
457 457
456 458
453 452
455 454
451 450
449 448
447 446
445 445
443 443
442 444
441 440
439 438
...

result:

ok da

Test #206:

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

input:

500
499 498 496 495 494 500 497 492 491 489 488 493 490 487 485 484 483 486 480 482 481 478 477 479 475 476 474 473 471 470 468 469 467 466 472 464 463 462 460 465 459 461 457 456 458 454 455 452 453 450 449 447 448 451 445 446 443 442 444 438 441 440 439 436 435 433 437 431 434 432 429 428 427 430 ...

output:

338
499 499
498 498
496 496
495 500
494 497
492 492
491 491
489 493
488 490
487 487
485 485
484 484
483 486
482 482
481 480
478 478
477 479
476 475
474 474
473 473
471 471
470 470
469 468
467 467
466 472
464 464
463 463
462 462
460 465
459 461
457 457
456 458
455 454
453 452
450 450
449 451
448 447
...

result:

ok da

Test #207:

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

input:

500
499 500 494 498 496 497 495 492 493 489 488 491 487 490 485 486 482 480 481 484 483 478 479 473 474 476 475 477 471 472 468 467 469 466 470 464 465 461 460 459 462 463 457 458 454 452 455 456 453 450 451 445 448 447 446 449 443 444 439 442 438 441 440 436 437 431 435 433 432 434 429 430 426 428 ...

output:

288
499 500
498 498
496 497
495 494
493 492
489 489
488 491
487 490
486 485
482 482
480 484
483 481
478 479
473 473
476 474
475 477
472 471
468 468
467 469
466 470
464 465
461 461
460 462
459 463
458 457
454 454
455 456
453 452
451 450
448 448
447 445
446 449
444 443
442 442
441 439
440 438
437 436
...

result:

ok da

Test #208:

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

input:

500
500 494 495 498 496 499 497 492 493 490 491 488 489 487 485 480 477 483 484 482 481 479 478 486 475 476 474 473 470 471 472 468 469 466 463 465 467 464 461 462 459 460 458 457 456 455 449 450 453 451 452 454 448 442 443 446 445 447 444 440 441 439 438 436 435 437 434 428 429 430 432 431 433 426 ...

output:

304
500 500
499 494
495 498
497 496
493 492
491 490
489 488
487 487
485 485
484 483
482 482
481 480
479 486
478 477
476 475
474 474
473 473
470 470
472 471
469 468
466 466
465 467
464 463
462 461
460 459
458 458
457 457
456 456
455 455
450 449
454 453
451 452
448 448
446 442
445 447
444 443
441 440
...

result:

ok da

Test #209:

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

input:

500
500 494 496 495 499 498 497 493 487 489 488 492 490 491 486 480 483 481 485 482 484 479 473 475 474 476 478 477 472 466 468 469 471 467 470 465 459 462 461 460 463 464 458 452 455 454 456 457 453 451 445 449 446 448 447 450 444 438 440 443 439 442 441 437 431 435 433 432 436 434 430 424 428 427 ...

output:

292
500 500
499 494
498 496
497 495
493 493
489 487
488 492
491 490
486 486
483 480
481 485
482 484
479 479
475 473
478 476
477 474
472 472
468 466
471 469
467 470
465 465
462 459
461 463
460 464
458 458
456 455
454 457
453 452
451 451
449 445
448 450
447 446
444 444
443 438
442 440
441 439
437 437
...

result:

ok da

Test #210:

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

input:

500
500 495 496 497 494 499 498 493 487 492 491 490 488 489 486 481 482 480 485 484 483 479 474 473 478 475 477 476 472 466 471 469 468 467 470 465 459 464 462 461 463 460 458 453 452 456 454 457 455 450 442 446 448 447 445 451 449 443 444 441 435 440 438 439 436 437 434 429 428 433 432 431 430 427 ...

output:

303
500 500
499 495
496 497
494 498
493 493
492 492
491 491
490 487
489 488
486 486
485 481
484 482
483 480
479 479
478 474
477 473
476 475
472 472
471 471
469 469
468 466
467 470
465 465
464 464
462 462
461 463
460 459
458 458
456 453
452 457
455 454
451 450
448 442
447 446
445 449
444 443
441 441
...

result:

ok da

Test #211:

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

input:

500
500 495 499 496 494 497 498 493 488 492 489 490 491 487 486 481 484 480 482 485 483 479 474 475 478 473 477 476 472 467 470 468 471 466 469 465 460 462 463 459 461 464 458 453 454 456 457 452 455 451 446 449 448 450 445 447 444 439 443 440 438 442 441 437 432 434 433 435 436 431 430 425 428 427 ...

output:

305
500 500
499 495
498 496
494 497
493 493
492 492
489 488
491 490
487 487
486 486
484 481
482 485
483 480
479 479
478 474
477 475
476 473
472 472
470 467
468 471
466 469
465 465
464 460
463 462
459 461
458 458
454 453
457 456
452 455
451 451
449 446
448 450
445 447
444 444
443 439
442 440
441 438
...

result:

ok da

Test #212:

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

input:

500
500 496 495 494 499 498 497 493 489 487 492 491 488 490 486 482 483 480 484 485 481 479 475 473 474 476 477 478 472 468 466 471 469 467 470 465 461 460 463 459 464 462 458 454 452 456 453 457 455 451 447 445 448 449 446 450 444 440 438 441 439 442 443 437 433 431 435 436 432 434 430 426 424 425 ...

output:

305
500 500
499 496
498 495
497 494
493 493
492 489
491 487
488 490
486 486
483 482
485 484
481 480
479 479
476 475
478 477
474 473
472 472
471 468
469 466
467 470
465 465
464 461
460 463
459 462
458 458
456 454
452 457
455 453
451 451
450 449
448 447
446 445
444 444
443 440
442 441
439 438
437 437
...

result:

ok da

Test #213:

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

input:

500
500 496 497 499 494 498 495 493 489 491 487 490 488 492 486 482 484 485 480 483 481 479 475 478 476 473 477 474 472 468 470 471 469 466 467 465 461 462 463 464 460 459 458 454 456 455 457 453 452 451 447 450 446 448 445 449 444 440 443 441 442 439 438 437 433 435 434 431 432 436 430 426 429 427 ...

output:

312
500 500
499 496
498 497
495 494
493 493
491 489
490 492
488 487
486 486
485 484
483 482
481 480
479 479
475 478
477 476
474 473
472 472
471 470
469 468
467 466
465 465
463 462
461 464
460 460
459 459
458 458
456 454
455 457
453 453
452 452
451 451
450 447
446 448
445 449
444 444
443 440
442 441
...

result:

ok da

Test #214:

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

input:

500
500 497 495 494 499 498 496 493 490 489 488 491 487 492 486 483 481 482 484 480 485 473 479 476 470 475 474 471 478 472 477 469 466 464 465 467 468 463 462 459 458 461 460 457 456 455 452 451 449 450 453 454 448 445 444 443 442 447 446 441 438 439 435 440 436 437 434 431 428 432 433 429 430 427 ...

output:

306
500 500
499 497
498 495
496 494
493 493
490 490
489 489
488 491
487 492
486 486
484 483
481 482
480 485
479 473
478 476
470 475
474 477
472 471
469 469
466 466
467 468
465 464
463 463
462 462
461 459
460 458
457 457
456 456
455 455
452 453
451 454
449 450
448 448
445 445
444 444
443 447
442 446
...

result:

ok da

Test #215:

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

input:

500
500 497 498 495 499 494 496 493 490 492 488 491 487 489 486 483 484 485 481 480 482 479 476 478 475 473 477 474 472 470 466 469 471 467 468 465 462 463 460 461 464 459 458 456 452 454 453 455 457 451 448 449 447 450 445 446 444 442 438 443 440 439 441 437 434 436 432 433 435 431 430 427 428 425 ...

output:

314
500 500
498 497
495 499
494 496
493 493
490 492
488 491
487 489
486 486
483 483
485 484
481 481
480 482
479 479
478 476
475 477
474 473
472 472
471 470
469 466
468 467
465 465
463 463
462 464
461 460
459 459
458 458
457 456
454 452
453 455
451 451
449 448
447 450
446 445
444 444
443 442
440 438
...

result:

ok da

Test #216:

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

input:

500
500 498 495 497 496 499 494 493 491 490 492 489 487 488 486 484 482 480 485 483 481 479 477 474 478 473 475 476 472 470 468 467 466 469 471 465 463 462 461 464 460 459 458 456 457 452 453 455 454 451 449 447 448 446 445 450 444 438 435 442 437 441 436 440 443 439 434 432 430 428 431 429 433 427 ...

output:

334
500 500
498 498
497 499
496 495
494 494
493 493
491 491
490 492
489 489
488 487
486 486
485 484
483 482
481 480
479 479
478 477
475 474
473 476
472 472
470 470
468 468
467 471
466 469
465 465
463 463
462 462
461 464
460 460
459 459
458 458
457 456
455 452
454 453
451 451
449 449
448 447
446 446
...

result:

ok da

Test #217:

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

input:

500
500 499 494 495 496 498 497 493 492 488 489 491 490 487 486 484 485 482 481 483 480 479 477 478 474 476 475 473 472 471 466 469 468 467 470 465 464 460 462 459 461 463 458 456 457 453 454 455 452 451 449 450 448 445 446 447 444 442 443 440 438 439 441 437 435 436 433 432 431 434 430 429 424 427 ...

output:

350
500 500
499 499
495 495
498 494
497 496
493 493
492 492
491 488
490 489
487 487
486 486
485 484
482 482
481 483
480 480
479 479
478 477
476 476
475 474
473 473
472 472
471 471
469 469
468 466
467 470
465 465
464 464
460 460
463 462
459 461
458 458
457 456
453 453
455 454
452 452
451 451
450 449
...

result:

ok da

Test #218:

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

input:

500
500 499 496 495 494 498 497 493 492 490 491 488 487 489 486 485 483 484 481 482 480 479 478 476 477 475 473 474 472 471 468 470 467 469 466 465 464 463 462 460 461 459 458 457 454 455 456 453 452 451 450 449 448 446 445 447 444 443 441 440 439 442 438 437 436 434 435 431 432 433 430 429 426 427 ...

output:

374
500 500
499 499
496 496
495 498
494 497
493 493
492 492
491 490
488 488
487 489
486 486
485 485
484 483
481 482
480 480
479 479
478 478
477 476
475 475
474 473
472 472
471 471
470 468
467 469
466 466
465 465
464 464
463 463
462 462
461 460
459 459
458 458
457 457
454 454
456 455
453 453
452 452
...

result:

ok da

Test #219:

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

input:

7500
7493 7494 7500 7498 7495 7496 7499 7497 7485 7486 7490 7488 7487 7491 7492 7489 7477 7478 7481 7484 7480 7482 7483 7479 7469 7470 7475 7472 7474 7476 7473 7471 7461 7462 7464 7467 7466 7465 7468 7463 7453 7454 7455 7459 7458 7457 7456 7460 7445 7446 7450 7452 7448 7449 7447 7451 7437 7438 7443 ...

output:

3781
7500 7494
7498 7493
7495 7499
7497 7496
7486 7485
7491 7490
7488 7492
7487 7489
7484 7481
7482 7478
7480 7483
7479 7477
7475 7469
7474 7476
7473 7472
7471 7470
7467 7461
7466 7464
7465 7468
7463 7462
7459 7453
7458 7454
7457 7455
7456 7460
7450 7452
7446 7445
7449 7448
7447 7451
7443 7437
7442 ...

result:

ok da

Test #220:

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

input:

7500
7493 7495 7494 7498 7496 7497 7500 7499 7485 7487 7486 7489 7492 7488 7491 7490 7477 7479 7484 7482 7483 7480 7478 7481 7469 7471 7474 7472 7473 7470 7476 7475 7461 7463 7464 7465 7466 7468 7467 7462 7453 7455 7458 7456 7454 7460 7459 7457 7445 7447 7449 7452 7451 7446 7450 7448 7437 7439 7443 ...

output:

3781
7493 7495
7498 7500
7499 7494
7497 7496
7487 7485
7492 7489
7491 7486
7490 7488
7484 7477
7483 7482
7480 7479
7478 7481
7476 7469
7471 7474
7473 7472
7470 7475
7464 7463
7468 7465
7467 7466
7462 7461
7460 7453
7458 7455
7456 7459
7454 7457
7452 7445
7451 7447
7450 7449
7448 7446
7444 7443
7439 ...

result:

ok da

Test #221:

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

input:

7500
7493 7496 7499 7497 7498 7500 7494 7495 7485 7488 7487 7492 7490 7489 7491 7486 7477 7480 7482 7483 7479 7478 7481 7484 7469 7472 7474 7473 7471 7475 7476 7470 7461 7464 7468 7465 7467 7466 7462 7463 7453 7456 7459 7455 7457 7460 7454 7458 7445 7448 7452 7449 7450 7451 7447 7446 7437 7440 7444 ...

output:

3793
7493 7496
7499 7500
7497 7498
7494 7495
7492 7488
7490 7487
7489 7491
7486 7485
7483 7484
7482 7480
7479 7477
7478 7481
7474 7472
7473 7475
7471 7476
7470 7469
7468 7461
7467 7464
7466 7465
7462 7463
7456 7453
7460 7459
7455 7457
7454 7458
7452 7452
7451 7448
7449 7450
7447 7447
7446 7445
7444 ...

result:

ok da

Test #222:

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

input:

7500
7493 7497 7496 7495 7494 7500 7499 7498 7485 7489 7491 7487 7486 7490 7492 7488 7477 7481 7484 7480 7479 7483 7478 7482 7469 7473 7471 7476 7470 7475 7474 7472 7461 7465 7466 7462 7467 7468 7463 7464 7453 7457 7456 7458 7460 7459 7454 7455 7445 7449 7447 7451 7446 7450 7448 7452 7437 7441 7439 ...

output:

3799
7493 7497
7496 7500
7495 7499
7494 7498
7491 7489
7485 7492
7487 7490
7486 7488
7484 7481
7480 7477
7479 7483
7478 7482
7476 7469
7475 7473
7474 7471
7472 7470
7465 7461
7467 7466
7462 7468
7463 7464
7457 7453
7460 7458
7459 7456
7455 7454
7449 7445
7452 7451
7450 7447
7448 7446
7442 7441
7439 ...

result:

ok da

Test #223:

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

input:

7500
7493 7498 7495 7500 7496 7497 7499 7494 7485 7490 7488 7486 7489 7491 7492 7487 7477 7482 7484 7478 7483 7480 7479 7481 7469 7474 7471 7476 7473 7472 7470 7475 7461 7466 7467 7463 7465 7468 7464 7462 7453 7458 7455 7457 7460 7459 7456 7454 7445 7450 7452 7446 7451 7448 7449 7447 7437 7442 7439 ...

output:

3822
7500 7498
7499 7495
7497 7496
7494 7493
7491 7492
7485 7490
7489 7488
7487 7486
7484 7477
7483 7482
7480 7478
7479 7481
7476 7474
7473 7469
7472 7471
7470 7475
7467 7466
7465 7468
7464 7463
7462 7461
7460 7458
7459 7457
7456 7455
7454 7453
7452 7445
7451 7450
7449 7448
7447 7446
7442 7437
7439 ...

result:

ok da

Test #224:

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

input:

7500
7493 7499 7498 7496 7494 7497 7495 7500 7485 7491 7489 7490 7486 7487 7488 7492 7477 7483 7482 7480 7478 7479 7481 7484 7469 7475 7472 7474 7476 7473 7471 7470 7461 7467 7466 7464 7468 7463 7462 7465 7453 7459 7460 7457 7454 7458 7455 7456 7445 7451 7450 7452 7449 7448 7447 7446 7437 7443 7439 ...

output:

3876
7493 7499
7498 7500
7497 7496
7495 7494
7491 7485
7490 7489
7486 7492
7488 7487
7483 7477
7482 7484
7480 7481
7478 7479
7475 7475
7474 7476
7473 7472
7471 7471
7470 7469
7467 7467
7466 7466
7464 7468
7463 7461
7462 7465
7460 7459
7457 7453
7454 7458
7456 7455
7451 7451
7450 7452
7449 7449
7448 ...

result:

ok da

Test #225:

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

input:

7500
7493 7500 7495 7494 7498 7499 7496 7497 7485 7492 7488 7490 7486 7491 7489 7487 7477 7484 7479 7478 7480 7482 7483 7481 7469 7476 7473 7475 7470 7472 7474 7471 7461 7468 7467 7462 7465 7466 7463 7464 7453 7460 7455 7459 7456 7458 7457 7454 7445 7452 7447 7449 7446 7451 7448 7450 7437 7444 7442 ...

output:

4092
7493 7500
7498 7495
7494 7499
7496 7497
7492 7485
7490 7491
7489 7488
7487 7486
7484 7477
7480 7479
7483 7482
7481 7478
7476 7469
7473 7475
7472 7474
7471 7470
7468 7468
7467 7467
7462 7461
7466 7465
7464 7463
7460 7460
7459 7459
7458 7455
7457 7456
7454 7453
7452 7445
7449 7447
7446 7451
7448 ...

result:

ok da

Test #226:

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

input:

7500
7494 7493 7499 7497 7498 7495 7496 7500 7486 7485 7489 7491 7490 7488 7492 7487 7478 7477 7481 7479 7483 7480 7484 7482 7470 7469 7475 7476 7472 7474 7471 7473 7462 7461 7467 7468 7464 7463 7465 7466 7454 7453 7459 7458 7457 7456 7460 7455 7446 7445 7447 7452 7451 7448 7449 7450 7438 7437 7443 ...

output:

3781
7499 7494
7493 7500
7497 7498
7496 7495
7491 7486
7490 7489
7488 7492
7487 7485
7481 7478
7484 7483
7479 7477
7482 7480
7475 7470
7469 7476
7472 7474
7471 7473
7467 7462
7461 7468
7465 7464
7463 7466
7459 7459
7458 7458
7457 7454
7456 7460
7455 7453
7452 7447
7451 7446
7448 7445
7449 7450
7443 ...

result:

ok da

Test #227:

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

input:

7500
7494 7495 7497 7498 7500 7493 7499 7496 7486 7487 7489 7490 7488 7491 7492 7485 7478 7479 7481 7480 7482 7483 7477 7484 7470 7471 7476 7473 7474 7475 7472 7469 7462 7463 7465 7467 7464 7468 7466 7461 7454 7455 7460 7457 7453 7459 7458 7456 7446 7447 7445 7452 7449 7450 7451 7448 7438 7439 7440 ...

output:

3881
7494 7495
7497 7500
7499 7498
7496 7493
7492 7492
7490 7491
7487 7489
7488 7486
7485 7485
7479 7478
7482 7481
7480 7483
7477 7484
7476 7476
7473 7471
7475 7474
7472 7470
7469 7469
7462 7462
7465 7463
7468 7467
7466 7464
7461 7461
7460 7454
7459 7455
7458 7457
7456 7453
7452 7446
7451 7447
7449 ...

result:

ok da

Test #228:

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

input:

7500
7494 7496 7497 7500 7495 7499 7493 7498 7486 7488 7491 7485 7492 7487 7490 7489 7478 7480 7484 7482 7479 7477 7483 7481 7470 7472 7476 7473 7471 7469 7475 7474 7462 7464 7461 7468 7463 7465 7466 7467 7454 7456 7460 7457 7459 7453 7455 7458 7446 7448 7447 7450 7449 7452 7451 7445 7438 7440 7443 ...

output:

3881
7494 7496
7497 7500
7495 7499
7493 7498
7488 7486
7492 7491
7490 7485
7489 7487
7484 7478
7482 7480
7479 7483
7477 7481
7476 7470
7473 7472
7471 7475
7469 7474
7464 7462
7461 7468
7466 7465
7463 7467
7460 7454
7459 7456
7458 7457
7453 7455
7446 7446
7450 7448
7447 7452
7451 7449
7445 7445
7443 ...

result:

ok da

Test #229:

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

input:

7500
7494 7497 7499 7496 7500 7493 7498 7495 7486 7489 7490 7487 7491 7485 7492 7488 7478 7481 7484 7480 7479 7477 7483 7482 7470 7473 7475 7476 7474 7472 7471 7469 7462 7465 7466 7461 7468 7464 7467 7463 7454 7457 7460 7459 7456 7458 7455 7453 7446 7449 7445 7448 7450 7447 7452 7451 7438 7441 7439 ...

output:

3884
7494 7497
7499 7500
7498 7496
7495 7493
7489 7486
7491 7490
7487 7492
7485 7488
7481 7484
7480 7478
7479 7483
7477 7482
7476 7475
7474 7473
7472 7472
7471 7470
7469 7469
7465 7462
7468 7466
7464 7467
7463 7461
7460 7460
7459 7457
7456 7458
7455 7454
7453 7453
7449 7446
7452 7450
7445 7448
7447 ...

result:

ok da

Test #230:

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

input:

7500
7494 7498 7496 7499 7495 7493 7500 7497 7486 7490 7492 7485 7488 7489 7487 7491 7478 7482 7483 7477 7481 7484 7480 7479 7470 7474 7475 7473 7472 7471 7476 7469 7462 7466 7464 7468 7467 7465 7463 7461 7454 7458 7459 7456 7455 7453 7460 7457 7446 7450 7447 7445 7452 7449 7451 7448 7438 7442 7441 ...

output:

3898
7494 7498
7496 7499
7495 7500
7493 7497
7492 7486
7491 7490
7489 7488
7487 7485
7483 7482
7481 7484
7480 7478
7479 7477
7474 7475
7473 7473
7472 7476
7471 7470
7469 7469
7468 7468
7467 7466
7465 7464
7463 7462
7461 7461
7458 7459
7456 7460
7455 7454
7453 7457
7450 7446
7447 7452
7449 7451
7448 ...

result:

ok da

Test #231:

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

input:

7500
7494 7499 7493 7500 7498 7496 7495 7497 7486 7491 7490 7488 7487 7492 7489 7485 7478 7483 7481 7482 7477 7480 7484 7479 7470 7475 7469 7476 7473 7471 7474 7472 7462 7467 7463 7466 7461 7464 7468 7465 7454 7459 7455 7453 7460 7456 7458 7457 7446 7451 7449 7447 7452 7448 7445 7450 7438 7443 7437 ...

output:

3936
7500 7499
7498 7494
7496 7493
7495 7497
7491 7491
7490 7486
7488 7492
7487 7489
7485 7485
7484 7483
7482 7481
7480 7478
7479 7477
7475 7470
7469 7476
7473 7474
7472 7471
7467 7468
7466 7462
7464 7463
7461 7465
7459 7454
7455 7460
7458 7456
7457 7453
7451 7446
7449 7452
7448 7447
7445 7450
7443 ...

result:

ok da

Test #232:

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

input:

7500
7494 7500 7496 7493 7497 7498 7499 7495 7486 7492 7488 7485 7491 7490 7487 7489 7478 7484 7481 7483 7482 7480 7477 7479 7470 7476 7469 7475 7473 7472 7471 7474 7462 7468 7465 7463 7461 7467 7464 7466 7454 7460 7459 7456 7453 7457 7455 7458 7446 7452 7445 7451 7449 7450 7448 7447 7438 7444 7439 ...

output:

4092
7494 7500
7497 7496
7499 7498
7495 7493
7492 7486
7491 7488
7490 7485
7487 7489
7484 7484
7483 7483
7482 7481
7480 7478
7477 7479
7476 7476
7475 7475
7473 7470
7472 7469
7471 7474
7468 7462
7467 7465
7466 7463
7461 7464
7460 7460
7459 7459
7456 7454
7458 7457
7455 7453
7452 7452
7451 7451
7450 ...

result:

ok da

Test #233:

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

input:

7500
7495 7493 7497 7494 7499 7498 7496 7500 7487 7485 7488 7492 7490 7491 7489 7486 7479 7477 7483 7481 7484 7480 7482 7478 7471 7469 7470 7474 7472 7475 7473 7476 7463 7461 7462 7468 7465 7467 7466 7464 7455 7453 7457 7454 7460 7456 7458 7459 7447 7445 7450 7451 7452 7446 7448 7449 7439 7437 7438 ...

output:

3781
7497 7495
7499 7500
7498 7493
7496 7494
7492 7487
7491 7490
7489 7488
7486 7485
7483 7479
7481 7484
7480 7482
7478 7477
7476 7475
7471 7474
7473 7472
7470 7469
7468 7463
7467 7461
7466 7465
7464 7462
7460 7455
7453 7457
7459 7458
7456 7454
7450 7447
7452 7451
7449 7445
7446 7448
7441 7439
7437 ...

result:

ok da

Test #234:

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

input:

7500
7495 7494 7498 7499 7493 7497 7496 7500 7487 7486 7488 7491 7492 7489 7485 7490 7479 7478 7477 7483 7484 7482 7480 7481 7471 7470 7473 7476 7472 7475 7469 7474 7463 7462 7467 7468 7466 7465 7464 7461 7455 7454 7453 7458 7457 7459 7456 7460 7447 7446 7445 7451 7452 7450 7449 7448 7439 7438 7440 ...

output:

3881
7499 7498
7495 7500
7494 7497
7493 7496
7488 7487
7492 7491
7489 7486
7485 7490
7483 7479
7478 7484
7477 7482
7481 7480
7473 7471
7470 7476
7472 7475
7469 7474
7468 7467
7466 7466
7465 7463
7464 7462
7461 7461
7460 7458
7455 7459
7454 7457
7453 7456
7452 7451
7450 7447
7449 7446
7448 7445
7443 ...

result:

ok da

Test #235:

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

input:

7500
7495 7496 7499 7497 7498 7500 7493 7494 7487 7488 7489 7491 7492 7490 7486 7485 7479 7480 7482 7483 7478 7477 7484 7481 7471 7472 7475 7474 7470 7473 7469 7476 7463 7464 7461 7468 7465 7462 7467 7466 7455 7456 7454 7453 7460 7458 7459 7457 7447 7448 7449 7445 7452 7450 7446 7451 7439 7440 7444 ...

output:

3901
7495 7496
7499 7500
7497 7498
7494 7493
7488 7487
7492 7491
7490 7489
7486 7486
7485 7485
7480 7479
7483 7482
7478 7484
7477 7481
7472 7475
7474 7471
7470 7473
7469 7476
7464 7463
7461 7468
7465 7467
7462 7466
7456 7455
7454 7460
7459 7458
7457 7453
7452 7449
7447 7448
7451 7450
7446 7445
7444 ...

result:

ok da

Test #236:

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

input:

7500
7495 7497 7494 7498 7496 7493 7500 7499 7487 7489 7490 7488 7491 7492 7486 7485 7479 7481 7477 7484 7480 7478 7482 7483 7471 7473 7475 7476 7472 7474 7469 7470 7463 7465 7462 7464 7467 7461 7468 7466 7455 7457 7460 7459 7456 7458 7453 7454 7447 7449 7450 7452 7448 7445 7451 7446 7439 7441 7444 ...

output:

3901
7495 7497
7498 7500
7496 7494
7493 7499
7490 7489
7492 7491
7488 7487
7486 7486
7485 7485
7484 7481
7482 7479
7480 7483
7478 7477
7476 7471
7473 7475
7472 7474
7470 7469
7465 7463
7468 7467
7462 7464
7461 7466
7460 7457
7459 7455
7456 7458
7454 7453
7449 7447
7452 7450
7448 7451
7446 7445
7444 ...

result:

ok da

Test #237:

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

input:

7500
7495 7498 7493 7497 7499 7494 7500 7496 7487 7490 7486 7485 7491 7488 7489 7492 7479 7482 7483 7477 7484 7481 7478 7480 7471 7474 7476 7475 7472 7470 7473 7469 7463 7466 7461 7464 7468 7462 7465 7467 7455 7458 7459 7460 7456 7454 7453 7457 7447 7450 7448 7449 7452 7445 7451 7446 7439 7442 7441 ...

output:

3912
7495 7498
7499 7500
7493 7497
7496 7494
7492 7487
7490 7491
7488 7486
7485 7489
7482 7479
7484 7483
7481 7477
7478 7480
7476 7476
7475 7474
7472 7471
7470 7473
7469 7469
7466 7463
7464 7468
7467 7461
7462 7465
7458 7458
7460 7459
7456 7455
7454 7454
7453 7457
7450 7452
7451 7447
7449 7448
7446 ...

result:

ok da

Test #238:

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

input:

7500
7495 7499 7497 7493 7496 7498 7494 7500 7487 7491 7492 7485 7488 7490 7489 7486 7479 7483 7477 7484 7478 7482 7480 7481 7471 7475 7472 7476 7473 7469 7474 7470 7463 7467 7465 7461 7466 7464 7468 7462 7455 7459 7456 7457 7458 7454 7453 7460 7447 7451 7445 7452 7449 7446 7450 7448 7439 7443 7437 ...

output:

3945
7495 7499
7497 7500
7496 7498
7494 7493
7492 7491
7490 7487
7489 7488
7486 7485
7483 7484
7482 7479
7478 7477
7481 7480
7475 7471
7472 7476
7473 7474
7470 7469
7467 7463
7465 7466
7464 7468
7462 7461
7459 7459
7458 7455
7456 7457
7454 7454
7453 7460
7451 7447
7445 7452
7450 7449
7448 7446
7443 ...

result:

ok da

Test #239:

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

input:

7500
7495 7500 7498 7496 7499 7494 7493 7497 7487 7492 7490 7491 7489 7488 7486 7485 7479 7484 7483 7478 7481 7477 7480 7482 7471 7476 7474 7469 7470 7475 7473 7472 7463 7468 7466 7467 7462 7465 7464 7461 7455 7460 7454 7458 7453 7457 7456 7459 7447 7452 7445 7448 7449 7446 7450 7451 7439 7444 7438 ...

output:

4092
7500 7500
7498 7495
7496 7499
7494 7494
7493 7497
7492 7492
7490 7491
7489 7489
7488 7487
7486 7486
7485 7485
7484 7484
7483 7483
7482 7479
7478 7481
7477 7480
7476 7471
7475 7474
7473 7470
7472 7469
7468 7468
7467 7466
7465 7463
7464 7462
7461 7461
7460 7455
7459 7458
7457 7454
7456 7453
7452 ...

result:

ok da

Test #240:

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

input:

7500
7496 7493 7498 7500 7497 7494 7495 7499 7488 7485 7486 7490 7489 7492 7487 7491 7480 7477 7484 7483 7481 7478 7479 7482 7472 7469 7473 7476 7474 7475 7470 7471 7464 7461 7466 7462 7463 7465 7468 7467 7456 7453 7460 7457 7458 7455 7459 7454 7448 7445 7446 7449 7447 7451 7450 7452 7440 7437 7443 ...

output:

3793
7498 7496
7493 7500
7497 7499
7494 7495
7490 7488
7485 7492
7489 7486
7487 7491
7484 7480
7483 7477
7482 7481
7479 7478
7473 7472
7469 7476
7475 7474
7471 7470
7466 7464
7461 7468
7463 7465
7467 7462
7460 7456
7458 7457
7455 7459
7454 7453
7452 7448
7451 7449
7445 7446
7450 7447
7443 7440
7442 ...

result:

ok da

Test #241:

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

input:

7500
7496 7494 7498 7495 7497 7499 7500 7493 7488 7486 7490 7492 7485 7489 7491 7487 7480 7478 7482 7479 7481 7484 7477 7483 7472 7470 7474 7469 7476 7471 7475 7473 7464 7462 7468 7466 7465 7461 7463 7467 7456 7454 7460 7459 7458 7455 7453 7457 7448 7446 7447 7449 7450 7452 7451 7445 7440 7438 7437 ...

output:

3881
7498 7498
7500 7499
7497 7496
7495 7494
7493 7493
7492 7490
7491 7488
7486 7489
7485 7487
7482 7480
7478 7484
7479 7481
7477 7483
7474 7472
7470 7476
7471 7475
7473 7469
7468 7464
7466 7462
7465 7467
7461 7463
7460 7460
7459 7459
7458 7456
7455 7454
7453 7457
7448 7448
7450 7449
7446 7452
7451 ...

result:

ok da

Test #242:

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

input:

7500
7496 7495 7498 7497 7493 7500 7499 7494 7488 7487 7491 7492 7485 7489 7486 7490 7480 7479 7484 7478 7481 7477 7483 7482 7472 7471 7469 7475 7473 7474 7470 7476 7464 7463 7462 7465 7467 7468 7466 7461 7456 7455 7454 7459 7457 7460 7453 7458 7448 7447 7446 7450 7451 7445 7452 7449 7440 7439 7442 ...

output:

3901
7498 7496
7495 7500
7499 7497
7494 7493
7491 7488
7487 7492
7490 7489
7486 7485
7484 7480
7483 7479
7478 7481
7477 7482
7476 7472
7471 7475
7474 7473
7470 7469
7464 7464
7465 7468
7463 7467
7462 7466
7461 7461
7459 7456
7455 7460
7454 7457
7453 7458
7448 7451
7447 7452
7446 7450
7445 7449
7442 ...

result:

ok da

Test #243:

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

input:

7500
7496 7497 7493 7499 7498 7495 7500 7494 7488 7489 7491 7492 7490 7485 7487 7486 7480 7481 7482 7483 7484 7477 7479 7478 7472 7473 7470 7469 7474 7475 7476 7471 7464 7465 7462 7466 7468 7463 7461 7467 7456 7457 7459 7460 7453 7455 7454 7458 7448 7449 7451 7452 7445 7447 7450 7446 7440 7441 7442 ...

output:

3948
7499 7497
7498 7496
7495 7500
7494 7493
7488 7488
7492 7491
7490 7489
7487 7487
7486 7485
7480 7480
7482 7481
7484 7483
7479 7479
7478 7477
7475 7476
7472 7473
7470 7474
7469 7471
7465 7464
7468 7466
7463 7462
7461 7467
7460 7459
7456 7457
7455 7458
7454 7453
7449 7448
7452 7451
7447 7450
7446 ...

result:

ok da

Test #244:

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

input:

7500
7496 7498 7494 7495 7499 7500 7493 7497 7488 7490 7491 7485 7489 7486 7492 7487 7480 7482 7481 7483 7477 7484 7478 7479 7472 7474 7476 7473 7471 7469 7470 7475 7464 7466 7465 7467 7461 7462 7463 7468 7456 7458 7453 7460 7455 7457 7454 7459 7448 7450 7446 7447 7449 7452 7451 7445 7440 7442 7441 ...

output:

3948
7496 7498
7499 7500
7495 7494
7493 7497
7492 7488
7491 7490
7485 7489
7487 7486
7482 7480
7481 7483
7477 7484
7479 7478
7476 7474
7473 7472
7471 7475
7470 7469
7466 7467
7465 7464
7461 7468
7463 7462
7458 7460
7459 7456
7455 7457
7454 7453
7448 7448
7452 7450
7447 7449
7451 7446
7445 7445
7442 ...

result:

ok da

Test #245:

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

input:

7500
7496 7499 7498 7500 7493 7497 7495 7494 7488 7491 7486 7485 7490 7492 7489 7487 7480 7483 7484 7479 7477 7481 7482 7478 7472 7475 7470 7471 7473 7474 7469 7476 7464 7467 7465 7461 7466 7468 7463 7462 7456 7459 7455 7453 7460 7454 7458 7457 7448 7451 7446 7452 7449 7445 7450 7447 7440 7443 7437 ...

output:

3970
7499 7499
7498 7500
7497 7496
7495 7495
7494 7493
7491 7488
7490 7492
7489 7486
7487 7485
7483 7484
7481 7480
7479 7482
7478 7477
7472 7475
7473 7474
7471 7470
7469 7476
7464 7464
7468 7467
7466 7465
7463 7463
7462 7461
7459 7460
7458 7456
7457 7455
7454 7453
7451 7448
7446 7452
7450 7449
7447 ...

result:

ok da

Test #246:

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

input:

7500
7496 7500 7494 7495 7498 7493 7499 7497 7488 7492 7491 7486 7489 7487 7485 7490 7480 7484 7483 7477 7482 7478 7479 7481 7472 7476 7473 7475 7474 7470 7469 7471 7464 7468 7465 7467 7463 7461 7466 7462 7456 7460 7459 7454 7458 7453 7457 7455 7448 7452 7447 7449 7445 7450 7451 7446 7440 7444 7441 ...

output:

4092
7496 7500
7498 7499
7494 7495
7493 7497
7492 7492
7491 7491
7489 7488
7487 7486
7485 7490
7484 7484
7483 7483
7482 7480
7481 7477
7479 7478
7476 7476
7475 7472
7474 7473
7470 7470
7469 7471
7468 7464
7465 7467
7463 7466
7462 7461
7460 7460
7459 7459
7458 7456
7457 7454
7455 7453
7452 7448
7450 ...

result:

ok da

Test #247:

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

input:

7500
7497 7493 7498 7499 7495 7500 7496 7494 7489 7485 7487 7492 7491 7490 7486 7488 7481 7477 7484 7479 7478 7483 7480 7482 7473 7469 7475 7471 7474 7470 7472 7476 7465 7461 7467 7462 7468 7466 7463 7464 7457 7453 7454 7455 7459 7458 7456 7460 7449 7445 7448 7452 7450 7451 7447 7446 7441 7437 7443 ...

output:

3799
7499 7498
7497 7500
7496 7495
7494 7493
7492 7489
7491 7485
7490 7487
7486 7488
7484 7481
7483 7477
7482 7479
7478 7480
7475 7476
7474 7473
7471 7469
7470 7472
7467 7465
7461 7468
7466 7462
7464 7463
7460 7459
7458 7457
7453 7455
7456 7454
7449 7449
7448 7452
7451 7450
7447 7447
7446 7445
7443 ...

result:

ok da

Test #248:

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

input:

7500
7497 7494 7500 7498 7496 7499 7495 7493 7489 7486 7491 7487 7492 7485 7490 7488 7481 7478 7482 7483 7480 7479 7484 7477 7473 7470 7472 7474 7469 7476 7475 7471 7465 7462 7461 7464 7463 7466 7467 7468 7457 7454 7456 7460 7453 7455 7459 7458 7449 7446 7450 7451 7447 7445 7448 7452 7441 7438 7444 ...

output:

3884
7500 7500
7498 7497
7496 7499
7495 7494
7493 7493
7491 7489
7486 7492
7490 7487
7488 7485
7481 7481
7482 7483
7480 7484
7479 7478
7477 7477
7476 7473
7472 7474
7475 7470
7471 7469
7466 7465
7468 7467
7464 7462
7463 7461
7460 7457
7454 7456
7455 7459
7458 7453
7450 7449
7452 7451
7447 7446
7445 ...

result:

ok da

Test #249:

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

input:

7500
7497 7495 7499 7498 7494 7493 7500 7496 7489 7487 7492 7488 7485 7490 7491 7486 7481 7479 7477 7480 7484 7483 7478 7482 7473 7471 7469 7472 7474 7475 7470 7476 7465 7463 7462 7464 7461 7468 7467 7466 7457 7455 7456 7454 7453 7460 7458 7459 7449 7447 7451 7445 7450 7446 7452 7448 7441 7439 7438 ...

output:

3901
7499 7497
7498 7495
7494 7500
7493 7496
7492 7489
7490 7487
7488 7491
7486 7485
7484 7481
7480 7479
7477 7483
7478 7482
7476 7473
7474 7475
7471 7472
7470 7469
7468 7465
7464 7463
7462 7467
7461 7466
7457 7460
7456 7455
7454 7458
7453 7459
7451 7452
7450 7449
7448 7447
7446 7445
7443 7441
7439 ...

result:

ok da

Test #250:

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

input:

7500
7497 7496 7494 7500 7495 7498 7493 7499 7489 7488 7487 7490 7491 7486 7492 7485 7481 7480 7483 7482 7479 7477 7478 7484 7473 7472 7474 7471 7475 7469 7470 7476 7465 7464 7461 7466 7462 7463 7467 7468 7457 7456 7455 7454 7460 7458 7459 7453 7449 7448 7447 7445 7446 7451 7450 7452 7441 7440 7443 ...

output:

3978
7497 7500
7496 7498
7495 7494
7493 7499
7489 7489
7488 7490
7487 7491
7486 7492
7485 7485
7483 7481
7482 7480
7479 7484
7478 7477
7474 7473
7472 7475
7471 7476
7469 7470
7466 7465
7464 7467
7461 7468
7463 7462
7457 7457
7456 7460
7455 7458
7454 7459
7453 7453
7451 7449
7448 7452
7447 7450
7446 ...

result:

ok da

Test #251:

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

input:

7500
7497 7498 7495 7500 7499 7493 7494 7496 7489 7490 7485 7492 7487 7488 7486 7491 7481 7482 7478 7477 7484 7479 7483 7480 7473 7474 7472 7476 7470 7471 7475 7469 7465 7466 7468 7467 7463 7462 7461 7464 7457 7458 7459 7460 7456 7453 7455 7454 7449 7450 7446 7448 7445 7451 7452 7447 7441 7442 7443 ...

output:

3992
7500 7498
7499 7497
7496 7495
7494 7493
7490 7489
7485 7492
7488 7487
7486 7491
7481 7484
7483 7482
7479 7478
7477 7480
7476 7476
7473 7474
7472 7475
7471 7470
7469 7469
7468 7465
7467 7466
7463 7463
7462 7462
7461 7464
7458 7457
7460 7459
7456 7456
7455 7455
7454 7453
7452 7451
7449 7450
7446 ...

result:

ok da

Test #252:

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

input:

7500
7497 7499 7498 7500 7494 7495 7496 7493 7489 7491 7487 7488 7492 7485 7486 7490 7481 7483 7480 7478 7479 7477 7482 7484 7473 7475 7469 7470 7476 7472 7471 7474 7465 7467 7468 7462 7461 7463 7464 7466 7457 7459 7460 7455 7453 7456 7454 7458 7449 7451 7448 7446 7447 7445 7452 7450 7441 7443 7440 ...

output:

3992
7497 7499
7498 7500
7494 7494
7496 7495
7493 7493
7491 7492
7490 7489
7488 7487
7486 7485
7483 7481
7480 7484
7478 7479
7477 7482
7475 7473
7469 7476
7472 7470
7471 7474
7467 7468
7466 7465
7462 7463
7461 7464
7460 7459
7458 7457
7456 7455
7454 7453
7451 7449
7448 7452
7446 7447
7445 7450
7443 ...

result:

ok da

Test #253:

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

input:

7500
7497 7500 7498 7496 7495 7494 7499 7493 7489 7492 7485 7487 7490 7486 7491 7488 7481 7484 7478 7477 7483 7479 7482 7480 7473 7476 7470 7474 7475 7471 7472 7469 7465 7468 7463 7461 7462 7467 7466 7464 7457 7460 7458 7455 7454 7456 7453 7459 7449 7452 7451 7448 7450 7446 7445 7447 6138 7159 5817 ...

output:

4092
7500 7500
7498 7497
7496 7496
7495 7495
7494 7499
7493 7493
7492 7489
7491 7490
7487 7485
7486 7488
7484 7481
7478 7483
7479 7482
7480 7477
7476 7476
7474 7473
7470 7475
7472 7471
7469 7469
7468 7465
7463 7467
7461 7466
7464 7462
7460 7460
7458 7457
7455 7455
7454 7456
7453 7459
7452 7452
7451 ...

result:

ok da

Test #254:

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

input:

7500
7498 7493 7500 7499 7496 7497 7494 7495 7490 7485 7491 7487 7486 7489 7492 7488 7482 7477 7484 7481 7480 7483 7478 7479 7474 7469 7473 7475 7470 7476 7471 7472 7466 7461 7465 7468 7463 7462 7464 7467 7458 7453 7460 7456 7459 7454 7455 7457 7450 7445 7446 7452 7447 7449 7451 7448 7442 7437 7440 ...

output:

3822
7498 7500
7493 7499
7497 7496
7495 7494
7491 7490
7485 7492
7487 7489
7486 7488
7484 7482
7481 7477
7480 7483
7479 7478
7475 7474
7473 7476
7470 7469
7471 7472
7468 7466
7465 7461
7463 7467
7462 7464
7460 7458
7459 7453
7457 7456
7455 7454
7452 7450
7445 7446
7449 7451
7448 7447
7444 7442
7440 ...

result:

ok da

Test #255:

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

input:

7500
7498 7494 7497 7495 7496 7493 7499 7500 7490 7486 7487 7492 7488 7485 7491 7489 7482 7478 7479 7477 7481 7484 7483 7480 7474 7470 7471 7469 7476 7472 7473 7475 7466 7462 7468 7463 7461 7465 7467 7464 7458 7454 7456 7453 7460 7457 7459 7455 7450 7446 7452 7449 7445 7447 7451 7448 7442 7438 7441 ...

output:

3898
7500 7498
7497 7494
7495 7496
7493 7499
7492 7490
7487 7486
7488 7491
7485 7489
7484 7482
7479 7481
7483 7478
7480 7477
7476 7474
7471 7470
7472 7475
7469 7473
7468 7466
7467 7462
7465 7463
7464 7461
7460 7458
7456 7454
7457 7459
7455 7453
7452 7450
7449 7446
7447 7451
7448 7445
7444 7442
7441 ...

result:

ok da

Test #256:

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

input:

7500
7498 7495 7499 7496 7493 7494 7497 7500 7490 7487 7489 7488 7486 7485 7491 7492 7482 7479 7477 7483 7480 7478 7481 7484 7474 7471 7473 7475 7472 7470 7476 7469 7466 7463 7464 7467 7462 7461 7468 7465 7458 7455 7453 7460 7459 7454 7457 7456 7450 7447 7452 7449 7448 7446 7451 7445 7442 7439 7444 ...

output:

3916
7499 7498
7495 7500
7496 7497
7494 7493
7490 7490
7489 7489
7488 7487
7486 7492
7485 7491
7483 7482
7479 7484
7481 7480
7478 7477
7474 7474
7473 7475
7472 7471
7470 7476
7469 7469
7467 7466
7463 7464
7462 7468
7461 7465
7460 7458
7459 7455
7457 7453
7456 7454
7450 7452
7449 7449
7448 7447
7446 ...

result:

ok da

Test #257:

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

input:

7500
7498 7496 7500 7495 7493 7494 7497 7499 7490 7488 7491 7492 7489 7487 7485 7486 7482 7480 7477 7478 7484 7479 7483 7481 7474 7472 7471 7473 7470 7476 7475 7469 7466 7464 7463 7461 7468 7465 7462 7467 7458 7456 7460 7457 7455 7453 7454 7459 7450 7448 7446 7452 7447 7451 7449 7445 7442 7440 7444 ...

output:

3978
7498 7500
7496 7499
7495 7497
7494 7493
7490 7490
7492 7491
7489 7488
7487 7487
7485 7486
7484 7482
7483 7480
7478 7477
7481 7479
7474 7474
7472 7476
7471 7473
7470 7475
7469 7469
7468 7466
7467 7464
7463 7465
7462 7461
7460 7458
7457 7456
7455 7459
7454 7453
7450 7450
7448 7452
7446 7451
7449 ...

result:

ok da

Test #258:

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

input:

7500
7498 7497 7495 7494 7499 7500 7493 7496 7490 7489 7487 7486 7488 7491 7485 7492 7482 7481 7479 7480 7483 7484 7478 7477 7474 7473 7472 7475 7476 7469 7470 7471 7466 7465 7462 7468 7467 7463 7464 7461 7458 7457 7454 7455 7453 7456 7460 7459 7450 7449 7451 7447 7446 7445 7448 7452 7442 7441 7443 ...

output:

4140
7498 7498
7497 7497
7495 7500
7494 7499
7493 7496
7490 7490
7489 7489
7487 7491
7486 7488
7485 7492
7483 7482
7481 7484
7480 7479
7478 7478
7477 7477
7474 7474
7473 7475
7472 7476
7469 7469
7471 7470
7466 7466
7465 7468
7462 7467
7464 7463
7461 7461
7458 7460
7457 7459
7455 7454
7453 7456
7450 ...

result:

ok da

Test #259:

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

input:

7500
7498 7499 7500 7496 7493 7495 7494 7497 7490 7491 7485 7492 7489 7488 7486 7487 7482 7483 7480 7479 7484 7478 7477 7481 7474 7475 7472 7470 7476 7473 7471 7469 7466 7467 7464 7462 7465 7461 7468 7463 7458 7459 7456 7453 7454 7460 7457 7455 7450 7451 7445 7446 7447 7449 7452 7448 7442 7443 7439 ...

output:

4092
7499 7499
7500 7498
7496 7496
7495 7497
7494 7493
7491 7491
7492 7490
7489 7489
7488 7485
7487 7486
7483 7482
7480 7480
7479 7484
7478 7478
7477 7481
7474 7474
7476 7475
7473 7472
7471 7470
7469 7469
7466 7467
7464 7468
7462 7465
7461 7463
7459 7458
7456 7460
7453 7457
7455 7454
7450 7451
7445 ...

result:

ok da

Test #260:

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

input:

7500
7498 7500 7493 7496 7495 7499 7494 7497 7490 7492 7491 7489 7485 7488 7487 7486 7482 7484 7483 7480 7477 7481 7479 7478 7474 7476 7475 7472 7471 7473 7469 7470 7466 7468 7462 7467 7464 7465 7463 7461 7458 7460 7459 7457 7455 7453 7454 7456 7450 7452 7447 7445 7451 7448 7446 7449 7442 7444 7439 ...

output:

4092
7498 7500
7496 7499
7495 7493
7494 7497
7492 7492
7491 7490
7489 7489
7488 7488
7487 7487
7486 7485
7484 7484
7483 7482
7481 7480
7479 7479
7478 7477
7476 7476
7475 7474
7472 7472
7471 7473
7470 7469
7468 7468
7467 7466
7465 7464
7463 7462
7461 7461
7460 7460
7459 7458
7457 7457
7455 7456
7454 ...

result:

ok da

Test #261:

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

input:

7500
7499 7493 7500 7494 7497 7495 7496 7498 7491 7485 7489 7488 7492 7487 7486 7490 7483 7477 7479 7481 7484 7482 7480 7478 7475 7469 7471 7470 7474 7473 7476 7472 7467 7461 7466 7464 7462 7465 7468 7463 7459 7453 7455 7456 7457 7460 7458 7454 7451 7445 7449 7447 7452 7450 7446 7448 7443 7437 7442 ...

output:

3876
7500 7499
7498 7493
7494 7497
7496 7495
7491 7491
7489 7489
7488 7492
7487 7485
7486 7490
7483 7484
7482 7481
7480 7479
7478 7477
7476 7475
7474 7471
7473 7469
7472 7470
7467 7468
7461 7466
7465 7464
7463 7462
7460 7459
7456 7457
7458 7455
7454 7453
7452 7451
7445 7449
7447 7450
7446 7448
7444 ...

result:

ok da

Test #262:

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

input:

7500
7499 7494 7500 7497 7496 7498 7493 7495 7491 7486 7492 7488 7487 7490 7489 7485 7483 7478 7481 7480 7479 7477 7482 7484 7475 7470 7476 7471 7474 7469 7472 7473 7467 7462 7463 7464 7466 7461 7465 7468 7459 7454 7456 7455 7453 7460 7458 7457 7451 7446 7452 7450 7449 7445 7448 7447 7443 7438 7444 ...

output:

3948
7500 7499
7497 7494
7496 7498
7493 7495
7491 7491
7486 7492
7490 7488
7489 7487
7485 7485
7483 7483
7481 7481
7480 7484
7479 7478
7477 7482
7476 7475
7474 7470
7472 7471
7469 7473
7467 7468
7463 7462
7466 7464
7461 7465
7460 7459
7456 7454
7455 7458
7453 7457
7451 7452
7450 7450
7449 7449
7448 ...

result:

ok da

Test #263:

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

input:

7500
7499 7495 7497 7500 7496 7498 7494 7493 7491 7487 7486 7492 7485 7489 7490 7488 7483 7479 7477 7482 7480 7478 7484 7481 7475 7471 7469 7473 7476 7474 7470 7472 7467 7463 7466 7468 7465 7464 7462 7461 7459 7455 7458 7453 7457 7456 7460 7454 7451 7447 7449 7452 7450 7445 7448 7446 7443 7439 7441 ...

output:

3966
7500 7499
7497 7495
7496 7498
7494 7494
7493 7493
7492 7491
7489 7487
7486 7490
7485 7488
7484 7483
7479 7482
7481 7480
7478 7477
7476 7475
7473 7471
7469 7474
7470 7472
7467 7467
7466 7468
7465 7465
7464 7463
7462 7462
7461 7461
7459 7459
7458 7458
7457 7460
7456 7455
7454 7453
7452 7451
7450 ...

result:

ok da

Test #264:

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

input:

7500
7499 7496 7500 7497 7498 7495 7494 7493 7491 7488 7485 7487 7489 7492 7490 7486 7483 7480 7484 7477 7479 7482 7478 7481 7475 7472 7476 7474 7470 7469 7473 7471 7467 7464 7462 7465 7461 7466 7463 7468 7459 7456 7458 7455 7457 7460 7454 7453 7451 7448 7449 7445 7450 7447 7446 7452 7443 7440 7444 ...

output:

4026
7499 7499
7496 7500
7497 7498
7495 7495
7494 7494
7493 7493
7491 7492
7489 7488
7487 7490
7486 7485
7484 7483
7482 7480
7477 7479
7478 7481
7476 7475
7474 7472
7470 7473
7469 7471
7468 7467
7466 7464
7462 7465
7461 7463
7460 7459
7458 7456
7455 7457
7454 7454
7453 7453
7451 7451
7448 7448
7449 ...

result:

ok da

Test #265:

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

input:

7500
7499 7497 7496 7495 7493 7500 7494 7498 7491 7489 7492 7488 7485 7486 7490 7487 7483 7481 7479 7482 7484 7477 7480 7478 7475 7473 7470 7469 7472 7474 7476 7471 7467 7465 7464 7463 7461 7462 7466 7468 7459 7457 7454 7456 7458 7455 7460 7453 7451 7449 7446 7450 7452 7445 7448 7447 7443 7441 7437 ...

output:

4140
7499 7499
7497 7497
7496 7500
7495 7498
7494 7493
7491 7491
7489 7492
7488 7488
7485 7490
7487 7486
7484 7483
7482 7481
7480 7479
7478 7477
7475 7476
7473 7474
7472 7470
7471 7469
7467 7467
7465 7465
7464 7468
7463 7466
7461 7462
7459 7459
7457 7460
7456 7458
7455 7454
7453 7453
7452 7451
7450 ...

result:

ok da

Test #266:

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

input:

7500
7499 7498 7496 7500 7497 7495 7493 7494 7491 7490 7486 7487 7492 7485 7488 7489 7483 7482 7479 7480 7477 7478 7481 7484 7475 7474 7470 7473 7472 7469 7471 7476 7467 7466 7462 7464 7465 7468 7463 7461 7459 7458 7454 7453 7455 7460 7457 7456 7451 7450 7449 7448 7445 7447 7452 7446 7443 7442 7437 ...

output:

4596
7499 7499
7498 7500
7497 7496
7495 7495
7494 7493
7491 7491
7490 7490
7486 7492
7488 7487
7485 7489
7483 7483
7482 7482
7480 7484
7479 7481
7477 7478
7475 7475
7474 7474
7473 7476
7472 7470
7469 7471
7467 7467
7466 7468
7465 7464
7463 7462
7461 7461
7459 7459
7458 7458
7454 7460
7457 7455
7456 ...

result:

ok da

Test #267:

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

input:

7500
7499 7500 7494 7495 7497 7496 7493 7498 7491 7492 7485 7486 7489 7490 7488 7487 7483 7484 7478 7482 7479 7480 7481 7477 7475 7476 7471 7469 7470 7473 7474 7472 7467 7468 7466 7463 7461 7462 7465 7464 7459 7460 7457 7454 7456 7453 7455 7458 7451 7452 7445 7449 7450 7447 7446 7448 7443 7444 7441 ...

output:

4092
7499 7500
7497 7495
7496 7494
7493 7498
7491 7492
7489 7490
7488 7486
7487 7485
7484 7483
7482 7482
7479 7478
7481 7480
7477 7477
7476 7475
7473 7471
7469 7474
7472 7470
7468 7467
7466 7466
7463 7463
7461 7465
7464 7462
7460 7459
7458 7457
7454 7456
7453 7455
7452 7451
7450 7449
7447 7445
7446 ...

result:

ok da

Test #268:

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

input:

7500
7500 7493 7495 7497 7498 7496 7494 7499 7492 7485 7491 7486 7487 7489 7488 7490 7484 7477 7478 7480 7479 7481 7482 7483 7476 7469 7470 7475 7473 7474 7472 7471 7468 7461 7466 7462 7465 7467 7463 7464 7460 7453 7459 7456 7458 7457 7455 7454 7452 7445 7447 7450 7451 7448 7449 7446 7444 7437 7438 ...

output:

4501
7500 7500
7493 7493
7497 7498
7496 7495
7494 7499
7492 7492
7491 7491
7486 7485
7489 7487
7488 7490
7484 7484
7477 7477
7480 7478
7482 7481
7479 7483
7476 7476
7475 7475
7474 7473
7472 7469
7471 7470
7468 7468
7461 7461
7467 7466
7465 7462
7464 7463
7460 7460
7459 7459
7458 7458
7457 7456
7455 ...

result:

ok da

Test #269:

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

input:

7500
7500 7494 7498 7493 7496 7497 7495 7499 7492 7486 7485 7490 7488 7491 7489 7487 7484 7478 7477 7479 7482 7483 7481 7480 7476 7470 7471 7469 7473 7472 7474 7475 7468 7462 7466 7465 7467 7461 7463 7464 7460 7454 7455 7456 7459 7458 7457 7453 7452 7446 7451 7449 7448 7445 7450 7447 7444 7438 7442 ...

output:

4501
7500 7500
7494 7494
7498 7499
7497 7496
7495 7493
7492 7492
7486 7486
7490 7491
7489 7488
7487 7485
7484 7484
7478 7478
7483 7482
7481 7479
7480 7477
7476 7476
7471 7471
7474 7475
7470 7473
7469 7472
7468 7468
7466 7466
7465 7467
7464 7462
7461 7463
7460 7460
7459 7454
7458 7455
7457 7456
7453 ...

result:

ok da

Test #270:

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

input:

7500
7500 7495 7498 7497 7493 7499 7496 7494 7492 7487 7490 7489 7486 7491 7488 7485 7484 7479 7483 7478 7482 7477 7481 7480 7476 7471 7474 7475 7470 7473 7472 7469 7468 7463 7462 7464 7461 7467 7465 7466 7460 7455 7454 7453 7459 7457 7456 7458 7452 7447 7450 7448 7449 7445 7451 7446 7444 7439 7440 ...

output:

4513
7500 7500
7498 7498
7497 7499
7496 7495
7494 7493
7492 7492
7490 7487
7489 7491
7488 7486
7485 7485
7484 7484
7483 7483
7482 7479
7481 7478
7480 7477
7476 7476
7475 7474
7473 7471
7472 7470
7469 7469
7468 7468
7463 7463
7467 7464
7465 7462
7461 7466
7460 7460
7455 7455
7454 7459
7458 7457
7456 ...

result:

ok da

Test #271:

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

input:

7500
7500 7496 7499 7497 7495 7493 7498 7494 7492 7488 7491 7490 7486 7487 7485 7489 7484 7480 7479 7477 7483 7481 7478 7482 7476 7472 7470 7473 7469 7471 7475 7474 7468 7464 7465 7466 7463 7467 7462 7461 7460 7456 7455 7453 7457 7458 7459 7454 7452 7448 7445 7451 7450 7446 7447 7449 7444 7440 7443 ...

output:

4519
7500 7500
7499 7499
7497 7496
7495 7498
7494 7493
7492 7492
7491 7491
7490 7488
7487 7486
7485 7489
7484 7484
7480 7480
7479 7483
7482 7481
7478 7477
7476 7476
7472 7472
7475 7473
7471 7470
7469 7474
7468 7468
7464 7464
7466 7465
7463 7467
7462 7462
7461 7461
7460 7460
7456 7456
7458 7457
7455 ...

result:

ok da

Test #272:

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

input:

7500
7500 7497 7498 7496 7493 7495 7499 7494 7492 7489 7485 7488 7487 7486 7491 7490 7484 7481 7483 7477 7480 7478 7482 7479 7476 7473 7475 7474 7471 7472 7470 7469 7468 7465 7463 7467 7461 7464 7462 7466 7460 7457 7455 7458 7453 7459 7454 7456 7452 7449 7448 7447 7445 7450 7451 7446 7444 7441 7440 ...

output:

4542
7500 7500
7498 7497
7496 7496
7495 7499
7494 7493
7492 7492
7489 7489
7488 7491
7487 7485
7486 7490
7484 7484
7483 7483
7482 7481
7480 7477
7479 7478
7476 7476
7475 7475
7474 7473
7472 7471
7470 7470
7469 7469
7468 7468
7465 7465
7463 7467
7464 7466
7462 7461
7460 7460
7459 7459
7457 7458
7456 ...

result:

ok da

Test #273:

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

input:

7500
7500 7498 7495 7497 7493 7499 7494 7496 7492 7490 7487 7486 7485 7489 7488 7491 7484 7482 7483 7481 7477 7480 7479 7478 7476 7474 7470 7471 7473 7472 7469 7475 7468 7466 7467 7461 7465 7464 7463 7462 7460 7458 7456 7457 7459 7454 7453 7455 7452 7450 7447 7445 7449 7451 7446 7448 7444 7442 7443 ...

output:

4596
7500 7500
7498 7498
7497 7499
7496 7495
7494 7493
7492 7492
7490 7490
7487 7491
7486 7489
7485 7488
7484 7484
7483 7482
7481 7481
7480 7480
7479 7479
7478 7477
7476 7476
7474 7474
7473 7471
7472 7470
7469 7475
7468 7468
7467 7466
7465 7465
7464 7464
7463 7463
7462 7461
7460 7460
7459 7458
7457 ...

result:

ok da

Test #274:

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

input:

7500
7500 7499 7497 7498 7493 7496 7494 7495 7492 7491 7486 7489 7490 7488 7487 7485 7484 7483 7478 7479 7480 7477 7481 7482 7476 7475 7469 7471 7470 7474 7473 7472 7468 7467 7465 7464 7466 7463 7461 7462 7460 7459 7456 7457 7453 7458 7454 7455 7452 7451 7449 7445 7448 7447 7450 7446 7444 7443 7437 ...

output:

4812
7500 7500
7499 7499
7497 7498
7493 7496
7494 7495
7492 7492
7491 7491
7490 7489
7488 7488
7487 7486
7485 7485
7484 7484
7483 7483
7482 7479
7478 7480
7477 7481
7476 7476
7475 7475
7474 7469
7473 7471
7472 7470
7468 7468
7467 7467
7465 7465
7464 7466
7463 7463
7462 7461
7460 7460
7459 7459
7456 ...

result:

ok da

Test #275:

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

input:

8
4 3 7 8 2 1 5 6

output:

4
7 4
3 8
2 5
1 6

result:

ok da

Test #276:

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

input:

9
1 6 5 8 9 4 3 2 7

output:

5
8 6
5 9
4 4
3 1
2 7

result:

ok da

Test #277:

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

input:

8
3 5 1 6 7 8 4 2

output:

4
6 5
8 7
4 3
2 1

result:

ok da

Test #278:

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

input:

1
1

output:

1
1 1

result:

ok da