QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#138015#1142. Fountain Parksyahia#30 2820ms66496kbC++143.8kb2023-08-10 20:46:152024-07-04 01:34:12

Judging History

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

  • [2024-07-04 01:34:12]
  • 评测
  • 测评结果:30
  • 用时:2820ms
  • 内存:66496kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-10 20:46:15]
  • 提交

answer

#include "parks.h"
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize("-Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef int in;
#define int long long
#define double long double
#define f first
#define s second
#define pb push_back
#define pp push
#define ceil(x,y) (x/y)+(x%y!=0)*(x*y<0?0:1)
#define floor(x,y) (x/y)+(x%y!=0)*(x*y<0?-1:0)
const int MAAX=1e18;
const int MOD=1e9+7;
const int MAX=1e9;
bool vis[200010],lst[200010],ch[200010];
map<pair<int,int>,int> mp;
map<pair<int,int>,int> tk;
in construct_roads(vector<in> x, vector<in> y) {
    if (x.size() == 1) {
		build({}, {}, {}, {});
        return 1;
    }
    vector<in> ansu,ansv,ansa,ansb;
    int n=x.size();
    for(int i=0;i<n;i++){
    	mp[{x[i],y[i]}]=i;
    	ch[i]=1;
    }
   	int cur=1;
   	queue<int> q;
   	srand(72);
   	q.pp(0);
   	while(q.size()&&cur<n){
   		int curx=x[q.front()],cury=y[q.front()],curid=q.front();
   		q.pop();
   		if(mp[{curx-2,cury}]&&!vis[mp[{curx-2,cury}]]){
   			int idx=mp[{curx-2,cury}];
   			vis[idx]=1;
   			cur++;
   			q.pp(idx);
   			ansu.pb(curid);
   			ansv.pb(idx);
   		}
   		if(mp[{curx+2,cury}]&&!vis[mp[{curx+2,cury}]]){
   			int idx=mp[{curx+2,cury}];
   			vis[idx]=1;
   			cur++;
   			q.pp(idx);
   			ansu.pb(curid);
   			ansv.pb(idx);
   		}
   		if(mp[{curx,cury-2}]&&!vis[mp[{curx,cury-2}]]){
   			int idx=mp[{curx,cury-2}];
   			vis[idx]=1;
   			cur++;
   			q.pp(idx);
   			ansu.pb(curid);
   			ansv.pb(idx);
   		}
   		if(mp[{curx,cury+2}]&&!vis[mp[{curx,cury+2}]]){
   			int idx=mp[{curx,cury+2}];
   			vis[idx]=1;
   			cur++;
   			q.pp(idx);
   			ansu.pb(curid);
   			ansv.pb(idx);
   		}
   	}
   	if(cur<n)
	    return 0;
	int c=0;
	int t=time(0);
	while(1){
		bool cor=1;
		for(int i=0;i<ansu.size();i++){
			if(time(0)-t==3){
				return 0;
			}
			int x1=x[ansu[i]],y1=y[ansu[i]],x2=x[ansv[i]],y2=y[ansv[i]];
			if(x1==x2+2){
				int rnd=lst[i];
				if(ch[i])
					rnd=rand()%2;
				ch[i]=0;
				lst[i]=rnd;
				int bx=x1-1,by=y1-1+2*rnd;
				if(tk[{bx,by}])
					rnd=!rnd;
				by=y1-1+2*rnd;
				if(tk[{bx,by}]){
					ch[i]=1;
					ch[tk[{bx,by}]-1]=1;
					rnd=!rnd;
					by=y1-1+2*rnd;
					ch[tk[{bx,by}]-1]=1;
					cor=0;
					continue;
				}
				tk[{bx,by}]=i+1;
				ansa.pb(bx);
				ansb.pb(by);
			}
			else if(x1==x2-2){
				int rnd=lst[i];
				if(ch[i])
					rnd=rand()%2;
				ch[i]=0;
				lst[i]=rnd;
				int bx=x1+1,by=y1-1+2*rnd;
				if(tk[{bx,by}])
					rnd=!rnd;
				by=y1-1+2*rnd;
				if(tk[{bx,by}]){
					ch[i]=1;
					ch[tk[{bx,by}]-1]=1;
					rnd=!rnd;
					by=y1-1+2*rnd;
					ch[tk[{bx,by}]-1]=1;
					cor=0;
					continue;
				}
				tk[{bx,by}]=i+1;
				ansa.pb(bx);
				ansb.pb(by);
			}
			else if(y1==y2+2){
				int rnd=lst[i];
				if(ch[i])
					rnd=rand()%2;
				ch[i]=0;
				lst[i]=rnd;
				int bx=x1-1+2*rnd,by=y1-1;
				if(tk[{bx,by}])
					rnd=!rnd;
				bx=x1-1+2*rnd;
				if(tk[{bx,by}]){
					ch[i]=1;
					ch[tk[{bx,by}]-1]=1;
					rnd=!rnd;
					bx=x1-1+2*rnd;
					ch[tk[{bx,by}]-1]=1;
					cor=0;
					continue;
				}
				tk[{bx,by}]=i+1;
				ansa.pb(bx);
				ansb.pb(by);
			}
			else{
				int rnd=lst[i];
				if(ch[i])
					rnd=rand()%2;
				ch[i]=0;
				lst[i]=rnd;
				int bx=x1-1+2*rnd,by=y1+1;
				if(tk[{bx,by}])
					rnd=!rnd;
				bx=x1-1+2*rnd;
				if(tk[{bx,by}]){
					ch[i]=1;
					ch[tk[{bx,by}]-1]=1;
					rnd=!rnd;
					bx=x1-1+2*rnd;
					ch[tk[{bx,by}]-1]=1;
					cor=0;
					continue;
				}
				tk[{bx,by}]=i+1;
				ansa.pb(bx);
				ansb.pb(by);
			}
		}
		if(cor)
			break;
		tk.clear();
		ansa.clear();
		ansb.clear();
		if(time(0)-t==3){
			return 0;
		}
	}
	build(ansu,ansv,ansa,ansb);
	return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

ba73dbf9c7d5e5202834d6a500541c
1
2 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
0

result:

ok 

Test #2:

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

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: 3832kb

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
2 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #4:

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

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: 3812kb

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 3 7

result:

ok 

Test #6:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
2 8

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #7:

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

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: 3836kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 6
2 10

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #9:

score: 5
Accepted
time: 151ms
memory: 34880kb

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
0 30345 1 15659
0 86548 3 15661
30345 82179 3 15657
86548 51470 3 15663
82179 64823 1 15655
51470 3650 3 15665
64823 86081 3 15653
3650 64744 1 15667
86081 27849 3 15651
64744 31576 1 15669
27849 1420 3 15649
31576 88961 1 15671
1420 58855 3 15647
...

result:

ok 

Test #10:

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

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 3 3127
2 3 3 3129
3 4 3 3131
4 5 1 3133
5 6 3 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 3 3151
14 15 1 3153
15 16 3 3155
16 17 1 3157
17 18 1 3159
18 19 1 3161
19 20 3 3163
20 21 1 ...

result:

ok 

Test #11:

score: 5
Accepted
time: 75ms
memory: 20440kb

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

result:

ok 

Test #12:

score: 5
Accepted
time: 16ms
memory: 8400kb

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

result:

ok 

Test #13:

score: 5
Accepted
time: 35ms
memory: 10924kb

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: 4224kb

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: 1ms
memory: 4016kb

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: 175ms
memory: 34744kb

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
0 22204 1 103033
0 21451 3 103035
22204 82343 3 103031
21451 29258 3 103037
82343 29285 1 103029
29258 67648 3 103039
29285 55421 3 103027
67648 76589 1 103041
55421 42442 3 103025
76589 85459 1 103043
42442 96204 3 103023
85459 49020 1 103045
9620...

result:

ok 

Subtask #2:

score: 10
Accepted

Dependency #1:

100%
Accepted

Test #17:

score: 10
Accepted
time: 1ms
memory: 4088kb

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: 10
Accepted
time: 0ms
memory: 3844kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
4 4
2 6
2 4
4 6

output:

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

result:

ok 

Test #19:

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

input:

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

output:

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

result:

ok 

Test #20:

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

input:

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

output:

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

result:

ok 

Test #21:

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

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: 0ms
memory: 3856kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 200000
4 199998
2 199998
4 200000

output:

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

result:

ok 

Test #23:

score: 10
Accepted
time: 341ms
memory: 53872kb

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
0 184307 3 177613
0 76079 5 177613
0 59080 5 177615
184307 176199 1 177613
184307 21090 1 177615
76079 114331 5 177611
59080 29517 5 177617
176199 177880 1 177611
21090 78631 3 177617
114331 91088 3 177609
29517 29641 5 177619
177880 151166 1 1776...

result:

ok 

Test #24:

score: 10
Accepted
time: 1ms
memory: 3852kb

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 1 3 183569
0 3 3 183571
1 2 5 183571
2 5 5 183573
5 7 3 183575
7 6 3 183577
6 4 1 183577

result:

ok 

Test #25:

score: 10
Accepted
time: 2ms
memory: 4096kb

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
0 729 3 186525
0 43 1 186525
0 585 3 186527
729 1165 5 186525
729 569 5 186527
43 150 3 186523
585 591 3 186529
1165 597 5 186523
569 911 5 186529
150 663 1 186521
591 940 3 186531
597 149 3 186521
911 832 5 186531
663 831 3 186519
940 109 1 186533
...

result:

ok 

Test #26:

score: 10
Accepted
time: 2ms
memory: 4420kb

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: 0ms
memory: 4452kb

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: 139ms
memory: 23648kb

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
0 79027 3 77929
0 23775 1 77929
0 13711 3 77931
79027 18058 5 77929
79027 64819 5 77931
23775 50410 3 77927
13711 29858 3 77933
18058 40294 5 77927
64819 46063 5 77933
50410 5967 1 77925
29858 61647 3 77935
40294 72524 3 77925
46063 16681 5 77935
5...

result:

ok 

Test #29:

score: 10
Accepted
time: 214ms
memory: 33780kb

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
0 42961 3 107881
0 112528 1 107881
0 30090 3 107883
42961 56616 5 107881
42961 10508 5 107883
112528 99479 3 107879
30090 41117 3 107885
56616 8559 5 107879
10508 55056 5 107885
99479 115806 1 107877
41117 64833 3 107887
8559 18335 3 107877
55056 ...

result:

ok 

Test #30:

score: 10
Accepted
time: 339ms
memory: 43836kb

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
0 146571 3 52857
0 137867 1 52857
0 30042 3 52859
146571 57501 5 52857
146571 10544 5 52859
137867 90762 3 52855
30042 123706 3 52861
57501 91769 5 52855
10544 86276 5 52861
90762 153055 1 52853
123706 154349 3 52863
91769 57016 3 52853
86276 9748...

result:

ok 

Test #31:

score: 10
Accepted
time: 370ms
memory: 53820kb

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
0 12274 3 159175
0 51331 5 159175
0 40413 5 159177
12274 33130 1 159175
12274 164171 1 159177
51331 131392 5 159173
40413 17386 5 159179
33130 115897 1 159173
164171 47301 3 159179
131392 104062 3 159171
17386 38642 5 159181
115897 16644 1 159171
...

result:

ok 

Test #32:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
4 2
4 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
0 1 3 3

result:

ok 

Test #33:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
4 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
0 1 3 1

result:

ok 

Test #34:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 4
4 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
0 1 3 3

result:

ok 

Test #35:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
4 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #36:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 4
4 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #37:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
4 2

output:

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

result:

ok 

Test #38:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
4 4

output:

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

result:

ok 

Test #39:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
4 2
4 4

output:

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

result:

ok 

Test #40:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 4
4 2
4 4

output:

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

result:

ok 

Test #41:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 4
4 2
4 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #42:

score: 10
Accepted
time: 1ms
memory: 3856kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 200000
2 199998
4 200000

output:

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

result:

ok 

Test #43:

score: 10
Accepted
time: 1ms
memory: 4332kb

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: 2ms
memory: 4080kb

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: 157ms
memory: 30952kb

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
0 57741 3 169675
0 31285 5 169677
57741 62423 3 169673
31285 74285 3 169679
62423 75710 1 169673
74285 40662 1 169679
75710 91161 3 169671
40662 38512 1 169681
91161 44986 3 169669
38512 3850 3 169681
38512 78163 3 169683
44986 23810 5 169669
78163...

result:

ok 

Test #46:

score: 10
Accepted
time: 245ms
memory: 43520kb

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
0 17095 3 166113
0 134467 3 166115
17095 43862 5 166113
134467 119920 3 166117
43862 64206 3 166111
119920 25896 3 166119
64206 8896 5 166109
25896 15516 3 166121
8896 117050 3 166109
8896 141760 3 166107
15516 139836 5 166121
141760 70248 3 16610...

result:

ok 

Test #47:

score: 10
Accepted
time: 248ms
memory: 43480kb

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
0 63781 3 155249
0 64143 3 155251
63781 64793 5 155249
64143 2843 3 155253
64793 68128 3 155247
2843 69322 3 155255
68128 9297 5 155245
69322 60388 5 155255
9297 63178 3 155245
9297 122732 3 155243
60388 36810 5 155257
122732 54433 3 155241
36810 ...

result:

ok 

Subtask #3:

score: 15
Accepted

Dependency #2:

100%
Accepted

Test #48:

score: 15
Accepted
time: 1ms
memory: 3808kb

input:

ba73dbf9c7d5e5202834d6a500541c
4
6 2
4 2
6 4
4 4

output:

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

result:

ok 

Test #49:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
6 6
4 4
6 4
4 6

output:

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

result:

ok 

Test #50:

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

input:

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

output:

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

result:

ok 

Test #51:

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

input:

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

output:

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

result:

ok 

Test #52:

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

input:

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

output:

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

result:

ok 

Test #53:

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

input:

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

output:

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

result:

ok 

Test #54:

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

input:

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

output:

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

result:

ok 

Test #55:

score: 15
Accepted
time: 377ms
memory: 49656kb

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
0 968 5 95047
0 163883 7 95047
0 113020 7 95049
968 176713 3 95049
968 19750 3 95047
968 87408 5 95049
163883 35901 7 95045
113020 142920 5 95051
176713 12149 1 95047
176713 94425 1 95049
19750 83006 5 95045
87408 41447 3 95051
35901 136777 7 9504...

result:

ok 

Test #56:

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

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
0 1 5 183571
0 7 7 183571
1 8 3 183573
1 9 3 183571
1 2 5 183573
2 5 5 183575
5 3 3 183577
5 4 5 183577
3 6 1 183577

result:

ok 

Test #57:

score: 15
Accepted
time: 4ms
memory: 4232kb

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
0 729 3 186527
0 43 1 186527
0 1372 1 186529
729 1289 5 186529
729 1165 5 186527
729 1464 3 186529
43 150 3 186525
1372 591 1 186531
1289 1150 7 186527
1289 1679 7 186529
1165 597 5 186525
1464 1352 3 186531
150 1495 3 186523
591 1639 3 186533
1150 ...

result:

ok 

Test #58:

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

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
0 4612 3 91731
0 770 5 91733
0 3588 5 91731
0 1016 3 91733
4612 2743 1 91731
4612 3837 1 91733
770 279 7 91731
770 5625 7 91733
3588 3689 5 91729
1016 4187 3 91735
2743 1083 3 91729
3837 4129 1 91735
279 192 7 91729
5625 2385 7 91735
3689 3879 3 917...

result:

ok 

Test #59:

score: 15
Accepted
time: 4ms
memory: 4760kb

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: 173ms
memory: 26504kb

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
0 21095 5 4303
0 80599 7 4303
0 28768 7 4305
21095 15561 3 4305
21095 84529 3 4303
21095 21823 5 4305
80599 81716 7 4301
28768 36181 5 4307
15561 52600 1 4303
15561 75732 1 4305
84529 51780 5 4301
21823 34578 3 4307
81716 50058 7 4299
36181 25035 7...

result:

ok 

Test #61:

score: 15
Accepted
time: 228ms
memory: 34756kb

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
0 79058 3 80107
0 30611 5 80109
0 87773 5 80107
0 18121 3 80109
79058 26756 1 80107
79058 90921 1 80109
30611 73337 7 80107
30611 99126 7 80109
87773 120863 5 80105
18121 25302 3 80111
26756 12869 3 80105
90921 37256 1 80111
73337 43478 7 80105
99...

result:

ok 

Test #62:

score: 15
Accepted
time: 303ms
memory: 41712kb

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
0 63005 5 172065
0 44444 7 172065
0 42834 7 172067
63005 161074 3 172067
63005 144166 3 172065
63005 75132 5 172067
44444 149667 7 172063
42834 41277 5 172069
161074 42453 1 172065
161074 113577 1 172067
144166 19702 5 172063
75132 155039 3 172069...

result:

ok 

Test #63:

score: 15
Accepted
time: 382ms
memory: 49764kb

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
0 185310 5 86561
0 65982 7 86561
0 159385 7 86563
185310 85976 3 86563
185310 4033 3 86561
185310 112058 5 86563
65982 25881 7 86559
159385 113529 5 86565
85976 168406 1 86561
85976 36547 1 86563
4033 65935 5 86559
112058 85873 3 86565
25881 90550...

result:

ok 

Test #64:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
6 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #65:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
4 2
6 2

output:

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

result:

ok 

Test #66:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 4
4 2
4 6
6 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #67:

score: 15
Accepted
time: 363ms
memory: 59968kb

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
0 186952 1 115865
0 104827 3 115867
186952 131077 3 115863
104827 192247 3 115869
131077 1507 1 115861
192247 108452 3 115871
1507 25110 3 115859
108452 45081 1 115873
25110 51165 3 115857
45081 77966 1 115875
51165 8264 3 115855
77966 175633 1 11...

result:

ok 

Test #68:

score: 15
Accepted
time: 360ms
memory: 59988kb

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
0 112530 1 90629
0 192623 3 90631
112530 38336 3 90627
192623 153145 3 90633
38336 155242 1 90625
153145 125338 3 90635
155242 21674 3 90623
125338 36445 1 90637
21674 70271 3 90621
36445 51608 1 90639
70271 38238 3 90619
51608 170201 1 90641
3823...

result:

ok 

Test #69:

score: 15
Accepted
time: 336ms
memory: 59860kb

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
0 165853 5 34653
0 77708 7 34655
165853 82520 7 34651
77708 167245 7 34657
82520 172777 5 34649
167245 53168 7 34659
172777 12044 7 34647
53168 152538 5 34661
12044 115347 7 34645
152538 125869 5 34663
115347 6691 7 34643
125869 85995 5 34665
6691...

result:

ok 

Test #70:

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

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: 4ms
memory: 4800kb

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: 768ms
memory: 29492kb

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
0 60144 5 42837
60144 79522 7 42839
79522 90183 5 42841
79522 46736 7 42841
90183 41169 3 42839
41169 79945 1 42839
41169 12834 3 42841
79945 86374 1 42837
12834 12987 3 42843
86374 42759 1 42835
12987 13748 3 42845
12987 79855 1 42845
42759 95301 ...

result:

ok 

Test #73:

score: 15
Accepted
time: 1021ms
memory: 42588kb

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
0 149675 5 78235
0 21421 7 78237
149675 56087 7 78233
21421 39995 5 78239
21421 39824 7 78239
56087 146070 5 78233
56087 66234 7 78231
39995 46246 3 78237
39824 134658 7 78241
66234 112469 5 78229
46246 76584 1 78237
134658 113090 5 78241
134658 2...

result:

ok 

Test #74:

score: 15
Accepted
time: 1813ms
memory: 55796kb

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
0 170109 3 87743
0 169885 5 87745
170109 70892 1 87743
169885 164826 5 87747
70892 49903 1 87741
164826 57973 7 87747
49903 187114 3 87741
57973 36336 5 87749
187114 38549 5 87739
36336 108329 5 87751
38549 16796 5 87737
38549 112511 3 87737
10832...

result:

ok 

Test #75:

score: 15
Accepted
time: 330ms
memory: 53996kb

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
0 109714 1 4287
0 180797 3 4289
109714 8274 3 4287
109714 5052 3 4285
180797 156667 3 4291
180797 72510 1 4291
8274 197616 5 4287
5052 195597 1 4283
156667 166529 5 4291
72510 187777 1 4293
197616 6460 7 4285
197616 130232 7 4287
195597 42449 3 42...

result:

ok 

Test #76:

score: 15
Accepted
time: 372ms
memory: 59988kb

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
0 78853 1 129081
0 161571 3 129083
78853 6290 3 129079
161571 80394 3 129085
6290 48398 1 129077
80394 115722 3 129087
48398 109611 3 129075
115722 71587 1 129089
109611 55224 3 129073
71587 3648 1 129091
55224 106051 3 129071
3648 11688 1 129093
...

result:

ok 

Test #77:

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

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: 2ms
memory: 5020kb

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: 521ms
memory: 28792kb

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
0 32806 5 66825
32806 46419 3 66825
32806 42055 5 66827
46419 2521 3 66823
46419 83286 5 66823
42055 26245 5 66829
83286 77197 5 66821
26245 43615 3 66829
26245 74520 5 66831
77197 78920 7 66821
43615 84981 3 66831
74520 34391 7 66831
78920 17502 7...

result:

ok 

Test #80:

score: 15
Accepted
time: 1142ms
memory: 41792kb

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
0 80107 1 174027
0 143486 3 174029
80107 112510 3 174027
143486 122031 3 174031
143486 86274 1 174031
112510 118811 5 174027
112510 75182 5 174025
122031 76028 5 174029
86274 52746 3 174033
118811 88225 7 174027
75182 66764 5 174023
76028 95226 5 ...

result:

ok 

Test #81:

score: 15
Accepted
time: 1426ms
memory: 54544kb

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
0 155719 3 52139
155719 173519 5 52139
155719 178859 5 52141
173519 102900 5 52137
173519 138209 3 52137
178859 83226 5 52143
178859 164464 3 52143
138209 51524 3 52135
138209 14 5 52135
164464 59306 3 52145
164464 95762 5 52145
14 94401 3 52133
9...

result:

ok 

Subtask #4:

score: 0
Wrong Answer

Test #82:

score: 20
Accepted
time: 1ms
memory: 3792kb

input:

ba73dbf9c7d5e5202834d6a500541c
3
200000 2
200000 4
199998 2

output:

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

result:

ok 

Test #83:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
200000 200000
200000 199998
199998 200000

output:

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

result:

ok 

Test #84:

score: 20
Accepted
time: 1ms
memory: 4036kb

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: 310ms
memory: 53816kb

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
0 183397 195231 4771
0 114192 195233 4771
183397 25518 195231 4773
114192 40149 195233 4769
25518 169400 195229 4773
40149 199945 195235 4769
169400 147022 195229 4775
199945 1522 195235 4767
147022 151960 195227 4777
1522 130824 195237 4767
15196...

result:

ok 

Test #86:

score: 20
Accepted
time: 353ms
memory: 53724kb

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
0 69117 56859 56863
0 178618 56857 56863
69117 63811 56861 56865
178618 54764 56857 56861
63811 193897 56861 56867
54764 71838 56855 56861
193897 184833 56863 56867
71838 166678 56855 56859
184833 43499 56863 56869
166678 36870 56853 56859
43499 4...

result:

ok 

Test #87:

score: 20
Accepted
time: 368ms
memory: 53756kb

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
0 4262 65539 34473
0 31471 65539 34475
4262 4241 65541 34473
31471 158187 65537 34477
4241 191290 65541 34471
158187 164032 65535 34477
191290 192831 65543 34471
164032 44776 65535 34479
192831 199854 65543 34469
44776 159478 65533 34479
199854 53...

result:

ok 

Test #88:

score: 20
Accepted
time: 319ms
memory: 56896kb

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
0 149070 97049 39999
0 48803 97051 40001
149070 422 97047 40001
48803 141044 97053 40001
422 165022 97045 39999
141044 164047 97055 40001
165022 61584 97043 40001
164047 106479 97057 39999
61584 53772 97041 40001
106479 120484 97059 39999
53772 12...

result:

ok 

Test #89:

score: 20
Accepted
time: 96ms
memory: 19224kb

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: 94ms
memory: 19480kb

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

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: 721ms
memory: 53844kb

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
0 141453 1397 811
0 95131 1399 813
141453 176841 1399 809
95131 30667 1399 815
176841 185645 1397 807
30667 23992 1399 817
185645 196741 1399 805
23992 190398 1397 819
196741 171843 1399 803
190398 152000 1397 821
171843 112705 1399 801
152000 412...

result:

ok 

Test #93:

score: 20
Accepted
time: 917ms
memory: 54260kb

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
0 116856 865 433
0 139943 867 435
116856 126589 867 431
139943 38355 867 437
126589 9977 865 429
38355 138621 867 439
9977 15055 867 427
138621 105546 865 441
15055 170109 867 425
105546 78113 865 443
170109 2312 867 423
78113 82779 865 445
2312 1...

result:

ok 

Test #94:

score: 20
Accepted
time: 459ms
memory: 54152kb

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
0 30935 971 593
0 19228 973 595
30935 54139 969 595
19228 146334 975 595
54139 90989 967 593
146334 120721 977 595
90989 38207 965 595
120721 31042 979 593
38207 182242 963 595
31042 198110 981 593
182242 105376 961 595
198110 424 983 593
105376 8...

result:

ok 

Test #95:

score: 20
Accepted
time: 442ms
memory: 53752kb

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
0 89742 627 129
0 54663 629 131
89742 89387 625 131
54663 124789 631 131
89387 137193 623 129
124789 34877 633 131
137193 52422 621 131
34877 129423 635 129
52422 14779 619 131
129423 44492 637 129
14779 67009 617 131
44492 93731 639 129
67009 223...

result:

ok 

Test #96:

score: 20
Accepted
time: 1ms
memory: 3840kb

input:

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

output:

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

result:

ok 

Test #97:

score: 20
Accepted
time: 117ms
memory: 7144kb

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
0 8570 185791 20625
0 8271 185793 20627
8570 1012 185789 20627
8570 11734 185789 20625
8570 2498 185791 20627
8271 4663 185795 20627
1012 14120 185787 20627
11734 12950 185789 20623
2498 13359 185791 20629
14120 8754 185785 20625
14120 2307 185785 ...

result:

ok 

Test #98:

score: 20
Accepted
time: 37ms
memory: 11220kb

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: 337ms
memory: 53744kb

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
0 140297 36997 36995
0 72651 36995 36995
140297 61000 36999 36997
72651 77210 36995 36993
61000 75450 36999 36999
77210 177784 36993 36993
75450 4489 37001 36999
177784 163214 36993 36991
4489 3390 37001 37001
163214 72038 36991 36991
3390 70992 3...

result:

ok 

Test #100:

score: 20
Accepted
time: 8ms
memory: 4852kb

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: 25ms
memory: 8096kb

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

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: 1882ms
memory: 22152kb

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
0 45227 110631 196677
0 73852 110633 196679
45227 29826 110629 196679
45227 43551 110629 196677
45227 50547 110631 196679
73852 61428 110635 196677
73852 63092 110635 196679
29826 73147 110627 196677
61428 33158 110635 196675
63092 19375 110633 196...

result:

ok 

Test #104:

score: 0
Wrong Answer
time: 2820ms
memory: 25444kb

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
0

result:

wrong answer Solution announced impossible, but it is possible.

Subtask #5:

score: 0
Wrong Answer

Test #108:

score: 20
Accepted
time: 391ms
memory: 66496kb

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
0 148989 82421 100001
0 168975 82423 100003
148989 138668 82419 100003
168975 129862 82425 100003
138668 25843 82417 100001
129862 183101 82427 100003
25843 187856 82415 100003
183101 20766 82429 100001
187856 176130 82413 100003
20766 71258 82431...

result:

ok 

Test #109:

score: 20
Accepted
time: 524ms
memory: 66436kb

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
0 28598 10673 50001
0 113011 10675 50003
28598 195343 10671 50003
113011 4917 10677 50003
195343 30065 10669 50001
4917 133766 10679 50003
30065 64561 10667 50003
133766 177889 10681 50001
64561 88066 10665 50003
177889 51243 10683 50001
88066 157...

result:

ok 

Test #110:

score: 20
Accepted
time: 368ms
memory: 53752kb

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
0 98733 47613 97611
0 58294 47611 97611
98733 90086 47615 97613
58294 37912 47611 97609
90086 30934 47615 97615
37912 20452 47609 97609
30934 44780 47617 97615
20452 98956 47609 97607
44780 105021 47617 97617
98956 132947 47607 97607
105021 82438 ...

result:

ok 

Test #111:

score: 20
Accepted
time: 1490ms
memory: 44920kb

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
0 168561 265 877
0 108894 267 879
0 170763 267 877
0 19723 265 879
168561 182428 263 877
108894 171924 269 879
170763 17732 267 875
19723 119927 265 881
182428 120345 261 879
182428 8131 261 877
182428 10349 263 879
171924 14878 271 877
171924 158...

result:

ok 

Test #112:

score: 20
Accepted
time: 1264ms
memory: 51496kb

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
0 108584 381 333
0 60502 383 335
108584 28401 381 331
108584 68145 383 333
108584 109338 383 331
60502 85903 383 337
28401 3186 379 333
68145 61099 385 331
109338 152450 383 329
85903 79101 381 339
3186 68532 377 333
61099 158156 387 331
152450 49...

result:

ok 

Test #113:

score: 20
Accepted
time: 1ms
memory: 3784kb

input:

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

output:

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

result:

ok 

Test #114:

score: 20
Accepted
time: 285ms
memory: 10880kb

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
0 14676 186079 21285
0 24707 186081 21287
0 25501 186081 21285
14676 24008 186077 21287
24707 3132 186083 21285
24707 24062 186083 21287
24008 9924 186075 21287
24062 17923 186081 21289
9924 7773 186075 21289
17923 16958 186083 21289
17923 10192 18...

result:

ok 

Test #115:

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

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: 35ms
memory: 9400kb

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: 66ms
memory: 13412kb

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: 0
Wrong Answer
time: 2602ms
memory: 22216kb

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
0

result:

wrong answer Solution announced impossible, but it is possible.

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%