QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#47346#4740. Plan metraZhangYiDe100 ✓172ms26092kbC++982.9kb2022-09-08 14:05:072022-09-08 14:05:09

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 11
Accepted

Test #1:

score: 11
Accepted
time: 2ms
memory: 3712kb

input:

7
6 6 2 2 1
5 3 5 1 4

output:

TAK
1 6 1
1 4 2
1 5 2
5 2 4
5 7 1
7 3 3

result:

ok good solution

Test #2:

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

input:

10
31 89 20 19 19 20 19 164
70 88 20 20 20 19 20 125

output:

NIE

result:

ok no solution

Test #3:

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

input:

10
57 106 79 12 139 103 103 85
110 53 28 65 98 86 50 117

output:

NIE

result:

ok no solution

Test #4:

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

input:

10
13 62 24 125 13 15 54 94
1 76 14 113 1 1 68 82

output:

NIE

result:

ok no solution

Test #5:

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

input:

10
123 146 139 5 192 80 77 118
97 172 165 31 166 106 51 92

output:

TAK
1 10 26
10 2 97
1 3 146
1 4 139
1 5 5
10 6 166
1 7 80
10 8 51
10 9 92

result:

ok good solution

Test #6:

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

input:

10
112 67 152 16 6 28 1 8
111 82 137 31 21 41 14 7

output:

TAK
1 6 6
1 5 16
1 3 67
1 8 1
8 7 27
8 9 7
9 2 104
9 10 7
10 4 137

result:

ok good solution

Test #7:

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

input:

10
83 108 180 120 114 50 79 132
15 176 112 188 182 118 11 64

output:

TAK
1 10 68
10 2 15
1 3 108
10 4 112
1 5 120
1 6 114
1 7 50
10 8 11
10 9 64

result:

ok good solution

Test #8:

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

input:

10
65 149 150 119 51 90 64 172
66 150 151 120 52 91 65 173

output:

TAK
1 10 1
1 2 65
1 3 149
1 4 150
1 5 119
1 6 51
1 7 90
1 8 64
1 9 172

result:

ok good solution

Test #9:

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

input:

2



output:

TAK
1 2 1

result:

ok good solution

Test #10:

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

input:

10
46 145 46 19 165 20 145 99
47 146 47 112 76 112 146 6

output:

NIE

result:

ok no solution

Test #11:

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

input:

10
4 3 4 150 114 86 99 86
2 3 2 155 118 80 105 80

output:

NIE

result:

ok no solution

Test #12:

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

input:

10
6 7 12 168 171 12 7 7
6 5 14 180 159 14 6 5

output:

NIE

result:

ok no solution

Test #13:

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

input:

10
13 170 28 134 10 117 117 90
98 85 113 49 95 32 32 5

output:

TAK
1 10 85
1 2 13
10 3 85
1 4 28
10 5 49
1 6 10
10 7 32
10 8 32
10 9 5

result:

ok good solution

Test #14:

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

input:

10
90 2 53 53 158 58 1 114
89 1 54 54 161 59 2 111

output:

TAK
1 6 158
1 8 1
8 7 57
8 5 52
8 4 52
8 3 1
3 2 88
3 10 1
10 9 111

result:

ok good solution

Test #15:

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

input:

10
47 2 198 181 29 192 192 2
187 142 58 41 169 52 52 142

output:

TAK
1 10 140
1 2 47
1 3 2
10 4 58
10 5 41
1 6 29
10 7 52
10 8 52
1 9 2

result:

ok good solution

Test #16:

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

input:

10
78 128 140 162 140 110 191 70
79 129 141 163 141 111 192 71

output:

TAK
1 10 1
1 2 78
1 3 128
1 4 140
1 5 162
1 6 140
1 7 110
1 8 191
1 9 70

result:

ok good solution

Test #17:

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

input:

3
1
2

output:

TAK
1 3 1
1 2 1

result:

ok good solution

Subtask #2:

score: 22
Accepted

Dependency #1:

100%
Accepted

Test #18:

score: 22
Accepted
time: 3ms
memory: 3652kb

input:

1000
998 997 996 995 994 993 992 991 990 989 988 987 986 985 984 983 982 981 980 979 978 977 976 975 974 973 972 971 970 969 968 967 966 965 964 963 962 961 960 959 958 957 956 955 954 953 952 951 950 949 948 947 946 945 944 943 942 941 940 939 938 937 936 935 934 933 932 931 930 929 928 927 926 925...

output:

TAK
1 999 1
999 998 1
998 997 1
997 996 1
996 995 1
995 994 1
994 993 1
993 992 1
992 991 1
991 990 1
990 989 1
989 988 1
988 987 1
987 986 1
986 985 1
985 984 1
984 983 1
983 982 1
982 981 1
981 980 1
980 979 1
979 978 1
978 977 1
977 976 1
976 975 1
975 974 1
974 973 1
973 972 1
972 971 1
971 970 ...

result:

ok good solution

Test #19:

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

input:

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

output:

TAK
1 2 1
2 999 997
2 998 996
2 997 995
2 996 994
2 995 993
2 994 992
2 993 991
2 992 990
2 991 989
2 990 988
2 989 987
2 988 986
2 987 985
2 986 984
2 985 983
2 984 982
2 983 981
2 982 980
2 981 979
2 980 978
2 979 977
2 978 976
2 977 975
2 976 974
2 975 973
2 974 972
2 973 971
2 972 970
2 971 969
...

result:

ok good solution

Test #20:

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

input:

3000
3246 3738 4685 1539 2140 2026 4814 4815 2059 2686 4692 4403 2701 1596 4878 2470 3194 2272 2171 4120 2654 3349 1842 2046 4360 4529 4792 3250 1741 4766 4337 1559 1601 2362 2295 4463 4987 4119 3847 2272 1522 2882 4556 2484 2864 3002 1446 1772 3089 3092 2562 1461 3630 1879 1899 4881 2334 3189 1794 ...

output:

NIE

result:

ok no solution

Test #21:

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

input:

3000
4130 2457 3399 3125 2758 4911 615 1200 3017 4249 4344 2200 4005 876 4946 976 3067 2029 2158 2667 4183 1380 40 919 3377 2618 3007 1818 1033 227 4422 2971 3208 893 3079 1691 663 4139 2833 1218 4741 2450 789 4493 971 3215 4274 3039 2060 3742 2302 1506 4156 607 773 3151 2661 3913 4082 2956 4454 192...

output:

NIE

result:

ok no solution

Test #22:

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

input:

3000
954 3442 341 795 3138 3391 4895 1174 3801 2933 3695 3388 1743 2942 1572 1029 2173 1438 2270 724 4007 896 2465 4667 3054 249 246 4977 3675 2669 3911 339 2771 984 3399 1237 349 3190 1834 3114 4549 3675 4487 1586 881 2723 677 1290 2979 2710 4746 2994 2524 682 3646 2776 317 4457 2636 2524 3278 465 ...

output:

NIE

result:

ok no solution

Test #23:

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

input:

3000
1236 2492 766 600 2029 4796 1025 4509 3655 4410 1132 3591 2190 3687 3393 1965 4342 3081 4140 2178 476 425 3368 2239 3481 245 548 4122 2637 4282 2385 606 2502 1565 1925 1754 2384 4313 3465 1490 2259 4430 1678 1632 1938 2513 3731 1713 3283 3289 3403 1979 1846 668 2635 3797 4226 4092 614 2677 1977...

output:

TAK
1 3000 425
1 2 1236
3000 3 2067
1 4 766
3000 5 175
1 6 2029
3000 7 4371
1 8 1025
3000 9 4084
1 10 3655
1 11 4410
3000 12 707
3000 13 3166
1 14 2190
3000 15 3262
3000 16 2968
3000 17 1540
3000 18 3917
3000 19 2656
3000 20 3715
1 21 2178
3000 22 51
1 23 425
1 24 3368
1 25 2239
1 26 3481
1 27 245
3...

result:

ok good solution

Test #24:

score: 0
Accepted
time: 4ms
memory: 5692kb

input:

3000
2567 1720 478 391 3422 4790 4949 2339 4239 919 1382 3856 4907 3545 4073 2037 3854 4075 2618 1578 2198 1964 2263 3825 2860 3242 2777 3795 2069 1280 1188 645 2323 4900 4781 4018 4425 4246 4049 2145 2096 1017 3644 3069 3423 3773 3587 4999 4324 1368 677 803 2346 4166 2428 4842 3374 2423 4618 2514 3...

output:

TAK
1 2903 1431
1 2870 3003
1 2756 381
1 2742 37
1 2727 1595
1 2690 1532
1 2680 1217
1 2655 2958
1 2615 1023
1 2560 2015
1 2559 5
1 2476 972
1 2417 390
1 2393 2867
1 2317 1132
1 2254 2711
1 2190 842
1 2133 97
1 1993 622
1 1912 1515
1 1905 751
1 1844 887
1 1833 1927
1 1806 1621
1 1801 669
1 1794 1058...

result:

ok good solution

Test #25:

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

input:

3000
4989 4334 179 1994 2064 2545 1064 4694 1823 4758 688 3273 875 708 2573 451 2326 4205 4815 1534 3459 2928 3565 3638 1987 4345 1414 4035 2531 1228 1589 3596 4318 3415 4512 2953 2003 2151 1650 4365 1935 4182 1154 1660 1760 1644 2423 1301 3310 2072 3024 1718 4061 1106 2165 4436 2082 1667 3732 260 3...

output:

TAK
1 3000 7
1 2 4989
3000 3 4327
3000 4 172
1 5 1994
3000 6 2057
1 7 2545
1 8 1064
3000 9 4687
1 10 1823
3000 11 4751
3000 12 681
3000 13 3266
1 14 875
3000 15 701
3000 16 2566
1 17 451
3000 18 2319
3000 19 4198
1 20 4815
1 21 1534
3000 22 3452
3000 23 2921
3000 24 3558
3000 25 3631
3000 26 1980
30...

result:

ok good solution

Test #26:

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

input:

3000
1352 2311 3356 3752 3704 2206 3802 2718 1693 3838 2439 1539 2157 2532 3342 2895 2380 1628 3603 3822 1283 4277 3128 4180 2361 3794 3853 4837 3991 4926 2307 4054 3399 3864 1265 2472 4890 1604 1800 4204 4133 4192 4630 3934 4785 3913 1573 4835 2828 3636 2702 2551 4335 2662 4159 2147 3808 3148 3371 ...

output:

TAK
1 2681 1260
2681 2980 1905
2681 2975 511
2681 2963 3600
2681 2960 693
2681 2952 427
2681 2951 2277
2681 2946 2363
2681 2924 1117
2681 2915 837
2681 2913 2534
2681 2911 1885
2681 2904 640
2681 2889 2625
2681 2872 3519
2681 2851 3512
2681 2848 2522
2681 2839 1250
2681 2826 1625
2681 2823 1559
2681...

result:

ok good solution

Test #27:

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

input:

3000
3097 3903 4418 1796 1042 4657 1430 2005 2767 3209 4552 1943 4809 4841 1355 4449 1330 1489 4339 886 749 4199 4558 4731 4947 601 3155 2695 3142 962 3101 2429 737 1891 3333 4856 3247 2016 2097 2504 4465 4420 2036 3511 1433 3773 1896 4490 2307 1489 2123 4623 2931 840 2268 3805 1984 2726 1790 1120 4...

output:

NIE

result:

ok no solution

Test #28:

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

input:

3000
886 2441 1532 1519 993 2071 1533 706 3290 3577 2399 3107 1818 2494 4684 3579 1157 3779 2708 1157 2737 1792 967 3015 2289 2691 4486 2122 2800 2027 3277 4540 3785 1152 4885 2099 1008 2799 3230 1610 3568 4055 2860 1931 1482 4322 3415 3720 3930 3986 2518 1314 1596 1392 469 3657 1438 4159 2898 2654 ...

output:

NIE

result:

ok no solution

Test #29:

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

input:

3000
2696 919 556 3002 1270 4174 2500 353 1352 3944 635 3440 4641 1575 4667 3561 3900 3147 1359 3273 938 829 900 2902 83 1087 302 1109 1910 4061 966 2803 4023 3639 2809 1303 1344 3385 2796 1538 1498 4548 1707 1888 3827 69 2512 557 610 3502 3360 1799 4427 669 3527 2313 4578 4303 2867 1200 1568 488 28...

output:

NIE

result:

ok no solution

Test #30:

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

input:

3000
2853 4599 4265 4267 2411 1064 1784 2058 1150 2720 2494 4060 1681 2671 3694 2359 2568 717 3405 1 1969 791 2362 2547 386 1547 2175 650 3372 4654 2080 2451 2143 397 3823 339 1073 3915 1218 905 3584 1340 901 681 240 2919 2433 4199 4842 2488 3026 724 3660 1325 265 4696 2023 4322 4057 2231 2640 4469 ...

output:

TAK
1 3000 2311
3000 2 542
3000 3 2288
3000 4 1954
3000 5 1956
3000 6 100
1 7 1064
1 8 1784
1 9 2058
1 10 1150
3000 11 409
3000 12 183
3000 13 1749
1 14 1681
1 15 2671
3000 16 1383
3000 17 48
1 18 2568
1 19 717
3000 20 1094
1 21 1
1 22 1969
1 23 791
1 24 2362
1 25 2547
1 26 386
1 27 1547
1 28 2175
1...

result:

ok good solution

Test #31:

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

input:

3000
2218 4876 1974 1767 390 3598 1346 2423 981 4265 1477 3160 1900 2063 4806 624 2391 4129 1166 3586 3094 1018 1384 2665 3668 2680 3722 3123 4195 3774 3897 1755 4422 1528 3473 3656 2016 992 4424 582 1797 1852 4493 3604 2722 1591 2900 2124 1375 4122 284 3011 4290 3482 4840 1712 2916 684 1624 1356 47...

output:

TAK
1 2974 95
1 2970 1363
1 2954 2276
1 2942 2826
1 2891 54
1 2872 1012
1 2839 465
1 2808 1843
1 2797 3509
1 2790 1945
1 2785 501
1 2780 3247
1 2779 207
1 2776 838
1 2733 586
1 2725 3126
1 2719 1359
1 2699 2602
1 2684 3123
1 2642 770
1 2641 2594
1 2634 238
1 2618 3026
1 2614 2285
1 2590 1935
1 2567 ...

result:

ok good solution

Test #32:

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

input:

3000
1091 3360 3940 2706 3309 1955 1031 4529 3713 3820 3280 1916 952 4104 262 4281 3753 3446 1426 3135 3016 50 4491 3646 1717 3391 3677 2804 3046 3658 342 4348 4900 3701 1141 4942 907 4024 1412 1922 2071 4306 3746 1073 2301 517 2824 3500 1580 105 2728 3224 4806 3607 4640 3007 4097 3525 2260 28 74 13...

output:

TAK
1 3000 2695
1 2 1091
3000 3 665
3000 4 1245
3000 5 11
3000 6 614
1 7 1955
1 8 1031
3000 9 1834
3000 10 1018
3000 11 1125
3000 12 585
1 13 1916
1 14 952
3000 15 1409
1 16 262
3000 17 1586
3000 18 1058
3000 19 751
1 20 1426
3000 21 440
3000 22 321
1 23 50
3000 24 1796
3000 25 951
1 26 1717
3000 27...

result:

ok good solution

Test #33:

score: 0
Accepted
time: 4ms
memory: 5728kb

input:

3000
3066 4794 1434 2322 1630 2913 1767 2035 4692 1441 3958 1787 2971 4301 3880 2889 3648 3292 3412 3012 2637 3888 4310 4986 4854 1983 2463 3127 4270 4277 3117 4782 4979 4226 3572 2153 4973 4226 2459 2092 4055 4711 1362 4527 1967 4794 1576 4563 3917 3941 2122 2808 1769 2958 4199 1431 4698 4117 4978 ...

output:

TAK
1 1445 1270
1445 2993 2683
1445 2254 40
1445 2218 289
1445 2182 1926
1445 2087 898
1445 1748 1613
1445 1679 1849
1445 1558 35
1445 1104 3083
1445 1041 3675
1445 1023 379
1445 848 2937
1445 823 2505
1445 757 3387
1445 2733 1
2733 2910 2703
2733 2884 118
2733 2703 260
2733 2679 816
2733 2510 2546
...

result:

ok good solution

Test #34:

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

input:

3000
3007 4339 2713 1682 3269 896 4912 1719 4017 2821 4716 4834 3914 2774 4564 1041 3359 1294 2362 3216 811 4452 4433 4144 1481 1748 3833 1420 1847 1424 1051 2678 2486 2506 2275 2397 3745 612 2430 3651 2980 3630 2386 3229 4982 3356 4081 4489 2604 4456 3572 1906 2670 3437 4940 2119 4182 4332 2324 368...

output:

NIE

result:

ok no solution

Test #35:

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

input:

3000
2113 2877 3332 1103 4221 1402 4988 3090 4447 3216 1214 2798 955 3564 3217 1640 3071 535 3509 1280 2014 2438 4628 1313 4929 3109 2404 4673 3314 1876 2131 4980 1943 2809 3748 3561 3790 1597 1120 2025 2927 2952 3810 1676 2214 3217 2319 1247 4407 2023 3757 1276 983 3849 2859 4187 2397 1631 1041 341...

output:

NIE

result:

ok no solution

Test #36:

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

input:

3000
1941 4646 2168 786 3079 4598 455 2861 4243 3087 3829 1626 2823 2402 4194 1680 3570 2198 1509 269 4882 99 3402 90 847 4219 3347 1955 757 88 134 2186 363 683 4604 1303 4488 2916 4352 551 2002 2107 4420 4418 4068 4754 3143 449 2727 2952 2414 3510 2293 2404 1223 1883 2098 2705 2223 3573 1742 4892 8...

output:

NIE

result:

ok no solution

Test #37:

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

input:

3000
4823 3370 3546 689 4392 2253 1309 1492 3406 3625 1540 1996 4594 1050 1342 2511 1137 1314 3871 693 1583 4453 2136 4567 2421 3968 956 4538 2083 534 537 1435 4836 3214 4443 607 3882 2646 171 1212 3325 4061 4967 4678 1267 3035 542 748 1552 8 851 2456 1224 210 2791 3160 257 4498 2664 2658 1450 3532 ...

output:

TAK
1 3000 10
1 2 4823
3000 3 3360
1 4 3546
3000 5 679
3000 6 4382
1 7 2253
3000 8 1299
1 9 1492
1 10 3406
3000 11 3615
3000 12 1530
1 13 1996
1 14 4594
3000 15 1040
3000 16 1332
1 17 2511
1 18 1137
1 19 1314
3000 20 3861
1 21 693
1 22 1583
1 23 4453
1 24 2136
1 25 4567
1 26 2421
3000 27 3958
1 28 9...

result:

ok good solution

Test #38:

score: 0
Accepted
time: 4ms
memory: 5708kb

input:

3000
3332 756 2055 1288 1561 1514 2953 536 3784 2353 423 4776 2334 2892 2112 1377 4588 1432 999 3987 3063 1186 945 696 1028 1459 3404 147 4055 467 721 3838 2162 793 3748 3218 1458 2074 3532 2710 768 452 2784 1080 4603 953 1112 4307 2720 1891 2228 726 2429 1093 1606 2130 4564 1780 2546 1829 1373 1104...

output:

TAK
1 2999 2323
1 2995 4389
1 2985 141
1 2972 410
1 2969 1392
1 2962 3559
1 2958 1946
1 2955 4209
1 2951 2287
1 2950 2560
1 2915 2042
1 2914 2156
1 2903 1398
1 2897 4163
1 2896 3130
1 2895 1538
1 2893 2781
1 2882 3141
1 2881 3536
1 2852 1516
1 2848 1420
1 2843 2019
1 2841 4266
1 2822 1984
1 2820 104...

result:

ok good solution

Test #39:

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

input:

3000
610 1799 1393 878 3099 1418 555 4169 1562 4823 4392 1525 2214 4168 975 4890 2034 1330 1266 946 2075 307 1229 2186 2106 473 3813 1702 309 1364 1328 956 906 2762 2254 4157 1434 2144 4442 3727 645 231 1985 4331 1625 544 602 1530 820 2125 909 1635 331 2216 1040 2794 1910 1764 4207 37 4032 4231 3354...

output:

TAK
1 3000 2693
1 2 610
1 3 1799
1 4 1393
1 5 878
3000 6 406
1 7 1418
1 8 555
3000 9 1476
1 10 1562
3000 11 2130
3000 12 1699
1 13 1525
1 14 2214
3000 15 1475
1 16 975
3000 17 2197
1 18 2034
1 19 1330
1 20 1266
1 21 946
1 22 2075
1 23 307
1 24 1229
1 25 2186
1 26 2106
1 27 473
3000 28 1120
1 29 1702...

result:

ok good solution

Test #40:

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

input:

3000
4392 2140 1762 1461 3944 3373 4608 2697 4508 3925 2016 1302 1448 1844 3854 4939 4992 2464 2034 3218 2114 1842 4347 3542 2030 4337 4016 3264 3751 1853 4686 1828 4083 4348 2692 4589 4107 3632 3108 2720 3526 3300 2029 3304 4522 1722 3600 4343 2664 3156 4156 1738 2972 3083 2460 2676 4999 1868 4196 ...

output:

TAK
1 1220 1270
1220 2991 2418
1220 2980 348
1220 2969 723
1220 2954 3508
1220 2952 1946
1220 2928 1794
1220 2925 2201
1220 2903 3032
1220 2867 719
1220 2864 1336
1220 2850 3021
1220 2846 477
1220 2839 950
1220 2837 1235
1220 2832 363
1220 2819 3372
1220 2818 1076
1220 2816 1998
1220 2814 292
1220 2...

result:

ok good solution

Test #41:

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

input:

3000
3776 3020 74 3836 4635 2332 3602 1143 1563 561 2317 1552 3531 1627 1560 3621 4104 4827 4065 1455 1113 4256 3436 107 3547 4420 1826 3772 4563 3927 4787 2141 3872 2726 607 2231 741 1769 4393 1596 2722 3962 3138 2631 4816 2958 4416 1539 1622 4220 1251 4873 4258 1589 3411 3298 2222 3702 1461 899 62...

output:

NIE

result:

ok no solution

Test #42:

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

input:

3000
3417 1286 2330 2910 1263 1904 2737 441 2043 2538 2191 3631 735 4281 1323 23 2407 2205 2405 2006 1822 2649 2622 526 1686 404 2569 3775 1194 3323 3357 2468 2466 374 1775 2699 1300 4548 2725 2306 4895 3011 4969 3321 1057 1716 3863 3360 3212 1994 4246 1212 644 3247 1964 962 2590 2942 818 2489 4223 ...

output:

NIE

result:

ok no solution

Test #43:

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

input:

3000
2126 1360 2131 843 4339 3597 4621 4533 4809 1878 4303 4777 2153 263 4424 1155 3541 1201 902 718 1277 2918 3751 2585 706 507 3311 4920 1164 1080 3461 4868 970 1274 625 3964 511 2880 2594 4673 3685 4602 510 1459 4702 1565 94 3545 255 3943 591 327 18 4823 1373 4165 1833 4489 1202 717 2532 4699 142...

output:

NIE

result:

ok no solution

Test #44:

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

input:

3000
1149 3550 1728 2850 1560 200 3630 4848 2568 1394 3044 2947 2576 589 2523 4333 3635 1043 3508 580 2380 2902 4838 4531 1484 4328 654 4418 2761 506 1862 498 2891 4653 2062 4698 4399 1389 1167 62 2304 329 1904 1142 2031 3770 3005 4208 668 453 468 2324 1741 823 3262 4403 1424 2565 4335 2592 3324 802...

output:

TAK
1 3000 2
3000 2 1147
3000 3 3548
1 4 1728
1 5 2850
3000 6 1558
3000 7 198
3000 8 3628
3000 9 4846
3000 10 2566
3000 11 1392
1 12 3044
3000 13 2945
3000 14 2574
3000 15 587
1 16 2523
1 17 4333
1 18 3635
1 19 1043
3000 20 3506
3000 21 578
3000 22 2378
3000 23 2900
1 24 4838
3000 25 4529
1 26 1484
...

result:

ok good solution

Test #45:

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

input:

3000
1635 282 203 1698 4542 4581 66 4702 4313 1436 2957 1820 4475 3991 1646 864 1367 4202 2545 1317 2712 1529 1371 370 1656 1932 654 3311 372 3257 844 4365 2111 2359 1379 405 3050 2395 29 3467 3429 3417 554 2911 2615 3735 2696 4529 2573 4394 3925 3605 3212 2655 469 1981 465 1141 1791 2303 4758 333 1...

output:

TAK
1 2995 1128
1 2985 107
1 2974 1009
1 2953 4223
1 2931 2194
1 2907 1034
1 2901 565
1 2881 1636
1 2827 3420
1 2793 1472
1 2788 1211
1 2787 3843
1 2779 216
1 2721 4164
1 2708 60
1 2704 1165
1 2697 1979
1 2679 616
1 2663 3138
1 2641 2899
1 2605 3974
1 2589 2466
1 2579 620
1 2566 1949
1 2557 3340
1 2...

result:

ok good solution

Test #46:

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

input:

3000
3095 3686 2303 4864 4525 4973 686 2608 2702 3043 1530 398 971 2975 249 3931 1914 2949 2100 1211 636 270 735 172 799 1903 4870 2863 504 1980 1613 2760 2753 96 3261 2262 2965 1590 3374 2417 618 1414 3734 2313 4838 855 3014 403 4064 405 2692 4503 4068 3962 255 2631 4061 2216 1937 2683 1290 590 545...

output:

TAK
1 3000 1927
3000 2 1168
3000 3 1759
3000 4 376
3000 5 2937
3000 6 2598
3000 7 3046
1 8 686
1 9 2608
1 10 2702
3000 11 1116
1 12 1530
1 13 398
1 14 971
1 15 2975
1 16 249
3000 17 2004
1 18 1914
3000 19 1022
1 20 2100
1 21 1211
1 22 636
1 23 270
1 24 735
1 25 172
1 26 799
1 27 1903
3000 28 2943
30...

result:

ok good solution

Test #47:

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

input:

3000
3150 1836 3172 4068 4876 2943 3457 2989 2031 4298 3147 2187 3949 1874 3444 3509 3477 3857 4473 4688 4270 3254 2633 2539 2586 2095 4295 2717 2061 3175 2604 3459 3514 2929 4280 2896 4154 4187 4400 1897 4733 1450 2311 2971 4025 2366 3119 1779 1624 3743 2393 2767 4341 3316 1467 2982 3749 3553 3430 ...

output:

TAK
1 2891 1321
2891 2970 103
2891 2966 2300
2891 2935 444
2891 2923 1984
2891 2897 682
2891 2883 1337
2891 2878 1858
2891 2875 3026
2891 2874 148
2891 2870 2838
2891 2868 1693
2891 2846 116
2891 2835 2620
2891 2828 1840
2891 2824 2556
2891 2816 375
2891 2798 536
2891 2793 718
2891 2785 1061
2891 27...

result:

ok good solution

Subtask #3:

score: 16
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #48:

score: 16
Accepted
time: 3ms
memory: 5764kb

input:

3000
33632 494127 696342 350424 494687 244029 34205 358600 33589 33688 33654 363547 917716 709668 34132 209516 647123 33932 459553 338587 344502 34173 33962 959639 186658 432587 751908 196121 831694 938534 375210 34215 33945 496720 944120 717068 359228 823700 795101 264198 894106 166421 878905 56096...

output:

NIE

result:

ok no solution

Test #49:

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

input:

3000
719501 190371 419469 530974 227226 585792 231123 604640 810638 945824 81162 234692 81417 470485 81514 904536 160555 81120 458883 833590 292427 298463 696428 991251 803836 290845 81271 164910 812817 311546 346303 182445 988478 81452 141870 399912 573781 113364 81366 707078 81447 579746 652421 74...

output:

NIE

result:

ok no solution

Test #50:

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

input:

3000
33367 117225 986863 489993 459134 848608 659883 682415 386653 418414 25671 596199 603604 686775 61167 861049 479739 998241 526134 349446 175511 428454 577920 180611 399767 519572 413504 675392 691762 456302 401104 641737 992570 216016 396301 671015 937784 490764 151444 958516 175964 611128 5533...

output:

NIE

result:

ok no solution

Test #51:

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

input:

3000
260266 727761 367878 933399 741131 526721 356038 469953 595663 297117 360534 710090 328255 86691 112505 523756 449413 409669 321665 538883 631287 870029 374437 621113 243200 488734 528312 245165 63888 469460 162819 286313 659751 375112 725042 852767 50740 335486 612512 698770 344877 461833 3401...

output:

TAK
1 3000 201286
1 2 260266
3000 3 526475
3000 4 166592
3000 5 732113
3000 6 539845
3000 7 325435
1 8 356038
1 9 469953
3000 10 394377
3000 11 95831
3000 12 159248
3000 13 508804
3000 14 126969
1 15 86691
1 16 112505
1 17 523756
1 18 449413
3000 19 208383
3000 20 120379
1 21 538883
1 22 631287
3000...

result:

ok good solution

Test #52:

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

input:

3000
990602 644534 718130 852792 816707 576523 58111 482057 102335 439369 73379 670012 929674 479443 361759 70928 79563 613769 853718 167957 655511 263428 76069 534776 73859 214474 58816 163198 518911 871410 518783 482805 378241 481322 213457 58326 434589 506037 323789 931785 657187 697710 40451 325...

output:

TAK
1 2999 348108
1 2997 213876
1 2996 459997
1 2986 278978
1 2982 732320
1 2978 228728
1 2976 806957
1 2970 800916
1 2967 814218
1 2963 48711
1 2955 168830
1 2953 24681
1 2939 475900
1 2938 670974
1 2934 124255
1 2933 399287
1 2932 222095
1 2930 24835
1 2927 146554
1 2926 1700
1 2925 402923
1 2924 ...

result:

ok good solution

Test #53:

score: 0
Accepted
time: 4ms
memory: 5668kb

input:

3000
123371 312195 835995 149637 799487 170772 195292 648627 476326 803490 674499 244504 429531 806106 255448 371496 627676 780092 473422 303011 943356 44364 430413 893362 706897 367434 126526 297689 257900 841409 228421 592559 817799 53260 349853 208307 3859 708783 827617 707957 652158 62545 147155...

output:

TAK
1 3000 168784
1 2 123371
3000 3 143411
3000 4 667211
1 5 149637
3000 6 630703
1 7 170772
3000 8 26508
1 9 648627
1 10 476326
3000 11 634706
1 12 674499
3000 13 75720
3000 14 260747
3000 15 637322
1 16 255448
1 17 371496
3000 18 458892
1 19 780092
1 20 473422
3000 21 134227
3000 22 774572
1 23 44...

result:

ok good solution

Test #54:

score: 0
Accepted
time: 4ms
memory: 5780kb

input:

3000
704276 595819 568590 836740 981560 800902 584618 694682 933504 974612 414162 378635 951690 459865 651877 937255 771192 697635 745645 614206 558771 409173 874112 760798 801123 668957 436923 787718 511406 483169 378210 847039 812786 739322 999151 816301 783567 639619 903009 667105 988812 488588 4...

output:

TAK
1 1474 363709
1474 2028 1
2028 2986 120042
2028 2973 583063
2028 2954 346617
2028 2943 30317
2028 2915 75162
2028 2874 52517
2028 2868 437433
2028 2867 370988
2028 2866 88382
2028 2854 118023
2028 2838 592804
2028 2837 254146
2028 2827 259531
2028 2822 511928
2028 2820 86660
2028 2805 633400
202...

result:

ok good solution

Test #55:

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

input:

3
1000000
1000000

output:

TAK
1 2 1000000
2 3 1000000

result:

ok good solution

Test #56:

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

input:

3000
27101 27983 193378 657093 26818 582247 27954 896701 26832 26964 27154 27378 897450 27446 28201 26712 27074 27462 26668 576438 27163 27578 27786 27207 728499 27651 648949 967139 27257 26891 28024 28232 27404 27067 476498 239642 27530 27823 27523 26797 26811 953213 405305 27636 293694 665456 3310...

output:

NIE

result:

ok no solution

Test #57:

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

input:

3000
537112 103838 832868 830790 677585 659891 740326 252361 686559 651870 326268 145324 136382 298958 219533 355420 245302 601455 417307 926830 602452 599847 648943 139897 531894 756503 978725 909009 409585 916592 517693 661310 221309 741779 837024 238513 929589 808890 512579 363468 498002 809345 8...

output:

NIE

result:

ok no solution

Test #58:

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

input:

3000
991921 585293 542720 18525 480227 709619 847291 105630 565857 799501 308455 491502 624191 767273 671319 421201 642691 106134 400479 63986 235649 212633 325475 235877 433366 426394 334065 642273 426190 41017 507218 348107 600047 423854 976051 447957 857087 461509 916016 580192 980835 955627 8198...

output:

NIE

result:

ok no solution

Test #59:

score: 0
Accepted
time: 4ms
memory: 5696kb

input:

3000
697884 570622 241819 900495 464741 78272 953627 926656 159040 748364 675506 244571 359302 431515 168816 131152 97687 385149 404339 468702 315173 293798 578602 493224 648731 217412 472269 43894 308667 407331 224954 941937 677131 692419 252121 283252 270771 531187 751486 446050 761826 795926 4426...

output:

TAK
1 3000 196562
3000 2 501322
3000 3 374060
3000 4 45257
3000 5 703933
1 6 464741
1 7 78272
3000 8 757065
3000 9 730094
1 10 159040
1 11 748364
1 12 675506
3000 13 48009
3000 14 162740
3000 15 234953
1 16 168816
1 17 131152
1 18 97687
1 19 385149
1 20 404339
1 21 468702
3000 22 118611
1 23 293798
...

result:

ok good solution

Test #60:

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

input:

3000
307838 358602 49735 302647 593319 117587 328601 987296 267770 907439 674952 832723 93519 201538 968152 876115 238734 867922 360015 411639 919148 378541 45812 216062 486655 345283 617897 951353 925030 562132 292774 128846 642902 71545 426038 21725 973771 581790 163196 449900 459681 8258 776928 3...

output:

TAK
1 2949 485961
1 2947 14868
1 2945 556341
1 2944 943750
1 2916 900134
1 2872 923601
1 2816 947402
1 2782 37468
1 2781 863577
1 2767 381927
1 2740 933513
1 2737 92328
1 2725 125340
1 2706 81249
1 2701 877171
1 2689 201534
1 2675 597976
1 2523 686498
1 2508 841853
1 2473 506176
1 2466 810352
1 2439...

result:

ok good solution

Test #61:

score: 0
Accepted
time: 4ms
memory: 5736kb

input:

3000
166414 871840 137934 886504 196581 562439 801561 565428 728076 760260 181697 595415 283545 999940 62920 444518 822135 50733 749639 335008 839611 426682 735978 814746 313373 813828 938298 756292 801277 475252 748124 324149 475297 820802 903704 485954 224145 768084 29558 423821 956820 519682 3564...

output:

TAK
1 3000 22835
3000 2 143579
3000 3 849005
3000 4 115099
3000 5 863669
3000 6 173746
3000 7 539604
3000 8 778726
3000 9 542593
3000 10 705241
3000 11 737425
3000 12 158862
1 13 595415
3000 14 260710
3000 15 977105
3000 16 40085
3000 17 421683
3000 18 799300
1 19 50733
3000 20 726804
3000 21 312173...

result:

ok good solution

Test #62:

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

input:

3000
721450 597466 646554 601431 855464 782681 963513 875992 785906 383940 442776 879631 384499 969947 389826 637712 721693 811372 738039 683456 737871 467574 924234 535092 719108 861836 840676 723386 860907 850142 671514 882765 366681 851885 557551 846579 942567 647968 909603 704946 499304 429153 9...

output:

TAK
1 1162 285278
1162 2997 196624
1162 2996 201120
1162 2993 162034
1162 2970 517104
1162 2969 619568
1162 2945 439216
1162 2943 437406
1162 2921 234162
1162 2917 600975
1162 2916 701894
1162 2912 204796
1162 2907 55412
1162 2903 451851
1162 2901 34535
1162 2890 695157
1162 2871 175166
1162 2857 30...

result:

ok good solution

Test #63:

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

input:

3000
473738 815133 745850 184285 575674 644352 378025 554473 184277 184293 445661 702130 925518 872029 619452 535894 483933 447368 376325 548345 240584 268543 888464 953777 376892 726063 641865 475367 721552 538018 633708 462743 390489 553370 382971 859037 733927 592313 495940 578653 724130 342469 7...

output:

NIE

result:

ok no solution

Test #64:

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

input:

3000
113146 205398 480860 411505 620634 358238 615045 403557 887039 201203 570311 176484 664526 991741 680592 405209 120459 88699 948415 173428 81742 388006 298591 513129 574518 808667 439161 227583 919128 519576 629930 672354 238459 226005 801315 814560 396280 998117 273814 935845 548366 846275 860...

output:

NIE

result:

ok no solution

Test #65:

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

input:

3000
892289 178934 632248 7584 672665 790021 713633 242070 512707 142322 847647 272840 990371 770894 651491 447478 295050 594637 739718 102518 908490 702008 745317 596945 526418 22343 560051 893064 299592 858019 630089 390792 82409 600030 672327 235410 264827 777043 148216 215347 157613 862174 13251...

output:

NIE

result:

ok no solution

Test #66:

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

input:

3000
85497 782516 440617 122737 498723 530740 618744 669858 803431 384680 924773 121723 471502 578003 48506 991262 618935 794554 550952 687780 280595 698132 795442 968818 416209 612154 964367 400849 581175 456465 805944 907680 680473 75523 935021 733692 141130 973798 91801 243824 421696 243208 48266...

output:

TAK
1 3000 4028
3000 2 81469
3000 3 778488
3000 4 436589
1 5 122737
1 6 498723
3000 7 526712
1 8 618744
1 9 669858
1 10 803431
1 11 384680
1 12 924773
1 13 121723
1 14 471502
1 15 578003
1 16 48506
1 17 991262
1 18 618935
1 19 794554
1 20 550952
1 21 687780
3000 22 276567
1 23 698132
3000 24 791414
...

result:

ok good solution

Test #67:

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

input:

3000
331569 320335 732683 330711 328048 151764 38202 8416 154487 413668 61405 711786 963841 783778 26951 201366 603171 68679 730606 400397 247463 767459 12777 987072 369773 797826 299662 60926 96047 764493 878790 877841 541952 88643 521699 525689 690768 826397 721998 347879 80796 324516 874650 10658...

output:

TAK
1 2995 770852
1 2994 721595
1 2990 527246
1 2983 492564
1 2982 869057
1 2981 321201
1 2980 327037
1 2979 162688
1 2976 103156
1 2975 428053
1 2974 757633
1 2972 80224
1 2967 496413
1 2965 828225
1 2957 480647
1 2952 762605
1 2951 98735
1 2940 620951
1 2936 870664
1 2930 277481
1 2928 476098
1 29...

result:

ok good solution

Test #68:

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

input:

3000
548182 740314 631064 192542 164200 531146 106418 983122 974332 129868 698936 615288 777559 321404 253908 383134 523947 416670 308886 341321 476121 70281 718792 629602 28162 601366 451204 269989 545667 751947 826307 446280 527548 26727 398541 587717 635146 703519 624210 375574 130718 235403 7811...

output:

TAK
1 3000 217342
1 2 548182
1 3 740314
3000 4 413722
1 5 192542
1 6 164200
1 7 531146
1 8 106418
3000 9 765780
3000 10 756990
1 11 129868
1 12 698936
3000 13 397946
3000 14 560217
1 15 321404
3000 16 36566
1 17 383134
1 18 523947
1 19 416670
1 20 308886
3000 21 123979
3000 22 258779
1 23 70281
3000...

result:

ok good solution

Test #69:

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

input:

3000
742646 897641 802380 899948 905956 639096 703135 757737 754345 317900 774107 395408 490989 658133 573512 889024 983515 324485 814191 348011 741582 831684 961240 712121 373360 959766 842411 363278 831111 988393 671162 457602 565366 451740 366471 601336 824537 693783 325012 376500 977593 819894 4...

output:

TAK
1 264 302278
264 2998 305766
264 2996 622884
264 2992 183639
264 2990 485390
264 2988 587082
264 2971 5221
264 2941 577360
264 2935 441467
264 2925 243475
264 2920 382852
264 2902 551172
264 2882 640396
264 2880 488335
264 2874 686205
264 2862 320344
264 2845 106409
264 2840 537767
264 2835 7656...

result:

ok good solution

Subtask #4:

score: 33
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #70:

score: 33
Accepted
time: 5ms
memory: 6476kb

input:

100000
881920 696247 189234 495545 188761 373014 199791 168987 191605 201736 907451 427051 356912 461898 536499 170776 378997 172047 774231 799185 996450 599835 288996 192846 371945 823647 983555 978285 739473 852317 198417 938871 181975 194608 485685 201973 167902 898743 186129 584228 407225 358850...

output:

NIE

result:

ok no solution

Test #71:

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

input:

100000
92316 769709 343358 629401 604167 293907 687931 521411 31820 186019 563967 339580 348256 388924 820250 418704 945127 257027 422694 655287 839717 728729 650694 279172 219655 828513 194351 322775 429687 722729 571860 153908 694417 792667 545406 206590 597060 269760 756100 200081 225850 733911 7...

output:

NIE

result:

ok no solution

Test #72:

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

input:

100000
801047 906028 898965 907497 29765 205398 956 961001 60261 828933 343075 88720 194743 781037 214480 56958 231138 209707 10462 957788 330213 119347 21804 81978 889203 335634 330146 348271 269644 21194 865382 145646 164454 90253 137428 147526 116217 209926 842296 88578 522181 714103 413389 55975...

output:

NIE

result:

ok no solution

Test #73:

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

input:

100000
832000 61235 836159 888831 751978 30532 906985 393271 747372 290700 828247 35630 500107 403962 832660 635064 900713 672614 478665 747849 303240 116923 478840 821191 191303 978515 906506 504491 456986 783479 866177 49871 216678 296084 672984 416638 396597 526234 670155 896511 242650 469235 706...

output:

TAK
1 100000 74895
1 2 832000
1 3 61235
1 4 836159
1 5 888831
1 6 751978
1 7 30532
100000 8 832090
1 9 393271
1 10 747372
100000 11 215805
1 12 828247
1 13 35630
1 14 500107
1 15 403962
100000 16 757765
1 17 635064
1 18 900713
1 19 672614
100000 20 403770
100000 21 672954
100000 22 228345
1 23 11692...

result:

ok good solution

Test #74:

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

input:

100000
497424 200926 306192 808523 780650 761288 444472 386647 386986 111702 204934 437555 627179 802522 783843 603654 667694 164210 928428 96783 647176 414133 540991 180319 343064 581954 210998 571259 393450 229631 653805 770122 698943 255225 498617 691034 691433 627830 490562 340785 963898 501292 ...

output:

TAK
1 99735 555110
1 99539 514077
1 99399 649796
1 99245 472681
1 98179 257501
1 98135 525102
1 98105 765253
1 97582 808554
1 97543 646283
1 97360 642340
1 97163 711177
1 96850 168483
1 96695 816014
1 96473 344485
1 96421 724681
1 96366 634489
1 96232 377313
1 96206 410863
1 95955 792208
1 95839 832...

result:

ok good solution

Test #75:

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

input:

100000
38358 80051 456892 958973 634985 543228 835442 623769 759626 737545 234556 262933 727320 311809 276468 566475 192897 133986 434342 732048 108552 500704 245970 190965 537649 501410 812789 969153 603058 240676 829629 915175 161887 363404 393857 105629 897674 954799 595138 869031 368757 442198 5...

output:

TAK
1 100000 6117
1 2 38358
100000 3 73934
1 4 456892
100000 5 952856
100000 6 628868
1 7 543228
100000 8 829325
1 9 623769
1 10 759626
1 11 737545
100000 12 228439
1 13 262933
1 14 727320
1 15 311809
1 16 276468
100000 17 560358
1 18 192897
100000 19 127869
1 20 434342
1 21 732048
1 22 108552
1 23 ...

result:

ok good solution

Test #76:

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

input:

100000
544772 581716 319762 599570 300454 610539 585213 867092 632966 932399 517314 908630 655161 339749 623252 719621 670251 860668 288551 710376 641466 470892 547455 897267 802560 431504 764992 543148 334966 671391 659807 331392 987079 475226 375117 498842 680626 350924 648515 864473 973035 633529...

output:

TAK
1 36285 279223
36285 99994 568114
36285 99974 256234
36285 99965 24605
36285 99964 661562
36285 99961 177514
36285 99950 706110
36285 99949 73071
36285 99939 216956
36285 99938 390971
36285 99934 187109
36285 99924 311583
36285 99923 363646
36285 99912 569147
36285 99898 576628
36285 99890 34500...

result:

ok good solution

Test #77:

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

input:

100000
943207 631888 252370 853723 523395 980930 499842 957656 213050 304434 122801 616804 937076 970757 384438 479956 566854 693154 730501 333814 847245 473448 329449 435737 575981 225905 228724 55755 29374 476546 526379 573475 463255 794050 625341 26168 977556 533548 63902 106685 447864 955426 412...

output:

NIE

result:

ok no solution

Test #78:

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

input:

100000
59706 108540 766457 657085 887526 316507 491398 59417 771565 948950 897734 362811 700501 931450 619260 698875 27907 853461 654568 668640 772555 781571 774893 592341 551177 867606 938065 628835 739294 543460 575855 904114 96773 145944 426985 490933 406382 379476 864499 367739 911579 871908 789...

output:

NIE

result:

ok no solution

Test #79:

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

input:

100000
47714 8276 63332 527885 12456 6068 572343 9398 13814 36678 35854 10369 13502 21088 28756 864546 34006 27144 787368 11809 81928 202719 30259 87311 22735 69469 54137 50693 23687 31509 35521 87226 38620 27013 119653 63936 62204 11657 7279 60831 66682 60906 6869 489203 87558 79440 213105 15512 37...

output:

NIE

result:

ok no solution

Test #80:

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

input:

100000
876781 641890 384413 628571 640670 259317 588405 296365 274405 71868 180090 546858 451548 497740 581274 238969 909560 734373 697474 844767 312202 627140 732350 997088 164403 385854 847261 426776 167330 911479 735085 757842 193834 281666 823351 878483 448819 899953 570399 977354 528798 833240 ...

output:

TAK
1 100000 148210
100000 2 728571
1 3 641890
1 4 384413
100000 5 480361
100000 6 492460
1 7 259317
100000 8 440195
100000 9 148155
1 10 274405
1 11 71868
100000 12 31880
1 13 546858
100000 14 303338
1 15 497740
100000 16 433064
100000 17 90759
100000 18 761350
100000 19 586163
1 20 697474
1 21 844...

result:

ok good solution

Test #81:

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

input:

100000
320373 40200 280459 32380 270139 693000 867666 39068 400045 37080 278231 862996 234160 474157 824822 8388 24002 557652 32310 595471 833064 377904 193849 39628 28162 217462 536435 225752 476204 16763 474307 19615 10045 19853 40033 694968 943060 22351 256063 130500 3937 907247 30141 708588 4112...

output:

TAK
1 99569 822556
1 99485 740924
1 99464 905472
1 99458 633503
1 99317 284747
1 99078 328623
1 98987 182799
1 98780 833212
1 98721 186798
1 98630 622159
1 97999 785045
1 97964 807061
1 97700 699756
1 97581 164457
1 97241 146756
1 97131 809565
1 97084 830080
1 96602 346764
1 95965 117806
1 95941 728...

result:

ok good solution

Test #82:

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

input:

100000
153532 600751 117607 385147 363219 488053 648298 703127 17249 849350 84958 186748 631851 543128 909553 246393 574998 137426 483994 545348 240217 403567 164161 940460 99675 402601 654474 580181 6870 428836 582630 480368 202641 513035 670944 903548 347710 828070 218148 127322 461176 857128 7166...

output:

TAK
1 100000 285191
1 2 153532
1 3 600751
1 4 117607
100000 5 99956
1 6 363219
100000 7 202862
1 8 648298
1 9 703127
1 10 17249
100000 11 564159
1 12 84958
1 13 186748
1 14 631851
1 15 543128
100000 16 624362
1 17 246393
1 18 574998
1 19 137426
1 20 483994
100000 21 260157
1 22 240217
1 23 403567
1 ...

result:

ok good solution

Test #83:

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

input:

100000
316502 661922 955611 622710 266892 770339 772974 728221 297555 438150 900420 816111 392364 312034 481989 362330 395314 610075 569754 989254 621336 848306 844738 940446 890336 535754 353760 692999 956433 990528 853792 397527 716886 333841 664326 924698 419218 789651 327901 919801 607869 309898...

output:

TAK
1 67273 260851
67273 99976 589304
67273 99967 63254
67273 99958 21892
67273 99955 678875
67273 99948 582726
67273 99918 18490
67273 99911 179203
67273 99894 357605
67273 99885 613618
67273 99876 600826
67273 99861 426691
67273 99860 322135
67273 99856 594321
67273 99845 286759
67273 99835 2397
6...

result:

ok good solution

Test #84:

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

input:

100000
298602 719304 105586 172102 574769 460650 516757 870523 705426 213621 193183 436390 336140 52605 48860 748449 459323 42382 91191 832425 38444 48699 944592 824850 898189 5260 53022 716642 52685 50067 682689 523508 704101 130193 504616 595016 104728 430777 363401 775247 942694 725844 238965 229...

output:

NIE

result:

ok no solution

Test #85:

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

input:

100000
403756 308137 529594 685272 62734 679409 357669 80729 684657 831240 923837 497701 543363 389660 495162 323986 29235 727811 131272 825400 509363 375734 698919 393492 783510 149587 961437 619618 661530 510887 665163 962596 121089 920481 313373 783951 62911 389792 573173 429896 520120 835343 748...

output:

NIE

result:

ok no solution

Test #86:

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

input:

100000
327349 194575 153828 344691 711077 421821 801523 867896 943362 44779 505482 832589 708403 419293 851178 291526 400665 330708 6603 255666 280729 339468 8871 363034 629268 111756 901694 106072 449842 238150 465220 965540 328681 882466 224349 589448 832116 894618 446345 868334 483818 503408 7609...

output:

NIE

result:

ok no solution

Test #87:

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

input:

100000
424914 158335 666838 989418 209066 383655 696133 210217 198707 714909 882796 794668 134518 208121 930674 135888 88810 708747 659186 79163 81714 98539 661251 751645 527084 168180 130405 391329 76816 295439 244316 593018 298477 676438 341814 966564 864623 865714 490644 307446 295395 120930 1460...

output:

TAK
1 100000 12652
100000 2 412262
100000 3 145683
100000 4 654186
100000 5 976766
100000 6 196414
100000 7 371003
1 8 696133
100000 9 197565
100000 10 186055
1 11 714909
100000 12 870144
1 13 794668
1 14 134518
1 15 208121
1 16 930674
100000 17 123236
1 18 88810
1 19 708747
100000 20 646534
100000 ...

result:

ok good solution

Test #88:

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

input:

100000
390001 491097 374534 183026 728054 662043 383822 472359 39653 930572 382598 411249 81130 656269 480889 276554 830593 246113 116520 174528 303104 587058 751166 180037 736477 480930 91604 295662 701400 981339 378353 318829 399041 51191 172913 416557 678680 453046 286343 291285 784799 617941 950...

output:

TAK
1 99998 371696
1 99982 800344
1 99969 246934
1 99967 464034
1 99966 496191
1 99956 662431
1 99952 420634
1 99947 827946
1 99946 696694
1 99934 75245
1 99930 512098
1 99929 45269
1 99908 67470
1 99880 479433
1 99872 199253
1 99866 531985
1 99845 550267
1 99843 641806
1 99841 57683
1 99835 309769
...

result:

ok good solution

Test #89:

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

input:

100000
736034 613828 667374 724216 622387 447531 194860 509487 438273 77648 636158 773411 94063 589995 944705 74747 478156 395393 815143 488170 645164 719289 306536 885028 672556 923874 50253 262877 734053 896948 571863 715864 498305 978785 617733 781041 826814 602094 906669 423959 610072 971156 637...

output:

TAK
1 100000 189556
100000 2 546478
100000 3 424272
100000 4 477818
100000 5 534660
100000 6 432831
100000 7 257975
100000 8 5304
1 9 509487
100000 10 248717
1 11 77648
100000 12 446602
100000 13 583855
1 14 94063
1 15 589995
100000 16 755149
1 17 74747
1 18 478156
100000 19 205837
100000 20 625587
...

result:

ok good solution

Test #90:

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

input:

100000
755018 598061 336766 949557 931628 286691 334141 547495 428404 321171 995313 917041 783307 979586 620100 956955 752143 919270 393025 731491 632395 534700 530662 905975 306393 564341 788257 881025 372577 914152 318136 966896 637230 535598 801907 562097 972655 745849 427569 876891 666396 761081...

output:

TAK
1 65794 250684
65794 99971 418656
65794 99961 79959
65794 99937 142783
65794 99913 534117
65794 99892 280851
65794 99806 253904
65794 99802 570436
65794 99749 135336
65794 99699 688934
65794 99667 60487
65794 99615 308339
65794 99599 335938
65794 99595 87150
65794 99586 10184
65794 99445 426902
...

result:

ok good solution

Test #91:

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

input:

100000
663804 488471 769548 921960 178444 27725 746538 237913 731341 61073 632927 173752 814546 995139 428226 123700 907771 279186 907621 580298 535022 748850 545750 251547 181498 452113 628308 937658 123490 971092 332430 719883 820719 567350 279122 512943 63150 853688 979833 970571 909086 938689 93...

output:

NIE

result:

ok no solution

Test #92:

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

input:

100000
469562 978032 845494 65062 87865 758301 731659 229342 911159 903392 979064 158553 775642 555165 105822 638268 464945 196002 665280 192126 899993 308913 298701 457740 820879 649887 207361 152447 769246 407745 29335 669334 465042 501205 629786 332789 606189 262097 237156 862131 395511 416587 18...

output:

NIE

result:

ok no solution

Test #93:

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

input:

100000
62018 795061 726441 66032 384228 828466 579582 152329 363575 243514 273572 64781 258688 352266 590031 851681 882920 321564 694807 303373 437641 529677 834364 319955 434588 931932 963367 868186 126514 62734 86620 893307 65612 163986 480022 302202 697348 535032 769906 563596 322652 777482 68493...

output:

NIE

result:

ok no solution

Test #94:

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

input:

100000
208975 670453 757888 63754 162482 388956 185922 36019 96563 218382 515745 907825 704737 328309 847914 136747 804934 156025 275635 276652 232612 257697 383627 408240 453998 240263 121625 503857 503992 775982 633734 100834 194105 990213 217360 818825 942174 812749 748344 69739 713052 284734 709...

output:

TAK
1 100000 174342
1 2 208975
1 3 670453
1 4 757888
1 5 63754
1 6 162482
1 7 388956
100000 8 11580
1 9 36019
1 10 96563
1 11 218382
100000 12 341403
100000 13 733483
1 14 704737
1 15 328309
100000 16 673572
1 17 136747
1 18 804934
1 19 156025
1 20 275635
1 21 276652
100000 22 58270
100000 23 83355
...

result:

ok good solution

Test #95:

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

input:

100000
304783 744212 750198 4605 546584 676594 867905 674068 855685 221204 522506 42304 792309 574181 12691 168030 668631 799032 828679 580392 942226 565092 706420 4057 54347 391308 847134 804629 608922 691991 229552 523117 74866 562779 345077 48325 744710 42949 287505 183410 863178 607790 55640 652...

output:

TAK
1 99992 402586
1 99971 617751
1 99942 374706
1 99936 96553
1 99935 232255
1 99933 26461
1 99921 230982
1 99910 106491
1 99876 309010
1 99872 687904
1 99824 9389
1 99821 321601
1 99813 41054
1 99812 27057
1 99809 591185
1 99780 239459
1 99758 631326
1 99739 806073
1 99729 208955
1 99725 771545
1 ...

result:

ok good solution

Test #96:

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

input:

100000
208785 786215 988648 218590 630261 56554 520857 623813 278716 430522 128681 84019 453627 622138 132504 131558 798247 87431 612798 661155 600936 772896 210738 691386 24421 238302 708662 741771 378195 674261 443952 886804 255784 402510 68224 200549 813059 688830 1868 887546 827253 344195 446096...

output:

TAK
1 100000 37189
1 2 208785
100000 3 749026
100000 4 951459
100000 5 181401
100000 6 593072
1 7 56554
1 8 520857
1 9 623813
100000 10 241527
1 11 430522
1 12 128681
100000 13 46830
1 14 453627
100000 15 584949
1 16 132504
100000 17 94369
100000 18 761058
1 19 87431
100000 20 575609
1 21 661155
100...

result:

ok good solution

Test #97:

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

input:

100000
817561 617490 393322 588837 441535 616039 618160 625033 512957 944352 899443 572980 659935 372205 841742 627314 551633 418806 283724 805306 597771 792858 397335 414598 790255 510707 820152 976918 702379 349967 421019 641032 561187 649328 613559 759800 316322 838238 357222 384077 871254 692188...

output:

TAK
1 47720 252875
47720 99997 604584
47720 99958 637773
47720 99955 285061
47720 99941 635109
47720 99922 81582
47720 99920 448956
47720 99901 553874
47720 99875 696560
47720 99860 262343
47720 99838 495824
47720 99835 278970
47720 99834 565161
47720 99810 197210
47720 99796 91575
47720 99795 66490...

result:

ok good solution

Test #98:

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

input:

100000
885005 377719 693159 151473 826903 936858 511224 892768 995158 676100 568411 472801 750179 201642 936030 979853 502886 717895 367693 437170 381970 507193 352054 530346 187416 610559 910874 412187 209417 842036 882094 231127 140507 345178 630856 608640 894236 527672 137855 836872 656030 522124...

output:

NIE

result:

ok no solution

Test #99:

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

input:

100000
485545 649936 718666 618924 559760 618215 171708 243616 547462 557017 816282 218493 140522 897932 868661 322138 278874 744947 122886 631759 106597 333659 889983 200742 489465 699436 164433 777236 746272 933549 709491 707344 706019 463888 474030 361568 576936 801968 132246 201318 577130 874373...

output:

NIE

result:

ok no solution

Test #100:

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

input:

100000
785898 326326 901750 390474 45807 403299 715351 398206 43607 155831 48486 944197 609939 390476 841559 349460 964635 836564 749912 994182 36041 15269 382860 541496 775785 628981 215231 819743 81834 688482 861744 700182 772004 596497 329267 866058 359469 7055 835004 372439 714386 230432 621870 ...

output:

NIE

result:

ok no solution

Test #101:

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

input:

100000
671870 837394 399613 8935 791740 304513 283801 423657 327125 435354 72521 357433 743585 496963 886061 182894 419099 731665 877512 923312 354155 265433 690405 582878 866528 153339 693789 131463 203542 687468 351829 12555 340499 623702 549933 240258 599816 673025 522350 330843 313657 29036 4141...

output:

TAK
1 100000 26239
100000 2 645631
1 3 837394
100000 4 373374
1 5 8935
1 6 791740
1 7 304513
1 8 283801
100000 9 397418
100000 10 300886
100000 11 409115
1 12 72521
1 13 357433
1 14 743585
100000 15 470724
1 16 886061
100000 17 156655
100000 18 392860
100000 19 705426
1 20 877512
1 21 923312
100000 ...

result:

ok good solution

Test #102:

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

input:

100000
150183 296631 225226 851643 706822 138398 350202 742668 218556 801505 153348 692951 70460 592495 265176 564093 45280 305195 83392 872040 75009 793591 702460 916448 60291 903489 87230 906985 151949 514443 752068 837448 123297 884270 596278 432913 91186 601494 30378 666804 911882 558177 636581 ...

output:

TAK
1 99971 631995
1 99952 387550
1 99867 701344
1 99837 798459
1 99696 396890
1 99605 219057
1 99481 202464
1 99453 261197
1 99441 876868
1 99325 730021
1 99229 318321
1 99147 342873
1 99068 140460
1 99048 687503
1 98948 220914
1 98939 47925
1 98927 634183
1 98850 371912
1 98753 505917
1 98716 6494...

result:

ok good solution

Test #103:

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

input:

100000
532347 314768 753014 546278 318270 576521 451783 377307 692263 781151 697918 992853 166179 384950 962659 218383 148231 148894 372770 354864 318208 858453 499884 809049 980459 213466 608863 219863 434558 489606 360541 99648 785021 782192 426070 424455 538371 262533 441025 573031 664322 314534 ...

output:

TAK
1 100000 142255
100000 2 390092
100000 3 172513
100000 4 610759
100000 5 404023
1 6 318270
100000 7 434266
100000 8 309528
100000 9 235052
100000 10 550008
100000 11 638896
1 12 697918
100000 13 850598
100000 14 23924
100000 15 242695
100000 16 820404
100000 17 76128
100000 18 5976
100000 19 663...

result:

ok good solution

Test #104:

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

input:

100000
631868 656656 685293 781189 932466 626225 724659 487511 819377 657880 558773 776975 612265 536555 396524 303081 297334 809237 339743 625989 489675 592635 431124 630513 350836 336879 967021 383111 942577 362485 521321 618098 263843 565708 278144 896007 850086 551954 749889 293542 749359 494444...

output:

TAK
1 564 260753
564 99998 431429
564 99996 534596
564 99994 409214
564 99991 465335
564 99980 692142
564 99972 476410
564 99969 255628
564 99934 309504
564 99931 284240
564 99926 708510
564 99917 689994
564 99894 156358
564 99887 726666
564 99874 184021
564 99868 450225
564 99852 619839
564 99847 6...

result:

ok good solution

Test #105:

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

input:

100000
653226 659918 839624 144176 788751 45924 46329 254076 812027 339176 187272 318075 175483 494553 505628 201349 419589 201115 795655 846441 207392 115791 389177 253090 36660 47482 867375 159798 379564 511302 832030 137323 401711 735698 827310 2497 941944 418672 23830 197218 780717 619801 798349...

output:

NIE

result:

ok no solution

Test #106:

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

input:

100000
800322 409074 657521 187322 463151 671253 237262 867931 379100 552253 489580 895194 642833 67636 469262 638683 143313 477874 418191 64304 373146 96702 128462 771196 626348 196846 687202 367147 243662 698062 933361 35141 629016 116764 36795 533686 23838 69255 975089 472302 932650 541549 599305...

output:

NIE

result:

ok no solution

Test #107:

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

input:

100000
891297 597427 995205 454073 169305 225952 781536 169564 2678 555776 506713 970084 367663 511475 833007 510174 452342 566875 537113 778652 163118 930172 524690 4223 282046 693820 787246 656848 73833 138834 528790 849298 39670 909380 829058 947629 484090 436133 228732 776315 815177 297707 2366 ...

output:

NIE

result:

ok no solution

Test #108:

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

input:

100000
39771 269851 474386 39679 291593 426923 32030 202720 688261 303883 607594 425522 668162 446473 44392 143499 863807 234397 371197 613161 561294 510932 898646 53339 729886 112812 181640 994629 702944 351456 119016 763830 274483 550495 273646 782166 389431 722110 252840 518825 211646 474478 7253...

output:

TAK
1 100000 97842
1 2 39771
1 3 269851
100000 4 376544
1 5 39679
1 6 291593
100000 7 329081
1 8 32030
100000 9 104878
1 10 688261
1 11 303883
1 12 607594
1 13 425522
1 14 668162
100000 15 348631
1 16 44392
1 17 143499
1 18 863807
1 19 234397
1 20 371197
1 21 613161
1 22 561294
1 23 510932
1 24 8986...

result:

ok good solution

Test #109:

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

input:

100000
719451 882536 737092 800969 290031 115759 348682 606361 840012 684307 278159 372015 700894 458955 417805 905581 727159 777561 708520 146911 175706 187668 612859 656585 908815 853034 849754 502733 272732 895828 101762 441956 137354 623227 499432 483975 7121 511784 110530 554822 101756 897577 7...

output:

TAK
1 99998 257791
1 99980 473808
1 99975 257743
1 99966 540785
1 99954 142924
1 99953 321838
1 99926 842329
1 99925 476274
1 99924 165543
1 99912 221154
1 99907 453388
1 99905 691330
1 99904 403126
1 99897 459995
1 99850 723803
1 99845 521903
1 99833 630310
1 99811 391796
1 99789 87909
1 99779 6217...

result:

ok good solution

Test #110:

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

input:

100000
226049 306625 110642 351325 642054 647271 890936 590786 710119 484175 329661 59621 580588 132673 593773 413136 298373 42530 433077 459645 502399 447636 978479 464644 608353 666382 521463 348080 29556 511247 720610 275639 561418 623772 501426 98357 856813 14744 471308 400414 491396 661052 4434...

output:

TAK
1 100000 244755
1 2 226049
1 3 306625
1 4 110642
1 5 351325
100000 6 397299
100000 7 402516
100000 8 646181
100000 9 346031
100000 10 465364
100000 11 239420
100000 12 84906
1 13 59621
100000 14 335833
1 15 132673
1 16 593773
1 17 413136
100000 18 53618
1 19 42530
1 20 433077
1 21 459645
1 22 50...

result:

ok good solution

Test #111:

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

input:

100000
803180 949362 494930 296481 505308 540200 899040 317587 668400 527499 979673 766670 874613 875055 504482 849724 564859 407682 992990 717962 611259 702013 486600 657085 468292 489343 466509 949604 646395 286020 446998 417110 643591 895675 460765 817972 809300 539197 269153 301226 681297 272361...

output:

TAK
1 8571 269149
8571 99993 93259
8571 99975 54653
8571 99958 261581
8571 99943 709515
8571 99919 426976
8571 99911 291652
8571 99908 489474
8571 99905 483880
8571 99900 28944
8571 99893 156632
8571 99887 318659
8571 99879 142718
8571 99862 587496
8571 99861 124047
8571 99830 711815
8571 99828 2905...

result:

ok good solution

Test #112:

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

input:

14002
998678 998658 998574 998590 998695 998645 998578 998571 998658 998650 998627 998657 998742 998614 998618 998676 998565 998665 998668 998684 998572 998701 998611 998625 998660 998558 998623 998528 998554 998618 998674 998579 998569 998667 998639 998682 998707 998550 998577 998649 998687 998666 ...

output:

TAK
1 8882 998520
8882 13940 4
8882 13842 70
8882 13752 72
8882 13731 77
8882 13647 66
8882 13523 5
8882 12921 34
8882 12829 83
8882 12617 48
8882 11849 22
8882 11814 11
8882 11339 37
8882 11318 57
8882 11213 45
8882 10940 38
8882 10657 32
8882 10504 17
8882 10481 30
8882 10397 96
8882 10156 59
8882...

result:

ok good solution

Subtask #5:

score: 18
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #113:

score: 18
Accepted
time: 46ms
memory: 18788kb

input:

500000
236169 952990 757241 146742 599039 478356 523004 140015 962826 562178 368742 549108 86158 944559 806255 131335 644413 528997 923995 745466 498441 463083 475468 530030 288457 969119 204418 373072 774354 390782 522540 990951 356157 559786 195839 714717 754794 350818 129892 889335 168572 901579 ...

output:

NIE

result:

ok no solution

Test #114:

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

input:

500000
88582 167165 377150 604094 609178 987269 854551 652632 882447 565876 564043 579510 426040 601819 488829 996565 684356 271099 589034 522686 872238 679237 428054 249693 668403 492182 448207 441393 789845 495235 403837 720434 878704 418664 451785 834404 556233 266739 268418 304694 349219 488002 ...

output:

NIE

result:

ok no solution

Test #115:

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

input:

500000
395706 121511 550790 354978 906422 271416 97401 288434 462632 295720 208982 620701 849667 741649 675452 511229 114201 707494 792121 903781 809874 470998 574089 410486 485789 258276 629523 72359 468037 302967 760158 646476 415999 416805 197662 255727 562261 281909 588031 964827 994928 370101 8...

output:

NIE

result:

ok no solution

Test #116:

score: 0
Accepted
time: 134ms
memory: 9572kb

input:

500000
788907 725472 947004 173276 881965 593666 108597 803006 835535 405697 963744 568150 890915 905522 932398 686679 120619 92645 244984 516889 93762 459689 605157 615050 92627 548667 877309 781981 742752 142203 485348 144792 765381 739696 51754 434736 54311 619686 909904 532748 349589 536326 9863...

output:

TAK
1 500000 27629
1 2 788907
500000 3 697843
1 4 947004
1 5 173276
500000 6 854336
500000 7 566037
1 8 108597
500000 9 775377
500000 10 807906
1 11 405697
500000 12 936115
1 13 568150
1 14 890915
500000 15 877893
500000 16 904769
1 17 686679
1 18 120619
1 19 92645
500000 20 217355
1 21 516889
50000...

result:

ok good solution

Test #117:

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

input:

500000
505537 355397 75217 499831 663806 564712 709314 206220 175949 877910 948833 412438 421741 63813 87874 114532 191002 200605 904534 65009 249701 705040 578822 605497 754780 713250 238519 393998 69356 240966 422687 457340 481823 919481 418729 55380 916731 433830 876456 56430 725191 864012 841158...

output:

TAK
1 499937 572807
1 499922 528413
1 499841 463782
1 499838 520417
1 499827 412418
1 499816 8128
1 499807 131819
1 499768 287363
1 499715 325342
1 499713 390624
1 499697 97997
1 499672 41157
1 499655 706514
1 499646 34646
1 499617 226873
1 499596 662952
1 499590 466986
1 499534 704405
1 499521 5931...

result:

ok good solution

Test #118:

score: 0
Accepted
time: 135ms
memory: 9632kb

input:

500000
574621 859976 531511 632664 566027 155810 429999 303849 305552 478101 608869 42205 221809 533532 245372 613372 152931 426578 96908 835581 350867 888939 32453 291622 363226 343931 800362 887803 335194 592336 73580 243780 397212 560247 518573 717640 56350 425068 198162 338732 729483 590620 8975...

output:

TAK
1 500000 108543
1 2 574621
500000 3 751433
1 4 531511
1 5 632664
500000 6 457484
1 7 155810
1 8 429999
1 9 303849
1 10 305552
1 11 478101
1 12 608869
1 13 42205
1 14 221809
1 15 533532
1 16 245372
500000 17 504829
500000 18 44388
1 19 426578
1 20 96908
1 21 835581
1 22 350867
1 23 888939
1 24 32...

result:

ok good solution

Test #119:

score: 0
Accepted
time: 142ms
memory: 22160kb

input:

500000
651963 836393 437856 525793 904266 798251 277883 386794 307721 683563 614085 499613 829032 336030 495980 766316 515451 385250 912181 415836 779780 760259 364546 781283 942237 724817 401002 593087 862555 461385 901457 928812 910270 293208 272570 271260 718896 427984 764917 806920 802083 842493...

output:

TAK
1 490711 268260
490711 499996 25195
490711 499989 4459
490711 499963 276892
490711 499962 431040
490711 499944 615788
490711 499939 152448
490711 499930 41273
490711 499905 315392
490711 499890 434108
490711 499889 455250
490711 499880 610615
490711 499875 678971
490711 499824 67834
490711 49981...

result:

ok good solution

Test #120:

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

input:

500000
398812 655030 737717 408782 139331 772560 137285 448003 653137 453447 243942 273305 937252 911739 879927 383174 655280 156536 93537 64221 96623 142158 764677 915554 872909 501321 450891 81996 389284 103136 963237 626808 680846 438895 314266 935567 826608 287466 308443 436758 253521 611620 193...

output:

NIE

result:

ok no solution

Test #121:

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

input:

500000
179561 660110 705425 832096 582500 934162 425886 641897 643844 78937 748488 481458 532910 992050 617403 762233 293173 725278 29188 246662 517978 568493 304979 564587 159694 339967 329352 729788 621493 852978 590005 497690 266474 255173 305678 611639 689942 185894 516456 187894 285035 885088 1...

output:

NIE

result:

ok no solution

Test #122:

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

input:

500000
745777 86056 417144 334475 880085 339689 76081 729015 343238 693829 675190 133289 134760 866869 837107 965665 200328 906080 86311 869565 601121 818378 942502 830513 829122 582141 156992 434219 127712 466084 388701 670105 37513 500994 65916 680921 217095 302453 889363 627463 858926 49542 49263...

output:

NIE

result:

ok no solution

Test #123:

score: 0
Accepted
time: 119ms
memory: 9504kb

input:

500000
151464 163747 298203 218584 244402 920338 814442 518332 268019 567391 567675 223527 692031 558847 837459 111820 625091 840866 652496 532994 877369 457852 222716 149233 504308 162266 744547 611193 594166 696830 481934 631269 358987 627461 616921 212607 682793 440797 373443 669848 59479 382413 ...

output:

TAK
1 500000 105984
500000 2 45480
1 3 163747
500000 4 192219
500000 5 112600
1 6 244402
500000 7 814354
1 8 814442
500000 9 412348
1 10 268019
1 11 567391
500000 12 461691
1 13 223527
1 14 692031
500000 15 452863
500000 16 731475
1 17 111820
1 18 625091
1 19 840866
1 20 652496
1 21 532994
1 22 8773...

result:

ok good solution

Test #124:

score: 0
Accepted
time: 149ms
memory: 23716kb

input:

500000
704613 846101 196328 723528 539983 527581 835115 642305 290174 227222 786925 464653 484096 713914 446226 823556 353670 303814 879612 766504 336269 819905 438367 143676 149835 829117 725699 548477 854280 624305 559276 356763 543220 921242 16883 828021 402736 565144 895214 859020 900943 113634 ...

output:

TAK
1 499905 262053
1 499790 365820
1 499752 266909
1 499716 496201
1 499688 422179
1 499664 627261
1 499574 482222
1 499563 608784
1 499535 173259
1 499486 111386
1 499485 763714
1 499416 675682
1 499395 173661
1 499374 645199
1 499342 881907
1 499084 419880
1 499018 833486
1 498939 796423
1 498880...

result:

ok good solution

Test #125:

score: 0
Accepted
time: 145ms
memory: 9636kb

input:

500000
575640 974431 119793 345460 324989 986283 118096 61949 602742 105107 697462 613618 770331 833198 207737 821076 66133 710795 401563 369969 926058 517347 29363 422348 393771 261195 543718 623633 163164 710739 924942 596481 97970 945670 276142 231171 92899 238063 92472 23779 355459 193079 996436...

output:

TAK
1 500000 687
1 2 575640
500000 3 973744
500000 4 119106
500000 5 344773
500000 6 324302
500000 7 985596
500000 8 117409
1 9 61949
1 10 602742
500000 11 104420
500000 12 696775
500000 13 612931
500000 14 769644
1 15 833198
500000 16 207050
1 17 821076
1 18 66133
1 19 710795
500000 20 400876
50000...

result:

ok good solution

Test #126:

score: 0
Accepted
time: 150ms
memory: 22752kb

input:

500000
486664 919154 435522 863537 294666 564226 451732 623046 384433 517995 634007 550806 385279 479570 312545 646647 262306 710102 678119 369565 620333 525706 690783 515289 556480 614026 941545 751579 359573 739275 351378 271158 792378 507362 763249 660767 871304 469180 259290 297887 768575 672592...

output:

TAK
1 126785 252950
126785 498311 641587
126785 496211 655363
126785 495285 327924
126785 486236 508306
126785 482129 692581
126785 481352 230816
126785 474131 152296
126785 460501 508082
126785 446956 259934
126785 445265 308682
126785 444785 519973
126785 444773 519801
126785 443189 538297
126785 ...

result:

ok good solution

Test #127:

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

input:

500000
779291 990049 217668 777047 9737 867200 737186 707561 323285 983091 355593 749252 962925 956852 858304 845476 832528 765328 435154 798572 707198 358340 205907 833890 710256 575468 617227 728472 914256 631405 492680 987241 950929 360677 381621 987720 645798 914530 794419 927841 648729 362535 9...

output:

NIE

result:

ok no solution

Test #128:

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

input:

500000
430454 568651 486619 880827 262492 245950 304864 257194 307788 931015 276004 987877 481275 420801 895928 730522 423665 47553 501326 422533 126431 833775 501354 42958 270841 966990 99598 876403 276883 401109 286204 370541 495185 541175 933980 241124 223426 546429 517055 515854 785365 374024 87...

output:

NIE

result:

ok no solution

Test #129:

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

input:

500000
725133 529120 125547 696168 298620 279208 96819 565477 138126 970399 662174 809929 587113 707585 729417 38256 340155 76759 8774 281256 479127 660082 499831 847952 532148 546489 567892 417738 152148 626909 772601 917509 287477 320498 887272 153666 444917 457726 83424 907218 489748 554562 56000...

output:

NIE

result:

ok no solution

Test #130:

score: 0
Accepted
time: 145ms
memory: 9712kb

input:

500000
663342 22125 535270 249725 183665 993876 401293 436299 977351 724935 312470 244932 497397 740509 240445 447341 528374 675826 272164 198949 539449 730973 28277 615977 940191 612444 893801 635948 665546 537469 56255 687985 594958 56469 95387 415687 144461 228793 242887 230773 203516 783420 9588...

output:

TAK
1 500000 258488
1 2 663342
1 3 22125
1 4 535270
1 5 249725
1 6 183665
500000 7 735388
1 8 401293
500000 9 177811
500000 10 718863
500000 11 466447
1 12 312470
1 13 244932
1 14 497397
500000 15 482021
1 16 240445
1 17 447341
1 18 528374
1 19 675826
1 20 272164
1 21 198949
1 22 539449
500000 23 47...

result:

ok good solution

Test #131:

score: 0
Accepted
time: 155ms
memory: 22856kb

input:

500000
357135 432688 945424 518430 182309 296003 14833 515552 966514 132251 241876 334979 460130 414497 823 2989 25200 744757 961957 45605 165382 568073 568381 65895 884811 58447 81547 329249 739506 871016 907478 301561 754169 701617 713003 359411 847125 918522 66974 519309 81500 987278 583189 96184...

output:

TAK
1 499916 564492
1 499866 28410
1 499862 852887
1 499833 209050
1 499828 288892
1 499702 891049
1 499699 989401
1 499675 427704
1 499667 927472
1 499666 566105
1 499559 888414
1 499557 727184
1 499525 322034
1 499459 226636
1 499438 258602
1 499426 143302
1 499388 904770
1 499341 589848
1 499315 ...

result:

ok good solution

Test #132:

score: 0
Accepted
time: 138ms
memory: 9596kb

input:

500000
589489 501667 899208 706180 469140 829129 948465 17099 314232 220112 714048 975470 954194 974850 620429 819884 807973 25853 676719 605484 693226 367093 468312 794081 611502 439674 119621 262695 322308 272958 851021 832480 303855 173428 714726 384681 668577 731271 332501 849337 948884 477995 5...

output:

TAK
1 500000 5888
500000 2 583601
500000 3 495779
1 4 899208
1 5 706180
1 6 469140
500000 7 823241
1 8 948465
500000 9 11211
500000 10 308344
1 11 220112
500000 12 708160
500000 13 969582
500000 14 948306
500000 15 968962
500000 16 614541
1 17 819884
1 18 807973
1 19 25853
500000 20 670831
1 21 6054...

result:

ok good solution

Test #133:

score: 0
Accepted
time: 158ms
memory: 22452kb

input:

500000
549327 360110 980814 971962 736829 793491 924818 344618 739852 346178 335294 654584 476201 616941 903043 889708 574127 837508 915510 605094 886528 554699 629921 645826 468820 445092 474205 365578 990637 547776 509117 887764 502187 979750 722996 972325 880710 873258 907431 309239 750891 314358...

output:

TAK
1 477836 302419
477836 499998 143884
477836 499990 616716
477836 499989 624361
477836 499982 389479
477836 499954 565667
477836 499946 180589
477836 499936 405050
477836 499925 169293
477836 499904 593447
477836 499899 413187
477836 499898 106471
477836 499891 264428
477836 499885 450089
477836 ...

result:

ok good solution

Test #134:

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

input:

500000
197 222 224 305 306 374 570 582 776 890 985 1013 1437 1455 1580 1608 1616 1629 1670 1891 1926 2103 2165 2379 2569 2606 2713 2810 2856 2863 3094 3395 3441 3478 3722 3953 4209 4302 4336 4427 4474 4499 4635 4681 4761 4806 4816 4943 4959 4979 5065 5124 5186 5353 5477 5545 5643 5669 5724 5807 5901...

output:

NIE

result:

ok no solution