QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#461059#4277. Simple PolygonpropaneAC ✓16ms10744kbPython3775b2024-07-02 15:39:292024-07-02 15:39:30

Judging History

This is the latest submission verdict.

  • [2024-07-02 15:39:30]
  • Judged
  • Verdict: AC
  • Time: 16ms
  • Memory: 10744kb
  • [2024-07-02 15:39:29]
  • Submitted

answer

l, s = map(int, input().split())

if l % 2 == 1:
    print(-1)
    exit(0)

l //= 2

n, m = l // 2, (l + 1) // 2

if s < l - 1 or s > n * m:
    print(-1)
    exit(0)

ans = [(n, m), (n, 0), (0, 0)]

need = n * m - s

if need == 0:
    ans.append((0, m))
else:
    cnt, r = divmod(need, m - 1)

    if cnt == 0:
        ans.append((0, m - need))
        ans.append((1, m - need))
        ans.append((1, m))
    else:
        ans.append((0, 1))
        ans.append((cnt, 1))
        if r == 0:
            ans.append((cnt, m))
        else:
            ans.append((cnt, m - r))
            ans.append((cnt + 1, m - r))
            ans.append((cnt + 1, m))

print(len(ans))
print('\n'.join(map(lambda x : str(x[0]) + " " + str(x[1]), ans)))

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 14ms
memory: 10612kb

input:

4 1

output:

4
1 1
1 0
0 0
0 1

result:

ok good plan

Test #2:

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

input:

4 2

output:

-1

result:

ok NO SOLUTION

Test #3:

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

input:

656762045 149404634

output:

-1

result:

ok NO SOLUTION

Test #4:

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

input:

596732449 547492870

output:

-1

result:

ok NO SOLUTION

Test #5:

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

input:

490585606 197031926

output:

-1

result:

ok NO SOLUTION

Test #6:

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

input:

205935334 671544129

output:

8
51483833 51483834
51483833 0
0 0
0 1
51483820 1
51483820 2254301
51483821 2254301
51483821 51483834

result:

ok good plan

Test #7:

score: 0
Accepted
time: 7ms
memory: 10652kb

input:

122904120 825319663

output:

8
30726030 30726030
30726030 0
0 0
0 1
30726004 1
30726004 26442909
30726005 26442909
30726005 30726030

result:

ok good plan

Test #8:

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

input:

372662678 542854072

output:

8
93165669 93165670
93165669 0
0 0
0 1
93165664 1
93165664 77025728
93165665 77025728
93165665 93165670

result:

ok good plan

Test #9:

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

input:

743004999 188616704

output:

-1

result:

ok NO SOLUTION

Test #10:

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

input:

842473769 181343779

output:

-1

result:

ok NO SOLUTION

Test #11:

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

input:

850562596 980099219

output:

8
212640649 212640649
212640649 0
0 0
0 1
212640645 1
212640645 129536627
212640646 129536627
212640646 212640649

result:

ok good plan

Test #12:

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

input:

753747532 906770708

output:

8
188436883 188436883
188436883 0
0 0
0 1
188436879 1
188436879 153023180
188436880 153023180
188436880 188436883

result:

ok good plan

Test #13:

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

input:

421448642 685416185

output:

8
105362160 105362161
105362160 0
0 0
0 1
105362154 1
105362154 53243226
105362155 53243226
105362155 105362161

result:

ok good plan

Test #14:

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

input:

233439847 311101797

output:

-1

result:

ok NO SOLUTION

Test #15:

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

input:

251152449 177137892

output:

-1

result:

ok NO SOLUTION

Test #16:

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

input:

770588658 78245838

output:

-1

result:

ok NO SOLUTION

Test #17:

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

input:

820350607 531778846

output:

-1

result:

ok NO SOLUTION

Test #18:

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

input:

796111246 786209428

output:

8
199027811 199027812
199027811 0
0 0
0 1
199027808 1
199027808 189125996
199027809 189125996
199027809 199027812

result:

ok good plan

Test #19:

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

input:

936453726 441481755

output:

-1

result:

ok NO SOLUTION

Test #20:

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

input:

109411058 100658595

output:

8
27352764 27352765
27352764 0
0 0
0 1
27352761 1
27352761 18600304
27352762 18600304
27352762 27352765

result:

ok good plan

Test #21:

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

input:

720248693 974609485

output:

-1

result:

ok NO SOLUTION

Test #22:

score: 0
Accepted
time: 8ms
memory: 10576kb

input:

596992030 134373467

output:

-1

result:

ok NO SOLUTION

Test #23:

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

input:

277127289 907592028

output:

-1

result:

ok NO SOLUTION

Test #24:

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

input:

292844698 273681769

output:

8
73211174 73211175
73211174 0
0 0
0 1
73211171 1
73211171 54048248
73211172 54048248
73211172 73211175

result:

ok good plan

Test #25:

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

input:

335514279 73605709

output:

-1

result:

ok NO SOLUTION

Test #26:

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

input:

676664106 632143236

output:

8
169166026 169166027
169166026 0
0 0
0 1
169166023 1
169166023 124645159
169166024 124645159
169166024 169166027

result:

ok good plan

Test #27:

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

input:

888393402 19178143

output:

-1

result:

ok NO SOLUTION

Test #28:

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

input:

409352440 130292170

output:

-1

result:

ok NO SOLUTION

Test #29:

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

input:

390499700 267683852

output:

8
97624925 97624925
97624925 0
0 0
0 1
97624923 1
97624923 72434004
97624924 72434004
97624924 97624925

result:

ok good plan

Test #30:

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

input:

304232966 470743421

output:

8
76058241 76058242
76058241 0
0 0
0 1
76058235 1
76058235 14393976
76058236 14393976
76058236 76058242

result:

ok good plan

Test #31:

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

input:

748287082 766283467

output:

8
187071770 187071771
187071770 0
0 0
0 1
187071766 1
187071766 17996388
187071767 17996388
187071767 187071771

result:

ok good plan

Test #32:

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

input:

20018876 381657326

output:

8
5004719 5004719
5004719 0
0 0
0 1
5004643 1
5004643 1298758
5004644 1298758
5004644 5004719

result:

ok good plan

Test #33:

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

input:

525757814 846189716

output:

8
131439453 131439454
131439453 0
0 0
0 1
131439447 1
131439447 57552999
131439448 57552999
131439448 131439454

result:

ok good plan

Test #34:

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

input:

713603990 466683797

output:

8
178400997 178400998
178400997 0
0 0
0 1
178400995 1
178400995 109881804
178400996 109881804
178400996 178400998

result:

ok good plan

Test #35:

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

input:

274030892 438235130

output:

8
68507723 68507723
68507723 0
0 0
0 1
68507717 1
68507717 27188798
68507718 27188798
68507718 68507723

result:

ok good plan

Test #36:

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

input:

89061264 641898409

output:

8
22265316 22265316
22265316 0
0 0
0 1
22265288 1
22265288 18469589
22265289 18469589
22265289 22265316

result:

ok good plan

Test #37:

score: 0
Accepted
time: 7ms
memory: 10716kb

input:

531224402 120862474

output:

-1

result:

ok NO SOLUTION

Test #38:

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

input:

773240724 645857013

output:

8
193310181 193310181
193310181 0
0 0
0 1
193310178 1
193310178 65926473
193310179 65926473
193310179 193310181

result:

ok good plan

Test #39:

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

input:

708598658 620359198

output:

8
177149664 177149665
177149664 0
0 0
0 1
177149661 1
177149661 88910207
177149662 88910207
177149662 177149665

result:

ok good plan

Test #40:

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

input:

423968720 535749933

output:

8
105992180 105992180
105992180 0
0 0
0 1
105992175 1
105992175 5789038
105992176 5789038
105992176 105992180

result:

ok good plan

Test #41:

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

input:

530909092 728244562

output:

8
132727273 132727273
132727273 0
0 0
0 1
132727268 1
132727268 64608202
132727269 64608202
132727269 132727273

result:

ok good plan

Test #42:

score: 0
Accepted
time: 8ms
memory: 10652kb

input:

421139062 273115655

output:

8
105284765 105284766
105284765 0
0 0
0 1
105284763 1
105284763 62546126
105284764 62546126
105284764 105284766

result:

ok good plan

Test #43:

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

input:

604812834 777566583

output:

8
151203208 151203209
151203208 0
0 0
0 1
151203203 1
151203203 21550544
151203204 21550544
151203204 151203209

result:

ok good plan

Test #44:

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

input:

687797172 845256343

output:

8
171949293 171949293
171949293 0
0 0
0 1
171949289 1
171949289 157459175
171949290 157459175
171949290 171949293

result:

ok good plan

Test #45:

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

input:

779271936 373171148

output:

-1

result:

ok NO SOLUTION

Test #46:

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

input:

358898894 178215693

output:

-1

result:

ok NO SOLUTION

Test #47:

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

input:

182138052 729277997

output:

8
45534513 45534513
45534513 0
0 0
0 1
45534497 1
45534497 725805
45534498 725805
45534498 45534513

result:

ok good plan

Test #48:

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

input:

299640094 747781349

output:

8
74910023 74910024
74910023 0
0 0
0 1
74910014 1
74910014 73591143
74910015 73591143
74910015 74910024

result:

ok good plan

Test #49:

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

input:

199831800 657838219

output:

8
49957950 49957950
49957950 0
0 0
0 1
49957937 1
49957937 8384882
49957938 8384882
49957938 49957950

result:

ok good plan

Test #50:

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

input:

801971048 609973980

output:

8
200492762 200492762
200492762 0
0 0
0 1
200492759 1
200492759 8495697
200492760 8495697
200492760 200492762

result:

ok good plan

Test #51:

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

input:

410125446 499319768

output:

8
102531361 102531362
102531361 0
0 0
0 1
102531357 1
102531357 89194325
102531358 89194325
102531358 102531362

result:

ok good plan

Test #52:

score: 0
Accepted
time: 8ms
memory: 10604kb

input:

664337258 326232892

output:

-1

result:

ok NO SOLUTION

Test #53:

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

input:

198336320 502993871

output:

8
49584080 49584080
49584080 0
0 0
0 1
49584070 1
49584070 7153081
49584071 7153081
49584071 49584080

result:

ok good plan

Test #54:

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

input:

770483154 911695281

output:

8
192620788 192620789
192620788 0
0 0
0 1
192620784 1
192620784 141212130
192620785 141212130
192620785 192620789

result:

ok good plan

Test #55:

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

input:

968522752 905800329

output:

8
242130688 242130688
242130688 0
0 0
0 1
242130685 1
242130685 179408268
242130686 179408268
242130686 242130688

result:

ok good plan

Test #56:

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

input:

549864526 688851806

output:

8
137466131 137466132
137466131 0
0 0
0 1
137466126 1
137466126 1521152
137466127 1521152
137466127 137466132

result:

ok good plan

Test #57:

score: 0
Accepted
time: 7ms
memory: 10640kb

input:

694964358 273025751

output:

-1

result:

ok NO SOLUTION

Test #58:

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

input:

755213882 589915763

output:

8
188803470 188803471
188803470 0
0 0
0 1
188803467 1
188803467 23505354
188803468 23505354
188803468 188803471

result:

ok good plan

Test #59:

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

input:

853008566 261279048

output:

-1

result:

ok NO SOLUTION

Test #60:

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

input:

648529822 825071874

output:

8
162132455 162132456
162132455 0
0 0
0 1
162132450 1
162132450 14409600
162132451 14409600
162132451 162132456

result:

ok good plan

Test #61:

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

input:

109304282 232982785

output:

8
27326070 27326071
27326070 0
0 0
0 1
27326062 1
27326062 14374226
27326063 14374226
27326063 27326071

result:

ok good plan

Test #62:

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

input:

869585024 959944584

output:

8
217396256 217396256
217396256 0
0 0
0 1
217396252 1
217396252 90359564
217396253 90359564
217396253 217396256

result:

ok good plan

Test #63:

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

input:

507663674 88365136

output:

-1

result:

ok NO SOLUTION

Test #64:

score: 0
Accepted
time: 8ms
memory: 10640kb

input:

257793806 90998243

output:

-1

result:

ok NO SOLUTION

Test #65:

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

input:

919393432 666825571

output:

8
229848358 229848358
229848358 0
0 0
0 1
229848356 1
229848356 207128857
229848357 207128857
229848357 229848358

result:

ok good plan

Test #66:

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

input:

853903384 329850703

output:

-1

result:

ok NO SOLUTION

Test #67:

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

input:

335441670 284253394

output:

8
83860417 83860418
83860417 0
0 0
0 1
83860414 1
83860414 32672144
83860415 32672144
83860415 83860418

result:

ok good plan

Test #68:

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

input:

24544786 390070009

output:

8
6136196 6136197
6136196 0
0 0
0 1
6136133 1
6136133 3489662
6136134 3489662
6136134 6136197

result:

ok good plan

Test #69:

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

input:

323614096 699447036

output:

8
80903524 80903524
80903524 0
0 0
0 1
80903516 1
80903516 52218852
80903517 52218852
80903517 80903524

result:

ok good plan

Test #70:

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

input:

502837028 109125531

output:

-1

result:

ok NO SOLUTION

Test #71:

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

input:

664812904 365409364

output:

8
166203226 166203226
166203226 0
0 0
0 1
166203224 1
166203224 33002914
166203225 33002914
166203225 166203226

result:

ok good plan

Test #72:

score: 0
Accepted
time: 8ms
memory: 10616kb

input:

514667768 945027774

output:

8
128666942 128666942
128666942 0
0 0
0 1
128666935 1
128666935 44359187
128666936 44359187
128666936 128666942

result:

ok good plan

Test #73:

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

input:

655380202 337558629

output:

8
163845050 163845051
163845050 0
0 0
0 1
163845048 1
163845048 9868530
163845049 9868530
163845049 163845051

result:

ok good plan

Test #74:

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

input:

371491572 386802836

output:

8
92872893 92872893
92872893 0
0 0
0 1
92872889 1
92872889 15311268
92872890 15311268
92872890 92872893

result:

ok good plan

Test #75:

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

input:

370506158 366579356

output:

8
92626539 92626540
92626539 0
0 0
0 1
92626536 1
92626536 88699740
92626537 88699740
92626537 92626540

result:

ok good plan

Test #76:

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

input:

177655230 841310478

output:

8
44413807 44413808
44413807 0
0 0
0 1
44413789 1
44413789 41861953
44413790 41861953
44413790 44413808

result:

ok good plan

Test #77:

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

input:

135251342 579650917

output:

8
33812835 33812836
33812835 0
0 0
0 1
33812818 1
33812818 4832723
33812819 4832723
33812819 33812836

result:

ok good plan

Test #78:

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

input:

707764652 452687293

output:

8
176941163 176941163
176941163 0
0 0
0 1
176941161 1
176941161 98804969
176941162 98804969
176941162 176941163

result:

ok good plan

Test #79:

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

input:

870115800 430673599

output:

-1

result:

ok NO SOLUTION

Test #80:

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

input:

869686730 712395212

output:

8
217421682 217421683
217421682 0
0 0
0 1
217421679 1
217421679 60130167
217421680 60130167
217421680 217421683

result:

ok good plan

Test #81:

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

input:

948113264 941600913

output:

8
237028316 237028316
237028316 0
0 0
0 1
237028313 1
237028313 230515968
237028314 230515968
237028314 237028316

result:

ok good plan

Test #82:

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

input:

395441280 381620213

output:

8
98860320 98860320
98860320 0
0 0
0 1
98860317 1
98860317 85039256
98860318 85039256
98860318 98860320

result:

ok good plan

Test #83:

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

input:

397094130 636488993

output:

8
99273532 99273533
99273532 0
0 0
0 1
99273526 1
99273526 40847802
99273527 40847802
99273527 99273533

result:

ok good plan

Test #84:

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

input:

932433740 406519991

output:

-1

result:

ok NO SOLUTION

Test #85:

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

input:

768238442 525193487

output:

8
192059610 192059611
192059610 0
0 0
0 1
192059608 1
192059608 141074268
192059609 141074268
192059609 192059611

result:

ok good plan

Test #86:

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

input:

659791902 699488585

output:

8
164947975 164947976
164947975 0
0 0
0 1
164947971 1
164947971 39696686
164947972 39696686
164947972 164947976

result:

ok good plan

Test #87:

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

input:

249244600 310497662

output:

8
62311150 62311150
62311150 0
0 0
0 1
62311146 1
62311146 61253066
62311147 61253066
62311147 62311150

result:

ok good plan

Test #88:

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

input:

945387452 838174829

output:

8
236346863 236346863
236346863 0
0 0
0 1
236346860 1
236346860 129134243
236346861 129134243
236346861 236346863

result:

ok good plan

Test #89:

score: 0
Accepted
time: 7ms
memory: 10540kb

input:

365428734 126751007

output:

-1

result:

ok NO SOLUTION

Test #90:

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

input:

371260250 528530702

output:

8
92815062 92815063
92815062 0
0 0
0 1
92815057 1
92815057 64455393
92815058 64455393
92815058 92815063

result:

ok good plan

Test #91:

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

input:

872462082 360555751

output:

-1

result:

ok NO SOLUTION

Test #92:

score: 0
Accepted
time: 7ms
memory: 10704kb

input:

386375240 895400111

output:

8
96593810 96593810
96593810 0
0 0
0 1
96593801 1
96593801 26055830
96593802 26055830
96593802 96593810

result:

ok good plan

Test #93:

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

input:

945210142 542830818

output:

8
236302535 236302536
236302535 0
0 0
0 1
236302533 1
236302533 70225749
236302534 70225749
236302534 236302536

result:

ok good plan

Test #94:

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

input:

62895378 546576937

output:

8
15723844 15723845
15723844 0
0 0
0 1
15723810 1
15723810 11966242
15723811 11966242
15723811 15723845

result:

ok good plan

Test #95:

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

input:

311830080 660126790

output:

8
77957520 77957520
77957520 0
0 0
0 1
77957512 1
77957512 36466638
77957513 36466638
77957513 77957520

result:

ok good plan

Test #96:

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

input:

806503838 281477730

output:

-1

result:

ok NO SOLUTION

Test #97:

score: 0
Accepted
time: 7ms
memory: 10604kb

input:

302765796 428469874

output:

8
75691449 75691449
75691449 0
0 0
0 1
75691444 1
75691444 50012634
75691445 50012634
75691445 75691449

result:

ok good plan

Test #98:

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

input:

33545294 25336837

output:

8
8386323 8386324
8386323 0
0 0
0 1
8386320 1
8386320 177869
8386321 177869
8386321 8386324

result:

ok good plan

Test #99:

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

input:

879363252 692179827

output:

8
219840813 219840813
219840813 0
0 0
0 1
219840810 1
219840810 32657391
219840811 32657391
219840811 219840813

result:

ok good plan

Test #100:

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

input:

671000162 234266218

output:

-1

result:

ok NO SOLUTION

Test #101:

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

input:

576003508 153049489

output:

-1

result:

ok NO SOLUTION

Test #102:

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

input:

771313838 730168850

output:

8
192828459 192828460
192828459 0
0 0
0 1
192828456 1
192828456 151683474
192828457 151683474
192828457 192828460

result:

ok good plan

Test #103:

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

input:

836384904 432562321

output:

8
209096226 209096226
209096226 0
0 0
0 1
209096224 1
209096224 14369871
209096225 14369871
209096225 209096226

result:

ok good plan

Test #104:

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

input:

60293922 420693205

output:

8
15073480 15073481
15073480 0
0 0
0 1
15073453 1
15073453 13709246
15073454 13709246
15073454 15073481

result:

ok good plan

Test #105:

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

input:

338984060 404031611

output:

8
84746015 84746015
84746015 0
0 0
0 1
84746011 1
84746011 65047555
84746012 65047555
84746012 84746015

result:

ok good plan

Test #106:

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

input:

845909332 459008785

output:

8
211477333 211477333
211477333 0
0 0
0 1
211477331 1
211477331 36054121
211477332 36054121
211477332 211477333

result:

ok good plan

Test #107:

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

input:

801550650 756988125

output:

8
200387662 200387663
200387662 0
0 0
0 1
200387659 1
200387659 155825140
200387660 155825140
200387660 200387663

result:

ok good plan

Test #108:

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

input:

12239258 74994942

output:

8
3059814 3059815
3059814 0
0 0
0 1
3059790 1
3059790 1559407
3059791 1559407
3059791 3059815

result:

ok good plan

Test #109:

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

input:

689920978 647138514

output:

8
172480244 172480245
172480244 0
0 0
0 1
172480241 1
172480241 129697783
172480242 129697783
172480242 172480245

result:

ok good plan

Test #110:

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

input:

184342820 355672159

output:

8
46085705 46085705
46085705 0
0 0
0 1
46085698 1
46085698 33072231
46085699 33072231
46085699 46085705

result:

ok good plan

Test #111:

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

input:

302283400 155643880

output:

8
75570850 75570850
75570850 0
0 0
0 1
75570848 1
75570848 4502182
75570849 4502182
75570849 75570850

result:

ok good plan

Test #112:

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

input:

756062228 683554608

output:

8
189015557 189015557
189015557 0
0 0
0 1
189015554 1
189015554 116507940
189015555 116507940
189015555 189015557

result:

ok good plan

Test #113:

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

input:

291690990 659611467

output:

8
72922747 72922748
72922747 0
0 0
0 1
72922738 1
72922738 3306745
72922739 3306745
72922739 72922748

result:

ok good plan

Test #114:

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

input:

10173072 225574233

output:

8
2543268 2543268
2543268 0
0 0
0 1
2543180 1
2543180 1766737
2543181 1766737
2543181 2543268

result:

ok good plan

Test #115:

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

input:

116613708 99788090

output:

8
29153427 29153427
29153427 0
0 0
0 1
29153424 1
29153424 12327812
29153425 12327812
29153425 29153427

result:

ok good plan

Test #116:

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

input:

413403874 420363396

output:

8
103350968 103350969
103350968 0
0 0
0 1
103350964 1
103350964 6959525
103350965 6959525
103350965 103350969

result:

ok good plan

Test #117:

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

input:

104922974 68977141

output:

8
26230743 26230744
26230743 0
0 0
0 1
26230741 1
26230741 16515656
26230742 16515656
26230742 26230744

result:

ok good plan

Test #118:

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

input:

814481846 347162734

output:

-1

result:

ok NO SOLUTION

Test #119:

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

input:

401674718 224548659

output:

8
100418679 100418680
100418679 0
0 0
0 1
100418677 1
100418677 23711302
100418678 23711302
100418678 100418680

result:

ok good plan

Test #120:

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

input:

406976738 881568779

output:

8
101744184 101744185
101744184 0
0 0
0 1
101744176 1
101744176 67615308
101744177 67615308
101744177 101744185

result:

ok good plan

Test #121:

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

input:

926980270 622679155

output:

8
231745067 231745068
231745067 0
0 0
0 1
231745065 1
231745065 159189022
231745066 159189022
231745066 231745068

result:

ok good plan

Test #122:

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

input:

216852084 338679783

output:

8
54213021 54213021
54213021 0
0 0
0 1
54213015 1
54213015 13401663
54213016 13401663
54213016 54213021

result:

ok good plan

Test #123:

score: 0
Accepted
time: 8ms
memory: 10640kb

input:

610219914 207118079

output:

-1

result:

ok NO SOLUTION

Test #124:

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

input:

328457454 25931709

output:

-1

result:

ok NO SOLUTION

Test #125:

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

input:

915520690 118684974

output:

-1

result:

ok NO SOLUTION

Test #126:

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

input:

568229720 488525085

output:

8
142057430 142057430
142057430 0
0 0
0 1
142057427 1
142057427 62352798
142057428 62352798
142057428 142057430

result:

ok good plan

Test #127:

score: 0
Accepted
time: 8ms
memory: 10704kb

input:

531827830 685694401

output:

8
132956957 132956958
132956957 0
0 0
0 1
132956952 1
132956952 20909617
132956953 20909617
132956953 132956958

result:

ok good plan

Test #128:

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

input:

452409802 715329957

output:

8
113102450 113102451
113102450 0
0 0
0 1
113102444 1
113102444 36715258
113102445 36715258
113102445 113102451

result:

ok good plan

Test #129:

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

input:

739357828 243587585

output:

-1

result:

ok NO SOLUTION

Test #130:

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

input:

909250486 881008890

output:

8
227312621 227312622
227312621 0
0 0
0 1
227312618 1
227312618 199071028
227312619 199071028
227312619 227312622

result:

ok good plan

Test #131:

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

input:

190124236 623425506

output:

8
47531059 47531059
47531059 0
0 0
0 1
47531046 1
47531046 5521752
47531047 5521752
47531047 47531059

result:

ok good plan

Test #132:

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

input:

651638822 573089381

output:

8
162909705 162909706
162909705 0
0 0
0 1
162909702 1
162909702 84360267
162909703 84360267
162909703 162909706

result:

ok good plan

Test #133:

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

input:

118977068 383269885

output:

8
29744267 29744267
29744267 0
0 0
0 1
29744255 1
29744255 26338693
29744256 26338693
29744256 29744267

result:

ok good plan

Test #134:

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

input:

390751760 878353816

output:

8
97687940 97687940
97687940 0
0 0
0 1
97687932 1
97687932 96850304
97687933 96850304
97687933 97687940

result:

ok good plan