QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#621245#1142. Fountain ParksAndy_Lin35 357ms44972kbC++171.4kb2024-10-08 11:29:362024-10-08 11:29:37

Judging History

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

  • [2024-10-08 11:29:37]
  • 评测
  • 测评结果:35
  • 用时:357ms
  • 内存:44972kb
  • [2024-10-08 11:29:36]
  • 提交

answer

#include"parks.h"
#include<map>
#include<algorithm>
using namespace std;
void build(vector<int> u, vector<int> v, vector<int> a, vector<int> b);
int fa[200001],n;
int get(int x){
  return fa[x]==x?x:fa[x]=get(fa[x]);
}
bool cmp(pair<int,int> x,pair<int,int> y){
  if(x.second!=y.second)return x.second>y.second;
  return x.first<y.first;
}
int construct_roads(std::vector<int> x, std::vector<int> y){
  n=x.size();
  map<pair<int,int>,int>mp,us;
  vector<pair<int,int> >v;
  vector<int>va,vb,vu,vv;
  for(int i=0;i<n;++i){
    fa[i]=i;
    mp[{x[i],y[i]}]=i;v.push_back({x[i],y[i]});
  }
  sort(v.begin(),v.end(),cmp);
  for(auto [x,y]:v){
    if(mp.count({x+2,y})){
      int u=mp[{x,y}],v=mp[{x+2,y}];
      if(get(u)==get(v))continue;
      int xx=x+1,yy=y+1;
      if((xx/2+yy/2)&1)yy-=2;
      if(us.count({xx,yy}))continue;
      us[{xx,yy}]=1;
      va.push_back(u);vb.push_back(v);vu.push_back(xx);vv.push_back(yy);
      fa[get(u)]=get(v);
    }
    if(mp.count({x,y-2})){
      int u=mp[{x,y}],v=mp[{x,y-2}];
      if(get(u)==get(v))continue;
      int xx=x+1,yy=y-1;
      if(!((xx/2+yy/2)&1))xx-=2;
      if(us.count({xx,yy}))continue;
      us[{xx,yy}]=1;
      va.push_back(u);vb.push_back(v);vu.push_back(xx);vv.push_back(yy);
      fa[get(u)]=get(v);
    }
  }
  bool flag=1;
  for(int i=1;i<n;++i)flag&=(get(0)==get(i));
  if(!flag)return 0;
  build(va,vb,vu,vv);
  return 1;
}

详细

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

ba73dbf9c7d5e5202834d6a500541c
1
2 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
0

result:

ok 

Test #2:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
2 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
1 0 1 3

result:

ok 

Test #3:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
2 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #4:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
2 6

output:

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

result:

ok 

Test #5:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 6
2 8

output:

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

result:

ok 

Test #6:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
2 8

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #7:

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

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
2 2
2 4
2 6
2 10

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #9:

score: 5
Accepted
time: 111ms
memory: 24248kb

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
25622 7217 1 199999
7217 17464 3 199997
17464 87140 1 199995
87140 65725 3 199993
65725 52294 1 199991
52294 74289 3 199989
74289 64811 1 199987
64811 55280 3 199985
55280 6073 1 199983
6073 31177 3 199981
31177 32612 1 199979
32612 18618 3 199977
...

result:

ok 

Test #10:

score: 5
Accepted
time: 4ms
memory: 5516kb

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
9999 9998 3 23121
9998 9997 1 23119
9997 9996 3 23117
9996 9995 1 23115
9995 9994 3 23113
9994 9993 1 23111
9993 9992 3 23109
9992 9991 1 23107
9991 9990 3 23105
9990 9989 1 23103
9989 9988 3 23101
9988 9987 1 23099
9987 9986 3 23097
9986 9985 1 230...

result:

ok 

Test #11:

score: 5
Accepted
time: 49ms
memory: 14028kb

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
53890 53889 3 111345
53889 53888 1 111343
53888 53887 3 111341
53887 53886 1 111339
53886 53885 3 111337
53885 53884 1 111335
53884 53883 3 111333
53883 53882 1 111331
53882 53881 3 111329
53881 53880 1 111327
53880 53879 3 111325
53879 53878 1 111...

result:

ok 

Test #12:

score: 5
Accepted
time: 13ms
memory: 6488kb

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
14978 14977 3 34909
14977 14976 1 34907
14976 14975 3 34905
14975 14974 1 34903
14974 14973 3 34901
14973 14972 1 34899
14972 14971 3 34897
14971 14970 1 34895
14970 14969 3 34893
14969 14968 1 34891
14968 14967 3 34889
14967 14966 1 34887
14966 14...

result:

ok 

Test #13:

score: 5
Accepted
time: 36ms
memory: 10732kb

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

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

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

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
72682 40153 1 199999
40153 69239 3 199997
69239 43605 1 199995
43605 87197 3 199993
87197 73536 1 199991
73536 95361 3 199989
95361 44870 1 199987
44870 46436 3 199985
46436 29757 1 199983
29757 31039 3 199981
31039 94717 1 199979
94717 12140 3 199...

result:

ok 

Subtask #2:

score: 10
Accepted

Dependency #1:

100%
Accepted

Test #17:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
4 4
2 4
4 2
2 2

output:

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

result:

ok 

Test #18:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
4 4
2 6
2 4
4 6

output:

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

result:

ok 

Test #19:

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

input:

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

output:

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

result:

ok 

Test #20:

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

input:

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

output:

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

result:

ok 

Test #21:

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

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

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: 250ms
memory: 44972kb

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
55749 92420 3 199999
55749 61310 1 199999
92420 10847 5 199999
10847 164540 3 199997
191766 164540 3 199995
191766 109045 1 199995
164540 6202 5 199995
6202 161253 3 199993
192743 161253 3 199991
192743 156053 1 199991
161253 132064 5 199991
13206...

result:

ok 

Test #24:

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

input:

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

output:

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

result:

ok 

Test #25:

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

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
395 882 3 186769
1070 882 3 186767
1070 434 1 186767
882 421 5 186767
421 452 3 186765
1074 452 3 186763
1074 860 1 186763
452 19 5 186763
19 935 3 186761
985 935 3 186759
985 472 1 186759
935 675 5 186759
675 309 3 186757
252 309 3 186755
252 1153 ...

result:

ok 

Test #26:

score: 10
Accepted
time: 3ms
memory: 4388kb

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: 3ms
memory: 4464kb

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: 90ms
memory: 20248kb

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
23703 65744 3 79999
23703 28808 1 79999
65744 30851 5 79999
30851 1412 3 79997
3617 1412 3 79995
3617 15488 1 79995
1412 78008 5 79995
78008 51621 3 79993
12499 51621 3 79991
12499 28757 1 79991
51621 75747 5 79991
75747 42486 3 79989
1762 42486 3 ...

result:

ok 

Test #29:

score: 10
Accepted
time: 147ms
memory: 27448kb

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
65345 119857 3 199999
65345 87732 1 199999
119857 87929 5 199999
87929 44848 3 199997
11848 44848 3 199995
11848 39331 1 199995
44848 73357 5 199995
73357 96210 3 199993
102074 96210 3 199991
102074 6960 1 199991
96210 41616 5 199991
41616 59712 3...

result:

ok 

Test #30:

score: 10
Accepted
time: 212ms
memory: 36504kb

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
109081 15439 3 199999
109081 1207 1 199999
15439 26248 5 199999
26248 3061 3 199997
131138 3061 3 199995
131138 6739 1 199995
3061 125889 5 199995
125889 137487 3 199993
56232 137487 3 199991
56232 11297 1 199991
137487 38015 5 199991
38015 7342 3...

result:

ok 

Test #31:

score: 10
Accepted
time: 264ms
memory: 44936kb

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
131127 196244 3 199999
131127 9598 1 199999
196244 56112 5 199999
56112 191096 3 199997
189572 191096 3 199995
189572 143911 1 199995
191096 153326 5 199995
153326 26997 3 199993
127258 26997 3 199991
127258 50538 1 199991
26997 74887 5 199991
748...

result:

ok 

Test #32:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
4 2
4 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
1 0 5 3

result:

ok 

Test #33:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
4 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
1
1
0 1 3 3

result:

ok 

Test #34:

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

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 2
4 4

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #36:

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

input:

ba73dbf9c7d5e5202834d6a500541c
2
2 4
4 2

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #37:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
4 2

output:

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

result:

ok 

Test #38:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
2 4
4 4

output:

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

result:

ok 

Test #39:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 2
4 2
4 4

output:

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

result:

ok 

Test #40:

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

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
2 4
4 2
4 6

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

ok 

Test #42:

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

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

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: 3ms
memory: 4608kb

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: 110ms
memory: 24016kb

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
99062 9383 3 199999
99062 63988 1 199999
63988 71342 3 199997
71342 56734 3 199995
71342 86195 1 199995
86195 42265 3 199993
42265 97316 3 199991
42265 28687 1 199991
28687 99883 3 199989
99883 12827 1 199987
12827 95515 3 199987
12827 52802 3 1999...

result:

ok 

Test #46:

score: 10
Accepted
time: 168ms
memory: 33732kb

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
93856 127777 3 199999
93856 30085 1 199999
30085 21548 3 199997
21548 105325 3 199995
105325 101728 5 199995
101728 115675 3 199993
115675 33489 5 199991
41767 33489 3 199991
33489 88463 3 199989
88463 82495 5 199987
82495 33559 3 199985
136281 33...

result:

ok 

Test #47:

score: 10
Accepted
time: 163ms
memory: 33816kb

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
42443 92495 5 199999
115458 92495 3 199999
92495 134867 3 199997
134867 16312 5 199995
49605 16312 3 199995
16312 72984 3 199993
72984 117537 5 199991
577 117537 3 199991
577 12900 3 199989
12900 21073 1 199987
21073 76175 3 199987
21073 26848 3 1...

result:

ok 

Subtask #3:

score: 0
Wrong Answer

Dependency #2:

100%
Accepted

Test #48:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
6 2
4 2
6 4
4 4

output:

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

result:

ok 

Test #49:

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

input:

ba73dbf9c7d5e5202834d6a500541c
4
6 6
4 4
6 4
4 6

output:

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

result:

ok 

Test #50:

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

input:

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

output:

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

result:

ok 

Test #51:

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

input:

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

output:

3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix
OK
0

result:

wrong answer Solution announced impossible, but it is possible.

Subtask #4:

score: 20
Accepted

Test #82:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
200000 2
200000 4
199998 2

output:

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

result:

ok 

Test #83:

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

input:

ba73dbf9c7d5e5202834d6a500541c
3
200000 200000
200000 199998
199998 200000

output:

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

result:

ok 

Test #84:

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

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: 257ms
memory: 44920kb

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

result:

ok 

Test #86:

score: 20
Accepted
time: 266ms
memory: 43728kb

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
9002 16636 99999 100003
9002 177279 99997 100003
165137 177279 99997 100001
165137 180881 99995 100001
57191 180881 99995 99999
57191 98806 99993 99999
17593 178669 100005 99999
181732 98806 99993 99997
181732 41095 99991 99997
77464 178669 100003...

result:

ok 

Test #87:

score: 20
Accepted
time: 272ms
memory: 43908kb

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
189718 197976 9 100005
197976 85709 9 100003
85709 195804 11 100003
195804 179399 11 100001
165411 19497 5 99999
179399 177597 13 100001
177597 26922 13 99999
19497 176578 5 99997
176578 178153 7 99997
26922 169166 15 99999
169166 39208 15 99997
1...

result:

ok 

Test #88:

score: 20
Accepted
time: 216ms
memory: 38196kb

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
145497 50326 3 39999
145497 23955 1 39999
50326 415 5 40001
415 41385 7 39999
41385 103084 9 40001
103084 83651 11 39999
83651 147814 13 40001
147814 34482 15 39999
34482 103209 17 40001
103209 3970 19 39999
3970 98931 21 40001
98931 10631 23 3999...

result:

ok 

Test #89:

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

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: 264ms
memory: 37088kb

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: 294ms
memory: 37080kb

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: 328ms
memory: 43468kb

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
172935 31246 3 997
148698 38101 7 997
9479 173059 11 997
186078 33300 15 997
133436 71191 19 997
135876 65503 23 997
828 187683 27 997
77288 25161 31 997
56251 72888 35 997
138638 56530 39 997
167139 29277 43 997
21379 64223 47 997
23083 137036 51...

result:

ok 

Test #93:

score: 20
Accepted
time: 324ms
memory: 43552kb

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
30161 133231 3 999
30161 22679 1 999
133231 192432 5 1001
192432 15877 7 999
192432 1246 5 999
15877 149048 9 1001
149048 63301 11 999
149048 160627 9 999
63301 26312 13 1001
26312 29514 15 999
26312 101620 13 999
29514 55138 17 1001
55138 183822 ...

result:

ok 

Test #94:

score: 20
Accepted
time: 289ms
memory: 43432kb

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
194373 117419 3 1599
194373 49278 3 1597
117419 169018 5 1597
169018 136482 7 1599
136482 74584 9 1597
74584 12972 11 1599
12972 75062 13 1597
75062 41507 15 1599
41507 65716 17 1597
65716 167648 19 1599
167648 109159 21 1597
109159 199705 23 1599...

result:

ok 

Test #95:

score: 20
Accepted
time: 294ms
memory: 43420kb

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
87857 48197 5 1597
48197 119601 7 1599
119601 16411 9 1597
16411 61554 11 1599
61554 7290 13 1597
7290 153194 15 1599
153194 7513 17 1597
7513 43026 19 1599
43026 69571 21 1597
69571 84189 23 1599
84189 128683 25 1597
128683 189529 27 1599
189529 ...

result:

ok 

Test #96:

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

input:

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

output:

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

result:

ok 

Test #97:

score: 20
Accepted
time: 11ms
memory: 6124kb

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
13883 2628 185967 21013
9684 1063 185961 21011
4212 2628 185967 21011
4212 41 185965 21011
2628 11568 185969 21013
11568 13022 185971 21011
13022 3834 185973 21011
1063 1391 185963 21011
1391 41 185965 21009
3834 2205 185971 21009
12633 2205 185971...

result:

ok 

Test #98:

score: 20
Accepted
time: 57ms
memory: 12140kb

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: 250ms
memory: 44264kb

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
109113 136471 200001 199999
46740 136471 199999 199999
46740 102864 199999 199997
73960 102864 199997 199997
73960 139855 199997 199995
78572 139855 199995 199995
78572 38265 199995 199993
15948 38265 199993 199993
15948 51474 199993 199991
140481...

result:

ok 

Test #100:

score: 20
Accepted
time: 11ms
memory: 5588kb

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: 63ms
memory: 11652kb

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: 118ms
memory: 20160kb

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: 114ms
memory: 19516kb

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
59658 72608 110441 197163
58567 16470 110445 197163
72608 47686 110443 197163
47686 16470 110445 197161
47686 14543 110443 197161
16470 8397 110447 197163
8397 53163 110449 197161
69504 24800 110433 197159
38670 21209 110441 197159
14543 4856 11044...

result:

ok 

Test #104:

score: 20
Accepted
time: 171ms
memory: 25460kb

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
90085 2264 153327 86525
103411 76097 153453 86525
103411 84922 153451 86525
27937 62227 153323 86523
62227 2264 153325 86525
2264 100745 153325 86523
21480 69456 153397 86523
21493 18291 153439 86523
21493 60815 153437 86523
18291 94621 153441 865...

result:

ok 

Test #105:

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

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
16349 38668 183111 19645
16955 79342 183103 19643
79342 69340 183105 19643
38668 100665 183109 19643
69340 124965 183103 19641
62812 100665 183109 19641
62812 54293 183107 19641
94081 32765 183081 19639
106013 122739 183095 19639
122739 100438 183...

result:

ok 

Test #106:

score: 20
Accepted
time: 306ms
memory: 37468kb

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
130103 166388 12591 152737
103335 60265 12607 152737
48896 13274 12585 152735
166388 17255 12591 152735
17255 124073 12593 152735
60265 141803 12609 152737
60265 28582 12609 152735
141803 11081 12611 152735
11081 154450 12613 152737
103411 16235 1...

result:

ok 

Test #107:

score: 20
Accepted
time: 357ms
memory: 43412kb

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
95408 130175 121147 80171
130175 192526 121147 80169
137270 152101 121159 80169
192526 190021 121149 80169
190021 20634 121149 80167
122238 152101 121157 80169
152101 47363 121157 80167
103018 47057 121169 80167
20634 148737 121151 80167
148737 63...

result:

ok 

Subtask #5:

score: 0
Wrong Answer

Test #108:

score: 20
Accepted
time: 256ms
memory: 44364kb

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
45242 107138 3 100003
45242 144962 3 100001
107138 17743 5 100001
17743 119245 7 100003
119245 41351 9 100001
41351 98503 11 100003
98503 190138 13 100001
190138 185409 15 100003
185409 45100 17 100001
45100 109867 19 100003
109867 124566 21 10000...

result:

ok 

Test #109:

score: 20
Accepted
time: 247ms
memory: 43896kb

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
112203 107366 50003 100003
112203 161310 50003 100001
107366 132148 50005 100001
132148 120057 50007 100003
120057 106940 50009 100001
106940 192145 50011 100003
192145 49043 50013 100001
49043 198865 50015 100003
198865 28079 50017 100001
28079 1...

result:

ok 

Test #110:

score: 0
Wrong Answer
time: 242ms
memory: 38136kb

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

0%