QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#848387#8629. 寻宝WilliamFranklin0 1807ms211840kbC++142.1kb2025-01-08 20:09:332025-01-08 20:09:33

Judging History

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

  • [2025-01-08 20:09:33]
  • 评测
  • 测评结果:0
  • 用时:1807ms
  • 内存:211840kb
  • [2025-01-08 20:09:33]
  • 提交

answer

#include <bits/stdc++.h>
#include "treasure.h"
using namespace std;
#define x first
#define y second
#define mp(Tx, Ty) make_pair(Tx, Ty)
#define For(Ti, Ta, Tb) for(auto Ti = (Ta); Ti <= (Tb); Ti++)
#define Dec(Ti, Ta, Tb) for(auto Ti = (Ta); Ti >= (Tb); Ti--)
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define range(Tx) begin(Tx),end(Tx)
const int N = 5e6;
int d[N];
int h[N], e[N * 2], ne[N * 2], w[N * 2], idx;
void add(int a, int b, int c) {
	e[idx] = b, ne[idx] = h[a], w[idx] = c, h[a] = idx++;
}

void Alice(const int testid, const int n, const int m, const int x, const int u[], const int v[], bool dir[]) {
	memset(h, -1, sizeof(h));
	memset(d, 0, sizeof(d));
	For(i, 0, m - 1) {
		add(u[i], v[i], i), add(v[i], u[i], i);
	}
	queue<int> q;
	q.push(x);
	d[x] = 1;
	while (q.size()) {
		int t = q.front();
		q.pop();
		for (int i = h[t]; ~i; i = ne[i]) {
			int j = e[i];
			if (d[j]) continue;
			int id = w[i];
			if (u[id] == t) {
				d[v[id]] = d[t] + 1;
				q.push(v[id]);
			} else {
				d[u[id]] = d[t] + 1;
				q.push(u[id]);
			}
		}
	}
	int k = 1000;
	For(i, 0, m - 1) {
		if (d[u[i]] <= k && d[v[i]] <= k) {
			if (d[u[i]] < d[v[i]]) dir[i] = 0;
			else dir[i] = 1; 
		}
	}
	For(i, 0, m - 1) {
		if (d[u[i]] <= k && d[v[i]] > k) {
			dir[i] = 1;
		}
		if (d[u[i]] > k && d[v[i]] <= k) {
			dir[i] = 0;
		}
	}
	For(i, 0, m - 1) {
		if (d[u[i]] > k && d[v[i]] > k) {
			if (d[u[i]] % 2 == 0) dir[i] = 1;
			else dir[i] = 0;
		}
	}
}

int Bob(const int testid, const int n) {
	mt19937 rnd(time(0));
	int s = -1;
	vector<pair<int, bool> > e;
	For(i, 1, 4000) {
		int x = rnd() % n;
		e = discover(x);
		int cnt = 0;
		for (auto i : e) cnt = cnt + i.y;
		if (cnt != e.size()) {
			s = x;
			break;
		}
	}
	if (s == -1) {
		int x = rnd() % n;
		e = discover(x);
		while (e[0].y != 0) {
			x = rnd() % n;
			e = discover(x);
		}
		return e[0].x;
	}
	int cnt = 0;
	for (auto i : e) cnt = cnt + 1 - i.y;
	while (cnt) {
		for (auto i : e) {
			if (i.y == 0) {
				s = i.x;
				break;
			}
		}
		e = discover(s);
		cnt = 0;
		for (auto i : e) cnt = cnt + 1 - i.y;
	}
	return s;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 11ms
memory: 73828kb

Manager to Encoder

1 4999 9998 4883
1478 4883
1478 1709
797 1478
1478 384
2755 4883
2755 1046
1478 3225
3498 797
354 3498
1046 4678
433 4678
1709 2496
2535 2755
354 3890
2755 1979
3735 3225
4883 3480
3875 384
886 1979
4537 3225
384 3937
1046 2039
4778 1478
797 89
337 3890
202 2039
4883 2445
2535 3287
1478 1280
1979 93...

Encoder to Manager

1
1 4999 9998
1863 4269 0
2981 4576 0
3933 1377 1
2887 2499 1
3873 3696 1
3271 2534 1
127 946 1
1267 3121 1
1946 1427 1
208 492 1
2551 4695 1
3012 3747 1
1917 3810 0
27 2348 0
356 532 1
4777 3926 0
148 1419 1
3816 195 1
1544 3652 0
482 2290 0
3708 2590 0
2234 1805 0
783 2199 1
4301 2887 1
2082 101 1...

Manager to Decoder

1
1 4999 9998
1863 4269 0
2981 4576 0
3933 1377 1
2887 2499 1
3873 3696 1
3271 2534 1
127 946 1
1267 3121 1
1946 1427 1
208 492 1
2551 4695 1
3012 3747 1
1917 3810 0
27 2348 0
356 532 1
4777 3926 0
148 1419 1
3816 195 1
1544 3652 0
482 2290 0
3708 2590 0
2234 1805 0
783 2199 1
4301 2887 1
2082 101 1...

Decoder to Manager

4618 3

result:

wrong answer you reported 4618 but expected 4883

Subtask #2:

score: 0
Wrong Answer

Test #5:

score: 0
Wrong Answer
time: 111ms
memory: 89436kb

Manager to Encoder

2 99982 199964 6211
6211 58208
68464 6211
68464 26556
60485 6211
60485 58702
8092 26556
7330 58702
25249 58702
25249 5476
22495 58702
14358 8092
8092 50419
25249 39935
89623 6211
66788 22495
5476 82299
10093 58702
39935 96999
96999 51482
80541 6211
26556 97797
8092 64004
42587 50419
10093 28282
9415...

Encoder to Manager

1
2 99982 199964
76506 94936 0
39535 80618 1
70451 31268 1
69887 72086 1
79586 96755 0
53589 39098 0
91168 73507 0
49486 64908 1
79460 33062 0
52730 47141 0
51201 46979 1
474 46185 1
87716 4924 0
56680 21098 1
37654 54084 1
69117 52648 0
64332 80845 1
94753 29233 1
28440 84644 1
1206 42718 0
49112 1...

Manager to Decoder

1
2 99982 199964
76506 94936 0
39535 80618 1
70451 31268 1
69887 72086 1
79586 96755 0
53589 39098 0
91168 73507 0
49486 64908 1
79460 33062 0
52730 47141 0
51201 46979 1
474 46185 1
87716 4924 0
56680 21098 1
37654 54084 1
69117 52648 0
64332 80845 1
94753 29233 1
28440 84644 1
1206 42718 0
49112 1...

Decoder to Manager

65546 2

result:

wrong answer you reported 65546 but expected 6211

Subtask #3:

score: 0
Wrong Answer

Test #9:

score: 0
Wrong Answer
time: 98ms
memory: 90064kb

Manager to Encoder

3 99940 199880 58427
58427 94075
76269 58427
93325 94075
79768 93325
79768 2256
94075 70259
93325 80136
58427 14366
76269 97508
58427 54567
14723 70259
72733 14366
7474 2256
97508 8756
76269 71501
21736 94075
70259 35686
5094 71501
2256 61685
79768 49333
89914 2256
48170 72733
5094 1122
80136 61166
...

Encoder to Manager

1
3 99940 199880
99742 2020 1
29462 68557 1
44401 30243 1
5526 54801 0
44255 34387 0
65134 44236 0
98835 56543 1
10035 25973 1
27021 98454 1
1899 69768 0
20151 94875 0
60681 8759 1
25929 91442 0
28200 93902 1
1909 32696 1
54637 38490 0
61350 76564 1
76747 12930 1
52656 54153 1
17236 7199 1
74180 345...

Manager to Decoder

1
3 99940 199880
99742 2020 1
29462 68557 1
44401 30243 1
5526 54801 0
44255 34387 0
65134 44236 0
98835 56543 1
10035 25973 1
27021 98454 1
1899 69768 0
20151 94875 0
60681 8759 1
25929 91442 0
28200 93902 1
1909 32696 1
54637 38490 0
61350 76564 1
76747 12930 1
52656 54153 1
17236 7199 1
74180 345...

Decoder to Manager

78893 4

result:

wrong answer you reported 78893 but expected 58427

Subtask #4:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 659ms
memory: 198224kb

Manager to Encoder

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

Encoder to Manager

1
4 999990 999989
65281 864974 1
577362 23331 0
473922 151414 1
11759 561344 0
597526 564488 0
68665 345745 1
373305 176501 0
243839 450071 0
485659 167312 0
658335 235328 0
51688 343795 1
74086 15885 1
746528 176993 0
308342 843374 0
988888 522065 1
277908 775974 1
890577 236462 0
879334 247422 0
3...

Manager to Decoder

1
4 999990 999989
65281 864974 1
577362 23331 0
473922 151414 1
11759 561344 0
597526 564488 0
68665 345745 1
373305 176501 0
243839 450071 0
485659 167312 0
658335 235328 0
51688 343795 1
74086 15885 1
746528 176993 0
308342 843374 0
988888 522065 1
277908 775974 1
890577 236462 0
879334 247422 0
3...

Decoder to Manager

2749 2

result:

wrong answer you reported 2749 but expected 457874

Subtask #5:

score: 0
Wrong Answer

Test #15:

score: 0
Wrong Answer
time: 645ms
memory: 199968kb

Manager to Encoder

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

Encoder to Manager

1
5 999901 999900
363385 890770 1
426371 763156 1
144062 242841 1
70696 173451 0
243972 476109 1
83627 654240 1
361249 806212 0
398107 718149 1
302405 84786 1
873887 513833 1
127887 461849 0
771352 57725 0
383273 985273 0
510480 346824 0
436470 826956 0
128576 579131 1
37424 199905 1
714751 158252 0...

Manager to Decoder

1
5 999901 999900
363385 890770 1
426371 763156 1
144062 242841 1
70696 173451 0
243972 476109 1
83627 654240 1
361249 806212 0
398107 718149 1
302405 84786 1
873887 513833 1
127887 461849 0
771352 57725 0
383273 985273 0
510480 346824 0
436470 826956 0
128576 579131 1
37424 199905 1
714751 158252 0...

Decoder to Manager

180629 2

result:

wrong answer you reported 180629 but expected 740792

Subtask #6:

score: 0
Wrong Answer

Test #17:

score: 0
Wrong Answer
time: 703ms
memory: 118808kb

Manager to Encoder

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

Encoder to Manager

1
6 999917 999916
376618 28948 1
31245 312337 0
557782 254241 0
70005 414124 1
936153 810579 0
892718 976672 1
920779 265961 0
889632 122904 0
580233 282023 1
607940 327961 1
425460 752305 1
246884 279830 1
487568 52687 0
591578 30012 1
813753 802038 0
564247 402396 1
977459 272246 1
949566 403268 1...

Manager to Decoder

1
6 999917 999916
376618 28948 1
31245 312337 0
557782 254241 0
70005 414124 1
936153 810579 0
892718 976672 1
920779 265961 0
889632 122904 0
580233 282023 1
607940 327961 1
425460 752305 1
246884 279830 1
487568 52687 0
591578 30012 1
813753 802038 0
564247 402396 1
977459 272246 1
949566 403268 1...

Decoder to Manager

454728 2

result:

wrong answer you reported 454728 but expected 413744

Subtask #7:

score: 0
Wrong Answer

Test #19:

score: 0
Wrong Answer
time: 677ms
memory: 118768kb

Manager to Encoder

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

Encoder to Manager

1
7 999961 999960
939052 241673 1
834260 153165 1
184571 426917 1
793515 753906 1
565440 185584 1
39158 950708 1
351325 253348 1
215188 143689 0
230280 435682 1
481498 529750 0
987258 706076 0
848920 601314 0
278048 190908 1
908401 346977 1
449017 783904 1
226987 340476 0
394002 468988 0
759691 3571...

Manager to Decoder

1
7 999961 999960
939052 241673 1
834260 153165 1
184571 426917 1
793515 753906 1
565440 185584 1
39158 950708 1
351325 253348 1
215188 143689 0
230280 435682 1
481498 529750 0
987258 706076 0
848920 601314 0
278048 190908 1
908401 346977 1
449017 783904 1
226987 340476 0
394002 468988 0
759691 3571...

Decoder to Manager

732347 2

result:

wrong answer you reported 732347 but expected 779092

Subtask #8:

score: 0
Wrong Answer

Test #21:

score: 0
Wrong Answer
time: 718ms
memory: 121804kb

Manager to Encoder

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

Encoder to Manager

1
8 999907 999906
925141 417990 0
241822 398765 1
494613 470465 1
965811 306753 0
940798 24525 0
496140 10016 1
30580 705308 1
424633 154729 1
152610 818946 1
388379 831662 1
449659 374154 1
605148 180837 1
199915 210736 1
333457 636076 0
756349 76619 0
657239 373298 1
604210 528454 1
596859 985946 ...

Manager to Decoder

1
8 999907 999906
925141 417990 0
241822 398765 1
494613 470465 1
965811 306753 0
940798 24525 0
496140 10016 1
30580 705308 1
424633 154729 1
152610 818946 1
388379 831662 1
449659 374154 1
605148 180837 1
199915 210736 1
333457 636076 0
756349 76619 0
657239 373298 1
604210 528454 1
596859 985946 ...

Decoder to Manager

140459 2

result:

wrong answer you reported 140459 but expected 964440

Subtask #9:

score: 0
Wrong Answer

Test #23:

score: 0
Wrong Answer
time: 751ms
memory: 121992kb

Manager to Encoder

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

Encoder to Manager

1
9 999957 999956
211395 350478 1
902448 149742 1
733039 947992 1
270505 986433 1
841453 624213 1
47522 890859 1
986701 860894 1
294438 537189 1
457954 270545 1
872892 154437 1
443993 93805 1
93596 131674 1
240191 18408 1
369788 840410 1
506161 785758 1
613964 62571 1
341034 661607 1
129167 786287 1...

Manager to Decoder

1
9 999957 999956
211395 350478 1
902448 149742 1
733039 947992 1
270505 986433 1
841453 624213 1
47522 890859 1
986701 860894 1
294438 537189 1
457954 270545 1
872892 154437 1
443993 93805 1
93596 131674 1
240191 18408 1
369788 840410 1
506161 785758 1
613964 62571 1
341034 661607 1
129167 786287 1...

Decoder to Manager

520575 2

result:

wrong answer you reported 520575 but expected 842276

Subtask #10:

score: 0
Wrong Answer

Test #27:

score: 0
Wrong Answer
time: 734ms
memory: 122516kb

Manager to Encoder

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

Encoder to Manager

1
10 999998 999997
747271 468373 1
448478 715209 1
559329 744780 1
712938 517620 1
790196 13340 1
738159 32480 1
54775 327457 1
227993 457552 1
182826 157328 1
566494 863943 1
414947 742184 1
329295 241654 1
30631 169597 1
113016 143823 1
975678 67617 1
145083 624252 1
20924 88632 1
193475 345776 1
...

Manager to Decoder

1
10 999998 999997
747271 468373 1
448478 715209 1
559329 744780 1
712938 517620 1
790196 13340 1
738159 32480 1
54775 327457 1
227993 457552 1
182826 157328 1
566494 863943 1
414947 742184 1
329295 241654 1
30631 169597 1
113016 143823 1
975678 67617 1
145083 624252 1
20924 88632 1
193475 345776 1
...

Decoder to Manager

902833 2

result:

wrong answer you reported 902833 but expected 311774

Subtask #11:

score: 0
Wrong Answer

Test #31:

score: 0
Wrong Answer
time: 743ms
memory: 122136kb

Manager to Encoder

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

Encoder to Manager

1
11 999931 999930
793084 156604 1
586700 792192 1
925302 539431 1
383749 131931 1
394725 874421 1
231052 149260 1
791941 417282 1
676415 750718 1
284453 11101 1
486995 874137 1
805411 324242 1
185801 816130 1
319364 268172 1
686110 807556 1
750348 599477 1
649864 396292 1
438910 501258 1
606477 940...

Manager to Decoder

1
11 999931 999930
793084 156604 1
586700 792192 1
925302 539431 1
383749 131931 1
394725 874421 1
231052 149260 1
791941 417282 1
676415 750718 1
284453 11101 1
486995 874137 1
805411 324242 1
185801 816130 1
319364 268172 1
686110 807556 1
750348 599477 1
649864 396292 1
438910 501258 1
606477 940...

Decoder to Manager

752882 4

result:

wrong answer you reported 752882 but expected 58080

Subtask #12:

score: 0
Wrong Answer

Test #35:

score: 0
Wrong Answer
time: 730ms
memory: 121988kb

Manager to Encoder

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

Encoder to Manager

1
12 999960 999959
126028 589343 1
700296 861909 1
209521 212759 1
349213 334173 1
664836 60392 1
335046 22330 1
540157 59229 1
308884 762854 1
70385 910776 1
817838 591778 1
711236 485120 1
325752 864648 1
450475 761636 1
338814 27249 1
505180 651562 1
423892 923166 1
344397 334176 1
398250 523696 ...

Manager to Decoder

1
12 999960 999959
126028 589343 1
700296 861909 1
209521 212759 1
349213 334173 1
664836 60392 1
335046 22330 1
540157 59229 1
308884 762854 1
70385 910776 1
817838 591778 1
711236 485120 1
325752 864648 1
450475 761636 1
338814 27249 1
505180 651562 1
423892 923166 1
344397 334176 1
398250 523696 ...

Decoder to Manager

575533 4

result:

wrong answer you reported 575533 but expected 636223

Subtask #13:

score: 0
Wrong Answer

Test #39:

score: 0
Wrong Answer
time: 736ms
memory: 117160kb

Manager to Encoder

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

Encoder to Manager

1
13 999903 999902
699453 957127 1
717316 760764 1
87958 339281 1
758337 952887 1
5366 169789 1
389690 958796 1
830167 825032 1
989883 676815 1
427647 834277 1
9634 311592 1
655997 668048 1
117304 362088 1
405053 928229 1
267823 134039 1
720669 779811 1
553911 961244 1
20098 332778 1
851101 661056 1...

Manager to Decoder

1
13 999903 999902
699453 957127 1
717316 760764 1
87958 339281 1
758337 952887 1
5366 169789 1
389690 958796 1
830167 825032 1
989883 676815 1
427647 834277 1
9634 311592 1
655997 668048 1
117304 362088 1
405053 928229 1
267823 134039 1
720669 779811 1
553911 961244 1
20098 332778 1
851101 661056 1...

Decoder to Manager

357001 3

result:

wrong answer you reported 357001 but expected 761893

Subtask #14:

score: 0
Wrong Answer

Test #43:

score: 0
Wrong Answer
time: 1800ms
memory: 211640kb

Manager to Encoder

14 999070 1998140 376496
81367 376496
742278 81367
742278 598388
742278 296638
742278 146179
352306 296638
146179 66531
66531 921142
536455 376496
352306 264260
320745 352306
81367 905516
756472 536455
25339 921142
993294 352306
296638 779072
352306 159366
188989 742278
623522 921142
627347 993294
2...

Encoder to Manager

1
14 999070 1998140
926754 725212 1
932410 960882 1
171579 113210 1
145285 425865 0
769790 133161 0
881526 135596 0
754166 485296 0
260550 603644 0
156715 314194 0
249713 991573 1
87344 996849 1
549616 793449 1
126608 363307 1
358419 633723 0
560500 876288 0
300693 91693 1
866668 134628 1
492405 889...

Manager to Decoder

1
14 999070 1998140
926754 725212 1
932410 960882 1
171579 113210 1
145285 425865 0
769790 133161 0
881526 135596 0
754166 485296 0
260550 603644 0
156715 314194 0
249713 991573 1
87344 996849 1
549616 793449 1
126608 363307 1
358419 633723 0
560500 876288 0
300693 91693 1
866668 134628 1
492405 889...

Decoder to Manager

489392 2

result:

wrong answer you reported 489392 but expected 376496

Subtask #15:

score: 0
Wrong Answer

Test #46:

score: 0
Wrong Answer
time: 1807ms
memory: 205312kb

Manager to Encoder

15 999624 1999248 605695
605695 285054
924093 285054
858664 924093
313513 285054
313513 298720
185061 285054
662407 313513
491675 924093
856278 858664
215859 185061
555921 491675
185061 641277
555921 825909
251264 491675
514008 662407
958043 825909
686565 958043
641277 33519
686565 661056
207870 605...

Encoder to Manager

1
15 999624 1999248
320527 337692 0
719503 887526 0
619817 609666 0
536687 84016 0
38698 53927 1
537579 804746 0
863064 386462 0
457174 348636 1
976265 139900 0
728061 792926 0
764948 630940 0
321253 507762 1
658293 531216 1
396185 25687 1
19963 948867 0
726732 488190 1
377214 573789 1
850421 850104...

Manager to Decoder

1
15 999624 1999248
320527 337692 0
719503 887526 0
619817 609666 0
536687 84016 0
38698 53927 1
537579 804746 0
863064 386462 0
457174 348636 1
976265 139900 0
728061 792926 0
764948 630940 0
321253 507762 1
658293 531216 1
396185 25687 1
19963 948867 0
726732 488190 1
377214 573789 1
850421 850104...

Decoder to Manager

890216 2

result:

wrong answer you reported 890216 but expected 605695

Subtask #16:

score: 0
Wrong Answer

Test #49:

score: 0
Wrong Answer
time: 1758ms
memory: 209800kb

Manager to Encoder

16 999828 1999656 102404
102404 52981
52981 181578
156703 102404
156703 807582
196628 52981
501837 196628
196628 932550
391550 807582
251557 156703
52981 304039
181578 551420
156703 500302
181578 303695
672559 251557
52981 699726
991790 807582
721498 391550
52981 429680
551420 498973
359266 932550
6...

Encoder to Manager

1
16 999828 1999656
471239 461784 0
372476 129111 1
111651 398292 1
230335 719773 0
62658 194722 0
899717 534979 0
639770 693631 1
480942 496670 0
815606 461479 1
837542 209736 0
878254 349038 0
583854 662535 0
241348 20567 1
176441 177977 1
226883 45274 0
278278 761600 1
686729 358582 1
432911 5630...

Manager to Decoder

1
16 999828 1999656
471239 461784 0
372476 129111 1
111651 398292 1
230335 719773 0
62658 194722 0
899717 534979 0
639770 693631 1
480942 496670 0
815606 461479 1
837542 209736 0
878254 349038 0
583854 662535 0
241348 20567 1
176441 177977 1
226883 45274 0
278278 761600 1
686729 358582 1
432911 5630...

Decoder to Manager

372085 4

result:

wrong answer you reported 372085 but expected 102404

Subtask #17:

score: 0
Wrong Answer

Test #53:

score: 0
Wrong Answer
time: 1757ms
memory: 211740kb

Manager to Encoder

17 999345 1998690 431760
714048 431760
431760 864711
714048 531203
864711 496762
164587 431760
496762 813953
387128 531203
813953 323654
374474 813953
431760 91063
864711 59879
290944 813953
355050 431760
91063 802008
431760 162748
496762 193441
651538 290944
101587 802008
164587 519524
193441 49171...

Encoder to Manager

1
17 999345 1998690
177831 158081 0
232332 536408 0
105720 657442 1
427391 916988 1
122408 379750 1
239904 496579 0
694872 983380 0
278617 34759 0
660220 794229 1
708567 21698 0
295012 365792 0
930554 738796 0
309828 825954 0
194234 350923 1
407615 106346 0
348212 716943 1
530596 985563 1
779698 756...

Manager to Decoder

1
17 999345 1998690
177831 158081 0
232332 536408 0
105720 657442 1
427391 916988 1
122408 379750 1
239904 496579 0
694872 983380 0
278617 34759 0
660220 794229 1
708567 21698 0
295012 365792 0
930554 738796 0
309828 825954 0
194234 350923 1
407615 106346 0
348212 716943 1
530596 985563 1
779698 756...

Decoder to Manager

3249 4

result:

wrong answer you reported 3249 but expected 431760

Subtask #18:

score: 0
Wrong Answer

Test #57:

score: 0
Wrong Answer
time: 1741ms
memory: 211840kb

Manager to Encoder

18 999791 1999582 257930
257930 734927
257930 385531
474756 734927
432048 734927
474756 952965
841319 952965
179928 841319
841319 157614
841319 80029
80029 877225
179928 729178
432048 977126
877225 434464
841319 219745
734927 278874
432048 555110
640711 877225
640711 976997
952965 633295
52771 15761...

Encoder to Manager

1
18 999791 1999582
130567 292817 0
129935 960814 0
705146 790630 0
482141 51074 1
229578 370948 1
127311 551086 1
68332 418590 0
874240 663656 0
793532 426340 1
690611 382479 0
434069 742925 1
646291 723820 0
354694 189322 0
388178 858204 1
940950 452262 1
191661 474631 1
946289 743939 1
727634 593...

Manager to Decoder

1
18 999791 1999582
130567 292817 0
129935 960814 0
705146 790630 0
482141 51074 1
229578 370948 1
127311 551086 1
68332 418590 0
874240 663656 0
793532 426340 1
690611 382479 0
434069 742925 1
646291 723820 0
354694 189322 0
388178 858204 1
940950 452262 1
191661 474631 1
946289 743939 1
727634 593...

Decoder to Manager

624036 2

result:

wrong answer you reported 624036 but expected 257930

Subtask #19:

score: 0
Wrong Answer

Test #61:

score: 0
Wrong Answer
time: 1790ms
memory: 209740kb

Manager to Encoder

19 999857 1999714 627365
776577 627365
627365 687989
627365 718885
305280 718885
229260 627365
157881 776577
501968 229260
776577 469170
718885 20474
776577 789859
687989 300855
687989 977255
789859 549879
977255 192707
397031 776577
873328 300855
469170 586173
314074 776577
20474 441080
977255 6080...

Encoder to Manager

1
19 999857 1999714
839861 46745 1
43697 532391 0
88840 615682 1
650137 184004 0
704382 254033 1
589661 208654 1
811295 906340 1
104442 823529 1
345899 366666 0
970973 602873 0
625705 61407 0
704132 448229 1
568824 620159 1
961658 133965 1
998389 146437 1
21913 396387 0
385487 866360 1
608297 504651...

Manager to Decoder

1
19 999857 1999714
839861 46745 1
43697 532391 0
88840 615682 1
650137 184004 0
704382 254033 1
589661 208654 1
811295 906340 1
104442 823529 1
345899 366666 0
970973 602873 0
625705 61407 0
704132 448229 1
568824 620159 1
961658 133965 1
998389 146437 1
21913 396387 0
385487 866360 1
608297 504651...

Decoder to Manager

402289 2

result:

wrong answer you reported 402289 but expected 627365

Subtask #20:

score: 0
Wrong Answer

Test #65:

score: 0
Wrong Answer
time: 1742ms
memory: 205592kb

Manager to Encoder

20 999216 1998432 393580
393580 176918
176918 34074
34074 992983
176918 759882
992983 404864
449676 404864
1762 992983
759882 547393
176918 768240
449676 405535
449676 345823
393580 856783
1762 297598
856783 995935
768240 589268
860687 759882
589268 318244
589268 262010
992983 949669
386646 547393
7...

Encoder to Manager

1
20 999216 1998432
337127 560728 1
510282 27916 0
529243 224842 0
133256 265748 0
519992 218118 1
570741 363786 1
761318 849091 0
819809 410521 0
138511 665283 0
186733 164107 1
659088 449228 0
786570 366789 0
244150 727676 0
864437 732841 0
963695 842573 0
889753 922513 0
46689 280404 1
711722 568...

Manager to Decoder

1
20 999216 1998432
337127 560728 1
510282 27916 0
529243 224842 0
133256 265748 0
519992 218118 1
570741 363786 1
761318 849091 0
819809 410521 0
138511 665283 0
186733 164107 1
659088 449228 0
786570 366789 0
244150 727676 0
864437 732841 0
963695 842573 0
889753 922513 0
46689 280404 1
711722 568...

Decoder to Manager

138843 3

result:

wrong answer you reported 138843 but expected 393580

Subtask #21:

score: 0
Wrong Answer

Test #69:

score: 0
Wrong Answer
time: 1673ms
memory: 205460kb

Manager to Encoder

21 999831 1999662 700833
366038 700833
366038 325480
762150 366038
507283 700833
871987 325480
703342 507283
669603 703342
194453 325480
333639 762150
333639 736937
736937 144692
200070 736937
871987 924148
736937 362905
669603 855966
194453 691992
443375 762150
144692 732750
144692 538353
748802 36...

Encoder to Manager

1
21 999831 1999662
521323 153053 0
459480 718983 1
219066 870411 0
503664 595246 1
251879 32322 0
603159 110023 0
970551 746875 0
998304 331476 0
154561 220939 0
326559 970277 1
575431 208049 1
184798 738104 1
121575 581217 1
631868 13893 1
938537 154651 1
592586 186882 0
376047 722573 0
340602 552...

Manager to Decoder

1
21 999831 1999662
521323 153053 0
459480 718983 1
219066 870411 0
503664 595246 1
251879 32322 0
603159 110023 0
970551 746875 0
998304 331476 0
154561 220939 0
326559 970277 1
575431 208049 1
184798 738104 1
121575 581217 1
631868 13893 1
938537 154651 1
592586 186882 0
376047 722573 0
340602 552...

Decoder to Manager

525934 3

result:

wrong answer you reported 525934 but expected 700833

Subtask #22:

score: 0
Wrong Answer

Test #73:

score: 0
Wrong Answer
time: 1715ms
memory: 211652kb

Manager to Encoder

22 999385 1998770 808330
523876 808330
523876 152630
474273 808330
40289 523876
152630 268321
474273 940367
523876 342755
152630 40323
474273 77075
546091 40323
89779 940367
152630 985224
691156 77075
474273 875866
40323 259801
89779 165145
80666 546091
714560 691156
730653 875866
911033 523876
2688...

Encoder to Manager

1
22 999385 1998770
818735 524274 0
602708 54316 0
937643 330853 1
489354 825547 0
276482 362858 1
674388 375788 1
917923 206435 0
730296 761718 1
94401 753718 0
221762 504357 0
690034 673487 0
622887 651530 1
33008 408363 0
533043 312591 0
26603 427142 1
673779 872921 0
381942 806485 0
111671 17660...

Manager to Decoder

1
22 999385 1998770
818735 524274 0
602708 54316 0
937643 330853 1
489354 825547 0
276482 362858 1
674388 375788 1
917923 206435 0
730296 761718 1
94401 753718 0
221762 504357 0
690034 673487 0
622887 651530 1
33008 408363 0
533043 312591 0
26603 427142 1
673779 872921 0
381942 806485 0
111671 17660...

Decoder to Manager

720797 4

result:

wrong answer you reported 720797 but expected 808330

Subtask #23:

score: 0
Wrong Answer

Test #77:

score: 0
Wrong Answer
time: 1667ms
memory: 211512kb

Manager to Encoder

23 999537 1999074 823168
122681 823168
823168 455034
122681 75402
426585 75402
823168 278565
823168 873549
455034 933524
105554 75402
284478 278565
105554 170979
284478 485679
910957 823168
933524 493654
426585 984134
105554 783302
15832 170979
173838 278565
66929 933524
984134 657898
302219 873549
...

Encoder to Manager

1
23 999537 1999074
424831 829715 1
875871 753924 0
994071 355042 0
931155 867331 0
680335 442835 1
198348 443404 0
306067 289873 0
822479 775244 1
627424 441490 0
904285 872709 0
186039 453426 1
380545 807102 1
661273 844991 1
417459 200460 0
667235 318099 0
988819 369426 0
493178 25719 1
250383 36...

Manager to Decoder

1
23 999537 1999074
424831 829715 1
875871 753924 0
994071 355042 0
931155 867331 0
680335 442835 1
198348 443404 0
306067 289873 0
822479 775244 1
627424 441490 0
904285 872709 0
186039 453426 1
380545 807102 1
661273 844991 1
417459 200460 0
667235 318099 0
988819 369426 0
493178 25719 1
250383 36...

Decoder to Manager

224946 5

result:

wrong answer you reported 224946 but expected 823168

Subtask #24:

score: 0
Wrong Answer

Test #81:

score: 0
Wrong Answer
time: 1665ms
memory: 211560kb

Manager to Encoder

24 999130 1998260 703682
174218 703682
174218 108035
703682 493485
703682 335073
703682 730671
493485 725548
703829 335073
661753 108035
703682 647830
763891 108035
647830 508805
493485 858725
725548 200797
661753 20322
725548 507852
529299 174218
493485 101760
665475 200797
507852 658807
679277 507...

Encoder to Manager

1
24 999130 1998260
15028 739034 1
30883 267871 1
981734 444803 1
547058 486015 0
471448 917618 1
736944 797904 0
771386 563651 0
704764 151476 0
910261 660732 0
534605 548266 0
894502 869597 0
544312 924239 1
370082 647196 1
19580 780776 0
923217 868120 0
291242 105927 1
190721 144192 1
813255 1319...

Manager to Decoder

1
24 999130 1998260
15028 739034 1
30883 267871 1
981734 444803 1
547058 486015 0
471448 917618 1
736944 797904 0
771386 563651 0
704764 151476 0
910261 660732 0
534605 548266 0
894502 869597 0
544312 924239 1
370082 647196 1
19580 780776 0
923217 868120 0
291242 105927 1
190721 144192 1
813255 1319...

Decoder to Manager

373823 2

result:

wrong answer you reported 373823 but expected 703682

Subtask #25:

score: 0
Wrong Answer

Test #85:

score: 0
Wrong Answer
time: 1688ms
memory: 211712kb

Manager to Encoder

25 999125 1998250 796022
796022 615330
615330 621206
796022 996510
888967 621206
801851 615330
333641 796022
615330 129079
879920 621206
833607 333641
377834 833607
615330 630076
801851 582148
777181 879920
842476 879920
200558 833607
136957 833607
828302 333641
630076 330936
996510 523240
477345 80...

Encoder to Manager

1
25 999125 1998250
734802 775340 1
125650 531569 0
740279 490193 1
159804 158193 1
483664 829708 0
487267 631264 0
121496 287992 1
527125 355653 0
396795 50521 0
371176 797901 1
648282 403566 0
446272 347347 1
554001 468745 1
924323 72626 1
875058 454264 0
306365 551368 1
847801 821887 0
554741 623...

Manager to Decoder

1
25 999125 1998250
734802 775340 1
125650 531569 0
740279 490193 1
159804 158193 1
483664 829708 0
487267 631264 0
121496 287992 1
527125 355653 0
396795 50521 0
371176 797901 1
648282 403566 0
446272 347347 1
554001 468745 1
924323 72626 1
875058 454264 0
306365 551368 1
847801 821887 0
554741 623...

Decoder to Manager

901890 2

result:

wrong answer you reported 901890 but expected 796022