QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#527690#1142. Fountain Parksjamjanek45 347ms29048kbC++201.1kb2024-08-22 18:17:182024-08-22 18:17:19

Judging History

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

  • [2024-08-22 18:17:19]
  • 评测
  • 测评结果:45
  • 用时:347ms
  • 内存:29048kb
  • [2024-08-22 18:17:18]
  • 提交

answer

#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
map<pair<int,int>,int>mapa;
int roza[4][2] = {{0,-2}, {0,2}, {-2,0}, {2,0}};
int father[200010];
int find(int x){
	if(father[x]==x)return x;
	return father[x] = find(father[x]);
}
int construct_roads(vector<int> x, vector<int> y) {
	int n = x.size(), i;
	for(i=0;i<n;i++)father[i] = i;
	vector<int>a,b,u,v;
	for(i=0;i<n;i++){
		mapa[{x[i],y[i]}]=i;
		for(auto j: roza){
			if(mapa.find({x[i]+j[0], y[i]+j[1]})!=mapa.end()){
				if(find(i)==find(mapa[{x[i]+j[0], y[i]+j[1]}]))continue;
				father[find(i)] = find(mapa[{x[i]+j[0], y[i]+j[1]}]);
				u.push_back(mapa[{x[i]+j[0], y[i]+j[1]}]);
				v.push_back(i);
				int A = x[i]+j[0]/2, B = y[i]+j[1]/2;
				//printf("%d %d\n", A, B);
				if(j[1]==0){
					if((A+B)%4==1)
						a.push_back(A),b.push_back(B+1);
					else
						a.push_back(A),b.push_back(B-1);
				}
				else{
					if((A+B)%4==1)
						a.push_back(A-1),b.push_back(B);
					else
						a.push_back(A+1),b.push_back(B);
				}
			}
		}
	}
	for(i=0;i<n;i++)
		if(find(i)!=find(0))return 0;
	build(u,v,a,b);
	return 1;
}

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

ba73dbf9c7d5e5202834d6a500541c
1
2 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
0

result:

ok 

Test #2:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
2 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
0 1 1 3

result:

ok 

Test #3:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
2 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #4:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
2 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
2
0 1 1 3
1 2 3 5

result:

ok 

Test #5:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 6
2 8

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
3
0 1 1 3
1 2 3 5
2 3 1 7

result:

ok 

Test #6:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
2 8

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #7:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 8
2 10

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #8:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 6
2 10

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #9:

score: 5
Accepted
time: 106ms
memory: 16092kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
2 15660
2 23918
2 132200
2 117654
2 162750
2 183010
2 75554
2 29740
2 185476
2 135138
2 194024
2 182274
2 1338
2 42922
2 51616
2 171196
2 159598
2 136432
2 84454
2 61806
2 136968
2 167442
2 150036
2 23974
2 10064
2 86342
2 146274
2 174318
2 130832
2 118838
2 180...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
99999
211 289 1 166959
61 305 1 97823
154 389 3 159173
122 425 1 108895
373 594 3 109881
402 622 3 158737
483 699 3 75377
464 717 1 102939
198 746 3 85569
760 790 3 43993
148 805 3 114953
660 843 3 84841
484 984 1 125303
278 1069 1 54079
492 1080 3 60037...

result:

ok 

Test #10:

score: 5
Accepted
time: 6ms
memory: 4944kb

input:

ba73dbf9c7d5e5202834d6a500541c
10000
2 3124
2 3126
2 3128
2 3130
2 3132
2 3134
2 3136
2 3138
2 3140
2 3142
2 3144
2 3146
2 3148
2 3150
2 3152
2 3154
2 3156
2 3158
2 3160
2 3162
2 3164
2 3166
2 3168
2 3170
2 3172
2 3174
2 3176
2 3178
2 3180
2 3182
2 3184
2 3186
2 3188
2 3190
2 3192
2 3194
2 3196
2 31...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
9999
0 1 3 3125
1 2 1 3127
2 3 3 3129
3 4 1 3131
4 5 3 3133
5 6 1 3135
6 7 3 3137
7 8 1 3139
8 9 3 3141
9 10 1 3143
10 11 3 3145
11 12 1 3147
12 13 3 3149
13 14 1 3151
14 15 3 3153
15 16 1 3155
16 17 3 3157
17 18 1 3159
18 19 3 3161
19 20 1 3163
20 21 3 ...

result:

ok 

Test #11:

score: 5
Accepted
time: 44ms
memory: 10376kb

input:

ba73dbf9c7d5e5202834d6a500541c
53891
2 3566
2 3568
2 3570
2 3572
2 3574
2 3576
2 3578
2 3580
2 3582
2 3584
2 3586
2 3588
2 3590
2 3592
2 3594
2 3596
2 3598
2 3600
2 3602
2 3604
2 3606
2 3608
2 3610
2 3612
2 3614
2 3616
2 3618
2 3620
2 3622
2 3624
2 3626
2 3628
2 3630
2 3632
2 3634
2 3636
2 3638
2 36...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
53890
0 1 1 3567
1 2 3 3569
2 3 1 3571
3 4 3 3573
4 5 1 3575
5 6 3 3577
6 7 1 3579
7 8 3 3581
8 9 1 3583
9 10 3 3585
10 11 1 3587
11 12 3 3589
12 13 1 3591
13 14 3 3593
14 15 1 3595
15 16 3 3597
16 17 1 3599
17 18 3 3601
18 19 1 3603
19 20 3 3605
20 21 1...

result:

ok 

Test #12:

score: 5
Accepted
time: 9ms
memory: 5352kb

input:

ba73dbf9c7d5e5202834d6a500541c
14979
2 4954
2 4956
2 4958
2 4960
2 4962
2 4964
2 4966
2 4968
2 4970
2 4972
2 4974
2 4976
2 4978
2 4980
2 4982
2 4984
2 4986
2 4988
2 4990
2 4992
2 4994
2 4996
2 4998
2 5000
2 5002
2 5004
2 5006
2 5008
2 5010
2 5012
2 5014
2 5016
2 5018
2 5020
2 5022
2 5024
2 5026
2 50...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
14978
0 1 1 4955
1 2 3 4957
2 3 1 4959
3 4 3 4961
4 5 1 4963
5 6 3 4965
6 7 1 4967
7 8 3 4969
8 9 1 4971
9 10 3 4973
10 11 1 4975
11 12 3 4977
12 13 1 4979
13 14 3 4981
14 15 1 4983
15 16 3 4985
16 17 1 4987
17 18 3 4989
18 19 1 4991
19 20 3 4993
20 21 1...

result:

ok 

Test #13:

score: 5
Accepted
time: 24ms
memory: 7544kb

input:

ba73dbf9c7d5e5202834d6a500541c
44171
2 36500
2 36502
2 36504
2 36506
2 36508
2 36510
2 36512
2 36514
2 36516
2 36518
2 36520
2 36522
2 36524
2 36526
2 36528
2 36530
2 36532
2 36534
2 36536
2 36538
2 36540
2 36542
2 36544
2 36546
2 36548
2 36550
2 36552
2 36554
2 36556
2 36558
2 36560
2 36562
2 36564...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #14:

score: 5
Accepted
time: 1ms
memory: 3908kb

input:

ba73dbf9c7d5e5202834d6a500541c
1000
2 20406
2 20378
2 37840
2 37702
2 20448
2 37688
2 37780
2 20720
2 38256
2 20612
2 38050
2 20152
2 37880
2 20116
2 20030
2 20526
2 38324
2 20956
2 20852
2 20356
2 37668
2 20292
2 37648
2 20320
2 20078
2 38060
2 38014
2 37738
2 37878
2 20336
2 20472
2 20214
2 38340
...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #15:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2000
2 19578
2 1754
2 1760
2 130946
2 164378
2 1038
2 20302
2 131788
2 131632
2 164392
2 19868
2 164924
2 131380
2 130972
2 131348
2 1070
2 131568
2 19492
2 19876
2 131606
2 1142
2 1588
2 1424
2 1726
2 131416
2 946
2 20158
2 19574
2 20106
2 1736
2 1186
2 19476
2 164256...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #16:

score: 5
Accepted
time: 114ms
memory: 16064kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
2 103034
2 75068
2 69976
2 84860
2 113488
2 156808
2 109250
2 119184
2 169250
2 182382
2 161594
2 169232
2 41046
2 87158
2 10192
2 32612
2 84228
2 49708
2 157912
2 160028
2 160234
2 167142
2 22010
2 37360
2 64100
2 113388
2 81460
2 52862
2 77902
2 155958
2 13330...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
99999
81 223 1 164923
132 296 3 133113
137 569 3 141481
337 676 3 161481
462 721 3 188029
600 811 3 57445
83 916 1 17967
278 922 1 157491
744 945 3 102341
499 999 1 169315
703 1049 1 101743
570 1142 3 182805
1121 1171 1 74159
37 1194 1 138423
112 1206 3 ...

result:

ok 

Subtask #2:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Test #17:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
4 4
2 4
4 2
2 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
3
0 1 3 3
0 2 5 3
1 3 1 3

result:

ok 

Test #18:

score: 0
Wrong Answer
time: 0ms
memory: 3800kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
4 4
2 6
2 4
4 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
3
1 2 3 5
0 2 3 3
0 3 3 5

result:

wrong answer Tree @(3, 5) appears more than once: for edges on positions 0 and 2

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 20
Accepted

Test #82:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
200000 2
200000 4
199998 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
2
0 1 200001 3
0 2 199999 3

result:

ok 

Test #83:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
200000 200000
200000 199998
199998 200000

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
2
0 1 200001 199999
0 2 199999 199999

result:

ok 

Test #84:

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

input:

ba73dbf9c7d5e5202834d6a500541c
12
2 2
2 4
4 2
2 200000
2 199998
4 200000
200000 2
200000 4
199998 2
200000 200000
200000 199998
199998 200000

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #85:

score: 20
Accepted
time: 276ms
memory: 29048kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
195232 4772
192370 7632
64282 135722
174444 25558
54846 145156
70170 129832
196228 3774
23234 176768
186862 13140
22458 177546
18158 181846
144902 55100
109692 90310
154220 45782
180406 19598
176744 23260
69098 130906
83308 116694
728 199274
143272 56730
17012 1...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
295 299 41067 158935
195 310 139415 60589
237 439 1085 198919
456 490 174825 25179
556 664 101921 98083
606 799 33557 166447
728 857 66259 133745
189 1071 198527 1475
461 1143 38191 161811
1164 1171 50739 149263
957 1298 100825 99179
884 1298 1008...

result:

ok 

Test #86:

score: 20
Accepted
time: 286ms
memory: 28876kb

input:

ba73dbf9c7d5e5202834d6a500541c
199997
56858 56864
1456 1462
51406 51410
89266 89272
53562 53556
80164 80158
13970 13966
41960 41966
48338 48342
98766 98772
82904 82898
38168 38172
28780 28774
38142 38146
16616 16612
15258 15262
69676 69672
85410 85416
59306 59310
712 718
6144 6140
61280 61286
28928 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199996
48 157 17055 17051
7 525 41961 41965
161 532 43591 43597
22 570 28927 28923
358 586 3147 3153
492 589 34017 34023
177 638 6195 6201
245 673 35997 35993
159 720 40401 40405
101 796 82097 82091
245 801 35999 35993
265 806 89561 89567
122 843 76969 7...

result:

ok 

Test #87:

score: 20
Accepted
time: 301ms
memory: 28868kb

input:

ba73dbf9c7d5e5202834d6a500541c
199997
65538 34474
61104 38910
57364 42638
29768 70236
50488 49524
91868 8146
42764 57238
16096 83906
17718 82294
91644 8368
90818 9186
83908 16096
97246 2756
68350 31652
53514 46498
10854 89158
64174 35838
62258 37746
36734 63280
76516 23496
19968 80036
2764 97240
559...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199996
203 406 97685 2317
289 658 53649 46353
113 726 28203 71811
659 732 62175 37837
417 771 37443 62569
632 837 86797 13205
336 926 27149 72865
141 959 89361 10653
75 992 74933 25071
1152 1251 75801 24201
1024 1262 1413 98589
819 1298 17509 82493
1051 ...

result:

ok 

Test #88:

score: 20
Accepted
time: 226ms
memory: 25300kb

input:

ba73dbf9c7d5e5202834d6a500541c
169995
97050 40000
83488 40000
83726 40000
100000 25052
100000 13668
2 904
60986 40000
28594 20000
51184 40000
40000 12506
92936 2
32440 40000
61562 2
29342 2
29178 2
31564 2
84020 2
22850 2
86310 40000
2 25682
67964 20000
27174 2
34700 40000
100000 18902
24042 20000
8...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
169994
56 172 3 23277
251 328 88539 3
212 592 59117 40001
120 717 23529 1
250 994 28449 20001
418 1063 76803 19999
362 1196 100001 38139
652 1228 68753 40001
309 1273 100001 20407
240 1288 99647 39999
222 1295 15463 39999
402 1414 33421 20001
1372 1417 2...

result:

ok 

Test #89:

score: 20
Accepted
time: 172ms
memory: 19572kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
1314 1854
274 822
298 698
1510 1034
958 1170
938 878
558 406
1442 1542
1394 734
546 1234
1018 1426
1206 1454
414 402
210 566
1578 426
230 278
1022 1102
462 1026
166 66
1374 1810
1334 202
314 1042
602 1658
1598 550
718 1650
186 1618
1062 1806
262 1614
1082 1950
9...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #90:

score: 20
Accepted
time: 286ms
memory: 22648kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
194 138
778 1194
636 506
688 34
322 418
332 1882
706 574
106 746
162 1682
16 650
90 830
794 926
266 1642
468 914
790 438
354 1242
200 1530
706 402
482 822
612 1926
292 1934
224 662
172 1362
676 1294
344 1602
290 466
734 1238
300 1938
224 30
184 1370
520 822
264 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #91:

score: 20
Accepted
time: 260ms
memory: 22548kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
166 984
734 960
1026 70
1018 572
774 48
758 496
486 720
1090 680
862 120
1510 284
790 824
58 878
1102 690
910 256
322 140
6 750
630 554
86 506
122 898
1498 886
1266 110
470 514
114 832
338 182
1094 300
718 288
278 532
470 42
630 614
438 96
958 252
378 764
958 11...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #92:

score: 20
Accepted
time: 297ms
memory: 28964kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
1398 812
1458 624
1286 630
1430 638
1250 584
1026 92
1026 148
1114 750
38 642
1202 748
842 38
998 638
662 594
1570 430
710 258
26 552
154 442
10 666
922 378
90 488
1490 538
1594 662
1154 502
210 416
670 672
454 256
898 774
590 148
1318 842
1266 794
746 860
310 9...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
9 480 1203 749
290 541 1595 37
322 613 1553 91
119 872 197 23
366 1046 751 265
35 1264 337 775
519 1317 181 311
287 1429 883 985
745 1444 133 783
618 1504 361 951
1432 1513 981 247
148 1533 541 899
1448 1573 879 653
451 1698 475 637
714 1715 1161 ...

result:

ok 

Test #93:

score: 20
Accepted
time: 286ms
memory: 28952kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
866 434
1150 510
298 342
1442 170
382 976
686 442
854 894
318 976
166 640
1562 246
1438 814
1382 872
1558 782
578 320
1378 474
1474 320
1590 628
1554 278
682 82
554 318
34 248
674 870
246 522
726 482
1390 920
1298 682
294 622
402 472
1198 742
614 264
598 630
910...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
454 701 499 413
564 837 1029 1001
584 1061 477 327
1046 1116 981 879
560 1134 1073 943
203 1135 59 729
1186 1405 1517 479
278 1536 1173 215
145 1556 1227 189
162 1571 281 711
106 1589 535 833
1400 1616 387 937
376 1648 1039 793
258 1730 433 87
336...

result:

ok 

Test #94:

score: 20
Accepted
time: 315ms
memory: 28936kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
972 594
440 1198
762 586
426 1542
468 126
252 1434
182 1442
452 814
778 386
744 1118
854 82
912 178
84 1366
982 1202
212 1106
226 1442
210 878
570 890
422 846
264 1334
772 910
66 926
118 1094
304 98
810 1426
34 158
142 2
258 698
732 554
152 1110
290 490
794 690
...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
193 742 197 173
74 809 839 923
305 932 729 701
161 1265 515 551
1126 1378 385 553
884 1445 273 1405
982 1559 211 15
299 1569 389 1193
550 1577 975 199
527 1583 75 1015
688 1688 495 799
130 1690 845 1541
1467 1710 123 1335
62 1742 577 177
1625 1780...

result:

ok 

Test #95:

score: 20
Accepted
time: 328ms
memory: 28884kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
628 130
416 710
642 1042
500 138
150 202
294 166
742 1166
872 1094
854 378
500 846
72 490
122 10
328 422
54 834
340 1426
264 818
466 774
254 422
338 1554
952 542
238 1502
42 322
672 474
826 1246
994 1454
614 1418
816 386
314 346
620 1526
982 1298
296 1490
310 67...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
72 231 977 5
177 740 109 281
700 843 181 169
928 992 625 597
1001 1047 923 1043
920 1335 727 1007
55 1381 641 1565
987 1388 813 761
267 1413 787 907
1218 1543 485 473
643 1627 253 97
603 1657 759 379
1653 1687 381 957
705 1690 471 547
362 1692 639...

result:

ok 

Test #96:

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

input:

ba73dbf9c7d5e5202834d6a500541c
7
183572 142078
183572 142080
183568 142076
183574 142078
183574 142076
183568 142078
183570 142078

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
6
0 1 183573 142079
0 3 183573 142077
3 4 183575 142077
2 5 183567 142077
5 6 183569 142077
0 6 183571 142079

result:

ok 

Test #97:

score: 20
Accepted
time: 17ms
memory: 5312kb

input:

ba73dbf9c7d5e5202834d6a500541c
14125
185792 20626
186256 20742
186128 20844
186294 20356
185902 20752
186302 20350
185884 20314
185894 20614
185980 20576
186148 20520
185830 20870
185858 20382
186108 20826
186204 20714
185822 20694
185928 20984
185768 20438
186176 20758
185926 20604
186106 20672
185...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
14124
55 187 185813 20841
108 268 185765 20901
127 291 185879 20283
179 334 185821 20751
80 340 185767 20893
153 348 185759 20789
343 364 186185 20811
95 394 185813 20815
250 402 186291 20327
107 427 186201 20391
259 438 186273 20401
133 439 185799 20781...

result:

ok 

Test #98:

score: 20
Accepted
time: 71ms
memory: 11448kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
177456 177456
171074 171074
168200 168200
161352 161352
67104 67104
118318 118318
52258 52258
922 922
48450 48450
198048 198048
78358 78358
25852 25852
190812 190812
55744 55744
100624 100624
67562 67562
100866 100866
151566 151566
150458 150458
89932 89932
1124...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #99:

score: 20
Accepted
time: 264ms
memory: 28880kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
36996 36996
186060 186060
138654 138654
119648 119648
77274 77274
155998 155998
126848 126846
40008 40008
131372 131372
176154 176154
52550 52550
28622 28620
152276 152274
163746 163744
77792 77790
26394 26392
107542 107542
137218 137218
99318 99318
123124 12312...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
326 490 157757 157757
523 611 128991 128989
584 688 196209 196209
472 849 104557 104555
134 890 183951 183949
840 913 176833 176833
625 1055 122147 122147
891 1202 137555 137555
76 1257 38029 38029
1280 1293 115237 115235
1028 1457 32067 32065
958...

result:

ok 

Test #100:

score: 20
Accepted
time: 10ms
memory: 4776kb

input:

ba73dbf9c7d5e5202834d6a500541c
10000
176796 4336
103510 178630
176666 4270
176706 4416
176736 4434
176678 4446
176682 4352
176682 4328
103620 178604
176774 4284
176762 4278
176664 4418
103654 178692
176752 4376
176800 4358
176700 4426
103638 178626
176668 4434
103624 178694
103638 178756
103504 1786...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #101:

score: 20
Accepted
time: 59ms
memory: 8004kb

input:

ba73dbf9c7d5e5202834d6a500541c
50000
19712 125246
21028 78432
107586 175540
41632 93316
40222 19636
107864 175496
41542 93234
19724 125336
21004 78390
19840 125472
107696 175608
107744 175604
107868 175560
20950 78474
40432 19666
41542 93254
19828 125410
19672 125296
41694 93142
41650 93228
20986 78...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #102:

score: 20
Accepted
time: 130ms
memory: 13080kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
11532 82706
12484 8300
116672 115008
12586 8316
116574 115040
91278 196254
167350 193456
91178 196396
167250 193500
11696 82884
12456 8192
167330 193490
167264 193368
162872 76530
162838 76386
11692 82780
21684 51392
116554 115012
167308 193302
167246 193300
175...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #103:

score: 20
Accepted
time: 106ms
memory: 13808kb

input:

ba73dbf9c7d5e5202834d6a500541c
80000
110632 196678
110706 196562
110062 196474
110372 197130
110334 196998
110584 196940
110462 196562
110576 196678
110076 196620
110630 196486
110586 196562
110194 197046
110232 196526
110576 196778
110488 197020
110092 196852
110704 196558
110254 196698
110692 1966...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
79999
434 438 110403 196963
432 448 110381 196689
146 491 110135 196907
383 540 110595 196691
42 550 110199 196965
110 557 110739 196841
204 725 110221 196535
7 749 110577 196677
192 789 110027 196975
495 899 110641 196953
723 933 110117 196707
643 935 1...

result:

ok 

Test #104:

score: 20
Accepted
time: 161ms
memory: 17368kb

input:

ba73dbf9c7d5e5202834d6a500541c
110000
153248 86150
153422 86140
153336 85974
153374 85680
153026 85962
153322 85930
153536 85810
152996 86246
153750 85712
153536 86158
153790 86094
153098 85904
153182 85690
153078 86148
153848 86062
153656 85888
153066 85882
153096 85824
153554 85590
153518 86200
15...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
109999
340 353 153461 86171
335 424 153765 85971
359 458 153503 85847
0 464 153247 86151
398 664 153503 85637
539 731 153475 85717
334 794 153715 86045
182 845 153467 86271
257 856 153291 86449
372 1035 153543 86323
119 1049 153357 86249
408 1053 153449 ...

result:

ok 

Test #105:

score: 20
Accepted
time: 214ms
memory: 21396kb

input:

ba73dbf9c7d5e5202834d6a500541c
140000
182484 19098
182932 18626
183100 19106
183132 19482
182768 18952
183204 19426
182944 18630
183078 19558
182858 18640
183242 19530
183212 19092
183248 18828
183174 19230
183330 18848
183322 18710
182638 18824
183070 18818
182708 18952
183010 19154
183120 19540
18...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
139999
315 326 182859 19191
317 390 182733 18975
194 442 183445 19317
113 448 183031 18987
201 527 182923 18859
163 733 182839 19567
705 740 183293 19399
625 788 183025 19091
294 820 183293 19431
703 881 183351 18833
867 1002 182591 18863
624 1034 183013...

result:

ok 

Test #106:

score: 20
Accepted
time: 278ms
memory: 25140kb

input:

ba73dbf9c7d5e5202834d6a500541c
170000
12466 152266
12366 152380
12874 152026
12384 151764
12674 151762
12364 151662
12394 152198
13164 152022
12042 152002
12498 152164
12416 152346
12554 152040
12246 151920
12190 151820
12110 152452
12858 152564
12834 152132
13022 152014
12706 152692
12468 151568
12...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
169999
271 345 12121 151815
364 412 12773 151891
133 480 12051 151897
434 522 12163 152409
504 597 12871 152055
459 859 12619 152517
154 1007 12949 152125
846 1040 12991 152499
623 1166 12633 152025
1041 1180 12327 152255
271 1191 12123 151815
101 1418 1...

result:

ok 

Test #107:

score: 20
Accepted
time: 334ms
memory: 28932kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
121744 79484
121292 78880
120816 79608
121418 79068
121408 79102
121396 79782
121148 79636
121194 79636
121052 79024
120820 79454
121652 79184
121112 80116
121204 79382
121096 79926
121154 80104
121514 79848
121274 80028
121786 79584
120990 79962
121284 79608
12...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
222 655 120621 79381
70 736 121407 79917
630 779 120897 79741
567 985 121865 79467
449 1117 121781 79817
143 1124 120723 79585
462 1338 121527 79235
1290 1344 121379 79105
1265 1388 121441 79303
215 1608 121699 79667
811 1609 121575 79675
37 1641 ...

result:

ok 

Subtask #5:

score: 20
Accepted

Test #108:

score: 20
Accepted
time: 259ms
memory: 28872kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
82422 100002
100002 52498
82816 2
97624 2
100002 58032
20638 100002
100002 7646
80512 2
2 10584
28426 100002
2 83036
2 64556
47872 100002
55196 2
85350 100002
2 95376
2 23942
12488 100002
83178 2
2 9086
85598 2
100002 78820
100002 10868
98810 2
84182 100002
2 71...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
12 171 47873 100001
134 253 18709 1
223 411 9123 100003
246 647 100003 5377
646 816 100003 37161
334 885 3 24241
870 1171 61607 100003
397 1233 1 31579
724 1350 100001 79431
1264 1448 100001 67571
551 1501 100001 82979
389 1585 100001 73687
888 16...

result:

ok 

Test #109:

score: 20
Accepted
time: 259ms
memory: 28884kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
10674 50002
7228 2
31566 50002
48790 2
87212 50002
100002 76172
54282 100002
2 33136
100002 78564
50002 9882
50848 50002
50002 83692
92422 100002
100002 78880
100002 71432
50002 65586
3750 2
50002 11898
50002 17296
50002 44774
3836 2
49936 50002
50002 48536
1542...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
609 807 26575 50003
797 891 3 24181
834 995 50001 11731
881 1043 50001 98319
1141 1220 90523 50003
193 1309 100003 68293
989 1348 95905 100001
1153 1350 68885 100001
1040 1432 3 11005
1387 1464 100001 80115
1397 1488 3 41417
760 1513 100003 88205
...

result:

ok 

Test #110:

score: 20
Accepted
time: 298ms
memory: 28880kb

input:

ba73dbf9c7d5e5202834d6a500541c
199996
47612 97612
29284 20722
30860 80858
2350 52348
49558 99558
33234 83232
9050 59048
92420 57584
4174 54172
42730 92728
72144 77860
69182 19182
77286 72716
43440 6566
57918 7918
35822 85822
24864 25142
87024 37024
96744 46746
29472 79472
28650 78648
26748 76746
253...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199995
280 301 66641 83361
481 657 58567 8569
761 790 46073 3931
79 1379 38417 88415
781 1401 27599 77597
465 1411 41627 91625
924 1427 59909 9911
1248 1427 59911 9911
847 1519 77127 27129
789 1683 44329 5675
1074 1738 7059 42947
1388 1812 99025 49027
17...

result:

ok 

Test #111:

score: 20
Accepted
time: 342ms
memory: 28352kb

input:

ba73dbf9c7d5e5202834d6a500541c
196096
266 878
52 818
34 890
674 450
960 390
446 622
224 138
794 360
22 436
234 760
126 336
454 434
672 386
286 36
94 134
736 774
782 752
1014 692
228 594
778 878
550 1008
246 732
588 250
982 460
786 76
342 404
2 68
58 174
230 282
604 358
700 438
274 156
94 324
706 948...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
196095
559 665 711 591
164 684 157 841
417 764 689 667
357 835 789 115
576 864 505 349
558 908 533 929
778 1097 339 863
593 1129 329 323
571 1139 29 351
414 1264 231 191
589 1307 809 47
308 1360 117 37
1122 1409 727 259
1217 1436 353 405
824 1543 607 939...

result:

ok 

Test #112:

score: 20
Accepted
time: 283ms
memory: 25920kb

input:

ba73dbf9c7d5e5202834d6a500541c
175280
382 334
666 902
752 406
992 1306
1252 256
252 422
762 1018
72 210
1078 102
478 1182
1392 68
942 530
180 252
152 1176
2 594
52 182
522 1032
482 1386
242 260
242 276
112 572
782 138
762 1034
532 586
222 160
232 236
914 392
172 1006
612 1258
1170 832
1236 992
1370 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
175279
632 725 155 983
116 729 1101 819
559 780 543 721
89 812 441 61
658 842 1091 137
586 872 73 311
351 953 1187 771
707 1042 1023 1261
676 1107 671 1049
572 1108 411 823
389 1141 281 1367
728 1157 147 1291
1086 1166 1375 223
1176 1303 743 877
1334 144...

result:

ok 

Test #113:

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

input:

ba73dbf9c7d5e5202834d6a500541c
7
183572 142078
183572 142080
183568 142076
183574 142078
183574 142076
183568 142078
183570 142078

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
6
0 1 183573 142079
0 3 183573 142077
3 4 183575 142077
2 5 183567 142077
5 6 183569 142077
0 6 183571 142079

result:

ok 

Test #114:

score: 20
Accepted
time: 32ms
memory: 7268kb

input:

ba73dbf9c7d5e5202834d6a500541c
31065
186080 21286
185980 21532
185748 21002
185714 21252
185436 20722
186236 21564
185932 21236
185414 20700
185944 21578
185658 20936
185856 21540
186034 21122
186020 21492
186014 21310
185282 20638
185482 20878
185224 20682
185670 21264
186032 21510
186004 21112
185...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
31064
110 112 185931 21277
76 143 185621 21381
267 315 185175 20675
33 316 185671 21371
179 334 185281 20735
171 355 185937 21277
358 493 185463 20795
444 542 185555 21371
473 572 185927 21377
104 586 185243 20599
121 636 185835 21385
12 684 186019 21493...

result:

ok 

Test #115:

score: 20
Accepted
time: 18ms
memory: 5852kb

input:

ba73dbf9c7d5e5202834d6a500541c
20000
70262 161716
35896 78638
36020 78778
35780 78778
70374 161892
35858 78838
35908 78680
70376 161802
35886 78784
35858 78886
70436 161842
35884 78716
36030 78752
70344 161912
70270 161766
35868 78870
70276 161828
35806 78664
70330 161764
35978 78806
35850 78718
703...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #116:

score: 20
Accepted
time: 75ms
memory: 10192kb

input:

ba73dbf9c7d5e5202834d6a500541c
70000
101734 41174
53110 85692
125290 151418
53092 85668
125240 151526
101728 41006
155882 162620
70032 179926
125070 151314
69944 179838
125086 151362
101720 41088
125220 151418
78622 142762
70006 179900
78714 142782
53076 85646
78466 142806
156134 162652
69884 179760...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #117:

score: 20
Accepted
time: 166ms
memory: 14960kb

input:

ba73dbf9c7d5e5202834d6a500541c
120000
81980 29184
45086 128478
45130 128460
34094 161734
34312 161616
6660 133698
45032 128422
6464 133838
77706 149488
29744 82012
34066 161698
34152 161602
67876 16558
81992 29244
41026 168276
6594 133820
6410 133690
34300 161660
172610 38842
172506 38750
40990 1682...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #118:

score: 20
Accepted
time: 145ms
memory: 16180kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
21246 185820
20976 186272
21262 185900
20648 185812
21086 186086
20868 185712
21114 185810
21262 186168
20684 185892
20982 186216
20922 186194
21206 185654
20762 185796
21248 186200
21142 185850
21060 185510
20926 185746
21326 185710
20948 185798
21056 185958
21...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
99999
80 134 21423 186039
136 198 21255 185697
76 201 20825 186221
276 380 20909 185753
224 416 20785 185643
50 419 21069 186035
485 503 21283 185807
9 506 20983 186215
524 600 21363 185587
390 604 21059 186235
4 654 21087 186087
411 668 21029 185799
408...

result:

ok 

Test #119:

score: 20
Accepted
time: 191ms
memory: 19372kb

input:

ba73dbf9c7d5e5202834d6a500541c
125000
143578 113244
143620 112756
143600 113284
143670 113030
143848 113452
143654 113456
144176 112896
143982 112746
143648 112962
143542 113182
143954 113258
143500 112982
143960 113170
144016 112808
143802 112736
143952 112846
143364 112900
143658 112576
143632 112...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
124999
9 172 143541 113181
205 277 143451 113091
225 340 143683 112875
269 442 143987 112673
26 636 143451 112639
244 835 143689 112845
667 838 143473 112863
314 842 143779 112971
699 907 143463 113215
588 948 143977 112959
617 976 144083 113297
237 1015...

result:

ok 

Test #120:

score: 20
Accepted
time: 235ms
memory: 22404kb

input:

ba73dbf9c7d5e5202834d6a500541c
150000
115254 119710
115364 119296
115174 119288
115390 119648
115444 119620
115682 119260
115616 118782
114978 119008
115702 119260
115590 119250
115170 119030
115146 119308
115222 118958
114912 118972
115304 118678
115034 119388
115326 119348
115328 119082
115256 118...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
149999
121 138 115025 118917
473 529 115101 119121
433 620 114855 119245
289 772 114799 119061
832 835 114879 119173
274 877 115347 119629
674 937 114889 118999
624 1113 115509 119483
202 1125 115655 118877
547 1269 115507 118899
1192 1294 115243 118751
...

result:

ok 

Test #121:

score: 20
Accepted
time: 296ms
memory: 25844kb

input:

ba73dbf9c7d5e5202834d6a500541c
175000
70684 45878
70722 45914
70572 45804
70996 46520
70150 46340
70360 46792
70818 45802
70460 46280
70946 46002
70154 46322
70894 46696
70710 46696
70120 46212
71042 46286
70194 46302
70624 45856
70434 46158
70936 46408
70870 46012
70790 45822
70470 45956
70136 4644...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
174999
72 431 70155 46171
603 604 70963 46469
269 692 70205 46393
209 706 70833 46063
524 937 70479 46619
834 975 70689 46259
904 1023 70747 46581
1013 1066 70633 46859
875 1176 70899 46095
849 1282 70075 46467
988 1313 70211 46287
855 1339 70973 45947
6...

result:

ok 

Test #122:

score: 20
Accepted
time: 347ms
memory: 28940kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
120832 79932
121178 79254
120936 79156
121624 79142
121168 79430
121456 79722
121398 79244
121684 79344
121242 79718
121204 79394
121244 79174
121382 78964
121072 79288
121126 79078
121494 79378
121472 79306
121074 79832
121140 79956
121018 80010
121332 79428
12...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
7 298 121685 79343
247 406 120821 79257
602 637 121095 79147
540 808 121685 79705
752 824 121223 79461
45 914 120979 79739
917 967 121265 79597
595 1292 120829 79889
809 1409 121081 79777
124 1500 121503 79133
76 1536 121051 79651
693 1586 121267 ...

result:

ok 

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%