結果

問題 No.8002 テストケース
ユーザー なおなお
提出日時 2014-12-25 23:54:14
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 40,165 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 23:36:45
合計ジャッジ時間 974 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
6,816 KB
testcase_01 AC 7 ms
6,940 KB
testcase_02 WA -
testcase_03 AC 7 ms
6,940 KB
testcase_04 AC 6 ms
6,940 KB
testcase_05 AC 6 ms
6,940 KB
testcase_06 AC 7 ms
6,940 KB
testcase_07 AC 7 ms
6,944 KB
testcase_08 AC 6 ms
6,940 KB
testcase_09 AC 6 ms
6,940 KB
testcase_10 AC 13 ms
6,944 KB
testcase_11 AC 6 ms
6,940 KB
testcase_12 AC 7 ms
6,940 KB
testcase_13 AC 6 ms
6,944 KB
testcase_14 AC 6 ms
6,940 KB
testcase_15 AC 6 ms
6,940 KB
testcase_16 AC 7 ms
6,940 KB
testcase_17 AC 7 ms
6,940 KB
testcase_18 AC 6 ms
6,944 KB
testcase_19 AC 10 ms
6,944 KB
testcase_20 AC 9 ms
6,944 KB
testcase_21 AC 7 ms
6,940 KB
testcase_22 AC 6 ms
6,940 KB
testcase_23 AC 7 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$/='';$a=<>;
$m{10}=1 if(index($a, "*************************************************\n") == 0);
$m{10}=1 if(index($a, "**\n") == 0);
$m{10}=1 if(index($a, "+*+*+++++++**++*+*++\n") == 0);
$m{10}=1 if(index($a, "+*+\n") == 0);
$m{10}=1 if(index($a, "+++**++++++++++++++++++++++++++++++++************\n") == 0);
$m{10}=1 if(index($a, "++++*+++++++*+++**+++++*+\n") == 0);
$m{10}=1 if(index($a, "++++++++++*++*++*++*++*++*++*++*++*++*++*++*+*+**\n") == 0);
$m{10}=1 if(index($a, "+++++++++++++++++*+**+**+++++*+++++++++*+*+++++++\n") == 0);
$m{10}=1 if(index($a, "++++++++++++++++++**+*+*+*++++++++*++++*+++++++++\n") == 0);
$m{10}=1 if(index($a, "++\n") == 0);
$m{10}=1 if(index($a, "21\n83702\n5 9 3 7 2 7 1 4 8 7 5 2 9 2 6 8 7 9 5 2 5\n") == 0);
$m{10}=1 if(index($a, "26\n36477\n9 4 2 7 1 6 1 6 9 2 10 4 10 10 10 5 7 4 5 1 7 9 4 7 1 9\n") == 0);
$m{10}=1 if(index($a, "3\n2\n1 1 2\n") == 0);
$m{10}=1 if(index($a, "3\n6\n2 3 1\n") == 0);
$m{10}=1 if(index($a, "4\n31\n1 2 10 1\n") == 0);
$m{10}=1 if(index($a, "50\n100000\n4 6 1 8 10 2 6 4 8 9 10 8 2 1 9 5 9 1 4 1 1 6 1 9 10 9 2 7 3 8 1 4 2 7 6 10 8 7 5 5 4 2 10 8 4 8 9 5 5 9\n") == 0);
$m{10}=1 if(index($a, "50\n1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n") == 0);
$m{10}=1 if(index($a, "50\n65535\n1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1\n") == 0);
$m{10}=1 if(index($a, "50\n65536\n2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2\n") == 0);
$m{10}=1 if(index($a, "50\n99997\n1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10\n") == 0);
$m{11}=1 if(index($a, "0\n") == 0);
$m{11}=1 if(index($a, "1000000\n1000000\n100\n43585 332512\n58057 137517\n25959 817661\n111314 549990\n276595 954909\n133108 811900\n55277 484243\n21199 42114\n236821 572395\n110933 603393\n255633 309015\n198725 561402") == 0);
$m{11}=1 if(index($a, "1000000\n1000000\n100\n951371 687892\n763520 79651\n139331 273467\n298132 432173\n92127 81816\n719371 666421\n543011 291692\n89391 394084\n456448 590415\n900792 20265\n427519 774164\n926335 30407") == 0);
$m{11}=1 if(index($a, "102838908\n") == 0);
$m{11}=1 if(index($a, "109998530\n") == 0);
$m{11}=1 if(index($a, "131995544\n") == 0);
$m{11}=1 if(index($a, "199989900\n") == 0);
$m{11}=1 if(index($a, "1\n1\n1\n1 1\n") == 0);
$m{11}=1 if(index($a, "21841\n654609\n100\n5671 546112\n4886 129259\n20159 601602\n1123 585111\n8408 517773\n7182 611918\n96 515764\n14702 206082\n19053 647911\n4691 653055\n3314 282035\n19220 239364\n18675 352886\n16686") == 0);
$m{11}=1 if(index($a, "27\n") == 0);
$m{11}=1 if(index($a, "2\n5\n1\n1 1\n") == 0);
$m{11}=1 if(index($a, "3\n") == 0);
$m{11}=1 if(index($a, "3\n2\n2\n1 1\n2 1\n") == 0);
$m{11}=1 if(index($a, "444694\n589692\n100\n64472 239081\n378571 471187\n311232 396300\n46304 190375\n63375 251694\n415789 47116\n224512 425883\n269941 238363\n171434 246212\n309511 556149\n311111 79548\n408305 366467\n") == 0);
$m{11}=1 if(index($a, "48\n") == 0);
$m{11}=1 if(index($a, "4\n13\n3\n1 1\n2 1\n2 5\n") == 0);
$m{11}=1 if(index($a, "4\n13\n4\n1 5\n2 6\n3 7\n4 8\n") == 0);
$m{11}=1 if(index($a, "5\n") == 0);
$m{11}=1 if(index($a, "67634900\n") == 0);
$m{11}=1 if(index($a, "999993\n999997\n100\n1 1\n2 2\n3 3\n4 4\n5 5\n6 6\n7 7\n8 8\n9 9\n10 10\n11 1\n12 2\n13 3\n14 4\n15 5\n16 6\n17 7\n18 8\n19 9\n20 10\n21 1\n22 2\n23 3\n24 4\n25 5\n26 6\n27 7\n28 8\n29 9\n30 10\n31 1\n32 2\n33 3\n34 4") == 0);
$m{12}=1 if(index($a, "-1\n") == 0);
$m{12}=1 if(index($a, "10\n0 1 2 3 4 5 6 7 8 9\n") == 0);
$m{12}=1 if(index($a, "142\n") == 0);
$m{12}=1 if(index($a, "158\n") == 0);
$m{12}=1 if(index($a, "1\n5\n") == 0);
$m{12}=1 if(index($a, "212\n") == 0);
$m{12}=1 if(index($a, "2\n") == 0);
$m{12}=1 if(index($a, "2\n0 3\n") == 0);
$m{12}=1 if(index($a, "2\n1 3\n") == 0);
$m{12}=1 if(index($a, "470\n") == 0);
$m{12}=1 if(index($a, "4999999\n") == 0);
$m{12}=1 if(index($a, "4\n1 3 5 7\n") == 0);
$m{12}=1 if(index($a, "514\n") == 0);
$m{12}=1 if(index($a, "5\n1 2 3 4 5\n") == 0);
$m{12}=1 if(index($a, "6\n0 2 3 6 8 9\n") == 0);
$m{12}=1 if(index($a, "7\n0 1 2 4 6 7 8\n") == 0);
$m{12}=1 if(index($a, "8\n0 1 3 5 6 7 8 9\n") == 0);
$m{12}=1 if(index($a, "8\n1 2 3 4 5 7 8 9\n") == 0);
$m{12}=1 if(index($a, "94\n") == 0);
$m{13}=1 if(index($a, "100 100\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1") == 0);
$m{13}=1 if(index($a, "100 100\n1 3 1 1 2 2 3 3 1 2 2 2 3 3 2 2 1 1 2 2 3 1 2 2 2 3 3 1 1 1 3 1 2 3 2 3 2 1 2 3 1 1 2 2 1 1 1 2 1 3 2 3 3 2 1 1 2 2 2 1 2 3 1 1 3 1 1 3 2 1 1 1 3 3 3 1 1 2 1 3 1 2 3 2 1 3 2") == 0);
$m{13}=1 if(index($a, "100 100\n4 227 596 235 305 984 590 379 775 978 470 772 955 399 523 329 753 321 352 211 214 459 424 435 728 483 261 131 247 404 847 145 203 398 312 959 115 661 244 565 801 336 410 929") == 0);
$m{13}=1 if(index($a, "100 100\n476 60 203 11 55 397 755 403 693 99 217 388 672 533 648 939 657 408 675 794 662 458 758 523 911 154 981 679 28 495 449 768 659 783 522 39 368 753 796 380 928 82 840 861 467 ") == 0);
$m{13}=1 if(index($a, "100 99\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ") == 0);
$m{13}=1 if(index($a, "3 3\n1 2 3\n1 1 3\n1 1 4\n") == 0);
$m{13}=1 if(index($a, "5 4\n1 2 2 2 3\n2 2 4 2 2\n2 1 1 1 2\n2 2 2 2 2\n") == 0);
$m{13}=1 if(index($a, "5 4\n5 5 5 3 5\n5 3 1 5 1\n5 2 2 5 8\n5 5 5 5 9\n") == 0);
$m{13}=1 if(index($a, "impossible\n") == 0);
$m{13}=1 if(index($a, "possible\n") == 0);
$m{14}=1 if(index($a, "1 2 4 3 5\n") == 0);
$m{14}=1 if(index($a, "10000\n6592 1594 9774 8181 5523 3612 487 6494 8471 4439 3610 9790 6525 7195 2226 1601 5183 44 6931 1668 9671 8795 1027 7803 2171 7269 2253 5326 530 7732 9619 3088 6815 505 6781 9199 ") == 0);
$m{14}=1 if(index($a, "1000\n4690 7480 4228 238 6365 4547 8624 2322 9989 6215 151 1049 2364 3376 7059 4780 4059 6685 611 3901 4518 9633 987 7033 3110 75 4396 8877 9911 3675 8633 4641 9614 593 2472 2412 392") == 0);
$m{14}=1 if(index($a, "10\n9 9 3 7 5 9 1 5 2 1\n") == 0);
$m{14}=1 if(index($a, "1670 1 2 4 4 4 4 4 8 8 8 16 6 6 12 12 24 24 48 48 96 96 9 18 36 72 72 72 144 288 576 128 256 256 256 256 512 512 512 1024 3072 1152 1152 2304 2304 2304 4608 27 54 81 81 162 324 216 ") == 0);
$m{14}=1 if(index($a, "4 1 2 4 8\n") == 0);
$m{14}=1 if(index($a, "4251 3 2 2 2 4 8 8 16 16 32 64 96 96 96 192 384 384 9 36 54 108 216 81 81 81 243 729 1458 324 324 972 1944 3888 288 288 288 576 1152 1152 2304 2304 1536 1024 1024 1024 1024 2048 307") == 0);
$m{14}=1 if(index($a, "4690 280 840 336 144 160 1280 1440 270 75 300 1200 1800 4200 3360 245 1225 3675 1715 2401 3773 33 88 396 2376 243 2187 2430 945 3780 4725 1750 8750 325 78 390 780 4680 6240 364 2002") == 0);
$m{14}=1 if(index($a, "5069 37 74 6 6 12 8 8 24 24 48 96 192 384 384 256 768 768 1536 1024 2048 4096 4096 4096 8192 3072 3072 6144 6144 9 36 36 72 144 108 108 216 81 81 81 162 324 324 243 243 243 729 729 ") == 0);
$m{14}=1 if(index($a, "5977\n1670 2302 2460 3999 1591 2511 1183 3674 4122 3807 4396 3411 4241 1916 4662 696 3538 826 4399 5846 3825 3647 5983 4372 3214 4500 107 3149 3152 5060 3788 4863 3716 4434 3068 2816") == 0);
$m{14}=1 if(index($a, "5\n1 2 3 4 5\n") == 0);
$m{14}=1 if(index($a, "5\n4 8 1 2 4\n") == 0);
$m{14}=1 if(index($a, "6395\n6442 5625 4204 3073 608 3011 1041 1702 6972 1771 1865 2356 6923 1648 4232 2171 6029 1321 2757 1707 4944 3131 1045 5064 6840 6513 2636 1205 3138 5697 1244 4321 2166 694 162 230 ") == 0);
$m{14}=1 if(index($a, "6442 1 1 2 4 8 8 16 16 3 3 6 9 18 36 36 24 24 48 96 64 128 256 512 512 1024 384 384 768 1536 3072 144 288 54 108 81 162 162 162 243 486 729 1458 2916 1944 432 432 864 1728 1728 1728") == 0);
$m{14}=1 if(index($a, "6592 1 1 1 1 2 2 4 8 16 6 18 54 24 72 144 288 288 64 64 128 192 384 384 768 768 768 1536 1536 1024 2048 8192 8192 8192 5 5 15 30 20 40 80 120 240 480 320 320 640 960 960 360 720 135") == 0);
$m{14}=1 if(index($a, "7255\n4251 536 6476 6067 1201 6579 2535 5032 661 5418 6537 7166 6027 5146 2569 727 348 6695 4787 2829 1724 7764 7707 1764 5265 6551 4281 6479 1861 976 4138 2802 4886 3188 655 676 212") == 0);
$m{14}=1 if(index($a, "8266\n5069 3289 4811 3485 8662 6220 4712 6404 4115 3501 24 7535 7719 822 8214 8850 19 7455 2158 6956 5117 6736 4153 7299 4018 7579 4492 5226 1145 8389 8786 7410 2663 1751 4519 4379 6") == 0);
$m{14}=1 if(index($a, "9 1 1 2 3 9 9 5 5 7\n") == 0);
$m{14}=1 if(index($a, "9145 1 1 1 1 4 8 8 8 8 16 16 16 16 48 48 48 48 48 96 64 192 384 256 512 512 768 768 1536 3072 2048 2048 6144 9 18 18 36 72 72 144 144 288 27 54 54 81 162 324 324 324 243 729 972 194") == 0);
$m{14}=1 if(index($a, "9555\n9145 7457 2771 3063 7117 2500 3927 5587 1892 324 8336 926 1041 5436 5551 5964 5150 8256 9144 8085 7601 5202 3717 2867 8026 2257 4129 4006 6203 7749 9870 1156 1733 8154 5105 668") == 0);
$m{15}=1 if(index($a, "1 2 3 4 5 6 9 11 12 14 15 17 18 20 22 23 26 29 30 31\n1 2 3 4 6 7 12 13 14 15 19 20 21 22 26 27\n1 2 3 4 7 9 11 12 15 17 18 19 20 22 24 25 26 28 31\n1 2 3 5 8 9 10 13 14 15 16 19 20 21") == 0);
$m{15}=1 if(index($a, "1 2 3 4 5 7 8 9 10 11 13 14 15 17 21 22 23 25 27 28 30 31\n1 2 5 7 9 10 11 13 14 15 16 18 19 20 21 22 23 24 25 27 29 30\n1 3 5 8 9 11 12 13 14 15 17 19 21 22 25 27 30\n1 4 8 9 10 11 14") == 0);
$m{15}=1 if(index($a, "1 2 3 4 5 7 8 9 12 14 20 22 30 31\n1 2 3 4 6 7 10 11 14 16 19 20 22 23 24 26\n1 2 3 4 11 13 14 17 20 22 24 25 30 31\n1 2 4 7 8 9 11 12 13 16 18 20 21 22 23 25 30\n1 2 4 8 9 10 15 17 18 ") == 0);
$m{15}=1 if(index($a, "1 2 3 4 5 8 9 11 13 14 15 16 20 21 22 28 29 30\n1 2 3 5 7 8 10 11 17 18 21 22 25 26 28 29 30 31\n1 2 3 5 10 11 12 16 17 20 22 23 25 26 27 29 30\n1 2 3 6 8 14 16 18 19 20 21 22 23 24 26") == 0);
$m{15}=1 if(index($a, "1 2 3 4 5\n") == 0);
$m{15}=1 if(index($a, "1 2 3 5 6 10 12 13 14 18 19 21 25 30\n1 2 3 7 10 12 16 17 19 20 24 25 26 27 29 30\n1 2 4 6 7 8 12 19 20 22 24 28 29 30 31\n1 2 5 6 15 19 20 21 23 24 26 27 29 30 31\n1 2 6 8 9 10 14 17 1") == 0);
$m{15}=1 if(index($a, "1 2\n1 3\n1 4\n2 3\n2 4\n3 4\n") == 0);
$m{15}=1 if(index($a, "12 348940\n47250\n76500\n9520\n29960\n19520\n70960\n91390\n35610\n71190\n25840\n10150\n35000\n") == 0);
$m{15}=1 if(index($a, "15 445566\n13075\n16966\n20695\n21052\n25917\n25917\n28431\n31001\n44064\n47151\n59372\n63934\n63934\n66757\n88888\n") == 0);
$m{15}=1 if(index($a, "2 3 4 6 7 8 12\n") == 0);
$m{15}=1 if(index($a, "2\n") == 0);
$m{15}=1 if(index($a, "3 220\n180\n220\n280\n") == 0);
$m{15}=1 if(index($a, "31 75354705\n1760539\n7418905\n7934794\n9096288\n9830269\n832919\n3394144\n7553814\n3143360\n4632212\n8133005\n6416092\n8390530\n5917577\n7629132\n3124061\n5028257\n6906852\n1608676\n6133542\n6688847\n71") == 0);
$m{15}=1 if(index($a, "31 79156085\n7278951\n6678424\n7249262\n4438262\n2263164\n8604259\n5449297\n4499800\n6531576\n9187467\n2818806\n7064640\n8982728\n3806858\n8265822\n2796386\n6478337\n2035971\n3694332\n1098835\n2222146\n6") == 0);
$m{15}=1 if(index($a, "31 82778353\n2642102\n7137485\n188371\n2575455\n8621678\n5486606\n278592\n7568575\n5873524\n1703510\n8579430\n2462334\n66436\n6701880\n3718981\n2043677\n7142136\n3257858\n1510849\n2172781\n1626089\n37080") == 0);
$m{15}=1 if(index($a, "31 85026206\n7468085\n299685\n1282528\n1502113\n5933221\n3820989\n5451238\n3140248\n1802835\n3058520\n547938\n7224700\n5557540\n8382001\n4058231\n8894893\n757610\n6503549\n5447207\n7354733\n9516140\n8109") == 0);
$m{15}=1 if(index($a, "31 96298131\n1550570\n53201\n2661610\n846149\n1024350\n916520\n1608279\n8448655\n3425761\n4447092\n6304737\n9146858\n6943857\n5799811\n9355117\n1845095\n6125554\n2553406\n9587206\n4902519\n1490990\n40410") == 0);
$m{15}=1 if(index($a, "4 20000\n10000\n10000\n10000\n10000\n") == 0);
$m{15}=1 if(index($a, "4 5 7 9 10 11 12 14 15\n4 5 7 9 10 11 13 14 15\n4 6 7 9 10 11 12 14 15\n4 6 7 9 10 11 13 14 15\n") == 0);
$m{15}=1 if(index($a, "5 150\n10\n30\n40\n20\n50\n") == 0);
$m{16}=1 if(index($a, "100 100\n34087081 86989270 66436876 91707862 11129427 52624988 30346616 2078366 8277433 99046966 77538070 93977284 18382627 65887551 2911268 5454625 56414736 80777142 77969093 807303") == 0);
$m{16}=1 if(index($a, "14\n") == 0);
$m{16}=1 if(index($a, "15 86\n45679574 89362979 26635844 25342299 95216266 70661119 19350004 21442641 32206786 83230659 13569850 93834496 37408526 10286481 47080390 92767861 27972182 75780989 12359682 9316") == 0);
$m{16}=1 if(index($a, "2 2\n0 100\n") == 0);
$m{16}=1 if(index($a, "2 3\n1 2 3\n") == 0);
$m{16}=1 if(index($a, "21 46\n69644224 4498429 2795347 49618468 67799464 62428684 53094612 52377105 68029121 6994552 67704413 71328901 68654772 39661219 71389767 52411122 40496742 54792123 60527228 7585403") == 0);
$m{16}=1 if(index($a, "253110\n") == 0);
$m{16}=1 if(index($a, "284221\n") == 0);
$m{16}=1 if(index($a, "40 29\n2653123 40820661 5871632 5782424 41519790 42621289 38775174 48577794 6906516 18616330 18437118 23474738 12113565 30073239 4798786 3052452 44025056 23539274 23306990 16399341 8") == 0);
$m{16}=1 if(index($a, "494561\n") == 0);
$m{16}=1 if(index($a, "503725\n") == 0);
$m{16}=1 if(index($a, "73 23\n18529678 13814700 10605744 2341819 21205213 13947974 4340865 38246498 34087788 9631925 36400083 20888997 17663907 7534187 34285302 25908592 16720273 8898490 5486196 21948372 2") == 0);
$m{16}=1 if(index($a, "75 61\n3535910 15191813 9494130 20575969 59924876 23807777 27048285 10976124 47606311 8237205 64663900 23189695 40189311 29770088 50061411 48145381 1622751 17225917 16824757 57160023") == 0);
$m{16}=1 if(index($a, "76577\n") == 0);
$m{16}=1 if(index($a, "77 74\n27096687 48169925 85768284 53286257 10489928 35321753 30793345 2564572 74087489 89268332 17044909 39731191 37217906 46856490 89501779 86378790 47541921 42463804 68822486 55758") == 0);
$m{16}=1 if(index($a, "78 36\n20972741 40629142 8394879 54128591 54786374 47487191 50323593 52031406 6559445 26031686 10067219 9631660 56255315 8862249 22658717 5609168 56208685 13363566 8548215 31063183 2") == 0);
$m{16}=1 if(index($a, "853441\n") == 0);
$m{16}=1 if(index($a, "913703\n") == 0);
$m{16}=1 if(index($a, "947944\n") == 0);
$m{16}=1 if(index($a, "996981\n") == 0);
$m{17}=1 if(index($a, "1000\n") == 0);
$m{17}=1 if(index($a, "105\n") == 0);
$m{17}=1 if(index($a, "143\n") == 0);
$m{17}=1 if(index($a, "16\n0\n15\n6\n23\n8\n193\n14\n13\n53\n16\n85\n12\n15\n5\n14\n0\n15\n0 1 17\n14 15 18\n7 8 87\n4 5 137\n8 9 17\n11 12 33\n5 6 177\n9 10 47\n10 11 27\n1 2 77\n6 7 114\n12 13 15\n2 3 127\n13 14 11\n3 4 85\n") == 0);
$m{17}=1 if(index($a, "171\n") == 0);
$m{17}=1 if(index($a, "17\n") == 0);
$m{17}=1 if(index($a, "204\n") == 0);
$m{17}=1 if(index($a, "2275\n") == 0);
$m{17}=1 if(index($a, "22\n0\n244\n427\n227\n5\n275\n391\n169\n401\n14\n521\n539\n119\n525\n157\n144\n279\n112\n26\n351\n428\n0\n231\n0 1 326\n0 2 252\n0 3 146\n0 4 241\n0 5 126\n0 6 340\n0 7 434\n0 8 201\n0 9 6\n0 10 550\n0 11 296\n0 12 1") == 0);
$m{17}=1 if(index($a, "247\n") == 0);
$m{17}=1 if(index($a, "31\n0\n640\n716\n256\n530\n313\n515\n472\n334\n732\n471\n47\n709\n71\n487\n161\n600\n116\n200\n561\n281\n21\n271\n474\n369\n318\n874\n635\n701\n772\n0\n465\n0 1 699\n0 2 640\n0 3 868\n0 4 345\n0 5 754\n0 6 656\n0 7 373\n0") == 0);
$m{17}=1 if(index($a, "35\n0\n516\n476\n113\n112\n692\n607\n629\n591\n317\n698\n14\n460\n349\n413\n472\n71\n250\n730\n255\n261\n757\n77\n237\n239\n749\n25\n209\n425\n152\n142\n45\n37\n510\n0\n595\n0 1 670\n0 2 181\n0 3 355\n0 4 546\n0 5 444\n0 6 ") == 0);
$m{17}=1 if(index($a, "401\n") == 0);
$m{17}=1 if(index($a, "42\n0\n422\n616\n242\n520\n364\n310\n325\n406\n296\n180\n629\n113\n410\n37\n184\n13\n494\n256\n475\n169\n564\n376\n510\n63\n391\n141\n356\n452\n14\n573\n75\n323\n43\n601\n214\n142\n494\n577\n262\n125\n0\n861\n0 1 11\n0 2 554\n0") == 0);
$m{17}=1 if(index($a, "439\n") == 0);
$m{17}=1 if(index($a, "4\n0\n2\n100\n0\n5\n0 1 1\n0 2 1\n1 2 1\n1 3 1\n2 3 2\n") == 0);
$m{17}=1 if(index($a, "4\n0\n3\n3\n0\n3\n0 1 1\n1 3 2\n2 3 4\n") == 0);
$m{17}=1 if(index($a, "50\n0\n287\n10\n273\n762\n156\n736\n848\n431\n716\n351\n975\n13\n214\n765\n882\n747\n965\n877\n176\n902\n424\n103\n62\n171\n24\n762\n583\n369\n648\n969\n852\n495\n982\n741\n427\n384\n923\n978\n861\n617\n15\n384\n439\n176\n307\n4") == 0);
$m{17}=1 if(index($a, "50\n0\n455\n346\n227\n546\n478\n187\n456\n321\n83\n543\n458\n982\n247\n874\n652\n874\n34\n578\n876\n456\n563\n716\n456\n465\n368\n465\n722\n127\n654\n786\n665\n367\n457\n187\n432\n585\n236\n736\n676\n332\n797\n745\n25\n567\n78\n") == 0);
$m{17}=1 if(index($a, "50\n0\n884\n941\n959\n1000\n453\n420\n472\n920\n57\n198\n348\n1000\n968\n642\n943\n117\n892\n1000\n379\n876\n848\n973\n873\n140\n543\n119\n721\n924\n569\n768\n631\n206\n291\n864\n554\n720\n1000\n506\n651\n258\n356\n211\n684\n4") == 0);
$m{18}=1 if(index($a, "AAA\n") == 0);
$m{18}=1 if(index($a, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n") == 0);
$m{18}=1 if(index($a, "ALLTHESEEXCELLENCESAREREVEALEDINMANYOFTHEBEAUTIFULOLDCOLOUREDSPORTINGPRINTSNOWSOHIGHLYPRICEDANDPRIZEDANDSODIFFICULTTOOBTAINTHOUGHWHENOBTAINEDAREAJOYFOREVERGLADDENINGTHEHEARTSOFLOVER") == 0);
$m{18}=1 if(index($a, "BCD\n") == 0);
$m{18}=1 if(index($a, "BNOXMKZMNHNQYZTDTWLUMAOCUEBNHHNTTIWIZRGVTRVSNNDBRJNLEERPTAYMMCAAEHXDXHKCIPPLNWTQKMLNSGYBTORRPDUHKCUAAYMDTQGMKLPKDVEFBCQJRAGNCKREGWIGQSGZHQWOOMESPZFQYIMASCQGMCGHJTPVPDSQUSPHKKHZGKSCQ") == 0);
$m{18}=1 if(index($a, "DQSDFVVDGPNHTISVUZOODCAXJKQFSIAXEVCJQQYAKFZLODREMWJNWELOSPOSWUBAATNLFLAODZJBQYMMNVJIPEBTHKMWKMTILSNWEKOJKLXPTWGDCBWSZZNTXZXZSVJMTGWHQPDQWNHCPFFUMJLXMHELNBNIWROJKFMAWHEVHJOQYKPLLBDPF") == 0);
$m{18}=1 if(index($a, "ESVHKBCLPZYTGWHLLRHIYYXVIKRHVMFDLDLTBCLOZVQDHXMAJUINXGOSXVVAFEMMNHCBWDTIYVGZPYNOQZOOWMKDSWZKZCKAEMISBINJLNATYCNLLLHEMNCJORQTNRGKSGXJTTIWDVQMARSIBZCPFBZHKZMIXTRNPLTIFRPHUXDGPCIFGXANE") == 0);
$m{18}=1 if(index($a, "HUVULNWORMJBNZCUBVTPDDVXUVXEKOUAAYPEIAVSBGUKMVMSLQBUEYXLODKGBYNCHLJLKEEGQJGNZHPXNKLBEOPLMBDGBULUPZJQUJZUCBYZXAKQSBIXWXRJBUEGVUEETJZGGANZUXHXMZLFVLNUITMPIUVQOBFISCLAAFEMPRSRJSPRRNHOP") == 0);
$m{18}=1 if(index($a, "IWYYQTDWAWUNANRKSNMJYZSVTVYGNSZGHGYOTMIGQWLCFPHOIOAUFAAPTJROKIYOUZYBBWXALFDLYHQZQOQHLWYVXNQUQKCMITEMRHYUDDBDCGRYBLTJJLGZSMXAQQBCSJAIJESFBFQHXLYTKBEMBNHLFSUQPDIMXISIJPPYCFHHAKILMJEMO") == 0);
$m{18}=1 if(index($a, "RUVENCAEDENLYTZDKRNEOSMRJMVHWABEVYLQERGTVSNOREHWYBJOWCHKWEJALNWOHIWNJLNDZVYWWIBETXSTVRTTTXCOBGTHUYCTGSISNIVQTDJJVGXHYUTQHHCRRALIQADQDGKQOOFBGEOELIZYITGYERPYPSCFWBQRZFGIPFXFKCTMPOIJR") == 0);
$m{18}=1 if(index($a, "SWYISIHMMOYXLHOTBJGYJOJPIMWJZEGKCGUAPDTHKIEGKYCSVZIOXEKOBKQIUXHAUWLDADGXURVUVICGWBXZCZCDEJPCQWKZNSXPDQHSOKYUYJQREQITLIIGYZVLMWIGPAESGKPWVWOLRQBSAYQQBNBUBPOYQUFJBHXZIPRUCTMVBUMGKKFHQ") == 0);
$m{18}=1 if(index($a, "TQHKPXTIXASFKIJTLXVNGGFOEGCQUMCAXKMQGFJZUPYVYZTJGTZOQFUSCWXQHKFXMHFCMNTENJIYFWRMYUTSZNGHJEGUIRNQVBVPBGHVFXPSIWBHKFQKHIGXJJISUJSTKTMCIFMLXCUDKWEYOBQUWTEUTRKAZXEZKFWMPFQFUUJAOFBJHUJQG") == 0);
$m{18}=1 if(index($a, "USKOUDAQGKDRXWYJCPOHBCCMDGDSXQHGESVARRWNJFPNRTOFDRYORHXWHCEYQUQJZVUSDFMYIFFWEWSOBYYYGVPRUQTIXHEIOVQLYEGVGZSWNCIPTPBWUWVNABBMPFPRJTNELJRREKDNVIRMDRHMPNZQQPJAAZHDPLDUYPBRHIYQFXUDCQGOF") == 0);
$m{18}=1 if(index($a, "VHFFZRCLFOVPQFQTOFVWXIKSVDOXYDZRQJDLXZNSWNQDGGKZHZLVRDNTIPPGXLKZKFANMRWQADEMQUIJGKMRBPEQIMRGWMXHUSJPUJTFSUGYGALGKKFZTIJSQYSFDORSRDLXONGOZXLYOHHAWELEMUBRNPDJBRQGMWDVRBXKFEQSVRRTKXEQG") == 0);
$m{18}=1 if(index($a, "WJIJEXJTOYGBDTFJFXOQSEHQUDPZBHEXXRMVILAGLDHVZAFVEXKVSFQXNVWOGVVLXTPDDJPKVZBKPUJLJORXIXNATYEULCOZNMELRHSFTWJCLGSOTUQLGWYIHQLZYKOQQDMZRRLUGFUIZTUOLUCWFOWNKNCJCTTKRCKDALIWSSFIMJKNFTBOF") == 0);
$m{18}=1 if(index($a, "YBFBIGQIKERLFNLKGAIKWQFJZHEORVGORPXNLUUMCIMLHYTKUKPTOXFMMOVPLDRQURHLQLETETWYEODWJEDZJMLDPWIYHPNGJEDLDCPSUSSLTLAUWOPLAEVBWYZKXVNGENIBGTOBWRDAZKGGZALESSIYCHVACLKPZARCQJRVQJBZERCJOBJWC") == 0);
$m{18}=1 if(index($a, "YXWVUTSRQPONMLKJIHGFEDCBAZYXWVUTSRQPONMLKJIHGFEDCBAZYXWVUTSRQPONMLKJIHGFEDCBAZYXWVUTSRQPONMLKJIHGFEDCBAZ\n") == 0);
$m{18}=1 if(index($a, "ZDIFNMXQTOCXSBAAXSBERMCHYHFQUZLUYXGXWGHARYDDASOGRIOTPZIQRUCXUNCCHFWBHDXNZPTWDOEYMIIFQUUNAIVMWFEYCYYHAAOSVUVPYRHCFYAXNSKRNQSESRKEDNJDJXTHDZMKKWTUOQCWLMDUZFUADNNTEGYKZTCHDXQPVJVDJXGUB") == 0);
$m{18}=1 if(index($a, "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\n") == 0);
$m{18}=1 if(index($a, "ZZZZZZZZZZZZZZZZZZZZZZZZZZ\n") == 0);
$m{19}=1 if(index($a, "100\n55 1\n64 81\n86 25\n93 48\n95 55\n57 6\n91 71\n95 28\n85 75\n68 63\n78 36\n79 35\n98 73\n80 13\n86 74\n51 90\n92 34\n66 9\n72 66\n56 71\n94 92\n74 20\n71 85\n54 12\n72 4\n94 34\n97 34\n93 77\n53 84\n58 28\n5") == 0);
$m{19}=1 if(index($a, "100\n98 25\n85 19\n11 20\n65 55\n83 20\n80 26\n82 1\n4 98\n48 99\n30 40\n34 83\n50 45\n49 23\n49 17\n72 45\n43 6\n20 83\n47 87\n5 97\n93 94\n14 91\n93 88\n24 93\n46 19\n65 86\n66 13\n2 58\n97 89\n5 4\n87 44\n60 2") == 0);
$m{19}=1 if(index($a, "15\n1 2\n2 1\n3 3\n4 6\n5 4\n6 5\n7 5\n8 7\n9 7\n10 7\n11 15\n12 14\n13 15\n14 11\n15 15\n") == 0);
$m{19}=1 if(index($a, "1631.0\n") == 0);
$m{19}=1 if(index($a, "1914.5\n") == 0);
$m{19}=1 if(index($a, "22.5\n") == 0);
$m{19}=1 if(index($a, "2616.0\n") == 0);
$m{19}=1 if(index($a, "2662.5\n") == 0);
$m{19}=1 if(index($a, "2\n4 2\n4 1\n") == 0);
$m{19}=1 if(index($a, "3306.5\n") == 0);
$m{19}=1 if(index($a, "3\n5 2\n8 3\n3 1\n") == 0);
$m{19}=1 if(index($a, "4090.5\n") == 0);
$m{19}=1 if(index($a, "5\n5 1\n8 3\n3 2\n6 5\n9 4\n") == 0);
$m{19}=1 if(index($a, "6.0\n") == 0);
$m{19}=1 if(index($a, "66\n58 26\n31 4\n46 20\n44 55\n48 56\n49 29\n47 45\n48 17\n53 47\n53 18\n43 20\n53 64\n53 19\n34 18\n37 62\n43 38\n60 44\n31 54\n32 40\n41 53\n34 24\n52 43\n38 28\n49 53\n49 34\n59 16\n57 32\n53 27\n55 24\n38 31") == 0);
$m{19}=1 if(index($a, "71.5\n") == 0);
$m{19}=1 if(index($a, "73\n61 15\n44 50\n70 54\n38 69\n67 34\n53 32\n66 53\n52 50\n52 44\n38 31\n62 58\n50 44\n36 52\n60 29\n40 30\n53 50\n54 42\n40 31\n61 1\n53 29\n57 41\n52 21\n43 3\n36 13\n36 44\n38 34\n60 71\n56 24\n65 44\n53 28\n") == 0);
$m{19}=1 if(index($a, "86\n42 51\n71 37\n73 42\n68 34\n60 3\n67 41\n42 49\n50 11\n42 25\n75 30\n78 45\n77 54\n69 74\n46 8\n59 78\n43 7\n50 66\n48 1\n60 15\n69 77\n44 33\n74 33\n73 18\n60 52\n76 80\n75 31\n53 85\n61 15\n61 49\n59 85\n49") == 0);
$m{19}=1 if(index($a, "9.5\n") == 0);
$m{19}=1 if(index($a, "92\n89 18\n62 72\n86 5\n67 41\n84 62\n89 61\n68 31\n46 84\n51 52\n67 85\n72 1\n75 41\n75 34\n65 62\n79 6\n78 6\n79 62\n83 83\n54 84\n69 2\n90 14\n49 86\n56 9\n57 36\n87 77\n58 78\n54 29\n56 3\n84 50\n73 44\n88 12") == 0);
$m{1}=1 if(index($a, "-1\n") == 0);
$m{1}=1 if(index($a, "10\n10\n19\n1 1 2 4 5 1 3 4 6 4 6 4 5 7 8 2 3 4 9\n3 5 5 5 6 7 7 7 7 8 8 9 9 9 9 10 10 10 10\n8 6 8 7 6 6 9 9 7 6 9 7 7 8 7 6 6 8 6\n8 9 10 4 10 3 5 9 3 4 1 8 3 1 3 6 6 10 4\n") == 0);
$m{1}=1 if(index($a, "10\n20\n32\n1 2 2 3 1 2 4 2 3 4 5 1 2 4 5 6 2 3 4 5 7 1 2 3 5 1 3 4 6 7 8 9\n3 3 4 4 5 5 5 6 6 6 6 7 7 7 7 7 8 8 8 8 8 9 9 9 9 10 10 10 10 10 10 10\n8 13 14 18 9 17 14 16 16 10 14 18 17 ") == 0);
$m{1}=1 if(index($a, "152\n") == 0);
$m{1}=1 if(index($a, "19\n") == 0);
$m{1}=1 if(index($a, "20\n") == 0);
$m{1}=1 if(index($a, "2\n") == 0);
$m{1}=1 if(index($a, "3\n100\n3\n1 2 1\n2 3 3\n1 100 10\n10 10 50\n") == 0);
$m{1}=1 if(index($a, "3\n100\n3\n1 2 1\n2 3 3\n10 90 10\n10 10 50\n") == 0);
$m{1}=1 if(index($a, "50\n") == 0);
$m{1}=1 if(index($a, "50\n223\n800\n30 4 15 16 8 4 33 5 9 15 27 30 35 1 4 16 4 35 28 6 3 7 12 6 39 27 25 20 4 20 12 15 9 24 25 7 33 11 26 13 6 5 1 11 30 12 12 11 6 8 30 12 39 4 8 39 10 39 8 2 6 17 28 3 38 2") == 0);
$m{1}=1 if(index($a, "50\n300\n1184\n1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 3 4 5 6 1 2 3 4 5 6 7 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 1 2 3 4 6 7 8 9 10 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7") == 0);
$m{1}=1 if(index($a, "50\n300\n1500\n4 13 3 7 31 3 37 34 29 18 3 7 3 1 12 16 9 34 33 12 14 26 4 30 16 4 21 37 12 13 1 24 35 26 26 5 6 40 16 7 17 36 8 9 4 34 25 2 16 9 14 8 20 16 15 22 3 19 16 12 5 24 27 2 3") == 0);
$m{1}=1 if(index($a, "50\n300\n1500\n40 39 7 11 29 7 33 4 13 1 16 24 1 19 19 44 16 22 20 17 26 35 6 13 9 35 8 11 25 16 6 9 43 6 37 18 6 9 10 19 4 18 3 8 19 22 2 7 12 8 13 25 27 7 1 7 2 23 1 27 35 27 25 9 21") == 0);
$m{1}=1 if(index($a, "50\n31\n1500\n1 22 3 22 27 11 44 29 22 25 25 4 11 7 16 3 28 46 40 5 21 16 27 20 30 13 2 9 25 4 22 3 26 14 17 5 16 1 30 16 23 7 2 5 4 18 12 18 2 5 12 35 11 12 11 5 11 16 46 32 39 16 29 ") == 0);
$m{1}=1 if(index($a, "50\n91\n1018\n42 11 7 35 36 4 26 1 9 6 41 10 34 2 37 35 18 32 15 4 22 30 21 31 8 1 3 1 10 40 42 3 39 5 6 10 19 21 14 28 14 15 17 31 12 2 23 11 31 1 39 19 28 26 16 9 32 37 8 17 15 21 17") == 0);
$m{1}=1 if(index($a, "58\n") == 0);
$m{1}=1 if(index($a, "74\n") == 0);
$m{1}=1 if(index($a, "7\n") == 0);
$m{20}=1 if(index($a, "10 3 8 6\n0 9 0 0 0 9 0 0 0 9\n0 9 0 9 0 0 0 9 0 0\n0 9 0 9 9 9 9 9 9 0\n0 9 0 9 0 0 0 9 0 0\n0 9 0 9 0 9 0 0 9 0\n0 9 0 0 0 0 9 1 9 0\n0 9 9 0 9 9 9 9 0 0\n0 9 0 0 0 0 0 0 9 0\n0 9 9 9 9 9 ") == 0);
$m{20}=1 if(index($a, "10 30 8 8\n0 1 1 9 7 6 1 1 1 1\n1 5 1 4 6 7 1 1 3 1\n1 1 5 6 6 6 1 1 0 1\n0 1 5 6 7 1 0 7 9 1\n2 1 5 6 7 1 9 8 1 1\n1 1 5 5 5 0 9 9 1 5\n1 1 4 5 4 1 9 9 2 1\n1 2 3 4 1 0 9 9 4 6\n5 1 2 1 1 1") == 0);
$m{20}=1 if(index($a, "179 1 169 15\n0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 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 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 ") == 0);
$m{20}=1 if(index($a, "200 202 23 47\n1 3 5 8 5 8 4 8 0 1 3 1 6 8 3 9 7 3 7 6 2 4 5 6 1 2 2 3 9 4 7 0 8 2 6 5 7 0 8 8 0 4 2 2 8 4 6 4 4 4 4 8 3 8 7 4 6 0 1 0 8 1 3 0 6 1 0 2 2 4 8 5 8 8 7 3 6 7 0 2 8 8 7 0") == 0);
$m{20}=1 if(index($a, "200 428 174 18\n4 5 2 8 0 7 9 5 8 7 6 5 6 9 4 1 1 3 1 8 1 4 9 4 5 9 4 6 8 1 6 2 2 9 4 7 9 7 9 9 4 4 6 9 3 5 2 2 1 0 4 9 6 8 5 0 7 3 1 2 0 0 8 2 6 8 7 6 4 8 3 9 3 2 9 8 7 8 4 0 4 6 9 ") == 0);
$m{20}=1 if(index($a, "200 468 68 31\n1 1 6 6 9 4 2 5 0 7 7 7 8 5 5 1 3 4 4 7 3 0 8 2 8 8 5 9 8 9 9 7 9 2 9 6 2 4 3 3 2 6 6 5 3 7 9 8 0 0 7 7 4 0 0 6 4 6 3 8 4 5 4 9 0 6 3 6 6 2 6 2 8 7 9 9 7 1 0 1 4 5 6 2") == 0);
$m{20}=1 if(index($a, "200 500 42 42\n0 9 4 5 0 4 9 3 2 6 7 3 6 7 2 3 1 4 2 0 2 5 4 1 1 0 3 8 1 2 2 3 4 1 6 9 5 6 2 3 2 4 1 3 3 9 7 1 6 2 5 8 5 3 3 3 6 7 4 0 8 5 1 7 8 5 8 6 2 4 3 3 3 7 3 2 7 3 3 1 7 7 2 8") == 0);
$m{20}=1 if(index($a, "3 3 0 0\n0 1 1\n2 0 1\n1 2 0\n") == 0);
$m{20}=1 if(index($a, "49 29 0 0\n0 2 1 0 0 2 2 1 0 2 2 0 1 1 0 0 0 2 2 1 1 1 0 2 1 2 1 2 2 1 0 0 1 2 0 1 2 0 1 1 2 2 2 2 2 0 0 0 0\n0 0 2 2 0 2 0 1 0 2 1 2 0 0 2 0 2 0 1 2 1 1 2 2 1 2 1 1 1 1 2 0 0 0 2 1 2") == 0);
$m{20}=1 if(index($a, "50 100 25 25\n0 2 4 1 3 2 1 2 4 0 2 1 4 4 3 4 1 2 0 1 2 4 4 0 0 1 2 4 4 2 1 0 3 1 0 3 2 4 1 0 0 1 3 0 1 4 1 4 2 1\n3 4 1 2 0 1 3 0 0 4 4 4 0 2 2 1 3 2 2 4 4 0 0 1 1 2 1 4 2 0 4 3 4 2 ") == 0);
$m{20}=1 if(index($a, "NO\n") == 0);
$m{20}=1 if(index($a, "YES\n") == 0);
$m{2}=1 if(index($a, "100000000\n") == 0);
$m{2}=1 if(index($a, "111111\n") == 0);
$m{2}=1 if(index($a, "1191\n") == 0);
$m{2}=1 if(index($a, "11\n") == 0);
$m{2}=1 if(index($a, "12344321\n") == 0);
$m{2}=1 if(index($a, "12865745\n") == 0);
$m{2}=1 if(index($a, "14153200\n") == 0);
$m{2}=1 if(index($a, "24\n") == 0);
$m{2}=1 if(index($a, "4\n") == 0);
$m{2}=1 if(index($a, "600\n") == 0);
$m{2}=1 if(index($a, "Alice\n") == 0);
$m{2}=1 if(index($a, "Bob\n") == 0);
$m{3}=1 if(index($a, "-1\n") == 0);
$m{3}=1 if(index($a, "10000\n\n") == 0);
$m{3}=1 if(index($a, "1069\n") == 0);
$m{3}=1 if(index($a, "1155\n") == 0);
$m{3}=1 if(index($a, "11\n") == 0);
$m{3}=1 if(index($a, "1321\n") == 0);
$m{3}=1 if(index($a, "1487\n") == 0);
$m{3}=1 if(index($a, "1495\n") == 0);
$m{3}=1 if(index($a, "1572\n") == 0);
$m{3}=1 if(index($a, "1610\n") == 0);
$m{3}=1 if(index($a, "168\n") == 0);
$m{3}=1 if(index($a, "1692\n") == 0);
$m{3}=1 if(index($a, "1989\n") == 0);
$m{3}=1 if(index($a, "2343\n") == 0);
$m{3}=1 if(index($a, "2610\n") == 0);
$m{3}=1 if(index($a, "315\n") == 0);
$m{3}=1 if(index($a, "349\n") == 0);
$m{3}=1 if(index($a, "4179\n") == 0);
$m{3}=1 if(index($a, "4\n") == 0);
$m{3}=1 if(index($a, "5135\n") == 0);
$m{3}=1 if(index($a, "5283\n") == 0);
$m{3}=1 if(index($a, "5\n") == 0);
$m{3}=1 if(index($a, "6283\n") == 0);
$m{3}=1 if(index($a, "676\n") == 0);
$m{3}=1 if(index($a, "6886\n") == 0);
$m{3}=1 if(index($a, "741\n") == 0);
$m{3}=1 if(index($a, "7936\n") == 0);
$m{3}=1 if(index($a, "8201\n") == 0);
$m{3}=1 if(index($a, "9169\n") == 0);
$m{3}=1 if(index($a, "9730\n") == 0);
$m{3}=1 if(index($a, "9876\n") == 0);
$m{3}=1 if(index($a, "9\n") == 0);
$m{4}=1 if(index($a, "100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 1") == 0);
$m{4}=1 if(index($a, "100\n25 14 64 59 81 58 31 56 68 61 2 71 74 49 60 29 62 90 23 66 67 5 4 13 67 60 99 84 51 29 31 96 58 51 97 13 64 13 40 31 57 78 2 10 100 62 1 71 93 48 71 70 24 30 92 74 55 49 60 53 8") == 0);
$m{4}=1 if(index($a, "100\n99 72 38 81 14 65 43 42 12 100 39 79 87 95 87 25 100 80 88 70 86 90 2 74 7 80 44 55 33 99 33 100 98 2 31 50 84 30 22 1 48 36 39 20 10 27 66 75 87 45 54 25 51 71 85 3 29 6 21 27 ") == 0);
$m{4}=1 if(index($a, "10\n88 15 15 82 19 17 35 86 40 33\n") == 0);
$m{4}=1 if(index($a, "15\n62 8 90 2 24 62 38 64 76 60 30 76 80 74 72\n") == 0);
$m{4}=1 if(index($a, "15\n69 81 52 89 73 67 17 87 38 96 16 64 50 66 97\n") == 0);
$m{4}=1 if(index($a, "2\n100 98\n") == 0);
$m{4}=1 if(index($a, "3\n1 2 3\n") == 0);
$m{4}=1 if(index($a, "5\n1 2 3 4 5\n") == 0);
$m{4}=1 if(index($a, "99\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ") == 0);
$m{4}=1 if(index($a, "impossible\n") == 0);
$m{4}=1 if(index($a, "possible\n") == 0);
$m{5}=1 if(index($a, "10000\n10000\n1344 8475 7638 2551 4955 4495 6516 7888 939 284 8358 4328 7623 22 4454 7216 2288 9453 9015 306 255 5415 9392 3813 2166 4222 291 2217 4379 4959 2331 2309 2188 4597 2898 2") == 0);
$m{5}=1 if(index($a, "100\n") == 0);
$m{5}=1 if(index($a, "100\n10\n14 85 77 26 50 45 66 79 10 3\n") == 0);
$m{5}=1 if(index($a, "110\n") == 0);
$m{5}=1 if(index($a, "112\n") == 0);
$m{5}=1 if(index($a, "114\n4994\n95 61 89 87 11 14 41 74 106 13 106 108 22 90 66 93 83 25 106 21 91 84 61 96 47 58 49 96 29 64 109 17 27 36 104 75 105 92 37 99 69 106 35 23 93 87 58 13 99 63 100 48 15 69 5") == 0);
$m{5}=1 if(index($a, "116\n") == 0);
$m{5}=1 if(index($a, "117\n") == 0);
$m{5}=1 if(index($a, "118\n") == 0);
$m{5}=1 if(index($a, "121\n") == 0);
$m{5}=1 if(index($a, "127\n") == 0);
$m{5}=1 if(index($a, "140\n") == 0);
$m{5}=1 if(index($a, "147\n") == 0);
$m{5}=1 if(index($a, "16\n3\n10 5 7\n") == 0);
$m{5}=1 if(index($a, "1828\n4129\n1330 1547 274 718 496 1744 1430 1311 995 774 398 1586 1345 927 244 956 652 1121 319 1241 1671 1742 599 1560 609 1528 1236 2 1329 1478 49 172 1253 1236 1581 874 906 46 368 ") == 0);
$m{5}=1 if(index($a, "18\n") == 0);
$m{5}=1 if(index($a, "1\n") == 0);
$m{5}=1 if(index($a, "1\n1\n1\n") == 0);
$m{5}=1 if(index($a, "208\n277\n198 75 51 132 112 185 53 63 97 50 29 64 182 153 68 63 141 129 2 192 185 143 93 130 154 159 114 73 45 143 174 30 181 97 182 169 115 32 183 177 178 194 111 27 136 184 23 24 99") == 0);
$m{5}=1 if(index($a, "21\n") == 0);
$m{5}=1 if(index($a, "2\n") == 0);
$m{5}=1 if(index($a, "3138\n5814\n1333 2404 2316 174 2539 235 2929 38 2298 2047 3106 1572 3097 1749 2957 3120 957 80 1810 2477 979 670 653 78 1278 233 1354 3124 2512 2139 1265 2898 1677 2899 29 981 1539 12") == 0);
$m{5}=1 if(index($a, "3263\n2063\n1957 1440 1614 843 2088 2207 3084 3174 1908 1536 1458 841 2959 2945 2516 811 1625 2202 1850 1033 2130 2056 809 2882 3139 3129 2378 1990 2284 2882 311 2957 3215 2893 2566 2") == 0);
$m{5}=1 if(index($a, "3365\n8599\n1148 2683 3187 3167 2042 749 650 758 1895 1228 1365 2135 1682 1335 1540 3130 22 463 3159 2530 3139 775 1086 2258 1526 2968 2344 2178 1182 1489 2406 498 552 3018 3219 2863 ") == 0);
$m{5}=1 if(index($a, "3753\n7779\n1990 3097 82 1743 38 784 1999 842 1597 1843 2334 1776 671 866 3443 665 435 649 1935 129 1934 1460 2474 67 1218 2715 582 1641 3009 2138 197 2438 1552 3423 1956 2087 542 376") == 0);
$m{5}=1 if(index($a, "3933\n5137\n1923 2568 1756 3531 3675 1056 3531 3048 270 1545 2367 766 416 9 1144 119 2903 1141 3713 2440 3682 51 3521 1979 2954 1388 902 2610 3905 2532 2494 1202 1524 796 686 2922 230") == 0);
$m{5}=1 if(index($a, "4719\n8881\n3576 1947 2150 1208 2790 3075 4281 86 3549 3268 1040 4282 4313 4131 4678 3108 3279 2887 12 4693 429 2340 2750 487 2061 2679 1834 37 4013 1647 229 1257 1249 3528 3545 964 4") == 0);
$m{5}=1 if(index($a, "59\n") == 0);
$m{5}=1 if(index($a, "5\n") == 0);
$m{5}=1 if(index($a, "6132\n8108\n1728 2881 1154 1634 4159 2078 765 450 2118 4802 2582 3849 4436 4764 420 2909 5698 2488 3452 3772 3038 2706 3289 3678 1273 2715 2245 5324 2656 4554 2809 2880 3892 2693 1156") == 0);
$m{5}=1 if(index($a, "7169\n6428\n3937 142 3565 5943 6651 6059 2668 4400 4988 2117 1857 2239 2340 3570 1001 67 4120 6839 2640 6656 4203 2877 3646 2915 2542 6090 4557 1133 2019 2777 697 4046 779 4284 1703 6") == 0);
$m{5}=1 if(index($a, "7206\n4254\n4807 2294 1198 2787 2206 5547 866 5669 5202 2872 5333 1532 1371 4206 3995 4260 413 1174 4783 2755 5670 2792 6945 55 1404 4521 6156 6471 5215 4914 2521 5397 735 3783 2062 6") == 0);
$m{5}=1 if(index($a, "7281\n7907\n1840 3252 2665 4453 3408 6173 4694 1321 3654 4849 1207 5705 2095 2389 3241 5098 3141 4626 3157 6451 4767 208 3901 1373 6532 4893 6622 3173 5609 1794 4248 4573 1790 638 489") == 0);
$m{5}=1 if(index($a, "7513\n6188\n7226 4744 392 4028 2869 1608 1951 4942 896 3234 6318 226 4910 320 3401 6385 3452 5274 4228 7101 7069 1451 4378 2460 6661 5430 2633 6930 3945 4399 546 1252 884 2901 5466 60") == 0);
$m{5}=1 if(index($a, "79\n") == 0);
$m{5}=1 if(index($a, "8385\n122\n4335 2258 5929 3587 138 6023 430 6647 2730 5669 6659 4594 4998 829 3362 3099 6910 2863 1857 321 6857 2675 3940 1209 7270 7669 7394 3406 6804 7101 3339 5513 3405 8320 1193 1") == 0);
$m{5}=1 if(index($a, "8414\n9489\n5880 1005 3429 1702 7491 14 3553 6406 2965 7933 3614 1152 533 1956 2164 3904 1814 5484 2943 1095 8040 814 7705 2426 2204 1406 704 7916 1102 5996 836 3521 8152 3753 2268 19") == 0);
$m{5}=1 if(index($a, "85\n") == 0);
$m{5}=1 if(index($a, "87\n") == 0);
$m{6}=1 if(index($a, "10\n100\n") == 0);
$m{6}=1 if(index($a, "128489\n") == 0);
$m{6}=1 if(index($a, "136111\n") == 0);
$m{6}=1 if(index($a, "140683\n") == 0);
$m{6}=1 if(index($a, "168398\n194102\n") == 0);
$m{6}=1 if(index($a, "193573\n") == 0);
$m{6}=1 if(index($a, "1\n11\n") == 0);
$m{6}=1 if(index($a, "1\n200000\n") == 0);
$m{6}=1 if(index($a, "31\n") == 0);
$m{6}=1 if(index($a, "34277\n73704\n") == 0);
$m{6}=1 if(index($a, "35251\n") == 0);
$m{6}=1 if(index($a, "35805\n136786\n") == 0);
$m{6}=1 if(index($a, "3\n") == 0);
$m{6}=1 if(index($a, "56409\n140772\n") == 0);
$m{6}=1 if(index($a, "571\n57458\n") == 0);
$m{6}=1 if(index($a, "57383\n") == 0);
$m{6}=1 if(index($a, "7004\n35411\n") == 0);
$m{6}=1 if(index($a, "73471\n") == 0);
$m{6}=1 if(index($a, "76594\n128658\n") == 0);
$m{7}=1 if(index($a, "10000\n") == 0);
$m{7}=1 if(index($a, "1059\n") == 0);
$m{7}=1 if(index($a, "1075\n") == 0);
$m{7}=1 if(index($a, "12\n") == 0);
$m{7}=1 if(index($a, "2252\n") == 0);
$m{7}=1 if(index($a, "2675\n") == 0);
$m{7}=1 if(index($a, "4145\n") == 0);
$m{7}=1 if(index($a, "5143\n") == 0);
$m{7}=1 if(index($a, "5\n") == 0);
$m{7}=1 if(index($a, "6447\n") == 0);
$m{7}=1 if(index($a, "Lose\n") == 0);
$m{7}=1 if(index($a, "Win\n") == 0);
$m{8}=1 if(index($a, "100\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 10") == 0);
$m{8}=1 if(index($a, "100\n100000 2\n100000 3\n100000 4\n100000 5\n100000 6\n100000 7\n100000 8\n100000 9\n100000 10\n100000 11\n100000 12\n100000 13\n100000 14\n100000 15\n100000 16\n100000 17\n100000 18\n100000 19\n10000") == 0);
$m{8}=1 if(index($a, "100\n114568 4712\n45494 678\n77079 65438\n70552 10407\n73197 89347\n43353 54207\n80003 4705\n53291 364\n8017 28735\n45596 24978\n4790 4788\n93297 70012\n94708 618\n33536 49544\n30942 30940\n76803 7") == 0);
$m{8}=1 if(index($a, "100\n1441 47593\n31306 103\n49932 45150\n67127 27536\n24421 21903\n29507 15876\n54278 5996\n44250 37168\n23071 39882\n9733 10271\n20932 61250\n22673 33158\n61284 59154\n19905 33549\n7644 66265\n362") == 0);
$m{8}=1 if(index($a, "100\n46659 69377\n23169 85100\n90576 685\n18015 65376\n85111 98415\n92525 10305\n91352 61884\n83675 49330\n6417 15601\n56910 38440\n1017 37507\n74458 79939\n36670 36830\n17232 36196\n68980 94719\n2") == 0);
$m{8}=1 if(index($a, "100\n79339 12026\n1179 42133\n1744 76989\n69997 5906\n11318 24366\n41202 76348\n23787 28997\n32827 5504\n48898 60498\n31587 63750\n78534 56954\n31769 27111\n20133 54183\n69301 66601\n63601 17437\n6") == 0);
$m{8}=1 if(index($a, "100\n79970 29875\n706 16553\n6165 75085\n80743 4765\n30089 35785\n61866 29918\n58696 36022\n69397 82213\n12270 55777\n84073 76795\n27366 63213\n50807 89677\n57474 7939\n20326 51289\n54812 21143\n77") == 0);
$m{8}=1 if(index($a, "1\n12 5\n") == 0);
$m{8}=1 if(index($a, "1\n21 3\n") == 0);
$m{8}=1 if(index($a, "3\n5 10\n40 6\n100 8\n") == 0);
$m{8}=1 if(index($a, "Lose\n") == 0);
$m{8}=1 if(index($a, "Lose\nWin\nWin\nWin\nWin\nWin\nLose\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nLose\nWin\nWin\nWin\nWin\nWin\nWi") == 0);
$m{8}=1 if(index($a, "Win\n") == 0);
$m{8}=1 if(index($a, "Win\nLose\nWin\nWin\nWin\nWin\nLose\nLose\nWin\nWin\nLose\nWin\nLose\nWin\nLose\nLose\nWin\nWin\nWin\nWin\nWin\nLose\nLose\nLose\nLose\nLose\nWin\nLose\nWin\nWin\nLose\nWin\nLose\nWin\nWin\nWin\nLose\nLose\nWin\nWin\nWin\n") == 0);
$m{8}=1 if(index($a, "Win\nWin\nLose\n") == 0);
$m{8}=1 if(index($a, "Win\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nWin\nW") == 0);
$m{9}=1 if(index($a, "1328\n2712 3419 184 1513 3891 3046 1898 1189 2150 3581 733 299 766 397 3053 2756 883 118 438 1917 1885 1351 944 3137 2199 87 3524 1242 392 3545 2544 1116 3364 3092 2361 1005 524 1829") == 0);
$m{9}=1 if(index($a, "1475\n9656 191 7606 8815 2057 9385 1419 1910 6796 6402 1599 876 2736 5293 7623 5096 1852 8828 5818 1205 9536 6080 9417 524 8622 9647 421 2326 6675 6152 8042 9169 9160 9626 7997 9188 ") == 0);
$m{9}=1 if(index($a, "1500\n3916 6251 7875 5989 4292 4667 9037 7289 9724 7714 623 8718 257 8458 2353 1060 5381 5479 2774 1120 8654 429 6566 3773 5768 1532 7849 1293 6101 4729 4975 8896 7717 874 9245 3695 ") == 0);
$m{9}=1 if(index($a, "2\n") == 0);
$m{9}=1 if(index($a, "3\n") == 0);
$m{9}=1 if(index($a, "3\n6 1 5\n9 2 7\n") == 0);
$m{9}=1 if(index($a, "485\n3441 3188 3987 6517 3173 4790 4503 1319 3909 3916 1838 5352 1682 2318 4229 5948 3550 504 5572 6715 465 4724 796 1301 1517 140 6911 3037 3421 812 4253 5919 6891 5205 1578 5695 17") == 0);
$m{9}=1 if(index($a, "4\n") == 0);
$m{9}=1 if(index($a, "560\n4814 4381 3072 2335 2430 3172 3958 8736 3213 6259 91 8102 7265 7164 4639 7613 7006 838 3960 2468 2841 3686 8641 1586 5070 5910 2301 6533 5937 1609 4765 7382 2455 7517 2244 3141 ") == 0);
$m{9}=1 if(index($a, "5\n") == 0);
$m{9}=1 if(index($a, "5\n6 1 5 9 2\n7 7 9 4 4\n") == 0);
$m{9}=1 if(index($a, "69\n3253 3369 660 1949 4617 3586 3561 3382 7928 4932 2034 599 7713 1984 4040 5308 7972 6853 6802 5811 2226 4349 1997 4202 195 6608 1785 823 1084 2947 6118 4671 5526 4139 7016 3932 65") == 0);
$m{9}=1 if(index($a, "808\n4676 1297 905 1047 1021 659 125 117 1960 1285 5840 1698 2199 2840 3704 1298 908 5548 463 322 1692 5868 1138 5714 5462 2008 4252 520 1972 776 2179 2829 454 4137 3163 4050 3590 54") == 0);
$m{9}=1 if(index($a, "984\n2534 2660 4845 1951 524 1894 1409 2227 170 783 1313 4677 957 3941 4862 4572 2837 2601 3145 2944 4468 1330 436 3881 2452 1288 1466 4359 1547 3995 4158 4623 3465 4428 2037 3637 27") == 0);

print join(" ", sort{$a<=>$b}keys %m), "\n";
0