QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#9669#997. 2-SAT 问题Lenstar#100 ✓43ms16528kbC++111.4kb2021-04-09 10:21:082021-12-19 11:36:12

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2021-12-19 11:36:12]
  • 评测
  • 测评结果:100
  • 用时:43ms
  • 内存:16528kb
  • [2021-04-09 10:21:08]
  • 提交

answer

#include <bits/stdc++.h>

const int N = 2e5 + 10, M = 1e6 + 10;

inline int read()
{
	int x = 0, f = 0; char ch = getchar();
	while (!isdigit(ch)) f |= ch == '-', ch = getchar();
	while ( isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
	return f ? -x : x;
}

int tot = 1, fir[N], nex[M], got[M];

inline void add(int u, int v)
{
	nex[++tot] = fir[u], fir[u] = tot, got[tot] = v;
	// nex[++tot] = fir[v], fir[v] = tot, got[tot] = u;
}

int idx = 0, dfn[N], low[N];
int top = 0, stk[N], ins[N];
int num = 0, col[N];

inline void dfs(int u)
{
	dfn[u] = low[u] = ++idx, ins[stk[++top] = u] = 1;
	for (int i = fir[u]; i; i = nex[i])
		if (!dfn[got[i]]) dfs(got[i]), low[u] = std::min(low[u], low[got[i]]);
		else if (ins[got[i]]) low[u] = std::min(low[u], dfn[got[i]]);
	if (dfn[u] == low[u])
	{
		++num;
		do
		{
			ins[stk[top]] = 0;
			col[stk[top]] = num;
		} while (stk[top--] != u);
	}
}

int main()
{
	int n = read(), m = read();
	for (int i = 1; i <= m; ++i)
	{
		int u = read(), a = read();
		int v = read(), b = read();
		add(u + (a ^ 1) * n, v + b * n);
		add(v + (b ^ 1) * n, u + a * n);
	}
	for (int i = 1; i <= 2 * n; ++i) if (!dfn[i]) dfs(i);
	for (int i = 1; i <= n; ++i) if (col[i] == col[i + n]) return puts("No"), 0;
	puts("Yes");
	for (int i = 1; i <= n; ++i) printf("%d ", col[i] > col[i + n]);
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 14ms
memory: 15264kb

input:

86354 86418
14615 0 14903 1
13605 0 4458 0
15604 0 77112 0
52311 1 64996 0
22711 1 74245 1
39042 1 57372 1
2994 1 84183 1
80574 0 58791 1
27780 1 9336 1
61809 0 7216 0
71113 0 42287 1
20073 0 72448 0
73840 0 77048 0
28955 0 4165 0
16322 1 14075 1
43512 0 58600 1
45219 0 53858 0
14919 0 22576 0
16594 0 67238 1
62740 1 76360 1
1810 0 72736 0
39169 1 78303 1
28394 0 59283 0
20937 0 59893 0
63059 1 29640 1
59695 0 46400 1
83334 1 83190 1
79084 0 56434 0
60958 1 84935 1
31816 1 68318 0
86027 0 321 1
...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #2:

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

input:

17625 186889
17290 0 17616 1
8909 0 15829 0
9807 0 9920 1
14912 0 3052 1
14426 0 16910 1
8910 1 10153 1
5163 1 1118 1
2764 0 2787 1
2998 0 2344 1
17573 1 5693 1
9120 0 4529 1
9836 0 4832 0
4021 0 16206 1
1109 0 13286 1
12402 1 16982 0
6311 1 1218 1
147 0 5411 0
3958 1 1571 0
4848 1 16678 0
7433 1 3130 1
5439 1 9101 1
4224 0 1155 1
4642 0 4848 0
17551 1 11021 0
6760 1 10312 0
17420 0 10184 0
5286 0 12396 0
9452 0 6875 1
12472 0 7430 0
685 0 2016 1
14846 1 8831 0
1141 0 4803 1
253 1 1478 1
9347 0 ...

output:

Yes
1 0 0 1 0 1 1 1 1 1 0 1 1 1 1 0 1 0 0 0 1 0 0 1 0 1 1 1 1 0 0 0 1 1 0 1 1 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 1 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 1 0 ...

result:

ok Good plan

Test #3:

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

input:

27276 180666
4575 1 13941 1
23689 1 276 1
8916 1 5504 1
10230 1 19907 1
15820 1 27258 0
18040 0 11405 0
23944 1 23049 1
12183 1 24927 0
26509 1 20881 0
14596 1 766 0
5071 1 10703 0
15926 1 25575 1
15486 1 35 0
11290 1 26937 0
3475 0 20672 1
10309 0 22343 1
22873 0 21025 0
14802 1 22377 0
7701 1 11851 1
19539 0 14221 0
3976 1 16507 0
10932 1 17995 1
20625 0 12444 0
23373 0 9912 0
15323 1 24246 1
23178 1 19935 1
23486 0 5273 1
19395 0 2671 1
7770 0 18552 0
23248 0 13946 0
15068 0 22912 1
50 0 8674...

output:

Yes
0 1 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 1 1 0 0 1 0 0 1 0 0 1 1 1 0 1 1 1 0 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 1 0 ...

result:

ok Good plan

Test #4:

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

input:

70213 93094
53616 1 59247 1
16687 0 63568 0
10114 1 55521 1
58830 1 22082 0
46298 0 65072 0
2622 1 16071 0
66725 0 46161 1
4204 1 7255 0
39103 1 19710 1
33819 1 19406 0
24055 1 6494 1
45844 0 59888 0
63714 1 30868 0
12762 0 43441 0
59330 1 35278 0
2212 0 1284 0
45959 1 17786 1
17744 0 66761 1
54970 1 3455 1
8231 1 41580 1
10800 1 34796 1
17223 0 2174 1
45850 1 65645 1
26352 1 21947 1
38242 1 63803 0
28815 0 8706 0
9812 1 2105 1
34163 0 40293 1
57963 1 41559 1
67001 0 60807 1
57602 0 46601 1
6738...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #5:

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

input:

66484 178501
3057 1 32192 1
19941 0 37367 1
56292 0 54533 0
20407 1 27938 1
28653 1 37219 1
64377 0 63482 0
25218 0 12814 1
29736 0 34360 0
61150 0 38346 1
1116 0 56594 0
7410 1 58121 1
41370 0 36704 0
23807 1 60815 1
63396 0 55650 1
26564 1 5193 0
65150 1 27578 0
13215 0 5871 0
56406 1 63683 0
13210 1 10132 0
65465 1 13777 0
32954 0 49653 1
34626 1 61263 1
21146 0 18851 0
64849 0 4280 1
27189 0 6526 0
32170 1 29649 1
66169 1 37365 0
59440 0 28619 0
19890 1 8887 1
56417 1 24821 1
43924 1 30815 0...

output:

No

result:

ok No Solution

Test #6:

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

input:

9650 160962
4804 1 3956 0
4557 0 7207 1
4157 1 7867 0
1045 0 5033 0
8623 0 5770 1
4090 1 3088 1
2846 0 8117 1
4827 1 474 0
2822 0 4035 1
2245 1 4894 0
5093 0 8553 1
9160 1 641 1
5302 1 7701 1
4246 0 718 0
2096 1 2709 1
4288 0 850 1
4262 0 1309 0
2713 1 286 0
7228 1 5945 1
7481 0 770 1
1617 1 4784 1
1864 0 4664 1
3142 0 5464 1
8942 0 4641 1
6199 0 490 1
8676 1 3673 1
1376 0 4947 0
2001 1 9456 1
8053 0 8936 1
6864 0 4125 0
8621 1 6651 1
4087 1 9650 1
7872 1 9243 0
2667 1 9328 1
8565 0 4291 0
6037 ...

output:

Yes
1 1 0 0 1 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 ...

result:

ok Good plan

Test #7:

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

input:

82878 170546
59669 0 52924 1
4674 1 27496 0
81463 1 82234 0
22606 0 30346 1
70787 1 16429 0
46983 0 80599 0
82208 0 51421 1
31035 0 74680 0
48903 1 55211 1
46935 1 76651 1
78465 0 18656 0
55607 1 13210 1
14749 1 25929 0
69893 1 23187 1
8840 0 5696 1
30898 1 14164 0
55439 1 68798 0
29324 1 6831 1
10387 0 49874 0
45005 0 72479 1
66252 0 57890 1
48650 1 60632 1
38968 0 60939 1
6425 1 45091 0
60624 0 4425 1
40578 1 23058 0
63357 0 15517 1
72029 1 49491 1
1623 0 38912 0
51367 0 34417 1
47654 0 31392 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 ...

result:

ok Good plan

Test #8:

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

input:

22849 108511
22633 1 9868 1
1838 0 11979 0
16493 0 14662 1
4359 1 14080 1
1440 0 15825 1
1248 0 10522 0
5832 0 2369 0
16359 0 21931 1
4219 1 11059 1
17857 1 15021 0
527 0 12410 1
3606 1 11872 1
16771 1 695 0
21988 1 314 0
4674 1 18090 0
5861 1 21034 1
4147 1 7422 0
6607 1 9159 0
20501 1 16673 1
21520 1 665 0
20351 0 19545 0
8415 1 2776 1
8367 1 7686 1
3715 1 14926 1
13108 0 5252 1
16161 1 1394 1
12076 0 13592 0
10751 0 13911 1
18104 1 15169 1
3298 1 6047 0
16735 1 19385 1
10973 0 9061 0
1248 1 7...

output:

No

result:

ok No Solution

Test #9:

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

input:

29366 167993
17695 1 9514 0
14236 0 9220 0
25155 0 5701 0
19605 0 26072 0
14919 1 9254 0
10628 0 11786 0
27612 1 25759 0
10256 1 7615 1
67 1 23478 0
17423 0 2671 0
22262 1 13960 0
13269 1 27431 0
13753 0 22134 0
22823 1 1997 1
24737 1 20863 1
6278 0 16541 0
4130 1 16469 0
29271 0 14263 1
21310 1 22506 0
1289 0 4605 1
28786 1 248 0
21093 0 25478 0
8169 1 18061 0
27533 0 4808 0
8319 0 21066 0
26260 0 23761 0
25662 1 6424 1
22127 0 3523 0
24254 0 22654 1
1789 1 606 0
17058 1 15397 1
27393 0 23308 1...

output:

Yes
1 0 1 0 1 1 1 0 0 1 0 0 1 0 0 0 1 1 0 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 1 0 1 1 1 1 1 0 1 1 0 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 1 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 0 ...

result:

ok Good plan

Test #10:

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

input:

1682 170188
916 0 1392 1
1635 1 1351 0
357 0 243 0
1225 0 254 1
266 0 1215 1
36 0 730 1
1544 0 526 0
316 1 1633 0
356 1 1231 0
940 0 1121 0
875 1 933 1
625 1 1241 1
1654 1 890 0
558 1 137 0
192 1 1131 0
1420 0 361 0
1507 1 739 1
1092 0 1090 0
1539 0 314 0
267 0 1152 1
1175 0 383 0
1585 1 1349 1
516 1 586 1
720 1 920 0
1424 0 892 0
1178 0 908 1
1380 1 876 1
579 1 779 0
1004 0 664 1
150 0 1123 1
1300 0 131 1
1557 1 42 0
505 1 870 1
1571 1 543 0
1276 0 1390 0
86 0 576 0
1367 0 185 0
1679 1 1070 0
1...

output:

Yes
1 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 0 0 1 1 0 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 0 0 0 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 0 ...

result:

ok Good plan

Test #11:

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

input:

7196 105048
2859 0 287 1
689 0 3417 1
3339 1 5290 1
5024 1 386 0
1640 0 1248 1
3055 0 3501 1
6028 1 5555 0
5646 1 496 1
4043 0 2944 0
873 1 4251 1
4797 1 1369 0
198 1 6382 0
3985 1 4455 1
4165 1 7099 0
5910 1 6402 1
3784 0 5072 1
5727 0 5485 0
2384 0 1394 1
74 1 6712 0
7153 1 471 1
5020 1 3669 0
425 1 664 0
2631 1 2257 1
4176 1 1654 1
16 1 6211 1
1588 0 3111 1
2582 1 1905 0
1541 0 6680 1
1325 1 6241 1
121 1 3368 1
1571 0 1031 0
6073 1 4578 1
4154 1 2711 1
2433 1 6991 0
7041 1 5401 0
4282 0 83 0
...

output:

Yes
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 1 ...

result:

ok Good plan

Test #12:

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

input:

34766 55624
17816 1 18059 1
19359 1 7703 1
12707 1 8183 1
17814 0 4110 0
6119 0 12379 0
17510 0 34439 0
16709 0 22739 1
9555 1 3063 0
7258 0 21772 1
31924 1 4232 0
29692 0 29094 1
13653 1 16895 1
17462 1 27019 0
23572 1 18400 0
5748 0 1302 0
10769 1 15962 0
33973 1 14837 1
29160 0 12055 0
4429 1 11408 1
325 1 10434 0
6993 0 8662 0
3507 1 19650 0
15812 1 13938 1
30947 0 23674 0
6778 0 7545 1
33469 1 15150 1
13447 1 24448 1
7862 1 16838 0
3910 1 8015 0
12596 0 26909 0
20787 1 8168 0
11157 1 33753 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #13:

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

input:

5092 137430
2799 1 4966 1
542 1 1484 0
3411 0 1710 1
444 0 811 1
183 0 4372 0
3608 0 4255 0
729 1 2191 0
1917 1 1324 0
858 0 580 0
4222 0 4198 0
1169 0 4526 1
3296 0 1355 1
187 1 2818 0
4284 1 802 1
155 0 925 0
4226 0 1703 0
2990 0 3210 0
1106 0 3759 0
4922 1 1115 1
4740 1 4469 0
493 1 1264 1
1697 1 3485 0
436 1 764 0
4484 0 1621 1
536 1 674 1
23 0 3477 0
3922 1 1927 0
2792 0 3698 1
255 0 3607 0
822 1 2641 0
3192 0 3625 1
3744 0 4578 1
3500 1 4967 0
3650 0 1445 0
4786 1 1126 0
2231 1 992 0
4634 ...

output:

Yes
0 1 1 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 1 1 0 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 ...

result:

ok Good plan

Test #14:

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

input:

99252 104959
94974 1 15504 0
58094 0 8774 1
34526 1 90367 1
91897 1 17003 1
94791 0 20819 1
88290 0 1709 1
38261 1 55494 0
87494 0 59118 1
78954 0 664 0
94268 0 78725 0
26422 0 90161 1
65923 1 11045 0
37446 0 75065 1
59505 1 37830 1
88362 0 4670 1
82177 1 52868 1
72263 1 61602 0
80445 0 47243 0
6121 1 73997 1
34623 0 4898 0
97136 1 12491 1
53014 0 11448 0
54167 1 18151 1
88598 1 82897 0
65029 1 59735 1
23304 1 84258 0
60902 0 559 0
25621 0 11292 1
43635 0 60509 1
64315 1 24299 0
63423 1 64554 1
...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #15:

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

input:

40296 111028
37666 0 2212 1
11395 0 38653 1
11819 0 8871 0
13615 1 9629 0
16681 1 38246 0
17062 1 26243 0
34484 0 33388 0
21118 0 15952 0
9391 0 28190 1
38841 1 22721 0
17949 1 28537 1
23998 0 2167 0
18529 0 38047 0
37808 1 28816 0
35241 1 22402 0
22784 0 2297 1
25196 1 8670 0
36433 1 15279 1
1130 0 21213 1
21100 1 32042 1
31212 0 3701 0
27499 1 15119 1
9378 1 1585 0
11111 1 38389 0
11199 1 16041 0
37164 1 7086 0
476 1 39034 1
25816 1 7332 0
9990 0 34370 1
18060 0 8725 0
33438 1 9485 0
18142 1 5...

output:

Yes
0 1 1 0 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 0 0 ...

result:

ok Good plan

Test #16:

score: 0
Accepted
time: 31ms
memory: 13796kb

input:

92878 130583
2583 0 59729 1
85821 0 58252 1
53911 0 17767 1
26714 0 35804 1
15922 0 2072 0
75557 0 50848 0
90087 0 6297 0
4452 1 78035 0
2685 1 77616 0
47898 0 62183 0
69458 0 84245 0
33397 0 32662 0
74382 0 34515 1
89011 0 46016 1
12618 1 26596 1
59925 1 24264 0
45648 0 26222 0
13023 0 19083 1
34331 0 33010 0
54313 0 24217 1
92012 1 63960 0
28629 1 14897 1
9346 0 91269 1
51538 0 48501 0
17241 1 70675 0
55756 1 88393 0
79638 1 62017 1
70677 0 85872 0
6666 1 83162 1
80354 0 59383 0
76833 0 88824 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #17:

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

input:

48141 196323
32751 1 42687 1
4125 0 15596 1
606 1 43075 0
1841 0 30134 1
42601 1 30544 0
11839 1 3441 1
21547 1 39174 0
9434 0 29547 0
2925 0 19007 0
9003 0 45620 0
38248 0 48067 1
40510 1 16017 1
33022 1 25302 0
2547 0 10595 1
18810 0 23374 1
35005 1 6479 1
44333 1 39743 1
47531 1 29607 1
17381 0 16125 0
47445 0 6426 0
40938 0 13277 0
34090 0 44709 1
46043 0 34673 0
45796 0 35140 1
8413 0 10216 1
20461 1 35437 0
8004 0 336 1
27558 0 18521 0
22065 1 136 1
12699 1 16841 0
35609 0 24471 1
37791 0 ...

output:

Yes
0 1 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 0 1 0 0 1 0 1 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 1 1 1 0 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 1 0 0 1 1 1 1 1 0 1 0 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 0 0 1 1 1 0 1 1 0 ...

result:

ok Good plan

Test #18:

score: 0
Accepted
time: 31ms
memory: 15276kb

input:

98824 152442
89196 0 24768 0
26301 1 97460 1
56004 1 57742 0
6046 1 53060 0
40053 1 48477 0
16132 0 76397 0
34551 1 88548 0
3622 0 60598 0
37403 1 64570 1
76957 0 11365 0
14077 1 8907 1
78209 1 17994 1
79720 1 70492 1
87573 0 20675 1
593 1 764 0
52653 0 81690 1
25826 0 12820 0
20072 0 21127 0
54256 1 85810 1
4326 0 13401 0
83116 1 73583 1
12621 1 9230 0
27542 0 59463 0
663 0 87500 0
23241 1 89237 1
93719 1 21121 0
49858 0 80540 1
8857 1 59898 1
44970 0 27275 0
58750 0 50151 0
58841 0 16286 0
260...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #19:

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

input:

40538 95720
513 0 4106 0
5662 0 2491 1
24406 0 18066 1
37034 0 18529 0
3074 0 40294 1
35959 0 32310 0
31276 0 20719 0
29421 0 33716 0
3131 0 17239 0
4684 1 21184 0
4907 1 3113 0
17445 1 30012 1
1238 0 38330 0
26476 1 9595 1
37525 0 23627 0
26877 1 36268 1
20410 1 23686 1
33524 0 17975 1
27291 0 3691 1
7999 0 22628 0
9536 1 9095 0
6401 1 20192 1
31005 1 997 0
21615 0 20694 0
17195 0 1192 0
24023 0 9694 0
2528 1 40124 1
7362 1 21809 1
29492 1 29063 1
9415 0 7378 0
33880 1 20823 0
9493 0 17897 1
35...

output:

Yes
0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 1 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0 1 1 0 1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 0 1 1 0 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 1 1 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 ...

result:

ok Good plan

Test #20:

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

input:

27562 175398
19666 1 20049 0
7156 0 23482 0
6924 1 6428 0
21135 0 21772 0
18765 1 1042 0
23624 0 23263 0
15434 1 23464 0
7097 0 8916 1
6713 1 13182 1
1822 0 597 0
17635 1 20174 1
7737 1 23600 1
1099 0 3629 1
22991 1 9350 1
9548 0 24824 0
16212 0 22676 1
19541 1 6033 0
11968 1 16635 0
14737 1 24178 0
3068 0 11006 1
12623 1 26455 1
710 0 15071 0
17273 0 5009 1
24759 0 9339 0
11037 0 17486 0
17115 1 20302 0
5577 0 21854 1
12757 0 26679 1
9621 0 26338 0
10321 1 16197 0
12065 0 14427 0
19438 1 6818 1...

output:

Yes
1 1 0 1 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 1 0 1 1 1 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 ...

result:

ok Good plan

Test #21:

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

input:

58189 128656
56943 0 36725 1
7047 1 34831 1
10440 1 30138 0
25725 1 45528 1
31809 0 48830 1
23001 1 18303 1
15112 0 18872 1
32552 0 15299 0
4056 1 45551 0
45193 1 53342 0
25262 1 14330 1
15127 0 9351 0
24215 0 57814 0
7788 1 41714 1
7665 1 41641 0
19285 1 14053 1
43863 0 29771 0
42227 1 49964 0
10128 0 22578 0
56078 0 26266 0
19667 0 3248 1
50864 0 56208 0
18878 1 35295 1
20655 0 56962 1
43871 1 17841 1
14338 0 29704 1
51149 1 46755 1
21253 1 4801 0
17146 0 52434 0
14600 0 20240 0
16422 0 51471 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 0 0 1 1 0 0 0 1 1 0 1 ...

result:

ok Good plan

Test #22:

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

input:

80979 108868
23585 1 75369 1
32072 1 32409 1
35478 1 43154 0
63944 0 39515 0
24812 0 64049 0
57607 0 51475 0
53454 1 30060 0
25716 1 77227 0
67258 0 23222 1
51689 0 6109 1
68676 0 13867 0
13015 0 8513 0
2783 1 11662 0
61761 1 26445 0
32173 0 47162 0
12047 0 61342 0
33440 0 27945 1
44387 1 10025 1
78955 0 49629 0
19752 0 16799 0
3936 1 1305 1
32564 1 51701 1
28498 0 55889 0
64250 0 37097 0
55639 0 48903 1
20610 0 59502 0
50051 1 6318 1
1143 1 51230 1
74472 0 38547 0
24656 0 51675 0
29231 0 37254 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #23:

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

input:

72865 195389
10303 0 18260 1
31240 1 16493 0
52545 0 39657 1
61912 0 55281 0
70455 0 13770 0
72547 0 9211 0
54432 1 55131 0
65702 0 45945 1
49224 0 63538 0
9720 0 69478 1
10135 0 56923 0
21682 1 20249 1
51405 0 11235 1
48699 1 3755 0
7481 1 50028 1
70529 0 50304 0
24391 0 70902 0
35780 0 48466 1
18897 0 25151 1
41022 0 2775 1
19430 0 37844 0
1664 0 1729 1
44534 1 38062 1
30812 0 15121 1
61327 1 34668 0
54176 1 48124 0
61169 1 23108 1
11176 1 44650 1
23146 0 52719 1
63602 1 64703 1
68620 1 69212 ...

output:

Yes
0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 1 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 ...

result:

ok Good plan

Test #24:

score: 0
Accepted
time: 34ms
memory: 13412kb

input:

78095 158730
58578 0 57469 1
5714 0 53189 1
57385 0 30974 0
38098 1 69975 0
21307 1 47962 0
49682 0 73183 1
56635 0 58692 1
21813 1 33407 0
16212 1 7416 1
16382 1 25827 1
28025 0 53089 0
38678 0 37511 1
16569 1 42247 0
39327 1 68176 1
76322 0 59459 1
73509 1 13329 1
74354 0 25893 1
43616 0 65378 0
32824 0 33637 1
391 1 63446 1
31377 1 64198 1
47203 0 38241 0
7329 0 19147 1
20648 0 5821 0
44469 0 64584 1
7807 1 52175 1
5260 0 6803 0
41130 1 8229 1
60085 0 45024 1
44241 0 45271 1
3775 1 68956 0
34...

output:

Yes
0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 ...

result:

ok Good plan

Test #25:

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

input:

6669 101491
3839 1 4980 1
5457 0 5564 1
646 0 4867 0
2906 1 3901 1
5538 0 2248 0
830 1 5468 0
664 0 5179 0
773 1 4491 0
144 0 1182 0
4548 1 4457 1
5172 0 6111 0
1382 0 5257 1
1664 0 178 1
1317 0 3951 1
3863 0 2957 1
2642 1 6364 1
1266 0 6388 0
2863 1 2794 0
6176 0 6479 1
813 0 1916 1
3223 0 3332 1
4987 0 2975 0
2341 0 1501 1
4404 0 3038 1
5207 1 184 1
4738 0 6373 1
6410 0 2522 1
5592 0 3035 0
751 0 4865 0
4696 0 3926 1
1139 0 5689 1
3762 0 3400 1
522 0 604 1
159 0 5230 0
2117 0 513 1
4791 1 4584...

output:

Yes
0 1 1 1 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 1 1 ...

result:

ok Good plan

Test #26:

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

input:

79117 160549
76671 0 58639 0
15114 0 38236 0
12203 0 4550 0
30820 0 8794 1
42542 1 55557 0
33064 0 59334 0
46109 1 37275 1
26799 0 38587 0
18232 0 60406 1
5976 1 67106 1
37222 0 66335 0
66605 1 32215 0
73859 1 73262 0
77736 1 29993 0
26731 1 58406 1
27614 0 40828 0
24255 1 15310 1
42996 1 16631 1
17239 0 62166 1
20458 1 39587 0
29660 0 76168 0
55426 0 82 1
5006 0 57321 0
8897 0 6031 0
22409 0 27683 1
32195 0 78759 0
19380 0 71929 1
53368 0 36067 1
47851 1 77458 1
33361 1 12069 0
16513 0 51242 1
...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 0 ...

result:

ok Good plan

Test #27:

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

input:

4583 182336
1629 0 3049 0
3068 0 4279 1
2069 0 3463 1
2718 1 2822 1
3975 0 3674 0
1925 0 919 0
369 1 2915 1
2389 0 3049 1
3642 0 4149 1
1062 1 4547 0
2830 0 3611 1
1684 1 160 1
3288 1 1073 1
104 1 2748 1
3972 1 84 0
2872 0 608 0
1195 1 4176 1
2474 1 2273 1
1349 0 2212 0
773 1 3523 1
3900 0 1160 0
2476 0 1475 0
4179 0 2558 1
4014 0 4056 0
4510 0 1194 0
2740 0 2306 0
195 0 3978 1
2124 1 1623 1
314 1 3567 1
2174 1 2304 0
1976 0 4392 0
102 1 80 0
347 0 3463 1
4473 1 472 0
3890 0 1608 0
1118 1 966 1
...

output:

Yes
1 1 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 1 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 1 1 1 0 1 1 0 1 ...

result:

ok Good plan

Test #28:

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

input:

20787 33642
1307 0 3386 0
7784 1 11905 1
3631 1 14408 0
3009 1 4321 1
4826 0 15897 1
18370 1 9539 1
18738 1 18170 0
11396 1 10192 0
1704 1 2467 1
13090 0 15667 1
11415 1 19895 1
19364 1 3988 1
3721 0 16609 1
11448 0 5747 1
16229 1 1989 1
15911 1 15360 1
18766 1 8717 1
1660 1 8907 1
17646 1 2494 0
4003 1 11442 0
1212 1 5641 0
20769 1 523 0
11559 1 19044 0
3480 1 10378 1
12336 1 9785 1
20185 0 6768 0
4874 0 13828 0
1507 0 11486 1
17725 1 15761 1
779 0 12342 0
11835 1 12695 0
12274 1 13775 1
20592 ...

output:

No

result:

ok No Solution

Test #29:

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

input:

13508 105892
7297 1 8141 0
11470 0 3790 0
2640 1 10031 1
384 0 1972 0
5938 1 13272 0
8974 0 11188 0
4039 1 11094 0
4972 1 4169 1
12317 1 13443 0
459 1 7837 0
8576 0 1302 1
9328 0 9815 1
639 1 2566 0
7178 1 6224 1
235 0 4193 0
5498 0 2342 1
6232 0 3533 0
7192 1 12892 0
13346 1 12251 0
11716 0 240 0
5702 1 12980 0
10603 0 3084 0
1275 0 10146 0
2465 1 12304 0
8640 1 2285 1
11486 1 1412 0
6688 0 7368 0
7848 0 6722 0
7609 0 2555 0
8947 1 8042 0
8242 0 2085 1
7311 0 7525 0
8869 0 1225 0
7226 0 8379 1
...

output:

Yes
1 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 1 ...

result:

ok Good plan

Test #30:

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

input:

44208 134113
5489 0 41981 1
40887 0 20887 1
44022 1 26435 0
35915 0 24771 1
38092 0 38538 0
18371 0 16778 1
15399 1 14264 0
16196 1 1847 0
29281 1 12833 1
30462 1 38267 1
40126 0 5914 1
20318 1 31904 1
12838 0 31476 1
32151 1 9805 0
3236 1 26664 0
20927 0 18281 1
38992 1 13975 0
31053 0 20712 0
35102 1 38269 0
14985 1 23918 1
28823 0 14118 1
34714 1 3063 1
14740 1 28180 1
4411 0 13273 1
11628 1 25090 0
13444 0 23038 1
15784 1 3057 0
42365 0 27874 1
21042 1 25510 0
17439 0 35659 1
958 0 11312 1
1...

output:

No

result:

ok No Solution

Test #31:

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

input:

80600 102069
80435 1 63579 1
60602 1 68006 1
28353 1 3150 1
65388 0 62632 1
78321 0 10601 1
4551 0 22676 0
73844 0 67261 1
49736 1 69539 1
48051 0 67136 0
31372 0 12129 1
2462 1 9316 1
27230 0 38737 1
1903 0 60657 1
3778 1 61732 1
8709 1 73852 1
41842 0 25658 1
72247 0 67459 1
76390 1 74942 0
27304 0 18017 1
10540 0 52559 1
13563 0 39494 0
66205 0 12280 1
55438 1 57345 1
64683 1 1774 1
39172 1 54805 0
64059 0 64045 0
21620 1 37611 1
42276 1 45920 0
17247 1 52564 1
39473 1 77815 1
69405 0 66407 1...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #32:

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

input:

30118 140804
18893 0 22293 1
22421 0 4786 0
344 1 27471 0
899 0 10925 1
16592 1 25177 0
12719 1 2757 1
12578 1 3521 1
29040 0 24488 1
10735 0 12440 0
18751 1 19657 0
20879 1 2195 1
25304 0 6860 1
11778 0 25191 0
20674 1 26139 1
2809 1 7735 1
13085 1 20416 1
26298 1 28971 0
2014 1 5182 0
14302 0 10519 1
22090 0 13477 1
15574 0 26495 1
17052 1 19705 1
23114 0 29031 0
27807 0 27733 1
2730 0 2801 1
25094 1 18740 0
6627 0 2185 1
15767 1 10180 0
22528 1 22104 0
15159 1 7587 1
13567 1 10882 1
20332 1 9...

output:

Yes
0 1 0 0 1 1 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 1 1 0 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 1 1 0 0 1 0 1 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 ...

result:

ok Good plan

Test #33:

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

input:

30002 94908
19733 1 5886 1
19426 1 19450 1
27031 0 24759 1
1789 1 20024 0
6029 1 25158 0
9708 1 13886 0
14968 0 16157 0
1321 0 20003 1
12700 0 20996 1
28343 1 11124 0
19068 1 24874 0
7663 1 11638 1
10316 1 19969 0
1546 0 15122 1
25434 1 4531 0
14636 1 23856 1
19313 1 7534 1
5454 0 1194 0
27981 0 13556 0
13535 0 9708 1
16608 0 13189 1
25904 0 15024 1
9083 0 29383 0
2974 1 6055 0
7134 1 20042 1
4924 0 3940 1
22784 0 8686 1
1181 0 8145 0
13128 0 10902 0
5253 0 27718 0
22514 1 3128 0
3520 0 23622 1
...

output:

Yes
0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 0 1 1 0 0 1 0 0 0 0 1 1 ...

result:

ok Good plan

Test #34:

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

input:

76103 81606
59421 0 12253 1
16422 0 58124 1
17034 1 14346 0
5856 0 24302 0
8638 1 31741 0
8332 1 5003 0
65569 0 39000 0
30365 0 18754 1
32223 0 1145 0
52945 0 16017 0
32427 1 13268 0
40823 1 4011 0
38583 0 25097 0
22963 1 73776 1
73174 0 40531 1
29859 1 10556 0
11918 0 19085 0
30173 1 4656 1
26132 1 61860 1
51989 0 68823 1
36973 0 58146 1
47096 1 73019 0
26028 0 11913 0
24936 0 22178 1
51871 0 63974 0
66067 0 37995 0
56911 1 13073 0
16241 0 54273 1
40151 1 8755 1
56063 1 28264 0
48100 1 50509 1
...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #35:

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

input:

7393 14554
4311 0 1821 0
6334 1 1987 1
3363 1 2111 0
1138 1 5270 1
4608 1 6399 0
2402 1 3366 1
2806 0 6976 0
3613 0 3280 1
6563 0 958 0
3582 1 4468 0
5003 0 3175 0
719 0 2609 0
10 1 6024 1
597 1 6138 1
3113 0 5723 0
36 1 3185 0
2990 0 4216 1
6712 0 3748 1
6767 1 6849 1
1326 1 1464 1
1270 1 4813 1
5991 1 1312 0
1668 0 2806 0
4454 0 5401 0
5273 1 612 0
6222 0 1736 0
2814 1 6468 0
1683 1 4490 1
3662 1 1922 0
4302 0 444 1
1119 1 6815 0
2929 0 1194 0
3045 0 3579 1
5581 1 3753 0
1892 0 1725 1
1754 0 7...

output:

Yes
0 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 1 1 ...

result:

ok Good plan

Test #36:

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

input:

31601 145745
30194 0 30053 0
2875 1 31052 0
26179 0 26422 1
19854 0 17602 1
19690 1 16817 0
2380 1 17040 1
28276 0 1859 1
29072 0 9261 1
9948 1 21234 1
2822 1 30726 1
1941 0 7826 0
20287 0 5849 0
7215 0 6624 0
3606 1 20042 1
29593 1 329 0
19515 1 23939 0
6326 1 29090 0
20147 0 16628 0
9849 1 10525 0
21323 0 27175 0
5940 1 4633 0
3447 1 27322 0
9365 0 21264 0
8539 1 4596 0
14471 0 707 0
9550 1 28611 1
18396 0 18118 0
5384 1 8470 0
12216 0 13618 1
30205 0 2513 0
8448 0 23058 0
17579 0 2942 1
16418...

output:

No

result:

ok No Solution

Test #37:

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

input:

40178 41165
24759 0 33929 0
27519 1 25965 0
1696 0 11272 1
20778 1 15942 0
24981 1 33294 0
15942 0 18407 0
12630 1 18355 1
9687 0 23642 0
29203 0 15974 1
1804 1 35469 1
29068 1 28401 0
10415 1 24515 1
17590 1 18354 0
7060 1 36917 0
24674 0 26945 0
2537 1 18661 1
9665 1 15640 1
2301 1 18500 1
26738 1 16402 1
1056 0 28418 0
30118 1 29734 1
30884 0 29462 0
32160 1 7083 0
27621 1 1995 1
3835 1 7206 1
13874 1 22369 1
32647 0 15125 1
20490 0 2535 1
34453 1 4783 1
34671 0 34521 1
229 1 13809 1
5082 1 7...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #38:

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

input:

52589 198829
19071 0 8663 0
43756 1 29603 1
44656 1 30496 0
6787 0 2651 1
45629 1 38929 0
5726 1 24729 0
12284 0 39670 0
44541 0 29970 1
25364 1 9978 1
40033 1 26077 1
10146 0 1417 1
20367 1 37220 0
3764 1 45735 0
40035 0 39170 1
49641 0 35700 0
5073 0 29745 0
7976 1 33334 1
9420 0 35077 1
28426 1 13294 1
1012 1 5811 0
27715 1 19276 0
30493 0 28897 0
34783 1 15180 1
20486 0 30722 1
26138 1 16119 0
17218 0 51819 0
9161 0 1750 0
13332 1 15624 1
13752 1 38163 1
45025 0 30015 0
43886 0 23496 1
41953...

output:

No

result:

ok No Solution

Test #39:

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

input:

36268 138138
20384 0 18841 0
19037 1 28343 0
30565 1 33349 1
28645 0 15850 1
34152 1 3822 1
13180 1 17725 1
35374 1 3105 0
11008 1 15432 0
35235 0 24505 0
32013 1 11178 0
2370 1 33705 1
29254 1 21278 1
34625 0 6055 1
30544 1 9978 1
18913 0 13412 0
26985 0 22514 1
10217 1 21168 1
5582 1 22396 0
16831 0 17981 1
16816 1 35587 0
32227 0 31594 1
8026 1 7937 1
30667 0 26962 0
24876 0 30480 1
31791 1 8474 1
19696 0 31492 1
13621 0 16375 1
14326 1 14507 1
20435 1 23271 1
19426 0 15171 0
1691 1 26614 0
3...

output:

Yes
0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 1 1 1 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 0 ...

result:

ok Good plan

Test #40:

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

input:

8181 120482
747 0 5905 0
5707 1 3718 1
1161 0 3216 0
1681 0 148 0
4613 0 3492 0
5560 1 3653 1
6633 1 6674 1
1221 0 192 1
12 0 5868 1
5819 0 4955 1
4440 1 7748 0
7105 0 4752 1
3961 0 705 0
1749 0 3846 0
7575 0 5533 0
5265 0 2030 1
2680 1 6783 1
178 0 358 1
1687 1 5632 0
1682 0 2765 1
1738 1 163 1
4756 0 6270 0
7084 1 4019 1
6389 1 5377 1
3313 0 5807 1
996 1 6997 0
7220 0 3693 0
5766 0 3284 0
7179 0 4471 0
3594 0 5396 1
2427 1 7814 1
8101 1 3822 1
1504 1 5133 1
7394 0 8089 1
6867 0 3789 0
4818 0 2...

output:

Yes
1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1 1 0 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 1 ...

result:

ok Good plan

Test #41:

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

input:

85678 139928
15513 1 15590 0
19620 1 20574 0
75008 1 70540 1
63129 0 37001 0
4506 1 57988 0
8253 1 66890 1
6754 0 79170 1
83034 0 3911 0
68985 0 44542 1
22035 1 899 0
61436 0 70866 1
55983 0 81178 1
77942 0 71842 1
24456 1 28769 0
23471 1 23759 0
82369 0 66403 0
64799 0 27907 0
5589 1 80335 0
84705 1 24228 0
21946 1 69682 0
13974 0 38839 1
29650 1 50880 1
12074 1 56544 0
57489 1 35793 1
44164 0 3845 1
6036 1 70850 1
17501 0 24954 0
50458 1 13700 0
6327 1 15926 0
32479 0 27325 0
5126 0 77382 0
44...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #42:

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

input:

18449 50773
13536 1 13338 1
8692 0 16168 1
14479 0 7273 0
10576 0 12780 0
10353 1 1336 0
4099 1 16751 1
2598 0 10434 0
7872 0 8235 0
13893 1 7002 1
7115 1 13961 1
16016 1 6023 1
15863 0 5821 0
1926 0 16309 1
6678 1 17770 0
10632 0 10424 0
18390 1 5528 0
15553 1 16168 1
4281 0 1148 1
12443 0 473 0
5256 1 12128 1
8166 0 11161 1
2375 0 1702 1
14827 0 8769 0
3523 0 8143 1
7977 1 7693 1
580 1 4175 1
11054 1 12779 0
1294 1 1669 0
14076 0 15787 0
8086 0 4107 0
13476 1 6106 0
7256 0 4969 1
10881 0 18232...

output:

Yes
1 0 1 1 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 1 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 1 1 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 1 ...

result:

ok Good plan

Test #43:

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

input:

1139 56468
1130 1 929 1
456 0 777 0
900 1 81 0
1115 1 71 0
84 0 122 1
770 0 932 1
792 0 527 1
286 1 929 1
387 1 379 1
501 1 31 0
240 1 339 1
1 1 442 1
459 1 710 1
385 1 680 0
567 1 325 0
91 1 997 0
566 0 1012 0
946 0 96 1
529 0 920 0
1101 0 849 1
389 1 26 0
560 0 793 1
586 1 548 1
1121 1 579 1
858 0 927 0
37 0 203 0
827 1 345 0
353 1 44 0
775 1 968 1
867 1 337 0
1007 1 375 1
1081 1 980 1
1083 0 693 0
422 0 13 1
394 0 464 1
913 0 426 0
798 1 474 1
949 0 852 0
930 0 386 0
468 1 987 0
962 0 881 1
1...

output:

Yes
1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 1 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 0 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 0 0 1 1 0 1 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 0 0 1 ...

result:

ok Good plan

Test #44:

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

input:

20094 192506
10355 0 15680 0
12603 0 2685 1
7936 0 1270 1
14402 0 19415 0
16824 0 9992 1
13384 0 18323 0
3523 1 11847 1
8057 0 13530 0
13404 1 16100 0
19720 1 18987 0
8029 1 217 0
9819 0 9985 1
6587 0 1062 0
3696 0 8931 1
18907 0 4769 0
4481 1 19008 1
12966 0 545 0
16722 0 16564 0
4470 1 7273 1
4027 0 712 0
11536 1 11023 1
3378 0 1514 0
11629 0 12808 1
12829 1 2724 1
16693 1 19414 0
17211 0 14857 0
16620 1 17789 0
1712 0 2539 1
11655 0 9326 1
10444 1 1607 0
4799 0 18098 0
1078 0 14847 0
19804 1 ...

output:

Yes
0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 1 0 1 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 ...

result:

ok Good plan

Test #45:

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

input:

87463 95463
84574 1 18008 0
10895 0 65778 1
10201 1 61246 1
82132 1 18475 1
30721 0 60120 0
57094 0 31775 1
3724 0 43601 1
25655 0 56735 1
81130 1 18241 1
73503 1 25831 0
85940 1 4525 0
14498 1 81215 0
57264 0 72705 0
42207 1 54360 1
38120 1 39914 0
6185 1 35616 0
23391 1 37016 1
1752 1 13381 1
51239 1 47542 0
53300 1 20840 1
80263 1 47680 1
48357 1 83908 0
45826 1 14594 1
86290 1 7911 1
5688 0 65266 0
72080 1 34357 1
64936 1 6484 0
63516 1 30947 0
72863 0 23335 1
23492 1 80136 1
59551 0 67187 1...

output:

No

result:

ok No Solution

Test #46:

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

input:

92808 159730
65725 0 22963 1
16540 1 89432 0
79646 1 68199 0
89942 1 67607 1
47758 1 18304 0
13642 1 40851 1
51471 0 36675 0
25676 1 29727 0
73180 0 82749 0
42141 1 64457 0
82177 1 18144 0
76305 1 47448 0
42407 1 24781 1
70294 1 21850 0
11936 0 75999 1
44598 1 17110 1
2440 0 64342 1
77067 0 63724 1
54985 0 70860 0
77366 1 56223 0
30226 0 30722 1
83068 0 11962 0
48607 1 30518 1
75662 1 37044 0
45277 1 43969 1
90907 0 89428 0
44741 0 36344 0
16378 0 2398 0
76095 1 71830 1
37878 0 53679 1
92452 0 7...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #47:

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

input:

23274 162707
13954 0 6065 0
20344 1 2651 0
11625 0 6167 0
3990 0 15979 0
21611 0 9058 0
3460 1 17249 0
21 1 10607 1
15299 1 9179 0
1106 1 18807 0
20097 0 12413 0
15213 0 5811 0
1614 0 7237 1
5817 0 5299 0
18373 1 7913 0
353 1 13055 1
5333 0 21170 0
15046 1 20759 1
22845 1 19563 1
23225 1 20534 0
6862 1 4424 1
89 1 9765 1
19823 0 10153 1
15374 1 7489 0
13882 1 14551 1
14852 1 282 1
47 0 100 1
12760 0 18321 0
22659 1 419 0
6396 0 12096 1
19521 0 2617 0
2367 1 21307 1
19250 1 21826 0
11276 0 22839 ...

output:

Yes
1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 0 1 0 0 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 1 1 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 0 1 1 0 ...

result:

ok Good plan

Test #48:

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

input:

4511 37072
748 1 3509 0
1320 1 1193 1
320 1 3753 1
1957 0 1569 1
1552 1 2710 0
3213 0 1923 0
1255 0 4339 1
1238 0 2300 1
3759 1 3539 1
2636 0 85 0
923 0 2221 0
3284 0 2845 1
588 0 3927 0
99 0 4318 0
1709 0 1315 1
4250 0 2182 1
113 1 1802 0
2970 1 1116 1
570 1 3332 1
1394 0 944 1
2124 1 1623 0
1437 1 3544 0
1 1 3012 1
2843 0 4005 1
297 1 2512 1
2904 1 2602 0
1222 0 625 0
88 0 2894 0
1356 1 1406 0
3989 1 1263 1
2083 0 2011 0
3646 1 376 1
291 1 1391 1
2745 1 2232 0
2648 1 2611 0
1583 0 365 1
1843 1...

output:

Yes
1 1 0 0 1 0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 1 0 1 0 1 1 1 1 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 1 1 0 0 1 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 1 1 0 0 1 0 1 1 0 0 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 1 1 ...

result:

ok Good plan

Test #49:

score: 0
Accepted
time: 43ms
memory: 13848kb

input:

96406 180377
27230 0 4538 1
36090 0 39988 0
18838 1 71103 1
59232 1 63895 1
71126 1 58462 1
72143 1 95585 0
17893 1 68584 0
6546 1 79447 0
56606 1 18804 0
47950 1 17089 1
53890 0 32984 0
52932 1 46420 1
35540 0 92626 0
89680 1 35604 1
42720 0 54314 1
40688 1 1840 1
46978 0 4794 0
53345 0 7107 1
64175 0 64334 0
62850 0 83110 1
52425 1 12006 0
57254 1 94133 1
16684 0 70917 0
96083 1 52022 1
45530 1 26743 1
89049 0 47897 0
84333 0 31632 1
25463 1 2643 1
72822 0 89247 1
54961 0 38026 1
90175 1 16015...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #50:

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

input:

78195 156821
3595 1 33128 0
19821 1 62562 1
10552 1 41677 0
72207 0 19189 0
77390 1 37089 1
41124 1 2519 0
34606 0 34476 0
67375 0 16008 0
54444 1 38157 0
77195 0 48799 0
65132 1 62647 1
17124 0 63543 0
53078 1 39009 1
22330 1 38923 0
17244 0 48872 1
48909 0 34111 0
33760 1 5679 1
13670 1 35457 1
75747 1 23472 1
28726 1 62762 0
10815 1 18423 0
68735 0 22034 1
36263 1 26463 1
62524 1 68982 0
7964 1 59769 0
48972 1 10417 1
42295 1 9224 0
54946 1 38765 1
36173 0 65446 1
38930 1 68508 1
30168 0 9106...

output:

Yes
0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 0 0 1 ...

result:

ok Good plan

Test #51:

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

input:

30806 188299
4280 0 4004 1
16896 0 7090 0
1440 1 26898 1
5710 1 30060 1
21452 1 11394 0
6077 0 24238 0
7549 0 28939 0
3814 1 4582 1
8208 1 6832 0
5676 1 19180 1
29737 0 21904 0
18731 0 16457 1
28407 1 23968 0
16804 1 23960 1
23344 1 15485 1
20513 1 3703 1
25759 1 16916 1
13684 1 8818 1
18032 1 8723 0
27274 1 10751 1
783 1 208 1
13995 1 27489 0
21134 0 2131 1
16100 1 15824 1
5351 1 24858 0
8898 0 6774 1
18125 1 16173 0
6967 1 11353 1
1645 0 10319 0
20024 0 9282 1
2702 1 19046 1
13129 1 27896 0
24...

output:

Yes
1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 1 1 1 1 0 1 1 1 1 0 1 0 0 0 1 1 1 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 ...

result:

ok Good plan

Test #52:

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

input:

15195 110914
10431 1 9221 0
2600 0 5703 1
9313 1 15032 0
11116 1 13630 0
14094 1 1973 1
4048 1 14855 1
2202 0 9550 1
8838 0 11173 1
3821 1 11473 0
7316 0 768 1
1483 0 12148 0
11326 1 7106 1
3063 0 3409 0
6055 0 10113 1
6845 0 3051 1
12438 1 2641 1
9251 0 3944 1
2358 1 5073 0
10163 1 3502 0
8607 0 4528 0
1193 0 8964 0
14963 0 7955 1
3486 0 10667 1
1206 1 7074 0
6897 0 7209 1
7515 0 7417 0
13063 0 10984 1
4245 0 4412 1
12555 1 4048 1
7374 1 654 1
8955 0 7716 0
865 0 11523 1
5464 0 15041 0
12203 1 ...

output:

Yes
1 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 0 0 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 ...

result:

ok Good plan

Test #53:

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

input:

62417 175377
24538 0 30372 1
42383 1 4800 0
32771 1 11254 0
40480 1 31256 0
45037 1 29177 0
9589 0 31885 0
28662 1 18307 1
22165 1 56918 1
48768 1 49202 0
23741 1 35450 1
49742 1 739 0
28283 1 14300 1
49820 1 12739 1
51121 1 23368 0
5559 1 19594 0
11653 0 49513 1
20334 0 33198 1
8234 1 47015 0
36860 0 19804 0
14705 1 21064 1
41990 0 51655 1
7738 1 9414 1
59060 1 43191 1
2324 0 34426 0
24557 0 21467 1
6327 0 11864 0
4889 0 32025 0
1717 0 15962 0
12451 1 19716 0
42170 1 16730 1
32776 0 51329 1
106...

output:

Yes
0 0 0 0 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 0 0 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 0 1 0 0 0 1 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 1 1 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 1 0 1 1 1 0 0 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 ...

result:

ok Good plan

Test #54:

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

input:

21437 109983
308 1 3588 0
11804 0 1929 0
8461 0 10600 1
9752 1 6027 1
9145 1 4063 1
12852 0 6606 0
12783 1 19362 1
18364 1 4416 1
7540 0 4574 0
3219 0 1155 1
20666 0 20488 0
12376 1 5014 1
19681 0 3302 0
3687 1 2136 1
3276 0 14239 1
9443 1 11632 0
16764 0 5449 0
1934 1 1030 1
17235 0 13320 0
7134 0 6352 1
10027 1 8794 0
5338 0 6322 0
15863 0 5174 0
11149 0 20638 1
1707 1 7771 0
15123 0 15197 1
13092 0 12803 0
1178 0 10286 0
293 0 6907 0
4875 1 10183 0
5013 1 17249 1
5967 1 6309 1
19074 1 18998 0...

output:

Yes
0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 0 1 0 ...

result:

ok Good plan

Test #55:

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

input:

5039 111371
4761 1 4717 1
4248 0 143 1
2340 1 3687 0
1983 0 577 1
4462 0 1576 0
1262 1 4037 1
1735 1 4319 1
2075 1 2785 0
4921 0 2631 1
4952 0 1767 1
2912 0 4854 1
3702 0 3480 0
3685 1 3987 0
787 1 1141 0
3715 1 201 0
2704 0 1575 1
1945 1 3437 0
2678 0 656 0
3118 0 4626 0
2113 1 3374 0
1642 1 638 1
231 0 4170 1
1792 1 3291 1
2629 1 717 0
3968 0 4956 0
1981 0 216 1
2582 0 3240 1
2728 0 4793 0
2636 0 18 1
3507 1 4752 1
5039 0 478 1
3312 0 1560 1
810 0 3489 1
912 0 485 0
300 0 4964 1
1179 1 467 0
1...

output:

Yes
1 1 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 0 ...

result:

ok Good plan

Test #56:

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

input:

82828 166416
22105 0 57362 1
52597 1 40693 0
64470 1 45770 1
74484 0 58869 0
4169 0 9294 1
80527 1 27549 0
68865 1 25235 0
25761 0 40063 1
45202 1 78713 1
39033 0 66026 1
23285 0 31054 0
82192 0 32613 0
35088 0 1781 0
42413 0 31568 0
61274 1 33236 0
26577 0 51662 1
63323 1 14191 1
9545 0 31117 1
22501 0 70938 0
37095 1 46979 1
38373 1 47826 1
58378 0 35391 0
25308 1 47779 1
35917 0 50519 0
4219 0 5894 1
39705 1 45989 0
23683 1 5921 1
26945 1 16621 1
46028 1 32235 1
68642 1 77919 0
30215 1 58624 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 ...

result:

ok Good plan

Test #57:

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

input:

83463 108481
31251 0 47012 0
17181 0 27603 1
71381 0 9172 0
62146 1 47422 0
23189 1 12640 1
55771 0 25594 0
33892 0 33169 1
75746 0 24383 1
9493 1 33895 0
76665 0 14373 0
62862 1 39942 1
26964 1 32095 1
66262 0 40368 0
14809 1 67569 0
27318 1 19823 1
26656 0 21703 1
46989 0 51983 0
26051 0 15072 1
29932 1 11194 0
16319 0 47557 0
2144 1 46717 1
22363 0 41964 0
73999 1 81230 1
55895 0 60909 0
68993 0 10925 0
73019 0 70694 0
11817 0 66518 0
12696 1 61663 0
35918 1 1675 1
49168 1 81743 1
32714 0 778...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #58:

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

input:

42415 157947
36441 0 18268 1
25783 1 30885 0
16733 1 6976 0
33282 0 29584 1
35817 1 37891 0
25835 1 20102 1
29595 0 32405 1
7413 0 39919 0
2213 1 36199 0
21680 1 29660 0
7706 1 25028 0
11789 0 32331 0
33698 1 26252 0
15021 0 29443 1
29823 0 14226 0
25317 0 24061 1
8204 1 17527 0
22392 0 15943 0
23826 0 10280 0
40942 1 27452 0
19278 1 5082 0
32992 1 22142 0
27996 0 38208 0
40664 0 12515 1
21459 0 11410 1
13507 1 36918 1
27589 0 21657 0
24886 1 18497 1
37495 0 28767 1
28784 0 1076 0
12874 0 23166 ...

output:

Yes
0 0 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 0 0 1 0 1 1 0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 ...

result:

ok Good plan

Test #59:

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

input:

53093 176555
33711 1 35024 0
36874 0 20193 1
30063 1 3689 1
23699 1 904 1
8763 0 47755 1
35600 1 31897 1
47461 0 9483 1
27959 1 7791 1
23953 1 16046 1
39763 0 46716 1
50365 1 8169 1
34960 1 16907 1
15957 0 49286 1
22060 1 3152 0
31779 1 26243 0
15804 1 39669 0
22877 1 32433 0
20173 1 39906 0
23033 0 7481 1
1047 0 29875 1
3817 1 354 0
35488 0 40476 0
30038 1 17738 0
14983 0 21160 1
9747 0 49 0
39117 1 38253 0
28397 0 33139 0
32688 1 18922 0
27879 1 4370 1
1298 0 4094 0
40200 0 42873 1
13668 0 168...

output:

Yes
1 0 0 0 1 1 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 0 1 0 0 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 1 0 0 1 0 1 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 1 1 0 1 0 0 0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 0 0 0 ...

result:

ok Good plan

Test #60:

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

input:

49021 172689
41061 1 7738 0
5342 1 17906 1
32506 0 30320 0
8825 1 3322 1
45344 0 36204 1
15097 1 41221 1
14162 0 5471 0
2130 0 10276 1
11707 0 18303 0
23925 1 36370 1
2593 1 25635 1
42935 1 13071 0
17109 0 36113 0
48178 0 1780 1
8604 1 37608 0
42606 0 34269 1
1161 0 32826 0
24082 1 1787 0
15270 1 21470 0
44113 0 11451 0
18907 0 44021 1
20622 1 48015 0
32627 0 21531 1
45330 1 8224 0
20604 0 14529 1
14240 0 35973 0
12210 1 40843 1
31502 0 5377 1
21062 0 48260 0
15073 1 11571 1
16333 1 45530 0
3193...

output:

Yes
0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 1 0 1 1 1 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 0 1 0 0 1 1 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 1 0 0 0 1 0 1 ...

result:

ok Good plan

Test #61:

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

input:

28940 65636
5787 0 21497 0
15112 1 8152 0
24975 1 23699 1
19191 1 7143 0
9184 0 25262 0
17157 1 10033 1
21678 1 26368 1
25016 1 11614 1
15194 0 13462 0
18297 1 4677 0
13366 1 28491 1
19857 0 4616 1
17636 0 6244 1
20892 1 15419 1
25665 1 27546 0
1655 0 8688 1
17836 0 11021 1
14468 1 23801 1
14819 0 7534 0
12188 1 15395 0
26886 1 25461 1
19856 0 270 0
16787 0 15315 0
18108 1 21283 1
5213 0 2550 0
19123 1 6881 1
7210 0 8386 1
3998 0 19468 1
25171 0 1704 0
28320 1 15032 0
13762 0 15156 0
14733 0 222...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1 0 0 1 0 1 ...

result:

ok Good plan

Test #62:

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

input:

95302 121087
72472 1 91587 1
68038 1 30414 1
11846 1 14781 0
68638 1 14192 1
17711 1 52825 0
67216 0 49935 1
86682 0 35515 0
79997 0 47866 1
87550 0 2504 1
69613 1 11824 1
23555 1 36149 1
77998 1 42502 0
1962 1 11062 0
54350 0 26933 1
43433 0 89496 1
43877 1 34663 1
53381 0 25639 1
66219 0 78835 0
37661 0 31737 0
4914 1 20007 1
35168 1 85990 1
26732 0 60633 1
18242 1 75701 1
37266 0 4930 0
69282 1 53192 1
24885 0 47521 0
59535 0 65246 0
53846 0 48371 1
83608 1 84819 0
1601 1 88986 1
54323 0 9003...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #63:

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

input:

88564 127971
34287 1 35603 1
25508 1 20121 1
72344 1 85840 1
82651 1 35204 0
74926 1 37961 1
11824 0 24233 0
87196 1 64770 1
41247 0 38887 0
13841 0 50291 0
19841 0 6594 0
81748 1 83043 0
1133 0 65066 0
61767 0 40275 1
11008 1 1513 1
69437 0 52622 0
3416 1 20710 0
51502 0 66040 1
61345 1 25264 0
73014 1 23426 0
46945 0 21794 1
983 1 6843 0
1535 1 51840 1
66722 0 31007 1
51726 1 66327 1
20808 0 40361 1
78657 0 19796 1
14851 0 10003 1
29548 1 63314 1
7395 1 35574 1
59874 0 67115 0
53619 1 50652 0
...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #64:

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

input:

49269 149515
6998 0 48435 0
13905 1 48123 0
18971 1 37556 0
26212 0 30207 0
38360 1 43670 1
25251 0 13362 0
9342 1 16951 0
35512 0 45131 1
37108 0 5448 1
4857 1 40638 0
16088 1 46677 0
20986 0 11 1
30329 1 17140 0
24234 0 16914 1
11193 0 27320 1
42758 0 40997 0
9143 0 14496 0
7625 0 34823 1
40235 0 47509 1
33982 1 18853 0
48743 1 37640 0
20095 0 1901 1
35811 0 37835 1
3461 1 21332 0
8589 0 45307 1
32612 1 667 0
15492 1 7322 1
15965 1 17894 0
12700 0 14321 0
34638 0 37135 0
24432 0 5139 1
31068 1...

output:

Yes
0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 1 0 0 0 0 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 1 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 ...

result:

ok Good plan

Test #65:

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

input:

19363 163883
15826 1 8384 1
18417 0 15010 0
10158 1 5477 1
2476 0 10116 1
12514 1 6998 0
5132 0 8432 0
10503 1 2501 0
4230 0 2850 1
6861 1 5044 1
1135 1 18079 0
16107 0 13073 0
14182 0 3383 1
11362 1 11434 1
16019 0 15553 0
15896 1 7010 0
6780 1 11039 1
4972 1 4347 1
10228 0 1757 0
7475 1 14557 0
3730 0 7811 1
10666 0 17136 1
7887 1 19163 0
6261 0 9224 1
1364 0 4666 1
17895 1 2142 0
1961 1 12784 1
11643 1 13907 0
6895 1 16579 0
9545 1 16923 0
413 0 14964 1
15931 0 14436 0
1311 0 3250 1
3069 1 18...

output:

Yes
1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 ...

result:

ok Good plan

Test #66:

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

input:

891 117549
708 0 205 0
717 1 845 1
765 0 423 0
877 1 772 1
552 0 305 0
620 0 518 0
340 0 2 0
341 1 132 1
678 0 80 1
416 1 203 1
777 1 652 1
556 0 163 0
54 0 735 1
99 0 35 1
82 0 101 0
598 0 205 1
613 0 354 0
665 1 49 1
612 0 85 1
760 1 23 0
210 0 212 1
739 0 31 1
720 0 463 1
398 0 322 0
509 1 543 0
99 0 62 0
837 0 622 1
20 0 16 0
869 0 707 1
649 1 467 1
497 1 821 0
231 1 578 0
141 0 46 0
769 0 345 1
522 1 743 1
391 0 191 1
427 0 290 1
784 0 336 0
419 0 339 1
526 0 328 1
498 0 112 0
412 0 481 0
7...

output:

Yes
0 0 1 1 1 1 1 1 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 0 1 ...

result:

ok Good plan

Test #67:

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

input:

66156 152568
52666 0 33572 0
28312 1 64670 0
28392 1 18794 1
16973 1 57395 0
19954 1 59319 1
62847 1 357 1
30349 1 54189 1
7103 0 11603 0
39904 1 54263 1
65113 1 45204 0
60638 0 37277 1
33146 1 51294 0
39988 1 16714 1
5354 1 37866 1
56312 0 59976 0
24762 0 34307 0
65135 1 54903 1
11667 1 33955 0
43845 0 35629 1
17454 0 34725 0
55434 0 41266 0
36584 1 6181 1
5558 0 56142 0
4363 0 24580 0
51792 1 32751 1
43281 0 39586 0
61057 0 33907 1
24591 1 48078 1
64291 1 39107 0
10965 0 34261 0
61370 1 21853 ...

output:

Yes
0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 ...

result:

ok Good plan

Test #68:

score: 0
Accepted
time: 39ms
memory: 15356kb

input:

68728 195190
6828 0 12301 0
50766 0 5232 1
12101 1 30836 0
21788 0 21806 0
52766 0 18415 0
18458 0 13835 1
40353 1 62859 0
32138 1 36999 0
24875 1 12344 0
49640 1 45987 1
48992 0 64556 1
8181 0 8743 1
14083 0 34821 1
17385 1 26483 1
10459 1 67224 1
37916 1 42323 1
6468 0 65257 1
19748 0 43099 1
11133 1 1635 1
18795 1 31630 1
2409 0 28135 0
60269 1 17529 1
36412 0 32319 0
58839 1 32647 0
27124 0 25341 1
16388 1 55549 0
56392 1 3981 0
50725 0 19781 0
44602 0 61194 1
13794 0 58705 0
6965 0 63329 0
...

output:

Yes
0 0 1 1 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 0 1 1 0 1 1 1 1 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 ...

result:

ok Good plan

Test #69:

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

input:

34373 133385
12386 0 119 0
16962 1 29694 0
12672 1 388 0
19204 1 23160 0
1145 0 4962 1
6838 0 14850 0
10446 1 2108 1
8351 0 9382 1
22589 1 22638 1
28124 1 13274 1
24508 1 31570 1
10127 1 29550 1
17500 0 5315 0
19956 1 31072 1
1520 0 12229 0
24389 1 17567 1
10379 1 6604 0
17306 0 2044 1
33372 1 24938 0
3702 1 19444 1
13985 1 1416 1
33575 1 33454 0
29332 1 27003 1
2603 0 1111 1
31083 1 28709 1
24716 1 3190 0
8264 1 26983 0
30498 0 4389 0
14120 0 14236 0
33895 1 7275 1
7099 1 31063 1
7394 0 32659 0...

output:

No

result:

ok No Solution

Test #70:

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

input:

52214 73004
28841 1 31569 0
38098 1 25018 0
33553 0 38618 0
29112 1 7074 1
34996 1 2560 0
35114 1 2813 1
45949 0 12798 0
19348 1 39784 1
32732 0 30498 1
9584 1 21279 1
44821 1 51526 1
46759 0 45990 1
36080 1 2691 1
44377 1 43113 0
43879 1 3155 0
29259 1 25770 1
50530 1 32047 1
39569 1 353 1
40677 1 10 1
9001 1 948 0
7088 0 9365 1
51815 1 31369 0
10141 0 13399 0
19599 0 50801 0
43994 1 26545 0
31211 0 39435 1
48201 0 45523 0
46807 1 875 1
21213 1 16833 0
9187 1 25194 0
31204 1 12999 0
21969 1 489...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #71:

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

input:

36740 140203
24690 0 276 0
1793 0 25077 0
1546 0 25489 1
26096 0 28720 0
28740 0 36089 0
792 0 34541 1
18864 1 35806 1
9906 1 8913 0
33327 1 31156 0
17384 0 9376 1
202 1 10621 1
14125 0 23116 1
35371 1 32189 0
31670 0 12629 0
18261 0 6597 1
548 1 5669 0
12344 1 12147 1
3035 0 11482 1
6918 0 21690 1
21416 1 18048 0
21304 0 25932 0
21556 1 11577 1
9208 1 26610 0
25749 0 33856 0
20440 1 6171 0
30222 1 17347 1
6986 0 25905 0
15337 1 11489 1
18350 1 34498 1
29913 0 17300 1
13528 1 33764 0
35737 1 179...

output:

Yes
0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 1 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 ...

result:

ok Good plan

Test #72:

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

input:

17049 188278
16605 0 2014 1
6273 1 11271 1
12918 1 14091 0
15743 1 8842 1
1609 0 299 0
15138 1 7193 1
12940 1 15720 0
5005 1 16512 0
5746 0 4416 1
15252 0 15201 0
128 0 7670 1
10547 0 6577 0
2359 0 15515 0
16327 1 9708 1
14325 1 5036 1
16951 0 1280 0
10385 1 11375 0
8606 1 8066 1
15896 1 6230 0
16677 0 14635 0
1900 0 13495 1
8366 0 2316 0
9756 0 10449 1
11941 1 7511 0
3874 1 10517 1
13284 0 487 0
4866 1 2315 1
13025 0 3540 1
15790 1 7892 0
420 1 201 1
11045 1 5942 0
7270 1 14032 1
8061 0 568 1
4...

output:

Yes
1 0 1 0 0 0 0 0 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 0 1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 ...

result:

ok Good plan

Test #73:

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

input:

75754 85401
13508 0 63461 0
72192 0 43042 0
4120 1 45645 0
7110 0 18423 0
66857 0 6700 1
28975 1 68656 1
3533 0 66779 0
21120 1 40852 0
66382 0 45096 1
29492 1 36069 1
60979 1 21474 0
45354 0 46462 1
68322 1 13798 0
55160 0 15697 1
26393 0 55995 0
39190 1 51230 1
9582 0 6369 0
69268 0 44308 0
22071 1 21512 1
74652 1 7535 0
22332 1 9742 1
25965 1 75203 0
37093 1 13158 0
18248 1 4870 0
21536 0 48819 0
34487 0 72416 0
48936 0 59342 1
55713 1 36258 0
33003 1 39977 1
14463 0 41503 0
33873 1 37071 0
5...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ...

result:

ok Good plan

Test #74:

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

input:

61186 112133
54586 1 20482 1
39863 1 48329 0
31992 0 1585 0
37396 0 59682 0
1283 0 24938 1
37566 1 1619 0
11054 1 16329 0
21744 0 52784 1
17164 1 8628 1
39763 0 6956 0
53167 1 13269 0
58721 1 52920 1
54525 0 23624 1
313 1 15114 0
50823 1 48716 0
1093 1 50054 0
5286 1 14549 0
31913 0 44782 1
23172 1 5378 0
35784 1 21609 0
37386 1 26492 0
47016 1 53449 1
50671 0 21515 0
9520 1 59163 1
40938 0 2538 1
41467 1 60561 0
25135 0 46857 0
52900 0 42035 1
18846 1 19998 1
33994 1 10558 1
23449 1 19135 1
522...

output:

No

result:

ok No Solution

Test #75:

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

input:

74688 166273
47704 1 34232 0
15272 1 69222 0
46938 0 47443 1
14768 1 46738 0
40701 0 46157 0
47251 1 44590 1
37977 1 40003 1
29365 0 22589 1
10631 0 72260 1
5510 0 36246 0
73054 1 23148 1
72780 0 9382 1
14481 1 15119 1
37623 0 69736 1
39038 0 60180 0
28224 1 69271 0
15755 0 39657 1
52072 1 60142 1
4266 0 45668 0
29750 1 30737 0
28745 1 67009 0
42442 1 15311 0
20036 0 24866 1
51615 1 32248 0
6669 0 59839 0
59689 1 1431 1
63645 0 6665 0
11114 1 29510 0
14208 0 15888 1
58333 0 18737 1
53604 0 9918 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1 0 0 1 0 1 1 1 1 0 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 1 ...

result:

ok Good plan

Test #76:

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

input:

39846 79325
34184 0 6193 1
27928 0 7540 0
38506 1 24540 1
10619 0 1805 1
904 0 18586 0
38622 0 19438 0
18662 1 29924 0
5183 0 31058 1
17809 0 25253 0
520 1 19721 0
25253 0 12341 1
16551 1 12378 0
23917 0 15147 1
28925 1 36491 0
18936 0 23914 1
10930 1 26351 0
27997 0 14432 0
14654 1 22445 1
3620 0 32249 0
31091 1 20256 1
22962 0 9508 1
20011 1 26507 1
28464 1 9142 0
8551 1 25801 0
24819 1 19052 0
16376 1 7162 0
7376 0 33066 0
13578 1 17168 1
4901 1 11161 0
35883 1 15448 1
17331 1 1770 1
25305 0 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 ...

result:

ok Good plan

Test #77:

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

input:

1133 150671
658 0 660 1
890 1 526 1
675 1 241 1
839 0 919 0
837 1 1079 0
62 1 542 0
554 0 1111 1
528 1 267 0
718 0 976 1
1061 0 1097 0
25 1 1110 1
781 1 928 1
844 1 641 0
128 0 632 1
183 1 1021 0
799 0 776 0
730 0 338 0
940 0 213 1
584 0 776 0
241 0 758 1
668 1 491 1
427 1 725 1
1083 1 130 1
487 1 851 1
457 0 70 0
810 0 203 1
852 0 507 1
577 0 496 1
16 1 370 0
444 1 965 1
664 0 1051 0
173 1 748 0
519 0 840 0
155 1 572 1
780 1 352 0
67 1 340 1
340 0 1085 0
269 1 257 1
859 0 357 1
411 1 567 1
312 ...

output:

Yes
0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 ...

result:

ok Good plan

Test #78:

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

input:

79016 123529
9920 1 70060 1
30312 0 63752 1
22684 0 60626 1
418 0 60919 1
5041 0 71642 0
51596 0 36471 1
44739 0 37626 0
60896 0 74262 1
73408 0 24889 0
59923 1 26275 0
24205 0 4456 0
4943 0 67837 1
78059 1 78994 0
12320 1 27848 0
61630 0 72188 1
29372 0 19941 0
7684 0 60161 0
33486 0 2038 1
16850 1 43836 1
32730 0 46187 0
26527 0 15615 1
58913 1 33304 0
12024 0 20267 1
62449 1 6660 0
62889 0 11176 1
7511 0 45626 1
22129 0 5203 1
74681 0 65797 0
31352 1 68630 1
30014 0 20372 1
52088 0 26131 1
59...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #79:

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

input:

53504 123462
1627 0 36575 1
53039 0 22402 0
40107 1 21330 0
34268 0 47903 1
14338 0 38995 0
3380 1 35974 0
38380 0 41597 0
45226 1 38319 1
12471 1 32260 0
9482 1 5249 1
49817 0 12873 0
15797 0 10715 0
14174 0 52438 1
47846 0 24517 1
24240 1 30305 1
873 1 15260 1
20336 1 7102 0
43315 0 12476 0
26554 0 15460 0
30540 0 53297 0
47254 0 8957 1
11644 0 48493 1
48021 0 8026 1
47587 1 50411 1
37781 1 21613 1
15913 1 7505 1
44895 0 52765 0
34252 0 10148 1
31328 1 560 1
30255 1 26383 0
45499 1 50385 1
485...

output:

Yes
0 1 1 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 0 1 0 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 0 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 ...

result:

ok Good plan

Test #80:

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

input:

22876 35375
6693 0 13071 0
973 0 22291 0
22745 0 6067 1
8466 0 15234 1
15898 0 3032 0
10757 1 11375 1
2675 0 21690 0
4372 0 8826 0
11948 0 2126 1
14285 1 21549 1
15539 0 4900 0
7480 0 9489 1
1644 0 3643 1
11927 0 2079 1
877 0 752 1
5090 0 7380 1
16356 0 10077 1
19833 0 7908 0
22695 0 4423 0
22651 0 870 0
10110 1 17145 1
698 1 15513 1
13854 0 2019 0
21366 0 16413 1
15421 0 12318 1
12776 1 1244 1
21568 0 8791 0
16611 0 6288 1
15785 0 6221 1
4237 0 8722 0
20549 0 1225 0
12422 0 20559 0
13535 0 1471...

output:

No

result:

ok No Solution

Test #81:

score: 0
Accepted
time: 42ms
memory: 11316kb

input:

56348 187659
25980 1 51406 1
14721 1 51747 1
24000 1 8880 1
46587 0 20060 1
45300 0 30244 1
42126 0 29281 1
44503 1 38309 1
51481 1 32894 1
3373 1 21558 1
10730 1 39385 0
39221 0 10319 0
26357 1 5610 0
29236 0 36536 1
12930 0 46836 1
53149 1 25749 1
51112 1 55424 1
10945 0 28446 0
40296 0 47817 0
52543 0 27379 0
1211 0 13706 1
34434 1 38165 1
42594 0 17689 0
25404 0 29160 1
4194 1 24909 1
12852 1 19915 0
6207 0 41854 0
39422 1 53577 1
49742 1 41524 1
34779 0 43298 0
207 0 50995 0
28796 1 37083 1...

output:

Yes
1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 ...

result:

ok Good plan

Test #82:

score: 0
Accepted
time: 31ms
memory: 15128kb

input:

82658 177431
35069 1 18782 1
29199 0 57362 1
77638 0 42144 1
80778 0 28693 1
5854 1 40586 1
22257 0 82299 0
79044 0 12190 0
29478 1 46473 0
78226 1 65765 1
29024 0 64251 0
11905 1 12460 1
62184 1 52131 0
12636 1 33691 1
34381 0 16853 0
16704 0 8779 0
17112 1 26483 0
6117 1 77483 1
1864 1 44830 1
72955 1 64507 0
73682 0 70089 0
71896 0 1334 0
12716 0 51970 0
59946 0 37903 0
76041 1 45485 1
51391 1 35916 0
9573 0 1602 1
49522 0 19675 0
66389 1 50277 0
21682 0 31176 0
47667 1 43469 0
67732 1 73535 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 1 1 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 ...

result:

ok Good plan

Test #83:

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

input:

80517 168891
66040 1 767 1
27426 0 1933 0
31401 1 12210 1
15428 1 37258 1
49955 0 62385 1
42772 0 76835 0
37570 1 68081 0
54490 1 62303 0
80463 1 10707 1
35495 0 12611 0
53531 0 77241 1
21673 1 65734 1
65620 1 8270 1
65648 1 16010 0
27530 0 41284 0
8175 0 79574 0
43333 0 2809 1
46084 0 66386 1
23360 0 75311 1
74273 0 57144 0
58453 0 34317 0
72766 0 58848 0
3531 1 79622 0
78371 0 30053 0
4425 1 78980 0
79718 0 11001 1
2042 0 23919 0
38555 0 78560 0
4946 0 69836 1
62538 1 54322 0
11071 0 64435 0
4...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 0 1 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 0 1 1 1 1 0 0 0 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 ...

result:

ok Good plan

Test #84:

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

input:

71206 117891
54656 1 2535 1
43244 0 48736 1
66877 0 41268 1
31539 1 39967 0
1625 1 34347 0
6694 1 38780 1
59259 0 54219 1
33091 0 4290 0
22581 1 10693 0
14752 0 47227 0
23982 0 20808 0
12284 0 39304 1
47097 1 37279 1
22742 1 26324 0
42978 0 29378 1
575 0 50743 0
64068 0 3144 0
8344 0 50804 0
47946 0 30716 0
8610 1 52923 1
3471 0 40745 0
54020 0 36196 1
19213 0 11970 1
61020 1 63758 1
70447 0 15469 1
40814 1 5454 0
44892 1 44452 1
14713 0 45871 0
56208 0 21802 1
28829 1 56762 0
69536 1 19560 1
13...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #85:

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

input:

63200 163055
33761 1 13288 1
44275 1 23333 0
50410 1 15739 1
43832 1 58188 1
922 1 51074 0
14611 1 47964 1
5380 1 2933 0
15374 1 11264 1
17534 1 27654 0
34009 1 27103 1
43691 0 4076 1
27674 0 60637 1
29154 1 60490 0
31631 0 26899 1
7597 0 42704 0
39225 0 298 0
22249 1 42962 1
56220 1 13038 1
50567 1 61304 1
28310 1 12591 0
33394 1 36676 1
34189 1 44992 1
15439 0 44439 1
20104 0 301 0
10938 0 224 1
49124 1 6938 1
59743 0 37909 1
43312 0 4678 0
12550 0 32332 1
21655 1 53320 0
11124 1 5389 1
55511 ...

output:

Yes
0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 1 0 1 1 0 0 1 0 0 0 1 0 0 0 0 1 1 0 1 1 1 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 ...

result:

ok Good plan

Test #86:

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

input:

67914 176564
19648 0 6912 0
45035 1 28996 0
16155 0 59421 1
9481 1 54356 0
31780 0 62180 1
34716 0 49428 1
16782 0 14634 1
55490 1 12737 1
9450 0 356 0
63283 1 3347 1
22907 0 27019 1
34260 1 50638 1
51978 1 29380 0
12212 1 35667 0
17463 1 48849 1
51768 0 65603 1
52250 0 16068 0
61856 1 58930 0
6877 0 4682 1
35305 1 11419 1
32672 0 14601 0
2301 0 54559 0
39881 1 47122 0
37618 1 48376 0
13308 1 11012 1
31504 1 9312 0
60707 0 53979 0
4701 1 16013 1
65758 1 62559 0
20469 1 24851 1
2050 0 5337 0
2742...

output:

Yes
1 1 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 0 0 0 0 1 0 0 1 0 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 1 0 ...

result:

ok Good plan

Test #87:

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

input:

17682 84512
15315 0 364 1
2300 1 11450 1
7163 1 9309 0
9501 0 15052 0
8580 0 7449 1
16270 0 12762 1
8053 0 10095 1
2067 0 16423 1
13066 0 6233 1
4653 0 1927 0
5499 1 8444 1
328 1 537 1
10828 0 7080 0
4679 0 17082 0
10416 0 13725 0
8935 0 10966 0
3517 0 12343 1
9839 1 15494 0
12033 1 2493 1
17155 1 14457 0
10147 0 1332 1
4154 1 13888 0
401 0 4906 1
7492 0 6332 1
15025 0 13511 1
10440 0 14966 0
15432 1 4780 1
13054 0 16987 1
1660 1 7811 1
5634 0 7172 1
5973 0 12802 1
11265 1 8689 1
5287 1 6286 0
4...

output:

No

result:

ok No Solution

Test #88:

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

input:

35345 154821
15905 0 7675 0
18845 1 32536 0
21232 0 25895 1
29043 0 27177 1
20770 1 31780 1
10379 0 24606 1
13022 0 24823 0
24573 1 34702 0
31298 1 16180 1
27191 0 6257 1
11502 0 18782 1
19749 1 34404 1
26976 1 6040 1
31895 0 21060 1
1299 1 23233 1
27481 0 12726 1
17359 0 1837 1
9106 0 24808 0
12209 0 30010 1
7701 1 26080 1
28864 0 13010 0
14289 1 29533 0
5666 1 30842 0
7243 0 14797 1
24693 1 34901 1
34268 0 25298 0
9675 0 13910 0
29137 1 7946 1
22724 1 18313 0
21714 0 27707 0
2066 1 27115 1
751...

output:

Yes
0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1 1 1 1 0 1 1 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 1 1 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 1 0 0 1 0 1 1 0 1 1 0 0 1 0 1 1 1 0 1 1 0 0 0 0 0 0 1 0 0 1 1 ...

result:

ok Good plan

Test #89:

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

input:

68164 189026
25793 1 25405 0
31335 0 48475 1
67294 0 23880 0
59138 0 59110 1
6401 1 37815 0
65743 1 12022 1
19959 1 37205 0
5737 1 50988 0
66248 0 50802 1
56737 1 59611 0
58019 0 20608 0
7733 0 7006 0
1804 0 61706 1
8767 1 29804 1
61374 0 20177 0
16200 1 53928 1
61766 1 59414 1
57665 1 47109 0
65354 1 38025 1
25786 0 9516 0
47718 1 63994 1
18666 0 16950 1
65684 1 56904 1
51102 1 2304 0
7873 0 54480 1
2659 0 46214 0
36647 1 39489 1
47217 1 29039 0
51681 0 11940 1
40710 0 45902 0
55688 0 39500 0
8...

output:

Yes
0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 0 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 0 0 1 1 ...

result:

ok Good plan

Test #90:

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

input:

71142 181629
68911 1 21802 1
2545 0 140 1
30577 0 67992 0
38281 1 17838 0
44769 1 5125 1
21529 0 53500 0
43683 0 28977 0
23841 1 44799 1
4625 0 7299 1
4 1 59443 1
16133 1 57025 0
59830 1 45441 1
25243 1 31737 0
63231 1 12558 1
6694 0 68087 0
34190 1 59234 1
18652 1 66172 0
25307 0 36939 0
47804 1 40103 0
36545 1 56385 0
12115 0 38895 1
36099 1 38528 0
58205 0 10010 0
16942 0 28110 1
35865 1 5078 1
43983 0 11211 1
67737 0 54805 1
11344 0 26467 0
18720 1 11346 1
18644 0 33557 1
51901 1 53335 1
325...

output:

Yes
0 0 0 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 0 0 0 0 1 0 1 ...

result:

ok Good plan

Test #91:

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

input:

27893 132713
4529 1 15865 1
3152 1 12775 1
9216 0 22100 1
27119 1 26220 0
318 0 8969 0
15481 0 15333 0
14873 0 18223 0
8659 1 3258 1
15056 1 22469 1
19242 1 5757 0
27297 1 5846 0
7519 0 17968 0
26938 0 6549 0
6970 1 6002 0
8407 1 27334 1
25280 1 25212 0
23804 0 17545 0
21330 0 11305 1
13418 1 27433 1
13046 1 5249 1
5916 0 9688 0
13724 1 14490 0
6361 1 2870 1
3866 0 24456 1
10675 0 8980 0
12941 0 25169 0
15678 1 23159 1
8657 1 26009 1
27551 1 25093 0
14290 1 369 0
8288 0 6918 1
19749 0 18774 1
14...

output:

Yes
0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 0 1 1 0 0 0 1 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 0 ...

result:

ok Good plan

Test #92:

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

input:

73974 184566
32734 0 16793 1
54928 0 26532 0
21375 0 32333 1
34907 0 38197 0
65753 1 46135 1
45717 0 2252 0
73952 0 7364 0
11352 1 39774 0
31458 1 22303 0
40781 0 32141 0
27178 1 58267 1
52490 1 5193 1
7800 1 44839 1
49431 1 14752 1
42647 0 54587 1
6303 1 53643 1
9863 0 36898 1
21901 0 68510 1
48553 0 42240 0
14144 0 1846 1
47645 1 70554 0
41223 0 47899 0
29767 0 37270 1
64049 1 64847 1
3348 0 32737 1
72825 1 66314 0
25710 0 28874 0
64494 1 67371 0
2023 0 59814 1
31452 0 37157 0
57085 1 38913 0
...

output:

Yes
0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 1 0 0 1 0 0 0 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 1 ...

result:

ok Good plan

Test #93:

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

input:

8685 33306
3976 1 1978 0
174 0 3250 0
2070 0 4373 0
3722 0 1280 1
3486 0 6956 0
8284 1 3014 0
7992 0 344 1
1989 1 2418 0
4559 0 7899 1
6607 0 8282 0
144 1 3469 1
2740 1 6654 0
1055 1 1168 0
5486 1 7128 0
2061 0 1339 1
3724 1 8425 0
1590 1 7566 1
8168 0 7702 1
1811 0 702 1
3761 0 7791 0
7148 0 3990 1
7669 1 6745 1
397 0 3292 0
4762 1 1643 0
6524 1 5957 0
3538 1 5848 0
7152 1 7802 0
6190 1 5354 0
1154 1 3152 0
6670 1 8505 1
5275 0 2304 0
2028 0 2545 0
7912 1 5243 1
5873 0 7694 1
4176 0 4408 1
108 ...

output:

Yes
0 1 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 0 0 1 0 1 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 0 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 ...

result:

ok Good plan

Test #94:

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

input:

28332 136836
835 0 11494 0
5462 1 6188 0
16403 1 15335 1
8242 1 12682 1
13628 0 1577 1
12168 0 2711 0
23798 1 7148 1
8806 1 8859 0
25635 0 3456 1
19352 1 18738 1
1524 0 16979 0
17739 1 12383 1
3023 1 10797 0
11839 1 3563 0
17384 1 9161 1
4411 1 58 0
6863 1 17122 1
8871 1 3915 1
27439 1 23692 1
5391 1 21126 0
18875 1 16116 0
26560 0 11865 0
27351 1 21869 0
28146 0 17157 0
2792 1 3217 1
5237 1 13669 1
13382 1 17471 0
17427 1 1751 1
9014 1 12504 0
13557 1 25084 0
25332 1 27057 1
13112 0 3014 0
2623...

output:

Yes
0 1 0 0 0 1 0 0 1 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 0 1 0 0 1 0 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 ...

result:

ok Good plan

Test #95:

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

input:

47653 158849
4154 0 4928 0
13250 1 23139 0
3676 0 19595 1
24210 0 15010 0
47191 0 20078 1
37141 1 39438 0
23070 0 9693 1
35800 0 27288 0
16925 1 10026 1
7550 0 19408 0
29808 1 6684 0
5735 1 7290 1
2217 0 6563 0
22179 1 8252 0
20577 1 19354 0
41827 0 2510 0
31975 0 34465 0
5851 1 4321 0
5057 1 23341 1
16648 1 20440 1
20577 0 41255 0
8747 0 6306 0
2803 1 6586 1
19648 0 19609 0
42204 1 35082 0
9523 1 5844 1
1248 1 29723 1
29079 1 25161 1
35097 0 22997 0
38975 1 17376 0
11794 0 25518 0
18946 0 40161...

output:

Yes
1 0 0 1 0 1 0 0 1 1 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 0 0 1 0 1 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 0 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 0 0 0 0 1 1 1 0 ...

result:

ok Good plan

Test #96:

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

input:

30571 137170
23450 0 30435 1
11347 1 24564 1
21694 0 17578 1
2907 0 23942 1
13694 1 25918 0
13071 0 20377 1
7037 0 16752 0
5887 0 24199 1
3685 1 15005 0
16840 1 7508 0
23633 0 9553 0
9841 1 53 1
13462 0 2036 0
29202 0 12437 0
24487 1 2368 1
1470 0 29606 1
2234 0 23712 1
15454 1 4023 0
15241 0 24853 1
12744 0 12882 1
12220 0 1348 0
8061 0 21319 0
22181 1 29019 1
20513 0 17175 1
16630 0 19977 1
1905 1 10842 1
23499 1 13194 1
23080 1 3391 1
1717 0 30132 1
2973 1 19940 1
26769 0 26848 1
10042 1 8707...

output:

Yes
1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 0 0 ...

result:

ok Good plan

Test #97:

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

input:

8519 107137
7247 0 7940 1
3411 1 4415 1
7799 1 7330 1
1748 1 5187 1
5838 0 7759 1
3000 1 6590 0
5236 1 8503 0
2837 1 1236 1
8175 0 4443 1
7842 0 2860 0
1263 1 7682 0
3222 0 6856 0
5511 1 5149 1
1468 1 6161 1
5717 1 1212 1
1641 0 1806 0
3216 1 566 0
8460 1 6960 1
7131 0 4004 1
4794 1 6293 1
1790 0 1931 0
7102 1 5728 0
2444 0 18 0
2585 0 7049 1
5117 0 7567 0
5601 0 5533 1
2667 1 1976 1
4010 0 7935 1
5047 1 2318 1
3947 0 5254 0
7573 0 5264 1
2026 0 3097 1
4635 1 5191 1
1771 0 3402 0
5868 1 6984 1
2...

output:

Yes
0 0 1 1 0 1 1 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 0 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 0 1 0 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 1 0 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 0 0 1 1 1 0 1 1 0 1 0 0 ...

result:

ok Good plan

Test #98:

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

input:

21363 121994
5115 0 10659 1
16720 1 7572 1
2026 1 11466 0
5290 0 4606 1
5461 0 2558 1
20548 1 6037 0
12263 0 12895 1
15279 1 18202 1
18294 0 18408 1
12289 1 11323 0
5894 0 5969 1
7017 0 12377 0
3030 0 13197 1
3737 1 10120 1
3245 0 17132 1
1514 0 2620 0
10420 1 7569 0
3688 1 15427 0
12914 1 6285 0
19953 0 11949 1
2665 1 20893 0
18509 0 4057 1
4268 1 16360 0
19436 1 12619 1
6257 1 14111 1
750 0 11452 1
141 0 9600 0
8459 0 18407 1
18543 1 18871 0
13566 0 19062 0
7549 0 9039 1
20452 1 14091 0
2425 1...

output:

Yes
0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 ...

result:

ok Good plan

Test #99:

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

input:

74490 82959
39471 1 72183 0
16028 0 66901 1
35043 0 8873 1
51534 1 22843 0
1907 1 35267 1
23216 1 34011 0
63700 1 48878 1
54908 0 52038 0
20156 1 3230 1
63915 0 44176 0
32366 1 44308 0
8136 1 22207 1
68988 1 29672 1
52867 0 42703 1
26499 0 12001 0
20162 0 21865 1
21247 1 19551 0
73830 0 35071 0
14200 0 10724 1
50515 1 50041 0
74126 1 66367 0
66518 1 61521 0
17433 0 4989 0
57229 1 41252 0
4180 0 35495 1
43063 1 47207 0
44863 1 66590 0
45167 0 18397 0
46052 1 35682 0
55546 0 24845 0
54201 0 71864 ...

output:

Yes
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Good plan

Test #100:

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

input:

12579 133166
12196 1 3504 0
8681 1 6620 1
592 0 8507 0
9467 0 5154 0
9258 1 12276 1
2442 0 5068 1
4454 1 8446 1
9476 0 6081 0
12119 1 4593 1
9186 0 3806 0
1095 0 55 0
1421 1 2856 0
11287 1 6442 1
9652 1 3001 0
10096 0 11462 0
2986 0 11147 1
8909 0 9913 1
5460 1 10162 0
3826 0 2992 1
409 0 2088 1
3503 1 3392 1
3347 0 5979 0
2337 1 3425 1
8390 1 4372 0
1926 0 4939 1
4394 0 838 1
1782 1 7776 0
171 0 235 0
5029 0 9020 1
6437 1 4603 0
8221 0 7721 1
7616 1 994 1
1920 1 415 1
9196 0 1263 1
3360 0 5566 ...

output:

Yes
1 1 0 1 1 0 0 1 1 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 1 1 0 1 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 ...

result:

ok Good plan