QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#535150#1142. Fountain ParksCrysfly100 ✓293ms132824kbC++172.1kb2024-08-27 20:51:102024-08-27 20:51:11

Judging History

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

  • [2024-08-27 20:51:11]
  • 评测
  • 测评结果:100
  • 用时:293ms
  • 内存:132824kb
  • [2024-08-27 20:51:10]
  • 提交

answer

#include"parks.h"
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2") 
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
//#define int long long
//#define ull unsigned long long
#define SZ(x) ((int)((x).size()))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}

#define x first
#define y second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 1000005
#define inf 0x3f3f3f3f

int fa[maxn];
map<int,int>mp[maxn],hav[maxn];

int gf(int x){
	while(x!=fa[x])x=fa[x]=fa[fa[x]];
	return x;
}

vi U,V,A,B;
void add(int u,int v,int a,int b){
	if(gf(u)==gf(v)) return;
	if(hav[a][b]) return;
//	cout<<"u,v,a,b "<<u<<" "<<v<<" "<<a<<" "<<b<<"\n";
	fa[gf(u)]=gf(v);
	U.pb(u),V.pb(v),A.pb(a),B.pb(b);
	hav[a][b]=1;
}

int construct_roads(vi X,vi Y)
{
	int n=X.size();
	vector<pii>o;
	For(i,0,n-1)o.pb(mkp(X[i],Y[i])),mp[X[i]][Y[i]]=i,fa[i]=i;
	sort(ALL(o));
	bool fir=1;
	for(int l=0,r=0;l<n;l=r+1){
		r=l;
		while(r+1<n && o[r+1].x==o[l].x) ++r;
		
		vector<pii>p;
		For(i,l,r) p.pb(o[i]);
	//	assert(p.size()==n);
		
		if(fir){
			fir=0;
			for(auto [x,y]:p)
				if(mp[x].count(y+2)) add(mp[x][y],mp[x][y+2],x-1,y+1);
			continue;
		}
		
		for(auto [x,y]:p)
			if(mp[x].count(y+2) && (x+y)%4==0)
				add(mp[x][y],mp[x][y+2],x+1,y+1);
		
		for(auto [x,y]:p)
			if(mp[x-2].count(y) && (x+y)%4==2)
				add(mp[x][y],mp[x-2][y],x-1,y-1);
				
		for(auto [x,y]:p)
			if(mp[x].count(y+2) && (x+y)%4==2)
				add(mp[x][y],mp[x][y+2],x-1,y+1);
		
		for(auto [x,y]:p)
			if(mp[x-2].count(y) && (x+y)%4==0)
				add(mp[x][y],mp[x-2][y],x-1,y+1);
	}
	For(i,1,n-1) if(gf(i)!=gf(0)) return 0;
	build(U,V,A,B);
	return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 11ms
memory: 98196kb

input:

ba73dbf9c7d5e5202834d6a500541c
1
2 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
0

result:

ok 

Test #2:

score: 5
Accepted
time: 15ms
memory: 97884kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
2 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
0 1 1 3

result:

ok 

Test #3:

score: 5
Accepted
time: 11ms
memory: 98192kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
2 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #4:

score: 5
Accepted
time: 19ms
memory: 98076kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
2 6

output:

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

result:

ok 

Test #5:

score: 5
Accepted
time: 12ms
memory: 98192kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 6
2 8

output:

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

result:

ok 

Test #6:

score: 5
Accepted
time: 15ms
memory: 99372kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
2 8

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #7:

score: 5
Accepted
time: 12ms
memory: 98660kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 8
2 10

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #8:

score: 5
Accepted
time: 8ms
memory: 98644kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 6
2 10

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #9:

score: 5
Accepted
time: 116ms
memory: 113804kb

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
13952 31503 1 3
31503 34333 1 5
34333 11184 1 7
11184 42839 1 9
42839 39415 1 11
39415 76798 1 13
76798 20588 1 15
20588 37623 1 17
37623 30774 1 19
30774 21798 1 21
21798 81338 1 23
81338 35924 1 25
35924 98098 1 27
98098 4388 1 29
4388 94082 1 31...

result:

ok 

Test #10:

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

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 1 3125
1 2 1 3127
2 3 1 3129
3 4 1 3131
4 5 1 3133
5 6 1 3135
6 7 1 3137
7 8 1 3139
8 9 1 3141
9 10 1 3143
10 11 1 3145
11 12 1 3147
12 13 1 3149
13 14 1 3151
14 15 1 3153
15 16 1 3155
16 17 1 3157
17 18 1 3159
18 19 1 3161
19 20 1 3163
20 21 1 ...

result:

ok 

Test #11:

score: 5
Accepted
time: 55ms
memory: 106340kb

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 1 3569
2 3 1 3571
3 4 1 3573
4 5 1 3575
5 6 1 3577
6 7 1 3579
7 8 1 3581
8 9 1 3583
9 10 1 3585
10 11 1 3587
11 12 1 3589
12 13 1 3591
13 14 1 3593
14 15 1 3595
15 16 1 3597
16 17 1 3599
17 18 1 3601
18 19 1 3603
19 20 1 3605
20 21 1...

result:

ok 

Test #12:

score: 5
Accepted
time: 15ms
memory: 101484kb

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 1 4957
2 3 1 4959
3 4 1 4961
4 5 1 4963
5 6 1 4965
6 7 1 4967
7 8 1 4969
8 9 1 4971
9 10 1 4973
10 11 1 4975
11 12 1 4977
12 13 1 4979
13 14 1 4981
14 15 1 4983
15 16 1 4985
16 17 1 4987
17 18 1 4989
18 19 1 4991
19 20 1 4993
20 21 1...

result:

ok 

Test #13:

score: 5
Accepted
time: 40ms
memory: 105056kb

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: 12ms
memory: 98444kb

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: 16ms
memory: 97940kb

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: 116ms
memory: 114880kb

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
82261 74843 1 3
74843 8766 1 5
8766 52706 1 7
52706 50332 1 9
50332 87757 1 11
87757 96100 1 13
96100 10691 1 15
10691 67720 1 17
67720 56430 1 19
56430 82376 1 21
82376 85275 1 23
85275 77807 1 25
77807 58592 1 27
58592 63926 1 29
63926 32662 1 31...

result:

ok 

Subtask #2:

score: 10
Accepted

Dependency #1:

100%
Accepted

Test #17:

score: 10
Accepted
time: 7ms
memory: 99136kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
4 4
2 4
4 2
2 2

output:

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

result:

ok 

Test #18:

score: 10
Accepted
time: 21ms
memory: 99020kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
4 4
2 6
2 4
4 6

output:

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

result:

ok 

Test #19:

score: 10
Accepted
time: 16ms
memory: 99540kb

input:

ba73dbf9c7d5e5202834d6a500541c
6
4 6
2 4
2 2
4 2
4 4
2 6

output:

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

result:

ok 

Test #20:

score: 10
Accepted
time: 8ms
memory: 98808kb

input:

ba73dbf9c7d5e5202834d6a500541c
8
4 2
2 6
4 8
2 4
4 6
2 2
4 4
2 8

output:

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

result:

ok 

Test #21:

score: 10
Accepted
time: 15ms
memory: 99604kb

input:

ba73dbf9c7d5e5202834d6a500541c
8
2 10
2 4
4 4
4 8
2 2
2 8
4 10
4 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #22:

score: 10
Accepted
time: 15ms
memory: 98100kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 200000
4 199998
2 199998
4 200000

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
3
2 0 1 199999
1 2 3 199997
1 3 3 199999

result:

ok 

Test #23:

score: 10
Accepted
time: 288ms
memory: 131080kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
4 177614
4 159166
2 99950
4 127824
2 158654
4 82678
2 76278
2 198694
4 142000
4 8782
2 49352
2 71260
2 194790
2 87904
2 70702
2 20966
4 161326
2 52586
2 18108
2 36098
2 160702
2 102232
2 67042
2 16712
2 141944
4 27120
4 43282
4 139388
2 144766
4 75542
4 5228
2 1...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
87387 174493 1 3
174493 136703 1 5
136703 193595 1 7
193595 28659 1 9
28659 171330 1 11
171330 126146 1 13
126146 10708 1 15
10708 158430 1 17
158430 139479 1 19
139479 48968 1 21
48968 29851 1 23
29851 160919 1 25
160919 111808 1 27
111808 144510...

result:

ok 

Test #24:

score: 10
Accepted
time: 15ms
memory: 99372kb

input:

ba73dbf9c7d5e5202834d6a500541c
8
2 183570
4 183570
4 183572
2 183572
2 183578
4 183574
2 183576
4 183576

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
7
0 3 1 183571
6 4 1 183577
2 5 5 183573
1 0 3 183569
1 2 3 183571
5 7 3 183575
7 6 3 183577

result:

ok 

Test #25:

score: 10
Accepted
time: 19ms
memory: 98100kb

input:

ba73dbf9c7d5e5202834d6a500541c
1173
2 186526
2 185928
4 185842
4 185780
4 185692
4 186148
4 186016
2 186236
4 185948
4 185626
2 186332
4 186206
2 186480
4 186154
2 186542
2 186504
2 186230
2 186654
2 185902
4 186762
4 186074
2 185804
4 186262
4 185834
2 186224
4 186544
4 185604
2 186300
2 186042
4 1...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1172
1021 745 1 185599
745 720 1 185601
720 1155 1 185603
1155 187 1 185605
187 819 1 185607
819 979 1 185609
979 1148 1 185611
1148 356 1 185613
356 351 1 185615
351 982 1 185617
982 845 1 185619
845 772 1 185621
772 189 1 185623
189 44 1 185625
44 93 1...

result:

ok 

Test #26:

score: 10
Accepted
time: 18ms
memory: 99900kb

input:

ba73dbf9c7d5e5202834d6a500541c
3000
2 109002
2 197108
4 198220
4 197488
4 108286
2 109006
2 197954
2 108586
4 197416
4 197132
4 197374
4 197448
4 197898
2 108330
2 197992
4 109556
2 197598
4 108114
4 109046
2 197128
2 108454
2 108892
2 108110
4 108622
4 197756
2 197924
2 109102
2 198050
2 108460
2 1...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #27:

score: 10
Accepted
time: 16ms
memory: 98444kb

input:

ba73dbf9c7d5e5202834d6a500541c
4000
2 140462
2 140478
2 140596
2 4466
2 172072
2 140272
4 64560
2 64340
4 172244
4 64230
2 57126
4 158866
2 140482
2 64878
4 159028
4 140276
2 56814
2 4364
2 64356
4 64834
4 57096
2 3922
2 172124
4 64542
2 159218
4 140762
2 172112
4 140320
4 56964
4 158988
4 140398
2 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #28:

score: 10
Accepted
time: 103ms
memory: 110808kb

input:

ba73dbf9c7d5e5202834d6a500541c
80000
2 77930
2 34884
4 40062
2 34158
2 6130
4 32544
2 51290
2 50478
4 70072
4 69616
2 75800
4 5656
2 4510
2 77766
2 68358
2 42792
4 52374
4 48488
2 75616
2 46682
4 45386
4 28842
2 12918
4 8206
2 20568
2 70466
2 5562
4 61202
2 65046
4 71854
4 9510
2 45910
2 14066
4 608...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
79999
35158 33964 1 3
33964 64060 1 5
64060 3654 1 7
3654 52126 1 9
52126 4938 1 11
4938 6988 1 13
6988 62140 1 15
62140 32239 1 17
32239 39082 1 19
39082 12710 1 21
12710 12916 1 23
12916 40911 1 25
40911 47784 1 27
47784 46905 1 29
46905 18772 1 31
187...

result:

ok 

Test #29:

score: 10
Accepted
time: 155ms
memory: 118788kb

input:

ba73dbf9c7d5e5202834d6a500541c
120000
2 107882
4 86012
4 127996
2 176868
2 178032
4 122930
4 178436
4 160026
4 152606
2 160512
2 84884
2 161726
4 190586
2 149048
2 131608
2 80390
2 155598
4 84696
2 182976
4 158014
4 173998
2 159392
4 128890
4 119618
4 196866
2 97962
4 188404
2 133252
4 166790
4 1593...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
119999
3416 71671 1 80001
71671 46985 1 80003
46985 89055 1 80005
89055 79357 1 80007
79357 71793 1 80009
71793 57759 1 80011
57759 20411 1 80013
20411 31331 1 80015
31331 108465 1 80017
108465 710 1 80019
710 119147 1 80021
119147 79407 1 80023
79407 10...

result:

ok 

Test #30:

score: 10
Accepted
time: 222ms
memory: 126020kb

input:

ba73dbf9c7d5e5202834d6a500541c
160000
2 52858
4 164410
2 75528
2 52886
4 109942
4 170460
2 186328
2 124554
4 197478
2 192650
4 78512
4 153868
4 155132
2 162316
4 122256
2 166830
2 163464
2 129030
4 191906
4 68290
4 64288
4 152134
4 79376
2 125460
4 51150
2 106656
4 139088
2 136352
2 52620
4 95892
2 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
159999
140728 159895 1 40003
159895 116824 1 40005
116824 26002 1 40007
26002 10395 1 40009
10395 104968 1 40011
104968 22190 1 40013
22190 22827 1 40015
22827 14103 1 40017
14103 95800 1 40019
95800 96808 1 40021
96808 65716 1 40023
65716 133856 1 40025...

result:

ok 

Test #31:

score: 10
Accepted
time: 263ms
memory: 131972kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
4 159176
4 173814
4 148140
4 192932
2 10458
4 82176
2 192792
4 58608
4 152072
2 179396
4 65044
2 43890
2 6200
4 72634
2 27580
2 178602
2 61556
4 157146
2 133400
4 126376
4 18694
2 195536
4 159494
4 84034
2 33830
4 92734
2 6522
4 109768
2 101402
4 6176
4 53030
2 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
49531 157693 1 3
157693 51820 1 5
51820 22149 1 7
22149 90756 1 9
90756 148747 1 11
148747 109158 1 13
109158 192499 1 15
192499 123414 1 17
123414 35684 1 19
35684 113244 1 21
113244 18156 1 23
18156 88733 1 25
88733 91156 1 27
91156 154952 1 29
...

result:

ok 

Test #32:

score: 10
Accepted
time: 8ms
memory: 99268kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
4 2
4 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
0 1 3 3

result:

ok 

Test #33:

score: 10
Accepted
time: 8ms
memory: 98412kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
4 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
1 0 3 1

result:

ok 

Test #34:

score: 10
Accepted
time: 13ms
memory: 97788kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 4
4 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
1 0 3 5

result:

ok 

Test #35:

score: 10
Accepted
time: 14ms
memory: 98140kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
4 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #36:

score: 10
Accepted
time: 11ms
memory: 99492kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 4
4 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #37:

score: 10
Accepted
time: 14ms
memory: 98304kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
4 2

output:

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

result:

ok 

Test #38:

score: 10
Accepted
time: 8ms
memory: 98032kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
4 4

output:

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

result:

ok 

Test #39:

score: 10
Accepted
time: 7ms
memory: 98364kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
4 2
4 4

output:

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

result:

ok 

Test #40:

score: 10
Accepted
time: 8ms
memory: 98096kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 4
4 2
4 4

output:

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

result:

ok 

Test #41:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 4
4 2
4 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #42:

score: 10
Accepted
time: 8ms
memory: 98988kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 200000
2 199998
4 200000

output:

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

result:

ok 

Test #43:

score: 10
Accepted
time: 11ms
memory: 98332kb

input:

ba73dbf9c7d5e5202834d6a500541c
2000
2 66072
2 15600
2 65278
2 65372
2 15154
2 64698
4 15472
4 15336
4 15714
4 65714
2 65516
4 65552
2 64890
2 15174
2 65674
2 14732
2 15150
4 65768
2 15672
2 14610
4 15530
2 65776
2 15370
4 65724
2 15308
2 15412
4 15712
4 14620
4 14600
2 15404
4 15918
2 14858
2 15488
...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #44:

score: 10
Accepted
time: 23ms
memory: 98324kb

input:

ba73dbf9c7d5e5202834d6a500541c
3000
2 111548
2 111040
4 70070
2 177612
2 110868
2 111368
4 17940
2 111432
2 59736
2 177494
4 110958
2 70064
2 59920
2 70092
4 177672
2 59336
4 69988
4 111040
2 59840
4 18638
4 18042
2 111192
2 177526
4 69992
4 177776
4 69676
4 177824
4 111128
4 111278
4 59162
2 111592...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #45:

score: 10
Accepted
time: 132ms
memory: 115116kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
4 169676
2 166424
4 184362
4 189372
4 92358
4 163106
4 106516
4 84160
2 80238
2 189392
4 195840
2 118396
4 94344
4 188728
2 189284
2 164532
2 140524
2 126720
4 182624
4 131538
2 172512
2 163134
2 123156
4 137156
4 168310
2 140776
4 181764
2 92658
2 124148
4 1125...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
99999
82931 72659 1 62141
72659 38445 1 62143
38445 47840 1 62145
47840 6134 1 62147
99528 32305 1 62165
32305 34397 1 62167
34397 95403 1 62169
80426 2566 1 62175
2566 62247 1 62177
62247 22852 1 62179
22852 7378 1 62181
7378 70529 1 62183
70529 73482 1...

result:

ok 

Test #46:

score: 10
Accepted
time: 181ms
memory: 122868kb

input:

ba73dbf9c7d5e5202834d6a500541c
145093
2 166114
2 57160
2 100318
2 183710
2 157582
4 87300
2 108292
4 26942
4 152146
4 67878
2 189520
2 105504
4 182488
4 20028
4 149088
2 27528
4 54250
2 100720
2 62956
4 60756
2 107208
4 156884
2 184558
2 79524
4 152584
4 101220
2 8320
4 149952
4 2512
4 63280
2 14975...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
145092
59075 18304 1 3
106115 51449 1 19
51449 129446 1 21
142224 9276 1 35
9276 130865 1 37
130865 80199 1 39
80199 79829 1 41
79829 96330 1 43
96330 42746 1 45
42746 110442 1 47
110442 40308 1 49
40308 51876 1 51
51876 109530 1 53
109530 123909 1 55
12...

result:

ok 

Test #47:

score: 10
Accepted
time: 164ms
memory: 123352kb

input:

ba73dbf9c7d5e5202834d6a500541c
145075
2 155250
2 136442
2 94908
2 158406
4 57086
2 97650
4 48200
2 12782
2 185128
2 197282
4 27270
2 122262
4 66214
2 31156
2 150590
2 12294
4 1562
4 94584
2 23458
4 157278
4 33026
2 191138
4 147538
2 8652
2 108482
4 67498
4 157020
2 13190
2 30028
4 77576
4 44258
4 16...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
145074
42574 55747 1 3
55747 96449 1 5
96449 120955 1 7
120955 109902 1 9
109902 91793 1 11
62949 86278 1 25
86278 118586 1 27
118586 28978 1 29
28978 99732 1 31
99732 3045 1 33
58503 23125 1 47
23125 122563 1 49
122563 32005 1 51
32005 39763 1 53
39763 ...

result:

ok 

Subtask #3:

score: 15
Accepted

Dependency #2:

100%
Accepted

Test #48:

score: 15
Accepted
time: 12ms
memory: 99152kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
6 2
4 2
6 4
4 4

output:

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

result:

ok 

Test #49:

score: 15
Accepted
time: 16ms
memory: 99136kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
6 6
4 4
6 4
4 6

output:

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

result:

ok 

Test #50:

score: 15
Accepted
time: 13ms
memory: 98232kb

input:

ba73dbf9c7d5e5202834d6a500541c
6
6 2
2 2
6 4
2 4
4 2
4 4

output:

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

result:

ok 

Test #51:

score: 15
Accepted
time: 12ms
memory: 97772kb

input:

ba73dbf9c7d5e5202834d6a500541c
7
6 4
4 4
2 2
4 6
4 2
2 4
6 6

output:

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

result:

ok 

Test #52:

score: 15
Accepted
time: 3ms
memory: 99224kb

input:

ba73dbf9c7d5e5202834d6a500541c
8
4 2
2 2
6 8
4 6
4 8
4 4
6 6
2 4

output:

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

result:

ok 

Test #53:

score: 15
Accepted
time: 8ms
memory: 99320kb

input:

ba73dbf9c7d5e5202834d6a500541c
7
2 4
4 4
6 2
4 2
2 6
4 6
6 4

output:

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

result:

ok 

Test #54:

score: 15
Accepted
time: 7ms
memory: 98800kb

input:

ba73dbf9c7d5e5202834d6a500541c
8
4 2
4 8
4 6
6 2
2 6
4 4
2 8
6 4

output:

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

result:

ok 

Test #55:

score: 15
Accepted
time: 282ms
memory: 132092kb

input:

ba73dbf9c7d5e5202834d6a500541c
199998
6 95048
2 124620
6 92330
2 87562
4 64650
2 76818
6 94884
6 106050
2 87068
2 36890
4 118972
4 58310
2 59538
6 30350
4 14668
2 71226
4 83464
6 1438
2 63320
6 130540
6 20760
2 11738
6 121604
6 69304
2 35164
4 1904
6 63076
4 116444
6 96292
2 5438
6 16630
4 14906
6 8...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199997
180833 126224 1 3
126224 83881 1 5
83881 138308 1 7
138308 113233 1 9
113233 79947 1 11
79947 150235 1 13
150235 39002 1 15
39002 33628 1 17
33628 40658 1 19
40658 188337 1 21
188337 123479 1 23
123479 93771 1 25
93771 15412 1 27
15412 186208 1 29...

result:

ok 

Test #56:

score: 15
Accepted
time: 8ms
memory: 99116kb

input:

ba73dbf9c7d5e5202834d6a500541c
10
6 183572
4 183572
4 183574
2 183576
6 183576
4 183576
2 183578
6 183570
2 183572
4 183570

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
9
3 6 1 183577
1 2 5 183573
9 1 3 183571
2 5 3 183575
1 8 3 183573
5 3 3 183577
7 0 7 183571
0 1 5 183571
4 5 5 183575

result:

ok 

Test #57:

score: 15
Accepted
time: 11ms
memory: 99292kb

input:

ba73dbf9c7d5e5202834d6a500541c
1758
2 186528
2 185930
6 186026
4 185782
4 185694
4 186150
4 186018
2 186238
4 185950
4 185628
2 186334
6 185770
2 186482
4 186156
6 185842
6 186334
2 186232
2 186656
2 185904
4 186764
4 186076
2 185806
6 185650
4 185836
2 186226
4 186546
4 185606
2 186302
2 186044
4 1...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1757
1328 1329 1 185601
1329 720 1 185603
720 1155 1 185605
1155 1553 1 185607
1553 819 1 185609
819 979 1 185611
979 1148 1 185613
1148 356 1 185615
356 1272 1 185617
1272 1657 1 185619
1657 845 1 185621
845 1371 1 185623
1371 189 1 185625
189 1188 1 18...

result:

ok 

Test #58:

score: 15
Accepted
time: 19ms
memory: 99156kb

input:

ba73dbf9c7d5e5202834d6a500541c
6000
4 91732
4 90280
6 89008
2 91010
6 91888
4 90450
6 90196
6 90416
4 90156
6 91718
6 88708
6 89872
2 91232
2 91566
2 90018
2 89016
4 90382
2 88900
6 91918
4 89424
4 88672
2 89576
4 90656
6 88592
2 91610
2 90672
4 89684
2 91674
2 90820
2 91412
6 90820
2 91702
2 89464
...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
5999
5513 644 1 88155
644 3966 1 88157
3966 3598 1 88159
3598 1073 1 88161
1073 889 1 88163
889 3000 1 88165
3000 1786 1 88167
1786 2486 1 88169
2486 4134 1 88171
4134 5747 1 88173
5747 5534 1 88175
5534 1708 1 88177
1708 485 1 88179
485 2516 1 88181
251...

result:

ok 

Test #59:

score: 15
Accepted
time: 20ms
memory: 99040kb

input:

ba73dbf9c7d5e5202834d6a500541c
10000
2 85892
4 103848
4 55116
2 75724
6 178108
2 178416
6 104794
6 104736
6 54334
4 76036
4 86888
4 178912
4 86578
2 85994
6 74754
2 178168
4 103636
6 179140
4 75786
4 86246
6 85520
4 178886
6 104314
6 104818
6 74798
2 104170
4 103618
2 179026
2 178698
6 75788
2 54676...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #60:

score: 15
Accepted
time: 134ms
memory: 114740kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
6 4304
4 17988
4 43862
6 2282
6 37606
2 66400
2 11222
2 26524
2 66522
6 29288
2 54226
2 45692
4 66428
4 22820
6 65310
2 50814
2 8860
6 48664
2 40386
4 54982
2 23044
4 31694
4 6372
6 38602
2 9752
4 32596
6 53798
4 49586
2 24848
6 23096
6 40944
2 48824
6 16910
6 6...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
99999
52352 97931 1 3
97931 38222 1 5
38222 86929 1 7
86929 80656 1 9
80656 17742 1 11
17742 82482 1 13
82482 7410 1 15
7410 5196 1 17
5196 30562 1 19
30562 38109 1 21
38109 84182 1 23
84182 23046 1 25
23046 79889 1 27
79889 93235 1 29
93235 35346 1 31
3...

result:

ok 

Test #61:

score: 15
Accepted
time: 183ms
memory: 121456kb

input:

ba73dbf9c7d5e5202834d6a500541c
135000
4 80108
4 55532
6 15996
2 55940
6 40018
4 78816
6 35830
6 17658
2 86938
4 83772
2 72238
6 5506
6 61968
2 58268
6 43876
2 23076
4 27904
4 89178
6 35424
6 35176
4 89584
2 78888
6 7010
6 12638
2 42660
4 44862
6 60734
4 79580
2 74128
2 18674
2 19372
6 73860
6 54040
...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
134999
65274 131078 1 3
131078 118658 1 5
118658 49021 1 7
49021 33463 1 9
33463 20516 1 11
20516 122235 1 13
122235 26450 1 15
26450 127170 1 17
127170 13121 1 19
13121 85230 1 21
85230 19924 1 23
19924 46490 1 25
46490 40389 1 27
40389 125839 1 29
1258...

result:

ok 

Test #62:

score: 15
Accepted
time: 231ms
memory: 126548kb

input:

ba73dbf9c7d5e5202834d6a500541c
165000
6 172066
4 138088
2 134464
6 123142
4 170926
2 117864
2 185690
6 179060
6 187756
6 91450
4 92788
6 97334
6 134770
6 139588
2 121126
4 136832
4 197742
6 100388
6 91908
2 109104
6 106976
2 107942
4 142116
4 115082
2 113344
6 172824
6 110544
6 112464
4 149004
6 175...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
164999
70411 125160 1 89295
125160 65759 1 89297
65759 76006 1 89299
76006 114310 1 89301
114310 138974 1 89303
138974 43586 1 89305
43586 83733 1 89307
83733 40585 1 89309
40585 31473 1 89311
31473 15208 1 89313
15208 100187 1 89315
100187 105652 1 8931...

result:

ok 

Test #63:

score: 15
Accepted
time: 293ms
memory: 130916kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
6 86562
2 132164
2 161960
4 166102
4 94656
6 164844
6 45856
2 99300
4 77424
6 76788
6 162328
4 78372
4 103764
4 140704
6 127746
4 169652
4 96084
4 49796
6 172202
6 104484
4 167568
4 176392
6 129104
4 49314
4 56440
6 102854
4 59986
6 118008
6 145490
6 74630
4 788...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
99824 179200 1 43451
179200 66640 1 43453
66640 76512 1 43455
76512 88037 1 43457
88037 19055 1 43459
19055 33329 1 43461
33329 87044 1 43463
87044 42098 1 43465
42098 107409 1 43467
107409 81999 1 43469
81999 91040 1 43471
91040 141547 1 43473
14...

result:

ok 

Test #64:

score: 15
Accepted
time: 16ms
memory: 98180kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
6 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #65:

score: 15
Accepted
time: 12ms
memory: 98676kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
4 2
6 2

output:

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

result:

ok 

Test #66:

score: 15
Accepted
time: 11ms
memory: 99328kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 4
4 2
4 6
6 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #67:

score: 15
Accepted
time: 245ms
memory: 132464kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
2 115866
2 154134
2 3960
6 59348
6 111954
6 53896
2 15912
6 199914
2 163078
6 49868
2 137758
2 48042
2 69990
2 70364
2 133946
2 34468
2 130622
2 15364
6 196702
6 46780
2 128410
6 18592
6 4278
6 133068
6 142246
6 26900
6 43072
2 122198
6 124978
2 159380
2 85902
2...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
4082 9442 1 5
9442 102483 1 7
102483 107659 1 9
107659 89890 1 11
89890 20566 1 13
20566 56149 1 15
56149 167521 1 17
167521 176283 1 19
176283 169856 1 21
169856 29847 1 23
29847 71299 1 25
71299 65460 1 27
65460 189564 1 29
189564 96627 1 31
966...

result:

ok 

Test #68:

score: 15
Accepted
time: 239ms
memory: 131016kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
2 90630
6 168226
6 175968
2 130260
2 126026
6 119368
6 52682
6 64202
6 70518
2 170700
2 21860
2 178410
2 76192
2 38016
6 199270
6 23782
2 192152
2 106458
2 80892
6 163314
2 106656
6 49920
6 157054
2 136682
2 55556
2 79540
2 106102
6 88696
6 7678
2 52468
2 172280...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
7507 43994 1 5
43994 37535 1 7
37535 37030 1 9
37030 65598 1 11
65598 15170 1 13
15170 150001 1 15
150001 184108 1 17
184108 39733 1 19
39733 50752 1 21
50752 182688 1 23
182688 72389 1 25
72389 135632 1 27
135632 137510 1 29
137510 176496 1 31
17...

result:

ok 

Test #69:

score: 15
Accepted
time: 234ms
memory: 132412kb

input:

ba73dbf9c7d5e5202834d6a500541c
199005
6 34654
2 127948
6 190536
6 15644
2 120332
6 178698
6 3046
6 62338
6 12832
6 2824
2 48818
2 44152
6 71348
6 58418
2 151464
6 152242
2 111332
6 138662
6 146622
2 110626
6 6934
2 39908
2 108378
6 21936
6 164090
6 15418
2 36712
6 81888
6 146740
6 199770
6 158344
6 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199004
51358 139409 1 3
139409 52907 1 5
52907 162481 1 7
162481 175750 1 9
175750 1419 1 11
1419 138968 1 13
138968 128763 1 15
128763 34735 1 17
34735 129283 1 19
129283 163314 1 21
163314 14611 1 23
14611 27524 1 25
27524 159682 1 27
159682 86568 1 29...

result:

ok 

Test #70:

score: 15
Accepted
time: 20ms
memory: 98236kb

input:

ba73dbf9c7d5e5202834d6a500541c
4000
6 103928
6 191558
6 192994
6 104234
6 104228
6 192602
6 191276
6 192742
6 102730
6 102798
2 102814
2 191852
4 193088
2 192554
2 191866
6 192580
2 102534
2 104064
4 102812
4 103152
4 104060
6 104430
4 192606
6 192594
6 191350
2 103266
2 191778
2 191878
6 192648
2 1...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #71:

score: 15
Accepted
time: 19ms
memory: 99604kb

input:

ba73dbf9c7d5e5202834d6a500541c
8000
6 141670
6 184016
6 5642
4 184462
4 7172
4 185262
2 127694
6 184208
2 127008
6 5812
2 141736
6 184706
2 141928
6 141792
2 6068
2 7032
6 142914
2 127674
6 184572
2 143142
2 127594
2 128398
6 5628
6 5856
4 143130
6 6290
4 184104
4 142184
6 141864
4 7106
4 127108
2 1...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #72:

score: 15
Accepted
time: 129ms
memory: 115152kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
6 42836
2 5972
2 35490
6 39484
4 28614
2 35194
2 2202
4 80528
4 30536
4 90140
6 92102
6 54632
6 34240
4 84986
4 37206
4 64602
2 43952
6 49232
4 9034
2 67488
4 54660
2 16758
4 25776
2 89570
2 39854
2 16688
2 71262
6 79192
2 46376
2 47100
4 63702
2 10200
6 30688
2...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
99999
11289 72670 1 3
26634 93783 1 9
93783 3737 1 11
3737 7870 1 13
7870 50498 1 15
50498 63152 1 17
63152 78191 1 19
87730 32456 1 27
59812 40645 1 33
40645 350 1 35
60556 87907 1 45
87907 36499 1 47
36499 25032 1 49
25032 71733 1 51
71733 37097 1 53
3...

result:

ok 

Test #73:

score: 15
Accepted
time: 185ms
memory: 123824kb

input:

ba73dbf9c7d5e5202834d6a500541c
150000
6 78236
4 79810
4 91776
2 64708
4 102410
4 70544
2 103230
6 172210
4 115452
6 112350
4 54632
4 94094
2 70820
2 136734
6 59966
6 63288
6 158212
4 183616
2 142072
6 84484
2 184338
4 197862
2 96278
6 120562
2 66086
4 97884
6 115196
2 176864
6 138738
2 173644
6 1435...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
149999
137256 115958 1 53985
115958 140016 1 53987
140016 128730 1 53989
128730 27037 1 53991
27037 124258 1 53993
124258 2878 1 53995
2878 82725 1 53997
82725 78986 1 53999
78986 88109 1 54001
41895 94653 1 54007
94653 122732 1 54009
103629 113010 1 540...

result:

ok 

Test #74:

score: 15
Accepted
time: 251ms
memory: 132764kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
4 87744
2 105360
6 34704
2 171792
4 20694
6 25286
4 111544
6 25068
6 64900
2 15046
6 42920
2 56676
6 73896
6 62404
4 12270
4 170618
4 53634
2 178476
4 16464
6 188544
6 76360
4 15978
4 121632
4 38548
6 17998
2 106472
2 152492
2 70066
2 137378
4 55310
4 110092
2 9...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
40274 177260 1 5089
177260 64652 1 5091
64652 196585 1 5093
196585 132257 1 5095
132257 188493 1 5097
157516 16507 1 5111
16507 125764 1 5113
22378 190847 1 5119
190847 126556 1 5121
126556 110229 1 5123
110229 138447 1 5125
138447 150326 1 5127
1...

result:

ok 

Test #75:

score: 15
Accepted
time: 271ms
memory: 130964kb

input:

ba73dbf9c7d5e5202834d6a500541c
199998
2 4288
6 133692
4 30182
2 60312
4 47290
6 120388
2 130714
6 53616
4 91442
6 58218
6 71180
2 104478
6 57206
2 86644
2 93842
4 10502
2 92832
2 136286
6 157256
4 13610
4 148186
4 43542
2 18784
4 103326
4 15658
6 60290
2 23282
6 85690
6 148178
2 59640
2 84698
2 7120...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199997
198668 100317 1 3
100317 197689 1 5
197689 25068 1 7
25068 184499 1 9
184499 66839 1 11
66839 152416 1 13
152416 48180 1 15
48180 166469 1 17
166469 161745 1 19
161745 82068 1 21
82068 95026 1 23
95026 103873 1 25
103873 86419 1 27
86419 197464 1 ...

result:

ok 

Test #76:

score: 15
Accepted
time: 235ms
memory: 131836kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
2 129082
6 72610
6 194734
2 112750
6 82944
6 30138
6 15770
6 183396
2 154782
2 193764
2 194778
2 166484
2 193426
2 188262
2 145992
2 174192
6 123650
6 7554
2 119606
6 29826
6 67290
6 85018
2 126458
6 98598
6 55728
2 19416
2 57930
6 51516
6 193690
6 149696
6 6076...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
191221 92133 1 5
92133 192115 1 7
192115 31300 1 9
31300 177610 1 11
177610 98086 1 13
98086 65615 1 15
65615 108776 1 17
108776 2771 1 19
2771 116999 1 21
116999 175902 1 23
175902 63853 1 25
63853 77561 1 27
77561 153186 1 29
153186 107371 1 31
...

result:

ok 

Test #77:

score: 15
Accepted
time: 14ms
memory: 99044kb

input:

ba73dbf9c7d5e5202834d6a500541c
5000
4 156154
4 156368
2 196426
6 156928
6 196174
6 196750
4 197822
4 157596
6 197540
6 156240
6 157920
4 156878
6 158036
4 157232
4 196778
6 197648
6 198212
2 196894
2 197104
6 157446
4 158124
4 157874
4 158094
2 156192
2 157168
4 156104
6 156272
2 156800
6 156712
4 1...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #78:

score: 15
Accepted
time: 19ms
memory: 100312kb

input:

ba73dbf9c7d5e5202834d6a500541c
9000
4 170344
4 169674
2 32968
6 32518
6 169052
6 32668
6 167364
6 170438
2 113068
6 113654
6 169248
2 73998
2 113724
4 168816
6 114556
6 73758
6 169778
2 114014
4 168766
6 32746
4 33158
2 168994
6 113252
2 167962
2 74106
6 74430
2 33446
6 113268
4 167946
2 169548
6 16...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #79:

score: 15
Accepted
time: 128ms
memory: 115088kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
6 66826
6 39954
2 73296
2 75802
2 4612
4 61128
6 31252
6 31446
4 40332
2 9172
4 71820
6 84754
4 21092
6 61782
6 64606
6 51960
2 83080
2 19798
2 58636
2 87918
2 47708
4 11814
4 23664
2 50458
6 40382
2 63084
4 9814
2 72088
2 50462
4 50442
4 77972
6 1870
2 30758
2 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
99999
83787 22753 1 5
22753 75514 1 7
75514 55327 1 9
55327 73589 1 11
73589 51899 1 13
16121 9215 1 19
9215 13269 1 21
13269 11760 1 23
11760 20765 1 25
20765 12291 1 27
12291 55914 1 29
55914 16262 1 31
16262 38525 1 33
38525 91400 1 35
63778 71068 1 4...

result:

ok 

Test #80:

score: 15
Accepted
time: 189ms
memory: 124044kb

input:

ba73dbf9c7d5e5202834d6a500541c
150000
2 174028
4 144676
2 118168
6 186418
4 106026
2 169150
4 190940
2 67752
2 196266
4 96144
2 124170
2 82348
4 155326
6 144152
6 108674
2 127704
6 147302
2 94080
6 88216
4 121306
6 148108
2 73550
4 122830
6 112894
6 98012
2 195176
2 82024
6 152408
2 72600
4 80088
4 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
149999
31501 81133 1 65623
81133 137007 1 65625
137007 852 1 65627
852 64042 1 65629
64042 126216 1 65631
126216 33849 1 65633
33849 84275 1 65635
84275 778 1 65637
778 74480 1 65639
74480 902 1 65641
902 66244 1 65643
66244 103607 1 65645
103607 141656 ...

result:

ok 

Test #81:

score: 15
Accepted
time: 268ms
memory: 130992kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
2 52140
2 66722
6 68358
4 184262
6 44806
6 104740
4 58058
6 25488
6 29594
4 52850
6 130906
6 55904
2 160352
6 116632
4 52134
6 137734
2 180134
2 106380
6 114282
2 194328
6 79594
6 184894
2 42778
2 102758
6 144008
6 50926
6 119278
4 128810
4 21484
2 134002
6 1561...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
15795 17366 1 20639
17366 40322 1 20641
40322 157810 1 20643
157810 183397 1 20645
183397 17198 1 20647
134108 26810 1 20653
26810 55794 1 20655
55794 140779 1 20657
140779 186106 1 20659
186106 50156 1 20661
3075 96285 1 20667
96285 132056 1 2066...

result:

ok 

Subtask #4:

score: 20
Accepted

Test #82:

score: 20
Accepted
time: 14ms
memory: 99588kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
200000 2
200000 4
199998 2

output:

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

result:

ok 

Test #83:

score: 20
Accepted
time: 12ms
memory: 98032kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
200000 200000
200000 199998
199998 200000

output:

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

result:

ok 

Test #84:

score: 20
Accepted
time: 26ms
memory: 98324kb

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: 121ms
memory: 131152kb

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
64976 42656 3 199999
42656 177170 3 200001
99626 70454 5 199997
70454 64976 5 199999
108551 722 7 199995
722 99626 7 199997
32478 76300 9 199993
76300 108551 9 199995
30605 81828 11 199991
81828 32478 11 199993
20136 162100 13 199989
162100 30605 ...

result:

ok 

Test #86:

score: 20
Accepted
time: 128ms
memory: 132824kb

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
113948 165294 3 5
165294 18854 3 7
18854 23669 3 9
63414 8148 7 11
162590 113948 5 3
63414 23669 5 11
152046 52407 9 13
96089 162590 7 5
152046 8148 7 13
54259 190093 11 15
34265 96089 9 3
34265 56476 9 5
54259 52407 9 15
145713 115249 13 17
12002...

result:

ok 

Test #87:

score: 20
Accepted
time: 131ms
memory: 132704kb

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
19497 165411 3 99999
178153 176578 5 99997
176578 19497 5 99999
109685 56430 7 99995
56430 178153 7 99997
85709 197976 11 100003
197976 189718 9 100003
114285 83292 9 99993
83292 109685 9 99995
179399 195804 13 100001
195804 85709 11 100001
68721 ...

result:

ok 

Test #88:

score: 20
Accepted
time: 150ms
memory: 126512kb

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
155301 161777 1 3
161777 24402 1 5
24402 102888 1 7
102888 96890 1 9
96890 106150 1 11
106150 158515 1 13
158515 110720 1 15
110720 66862 1 17
66862 32035 1 19
32035 109939 1 21
109939 51174 1 23
51174 73734 1 25
73734 151701 1 27
151701 34245 1 2...

result:

ok 

Test #89:

score: 20
Accepted
time: 123ms
memory: 112784kb

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: 180ms
memory: 125184kb

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: 165ms
memory: 124928kb

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: 183ms
memory: 132000kb

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
82235 92072 1 3
92072 170898 1 5
170898 148297 1 7
148297 30450 1 9
30450 75977 1 11
75977 130177 1 13
130177 162765 1 15
162765 52031 1 17
52031 182901 1 19
182901 178195 1 21
178195 6571 1 23
6571 30001 1 25
30001 180738 1 27
180738 15842 1 29
1...

result:

ok 

Test #93:

score: 20
Accepted
time: 209ms
memory: 132752kb

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
9159 14492 1 5
14492 87730 1 7
87730 107996 1 9
107996 151938 1 11
151938 169744 1 13
169744 37232 1 15
37232 114619 1 17
114619 167643 1 19
167643 40911 1 21
40911 113729 1 23
113729 7648 1 25
7648 57689 1 27
57689 164568 1 29
164568 48652 1 31
4...

result:

ok 

Test #94:

score: 20
Accepted
time: 220ms
memory: 132600kb

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
13984 7105 1 3
7105 15977 1 5
15977 133243 1 7
133243 73913 1 9
73913 170983 1 11
170983 13104 1 13
13104 85628 1 15
85628 68379 1 17
68379 107524 1 19
107524 131113 1 21
131113 548 1 23
548 78813 1 25
78813 53134 1 27
53134 82595 1 29
82595 14017...

result:

ok 

Test #95:

score: 20
Accepted
time: 221ms
memory: 131060kb

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
24987 48613 5 3
179686 18612 5 7
15294 196666 5 11
40554 137461 5 15
190006 127456 5 19
191712 51037 5 23
191849 100423 5 27
27619 188937 5 31
133440 12073 5 35
186111 3188 5 39
149317 169905 5 43
20313 148327 5 47
92125 154262 5 51
84616 189312 5...

result:

ok 

Test #96:

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

input:

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

output:

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

result:

ok 

Test #97:

score: 20
Accepted
time: 25ms
memory: 100640kb

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
5891 5604 185667 20387
5507 12099 185665 20383
5507 5891 185665 20385
9854 5507 185667 20385
13299 5604 185667 20389
6150 9854 185669 20383
861 13299 185669 20387
3035 3394 185673 20389
4891 6150 185671 20385
3035 861 185671 20389
11326 6585 185675...

result:

ok 

Test #98:

score: 20
Accepted
time: 52ms
memory: 105684kb

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: 126ms
memory: 130904kb

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
12390 29270 3 1
12390 143875 3 3
41974 143875 5 3
41974 140693 5 5
60211 140693 7 5
60211 28967 7 7
106552 28967 9 7
106552 177696 9 9
95544 177696 11 9
95544 61755 11 11
92144 61755 13 11
92144 99458 13 13
157970 99458 15 13
157970 24083 15 15
12...

result:

ok 

Test #100:

score: 20
Accepted
time: 22ms
memory: 100796kb

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: 50ms
memory: 104968kb

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: 93ms
memory: 111916kb

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: 105ms
memory: 112688kb

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
69890 66124 109899 196749
68604 11258 109903 196743
31719 72368 109903 196747
7432 62675 109903 196751
32307 1602 109903 196755
49855 8653 109903 196759
72368 69890 109901 196747
11258 31719 109901 196745
72368 7432 109901 196749
62675 32307 109901...

result:

ok 

Test #104:

score: 20
Accepted
time: 128ms
memory: 116264kb

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
12226 102925 152903 86111
18326 12226 152901 86109
12226 76369 152901 86111
99644 78525 152905 86117
54522 12226 152903 86109
8706 99644 152903 86115
99644 10167 152903 86117
43939 99644 152905 86115
12569 13401 152905 86059
30716 53121 152905 861...

result:

ok 

Test #105:

score: 20
Accepted
time: 157ms
memory: 121656kb

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
135592 75527 182453 18849
15407 98041 182451 19117
15407 63042 182451 19119
50183 33105 182455 18847
47480 43797 182455 18867
33105 135592 182453 18847
53535 99464 182453 18859
76024 63042 182453 19119
39760 118536 182453 18853
53535 22752 182453 ...

result:

ok 

Test #106:

score: 20
Accepted
time: 192ms
memory: 127192kb

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
32639 124372 11969 152089
63574 116884 11969 152097
10197 93064 11969 152149
124372 114436 11967 152091
116884 112019 11967 152099
114436 168488 11967 152093
63574 63443 11967 152097
150068 24999 11971 152095
3476 23868 11971 152147
147852 114436 ...

result:

ok 

Test #107:

score: 20
Accepted
time: 239ms
memory: 131660kb

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
150864 155672 120525 79485
150864 95181 120523 79485
26551 42275 120527 79419
133793 177568 120527 79487
193577 147623 120525 79491
160527 37739 120525 79481
193577 43753 120525 79493
190205 192182 120525 79545
26551 94481 120525 79419
133793 1556...

result:

ok 

Subtask #5:

score: 20
Accepted

Test #108:

score: 20
Accepted
time: 190ms
memory: 132708kb

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
199575 112394 1 3
112394 150136 1 5
150136 127248 1 7
127248 13121 1 9
13121 11799 1 11
11799 23271 1 13
23271 18663 1 15
18663 40400 1 17
40400 111415 1 19
111415 196272 1 21
196272 50327 1 23
50327 23534 1 25
23534 184173 1 27
184173 190527 1 29...

result:

ok 

Test #109:

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

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
7382 173678 1 3
173678 98672 1 5
98672 152665 1 7
152665 196130 1 9
196130 117775 1 11
117775 182076 1 13
182076 16050 1 15
16050 147105 1 17
147105 44354 1 19
44354 188324 1 21
188324 115086 1 23
115086 170770 1 25
170770 42334 1 27
42334 31895 1...

result:

ok 

Test #110:

score: 20
Accepted
time: 142ms
memory: 131836kb

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
91487 32191 5 50001
32191 103320 3 50001
32191 158182 3 50003
33562 65959 7 49999
65959 91487 5 49999
47303 158182 5 50003
47303 179075 5 50005
97748 175173 9 49997
175173 33562 7 49997
15517 179075 7 50005
15517 114506 7 50007
176482 191442 11 49...

result:

ok 

Test #111:

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

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
153844 183524 1 3
183524 167151 1 5
167151 142114 1 7
142114 88910 1 9
88910 145937 1 11
145937 143141 1 13
143141 12356 1 15
12356 140638 1 17
140638 97877 1 19
97877 75293 1 21
75293 104550 1 23
104550 136809 1 25
136809 107932 1 27
107932 14629...

result:

ok 

Test #112:

score: 20
Accepted
time: 202ms
memory: 127292kb

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
121472 62771 1 3
62771 114145 1 5
114145 140261 1 7
140261 44338 1 9
44338 12435 1 11
12435 24956 1 13
24956 28840 1 15
28840 42081 1 17
42081 118552 1 19
118552 173678 1 21
173678 82802 1 23
82802 130491 1 25
130491 10586 1 27
10586 59213 1 29
59...

result:

ok 

Test #113:

score: 20
Accepted
time: 15ms
memory: 99340kb

input:

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

output:

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

result:

ok 

Test #114:

score: 20
Accepted
time: 50ms
memory: 103568kb

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
21747 5891 185079 20851
5891 20205 185077 20853
21747 14787 185077 20851
16555 5891 185079 20853
14795 16555 185081 20851
26637 24755 185085 20853
26637 14795 185083 20853
25748 26637 185085 20851
27624 25748 185087 20853
22908 27624 185089 20851
3...

result:

ok 

Test #115:

score: 20
Accepted
time: 34ms
memory: 102088kb

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: 61ms
memory: 108120kb

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: 115ms
memory: 115152kb

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: 116ms
memory: 115172kb

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
97902 11858 20639 185979
22618 97902 20641 185979
17964 71833 20645 185965
76448 28788 20643 185897
71833 96608 20643 185965
16761 22618 20643 185977
76448 46663 20643 185899
1392 41298 20647 185963
75847 81451 20647 185975
66989 9082 20647 185979
...

result:

ok 

Test #119:

score: 20
Accepted
time: 147ms
memory: 119328kb

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
78022 6053 143219 113047
6053 111332 143219 113049
97154 3649 143219 113055
38470 23613 143223 113023
50879 119198 143223 113051
119198 14480 143221 113053
50879 111332 143221 113051
14480 97154 143221 113055
102291 114491 143225 113021
114491 384...

result:

ok 

Test #120:

score: 20
Accepted
time: 178ms
memory: 124500kb

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
107578 102391 114755 119151
8539 121616 114755 119155
63199 107578 114753 119149
102391 8539 114753 119153
8539 97122 114753 119155
138628 104210 114757 119157
119719 35977 114757 119161
104210 119719 114755 119159
92273 63199 114755 119149
138950...

result:

ok 

Test #121:

score: 20
Accepted
time: 200ms
memory: 128804kb

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
113082 160255 69991 46347
67331 113082 69989 46345
113082 122181 69989 46347
136421 113082 69991 46345
39856 164624 69995 46347
121949 39856 69993 46345
39856 136421 69993 46347
117297 54480 69995 46343
54480 121949 69995 46345
21359 164624 69995 ...

result:

ok 

Test #122:

score: 20
Accepted
time: 225ms
memory: 131208kb

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
41518 183980 120567 79587
106872 41518 120569 79587
136847 106872 120571 79585
47005 957 120575 79587
180351 169341 120575 79595
108339 47005 120573 79585
957 68291 120573 79589
47005 136847 120573 79587
68291 3409 120573 79591
192638 102899 12057...

result:

ok 

Subtask #6:

score: 30
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Test #123:

score: 30
Accepted
time: 8ms
memory: 99044kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
200000 4
199998 4
200000 2
199998 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
3
3 1 199997 3
2 3 199999 1
2 0 199999 3

result:

ok 

Test #124:

score: 30
Accepted
time: 21ms
memory: 99396kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
200000 199998
199998 200000
200000 200000
199998 199998

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
3
3 1 199997 199999
0 3 199999 199997
0 2 199999 199999

result:

ok 

Test #125:

score: 30
Accepted
time: 245ms
memory: 131328kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
1784 1386
1176 1976
1038 1738
1194 1602
1436 1156
1164 1640
1514 1952
1132 1700
1114 1624
1370 1310
1030 1866
1728 1000
1024 1356
1618 1228
1406 1044
1598 1570
1376 1082
1620 1332
1646 1240
1410 1712
1086 1260
1412 1424
1286 1176
1202 1968
1146 1682
1042 1320
13...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
47397 101816 999 1001
101816 178467 999 1003
178467 18332 999 1005
18332 154758 999 1007
154758 9651 999 1009
9651 9722 999 1011
9722 87570 999 1013
87570 45586 999 1015
45586 21167 999 1017
21167 101912 999 1019
101912 76815 999 1021
76815 123188...

result:

ok 

Test #126:

score: 30
Accepted
time: 147ms
memory: 131368kb

input:

ba73dbf9c7d5e5202834d6a500541c
199999
133028 133028
12766 12768
49712 49714
50476 50478
157374 157376
154876 154878
66250 66250
48328 48330
125746 125746
92842 92844
85072 85074
109020 109022
148662 148662
67198 67200
70744 70744
114648 114650
120180 120182
59180 59182
52256 52258
21052 21054
161110...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199998
145824 26141 1 3
139298 179704 5 5
139298 26141 3 5
142026 81799 7 7
142026 179704 5 7
167800 110848 9 9
167800 81799 7 9
119584 175688 11 11
119584 110848 9 11
18689 148950 13 13
18689 175688 11 13
112569 47400 15 15
112569 148950 13 15
168053 63...

result:

ok 

Test #127:

score: 30
Accepted
time: 121ms
memory: 132576kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
49744 49746
101460 101462
17124 17124
17910 17910
102486 102486
71914 71912
1850 1850
37026 37024
27810 27808
12632 12632
10982 10980
67836 67834
38714 38714
62630 62628
123180 123180
112744 112742
14328 14330
111296 111294
83526 83528
116384 116384
12856 12854
...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
161435 114545 1 3
154197 20637 5 5
170761 161435 3 1
170761 154197 3 3
193990 158718 7 7
115840 154197 5 3
193990 20637 5 7
134369 73186 9 9
92406 193990 7 5
134369 158718 7 9
142656 7419 11 11
187510 134369 9 7
142656 73186 9 11
169819 53794 13 1...

result:

ok 

Test #128:

score: 30
Accepted
time: 141ms
memory: 132280kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
56882 56882
2378 2378
62118 62122
36338 36338
54862 54864
93436 93438
133122 133124
106102 106102
118556 118558
2636 2636
7390 7392
113600 113604
94568 94568
43882 43884
33832 33832
67966 67966
90366 90370
35250 35252
6928 6930
66074 66076
115376 115380
40916 40...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
9274 161824 1 3
161824 192577 1 5
61948 62368 5 5
62368 192577 3 5
62368 69642 3 7
59484 185114 7 7
185114 69642 5 7
185114 13717 5 9
102048 27939 9 9
27939 13717 7 9
27939 195300 7 11
45680 103058 11 11
103058 195300 9 11
103058 68286 9 13
156917...

result:

ok 

Test #129:

score: 30
Accepted
time: 141ms
memory: 132244kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
762 776
946 952
34556 34562
11442 11450
44116 44126
22460 22462
31376 31382
23242 23252
18882 18886
42244 42254
15200 15212
25358 25368
38298 38306
33196 33204
22150 22166
23124 23124
310 310
768 768
20476 20480
30626 30638
5470 5476
33568 33584
40172 40188
9252...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
177078 94778 1 3
94778 156422 1 5
156422 167911 1 7
167911 120694 1 9
120694 3361 1 11
3361 164804 1 13
164804 183016 1 15
183016 177508 1 17
100583 77700 5 5
59880 125822 5 9
27733 164884 5 13
42939 137471 5 17
77700 156422 3 5
125822 120694 3 9
...

result:

ok 

Test #130:

score: 30
Accepted
time: 194ms
memory: 131352kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
2516 2554
6574 6610
6594 6654
10484 10498
40 96
5018 5080
3176 3214
3422 3452
5060 5102
5994 6034
286 338
5338 5380
2350 2364
2920 2938
11836 11860
7448 7498
9148 9162
7196 7236
9086 9142
1948 1976
6456 6520
9524 9542
6940 6992
8124 8150
7306 7306
586 628
11544 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
102706 48476 1 3
48476 38297 1 5
38297 46948 1 7
46948 104919 1 9
104919 140428 1 11
140428 124832 1 13
124832 75252 1 15
75252 64263 1 17
64263 185173 1 19
185173 172929 1 21
172929 35378 1 23
35378 191829 1 25
191829 76031 1 27
76031 7324 1 29
7...

result:

ok 

Test #131:

score: 30
Accepted
time: 55ms
memory: 104896kb

input:

ba73dbf9c7d5e5202834d6a500541c
46320
185612 20720
185550 21680
185562 20750
185420 20976
185368 20962
185500 21290
185682 20734
185364 21538
185456 21194
185398 21524
185436 21102
185832 20904
185478 21162
185476 21300
185564 20996
185556 21278
185876 20958
185404 20968
185480 21498
185874 20788
185...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
46319
14787 21747 185187 20985
25748 43416 185191 21003
22908 31959 185191 21007
16555 14787 185189 20983
16555 45111 185189 20985
24755 25748 185189 21001
43416 22908 185189 21005
25748 5891 185189 21003
15678 19404 185193 20977
5278 44131 185193 20985
...

result:

ok 

Test #132:

score: 30
Accepted
time: 39ms
memory: 102408kb

input:

ba73dbf9c7d5e5202834d6a500541c
30000
168222 178842
196512 119388
196710 119380
196584 119266
196678 119290
196636 119442
168294 178902
168184 178974
196676 119422
196642 119406
196548 119424
196716 119382
168192 178810
168262 178984
196578 119446
168180 178752
196560 119280
196680 119200
196672 1192...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #133:

score: 30
Accepted
time: 85ms
memory: 108912kb

input:

ba73dbf9c7d5e5202834d6a500541c
80000
159084 135416
13496 13072
13486 13166
18782 56512
13354 13212
159082 135362
18840 56492
47132 130562
176744 183884
159178 135436
92764 136338
13364 13036
13366 13264
159056 135350
159208 135266
159144 135244
47092 130608
18824 56520
18760 56550
18854 56624
47048 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #134:

score: 30
Accepted
time: 137ms
memory: 119472kb

input:

ba73dbf9c7d5e5202834d6a500541c
150000
64856 103928
3856 63474
53938 173456
190302 64294
190122 64436
143294 54146
55680 79216
195316 66574
4022 63368
64678 103974
194176 64466
55710 79036
100402 142382
53886 173402
100304 142426
3968 63386
64716 103966
190274 64354
64878 103970
100288 142422
188578 ...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #135:

score: 30
Accepted
time: 195ms
memory: 124924kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
191134 71824
170268 159138
13986 32208
129736 17632
92912 115602
32140 38738
23018 151608
159928 56914
53228 79446
191220 71798
170346 159194
170246 159168
170288 159096
170284 159170
14004 32116
191192 71776
170278 159244
22978 151538
10592 74986
13986 32228
27...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #136:

score: 30
Accepted
time: 121ms
memory: 115116kb

input:

ba73dbf9c7d5e5202834d6a500541c
100000
21316 185658
21202 185768
21094 185736
21068 185968
20982 185860
20902 185824
21184 185644
21168 186112
21416 185894
20936 185998
20978 185962
21092 186196
21076 186138
20798 185844
20974 185674
21072 185890
20912 186044
21024 186216
20934 185734
21200 185828
20...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
99999
92190 63327 20753 185965
5640 96863 20751 185901
38577 92190 20751 185963
29717 47610 20755 185903
94959 86303 20755 185907
58732 92190 20753 185963
91970 29717 20753 185901
47610 94959 20753 185905
86303 56848 20753 185909
29717 5640 20753 185903
...

result:

ok 

Test #137:

score: 30
Accepted
time: 146ms
memory: 118312kb

input:

ba73dbf9c7d5e5202834d6a500541c
120000
85986 186370
85984 186246
85742 185750
85402 186098
85504 186178
85382 186322
85872 186064
85466 186362
85678 185970
85626 186254
85756 185976
85350 186206
85862 186246
85590 186386
85420 186008
86040 186024
85774 185734
85570 186390
85888 185974
86044 186124
85...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
119999
4565 78226 85273 186197
78226 48011 85271 186199
48011 117364 85271 186201
70062 4565 85273 186195
14608 78226 85273 186199
110876 77185 85277 186181
68449 112913 85277 186185
44678 10703 85277 186189
82993 93802 85277 186193
10703 78268 85275 186...

result:

ok 

Test #138:

score: 30
Accepted
time: 168ms
memory: 123328kb

input:

ba73dbf9c7d5e5202834d6a500541c
140000
183050 19024
182692 18788
182966 19488
182850 19288
183106 19328
183080 18904
182838 19004
182702 19236
183354 18966
182620 18964
183258 18944
183288 18802
183340 18944
183162 18792
182976 18946
182878 18788
183182 19452
182890 19114
183292 18898
183148 19122
18...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
139999
18511 5537 182577 19131
38957 128966 182581 18989
63739 104528 182581 19037
129639 104444 182581 19129
138915 30245 182579 18957
128966 8939 182579 18989
117330 83527 182579 19033
104444 18511 182579 19129
138915 23023 182579 18959
128966 108768 1...

result:

ok 

Test #139:

score: 30
Accepted
time: 194ms
memory: 125816kb

input:

ba73dbf9c7d5e5202834d6a500541c
160000
47518 19576
47460 18882
47484 19474
47860 19320
47908 19484
47336 19076
47574 19454
47524 19614
47542 19270
47506 18886
47582 18948
47774 19384
47288 19138
47842 19458
47958 19222
47808 19372
47298 18996
47542 19438
47964 19208
47640 19492
47964 19488
47512 1927...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
159999
103942 135000 47121 19305
103942 127242 47119 19305
105981 61513 47123 19303
61513 103942 47121 19303
150010 135000 47121 19307
105808 63844 47125 19301
45172 82908 47125 19305
150137 75991 47125 19309
102723 158578 47123 19285
63844 105981 47123 ...

result:

ok 

Test #140:

score: 30
Accepted
time: 225ms
memory: 128072kb

input:

ba73dbf9c7d5e5202834d6a500541c
180000
145130 52018
144664 52446
144878 52376
144676 51960
144996 51904
145142 52306
145252 51890
145184 51848
144832 51904
145110 51958
145006 51936
144724 52602
144558 52270
145118 52144
144748 52678
144866 52212
144492 52466
144562 52222
144436 52124
144892 51986
14...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
179999
113980 134168 144359 52283
111869 127995 144363 52279
71649 31197 144361 52287
155820 111869 144361 52277
127995 117420 144361 52281
111869 126179 144361 52279
117420 113980 144361 52283
25784 43412 144365 52281
154316 63805 144365 52285
102934 65...

result:

ok 

Test #141:

score: 30
Accepted
time: 268ms
memory: 131788kb

input:

ba73dbf9c7d5e5202834d6a500541c
200000
121472 79456
121056 79800
120988 79700
120930 79566
120792 79618
120746 79366
121444 79282
121226 79812
120826 79760
121066 79046
120838 79206
121566 79462
121026 79834
120988 79354
121390 79512
121318 79358
120868 79560
121476 79700
121572 79384
120872 79682
12...

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
199999
89282 81180 120683 79533
98351 66621 120687 79539
161477 62679 120685 79527
50990 89282 120685 79535
86570 179872 120689 79525
196773 38650 120689 79533
23639 159786 120689 79537
49549 149494 120689 79545
179872 161477 120687 79525
38650 50990 120...

result:

ok