QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#825500#9770. Middle Pointucup-team4579#AC ✓0ms3832kbC++204.5kb2024-12-21 19:48:382024-12-21 19:48:38

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3528kb

input:

2 2
1 1

output:

1
0 0 2 2

result:

ok correct!

Test #2:

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

input:

8 8
5 0

output:

3
0 0 8 0
4 0 8 0
4 0 6 0

result:

ok correct!

Test #3:

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

input:

0 0
0 0

output:

0

result:

ok correct!

Test #4:

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

input:

2024 0
1012 0

output:

1
0 0 2024 0

result:

ok correct!

Test #5:

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

input:

2024 2024
2023 2023

output:

-1

result:

ok correct!

Test #6:

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

input:

8 6
7 3

output:

3
8 6 0 6
8 6 4 6
8 0 6 6

result:

ok correct!

Test #7:

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

input:

2024 2026
2024 2026

output:

0

result:

ok correct!

Test #8:

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

input:

1000000000 1000000000
70 0

output:

-1

result:

ok correct!

Test #9:

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

input:

3 6
2 4

output:

-1

result:

ok correct!

Test #10:

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

input:

7 7
7 2

output:

-1

result:

ok correct!

Test #11:

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

input:

6 2
5 2

output:

-1

result:

ok correct!

Test #12:

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

input:

5 7
5 5

output:

-1

result:

ok correct!

Test #13:

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

input:

4 7
2 3

output:

-1

result:

ok correct!

Test #14:

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

input:

8 2
2 2

output:

2
0 2 8 2
0 2 4 2

result:

ok correct!

Test #15:

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

input:

3 3
0 2

output:

-1

result:

ok correct!

Test #16:

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

input:

7 7
1 4

output:

-1

result:

ok correct!

Test #17:

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

input:

6 3
6 1

output:

-1

result:

ok correct!

Test #18:

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

input:

4 2
2 1

output:

1
0 0 4 2

result:

ok correct!

Test #19:

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

input:

7 2
3 2

output:

-1

result:

ok correct!

Test #20:

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

input:

2 7
0 3

output:

-1

result:

ok correct!

Test #21:

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

input:

1 7
1 0

output:

0

result:

ok correct!

Test #22:

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

input:

5 1
0 0

output:

0

result:

ok correct!

Test #23:

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

input:

8 7
4 3

output:

-1

result:

ok correct!

Test #24:

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

input:

180057652 674822131
110693180 428023738

output:

-1

result:

ok correct!

Test #25:

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

input:

62347541 812142018
42922107 486416913

output:

-1

result:

ok correct!

Test #26:

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

input:

239604722 244429197
78993837 108804105

output:

-1

result:

ok correct!

Test #27:

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

input:

416861903 381749084
375027630 373683256

output:

-1

result:

ok correct!

Test #28:

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

input:

594119084 519068971
429116021 298715088

output:

-1

result:

ok correct!

Test #29:

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

input:

536870912 536870912
233225286 372408647

output:

29
0 536870912 0 0
536870912 536870912 0 268435456
536870912 536870912 268435456 402653184
0 0 402653184 469762048
0 0 201326592 234881024
0 0 100663296 117440512
536870912 536870912 50331648 58720256
0 0 293601280 297795584
0 536870912 146800640 148897792
0 0 73400320 342884352
536870912 0 36700160...

result:

ok correct!

Test #30:

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

input:

536870912 536870912
242171716 210314503

output:

29
536870912 536870912 536870912 0
536870912 536870912 536870912 268435456
0 536870912 536870912 402653184
0 0 268435456 469762048
0 0 134217728 234881024
0 0 67108864 117440512
536870912 0 33554432 58720256
0 0 285212672 29360128
536870912 536870912 142606336 14680064
536870912 0 339738624 27577548...

result:

ok correct!

Test #31:

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

input:

536870912 536870912
251118145 48220392

output:

29
0 536870912 536870912 536870912
0 536870912 268435456 536870912
0 536870912 134217728 536870912
0 0 67108864 536870912
0 0 33554432 268435456
0 536870912 16777216 134217728
536870912 536870912 8388608 335544320
0 536870912 272629760 436207616
0 0 136314880 486539264
536870912 0 68157440 243269632...

result:

ok correct!

Test #32:

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

input:

126070784 536870912
70206899 483718753

output:

29
126070784 0 126070784 536870912
126070784 0 126070784 268435456
126070784 134217728 126070784 268435456
126070784 201326592 126070784 268435456
126070784 234881024 126070784 268435456
126070784 251658240 126070784 268435456
126070784 251658240 126070784 260046848
126070784 255852544 126070784 260...

result:

ok correct!

Test #33:

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

input:

134541312 536870912
92168682 321624642

output:

28
0 0 0 536870912
0 268435456 0 536870912
0 402653184 0 536870912
0 469762048 0 536870912
0 469762048 0 503316480
0 469762048 0 486539264
0 478150656 0 486539264
0 482344960 0 486539264
0 482344960 0 484442112
0 483393536 0 484442112
0 483393536 0 483917824
0 483393536 0 483655680
0 483524608 0 483...

result:

ok correct!

Test #34:

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

input:

605171712 536870912
492293004 159530531

output:

29
605171712 0 605171712 536870912
605171712 0 605171712 268435456
605171712 134217728 605171712 268435456
605171712 134217728 605171712 201326592
605171712 134217728 605171712 167772160
605171712 134217728 605171712 150994944
605171712 142606336 605171712 150994944
605171712 146800640 605171712 150...

result:

ok correct!

Test #35:

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

input:

816447488 872415232
107288296 282864296

output:

23
816447488 0 816447488 872415232
816447488 0 816447488 436207616
816447488 0 816447488 218103808
816447488 109051904 816447488 218103808
816447488 163577856 816447488 218103808
816447488 163577856 816447488 190840832
816447488 177209344 816447488 190840832
816447488 177209344 816447488 184025088
8...

result:

ok correct!

Test #36:

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

input:

465043456 805306368
155625924 290419248

output:

24
0 0 0 805306368
0 402653184 0 805306368
0 603979776 0 805306368
0 603979776 0 704643072
0 603979776 0 654311424
0 603979776 0 629145600
0 603979776 0 616562688
465043456 0 0 610271232
465043456 0 232521728 305135616
465043456 805306368 348782592 152567808
0 0 406913024 478937088
465043456 0 20345...

result:

ok correct!

Test #37:

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

input:

246022144 587202560
78513033 233147565

output:

24
246022144 587202560 246022144 0
246022144 587202560 246022144 293601280
246022144 587202560 246022144 440401920
246022144 513802240 246022144 440401920
246022144 513802240 246022144 477102080
246022144 513802240 246022144 495452160
246022144 513802240 246022144 504627200
0 587202560 246022144 509...

result:

ok correct!

Test #38:

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

input:

536870912 699163134
414335415 699163134

output:

29
0 699163134 536870912 699163134
268435456 699163134 536870912 699163134
402653184 699163134 536870912 699163134
402653184 699163134 469762048 699163134
402653184 699163134 436207616 699163134
402653184 699163134 419430400 699163134
411041792 699163134 419430400 699163134
411041792 699163134 41523...

result:

ok correct!

Test #39:

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

input:

536870912 292943687
423281845 292943687

output:

29
0 292943687 536870912 292943687
268435456 292943687 536870912 292943687
402653184 292943687 536870912 292943687
402653184 292943687 469762048 292943687
402653184 292943687 436207616 292943687
419430400 292943687 436207616 292943687
419430400 292943687 427819008 292943687
419430400 292943687 42362...

result:

ok correct!

Test #40:

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

input:

536870912 31948433
432228266 0

output:

28
0 0 536870912 0
268435456 0 536870912 0
402653184 0 536870912 0
402653184 0 469762048 0
402653184 0 436207616 0
419430400 0 436207616 0
427819008 0 436207616 0
432013312 0 436207616 0
432013312 0 434110464 0
432013312 0 433061888 0
432013312 0 432537600 0
432013312 0 432275456 0
432144384 0 43227...

result:

ok correct!

Test #41:

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

input:

603979776 243951872
111389958 152469920

output:

25
603979776 243951872 0 243951872
301989888 243951872 0 243951872
301989888 243951872 150994944 243951872
301989888 243951872 226492416 243951872
301989888 243951872 264241152 243951872
301989888 243951872 283115520 243951872
292552704 243951872 283115520 243951872
287834112 243951872 283115520 243...

result:

ok correct!

Test #42:

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

input:

603979776 892103744
85336938 585443082

output:

25
0 892103744 603979776 892103744
301989888 892103744 603979776 892103744
301989888 892103744 452984832 892103744
301989888 892103744 377487360 892103744
301989888 892103744 339738624 892103744
301989888 892103744 320864256 892103744
311427072 892103744 320864256 892103744
311427072 892103744 31614...

result:

ok correct!

Test #43:

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

input:

67108864 893081440
6587231 502358310

output:

26
67108864 893081440 0 893081440
67108864 893081440 33554432 893081440
50331648 893081440 33554432 893081440
41943040 893081440 33554432 893081440
41943040 893081440 37748736 893081440
39845888 893081440 37748736 893081440
38797312 893081440 37748736 893081440
38797312 893081440 38273024 893081440
...

result:

ok correct!

Test #44:

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

input:

536870912 536870912
233225286 536870912

output:

28
0 536870912 536870912 536870912
0 536870912 268435456 536870912
134217728 536870912 268435456 536870912
201326592 536870912 268435456 536870912
201326592 536870912 234881024 536870912
218103808 536870912 234881024 536870912
226492416 536870912 234881024 536870912
230686720 536870912 234881024 536...

result:

ok correct!

Test #45:

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

input:

536870912 536870912
242171716 536870912

output:

27
0 536870912 536870912 536870912
0 536870912 268435456 536870912
134217728 536870912 268435456 536870912
201326592 536870912 268435456 536870912
234881024 536870912 268435456 536870912
234881024 536870912 251658240 536870912
234881024 536870912 243269632 536870912
239075328 536870912 243269632 536...

result:

ok correct!

Test #46:

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

input:

536870912 536870912
536870912 48220392

output:

26
536870912 0 536870912 536870912
536870912 0 536870912 268435456
536870912 0 536870912 134217728
536870912 0 536870912 67108864
536870912 33554432 536870912 67108864
536870912 33554432 536870912 50331648
536870912 41943040 536870912 50331648
536870912 46137344 536870912 50331648
536870912 46137344...

result:

ok correct!

Test #47:

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

input:

126070784 536870912
70206899 0

output:

12
0 0 126070784 0
63035392 0 126070784 0
63035392 0 94553088 0
63035392 0 78794240 0
63035392 0 70914816 0
66975104 0 70914816 0
68944960 0 70914816 0
69929888 0 70914816 0
69929888 0 70422352 0
70176120 0 70422352 0
70176120 0 70299236 0
70176120 0 70237678 0

result:

ok correct!

Test #48:

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

input:

536870912 536870912
33554432 1835008

output:

11
536870912 0 536870912 536870912
536870912 0 536870912 268435456
536870912 0 536870912 134217728
536870912 0 536870912 67108864
536870912 0 536870912 33554432
536870912 16777216 536870912 33554432
536870912 25165824 536870912 33554432
0 0 536870912 29360128
0 0 268435456 14680064
0 0 134217728 734...

result:

ok correct!

Test #49:

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

input:

134541312 536870912
0 321624642

output:

28
0 0 0 536870912
0 268435456 0 536870912
0 268435456 0 402653184
0 268435456 0 335544320
0 301989888 0 335544320
0 318767104 0 335544320
0 318767104 0 327155712
0 318767104 0 322961408
0 320864256 0 322961408
0 320864256 0 321912832
0 321388544 0 321912832
0 321388544 0 321650688
0 321519616 0 321...

result:

ok correct!

Test #50:

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

input:

605171712 536870912
605171712 159530531

output:

29
605171712 0 605171712 536870912
605171712 0 605171712 268435456
605171712 134217728 605171712 268435456
605171712 134217728 605171712 201326592
605171712 134217728 605171712 167772160
605171712 150994944 605171712 167772160
605171712 159383552 605171712 167772160
605171712 159383552 605171712 163...

result:

ok correct!

Test #51:

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

input:

816447488 872415232
107288296 872415232

output:

14
0 872415232 816447488 872415232
0 872415232 408223744 872415232
0 872415232 204111872 872415232
102055936 872415232 204111872 872415232
102055936 872415232 153083904 872415232
102055936 872415232 127569920 872415232
102055936 872415232 114812928 872415232
102055936 872415232 108434432 872415232
1...

result:

ok correct!

Test #52:

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

input:

465043456 805306368
155625924 805306368

output:

17
0 805306368 465043456 805306368
0 805306368 232521728 805306368
116260864 805306368 232521728 805306368
116260864 805306368 174391296 805306368
145326080 805306368 174391296 805306368
145326080 805306368 159858688 805306368
152592384 805306368 159858688 805306368
152592384 805306368 156225536 805...

result:

ok correct!

Test #53:

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

input:

246022144 587202560
0 233147565

output:

24
0 0 0 587202560
0 0 0 293601280
0 146800640 0 293601280
0 220200960 0 293601280
0 220200960 0 256901120
0 220200960 0 238551040
0 229376000 0 238551040
0 229376000 0 233963520
0 231669760 0 233963520
0 232816640 0 233963520
0 232816640 0 233390080
0 233103360 0 233390080
0 233103360 0 233246720
0...

result:

ok correct!

Test #54:

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

input:

536870912 699163134
0 699163134

output:

0

result:

ok correct!

Test #55:

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

input:

536870912 292943687
423281845 0

output:

29
0 0 536870912 0
268435456 0 536870912 0
402653184 0 536870912 0
402653184 0 469762048 0
402653184 0 436207616 0
419430400 0 436207616 0
419430400 0 427819008 0
419430400 0 423624704 0
421527552 0 423624704 0
422576128 0 423624704 0
423100416 0 423624704 0
423100416 0 423362560 0
423231488 0 42336...

result:

ok correct!

Test #56:

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

input:

536870912 31948433
0 0

output:

0

result:

ok correct!

Test #57:

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

input:

603979776 243951872
603979776 152469920

output:

3
603979776 0 603979776 243951872
603979776 121975936 603979776 243951872
603979776 121975936 603979776 182963904

result:

ok correct!

Test #58:

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

input:

603979776 892103744
603979776 585443082

output:

5
603979776 0 603979776 892103744
603979776 446051872 603979776 892103744
603979776 446051872 603979776 669077808
603979776 557564840 603979776 669077808
603979776 557564840 603979776 613321324

result:

ok correct!

Test #59:

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

input:

67108864 893081440
6587231 893081440

output:

26
0 893081440 67108864 893081440
0 893081440 33554432 893081440
0 893081440 16777216 893081440
0 893081440 8388608 893081440
4194304 893081440 8388608 893081440
6291456 893081440 8388608 893081440
6291456 893081440 7340032 893081440
6291456 893081440 6815744 893081440
6553600 893081440 6815744 8930...

result:

ok correct!

Test #60:

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

input:

276307968 0
139739247 0

output:

13
0 0 276307968 0
138153984 0 276307968 0
138153984 0 207230976 0
138153984 0 172692480 0
138153984 0 155423232 0
138153984 0 146788608 0
138153984 0 142471296 0
138153984 0 140312640 0
139233312 0 140312640 0
139233312 0 139772976 0
139503144 0 139772976 0
139638060 0 139772976 0
139705518 0 13977...

result:

ok correct!

Test #61:

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

input:

0 365756416
0 136488936

output:

13
0 0 0 365756416
0 0 0 182878208
0 91439104 0 182878208
0 91439104 0 137158656
0 114298880 0 137158656
0 125728768 0 137158656
0 131443712 0 137158656
0 134301184 0 137158656
0 135729920 0 137158656
0 136444288 0 137158656
0 136444288 0 136801472
0 136444288 0 136622880
0 136444288 0 136533584

result:

ok correct!

Test #62:

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

input:

0 214958080
0 164104960

output:

12
0 0 0 214958080
0 107479040 0 214958080
0 161218560 0 214958080
0 161218560 0 188088320
0 161218560 0 174653440
0 161218560 0 167936000
0 161218560 0 164577280
0 162897920 0 164577280
0 163737600 0 164577280
0 163737600 0 164157440
0 163947520 0 164157440
0 164052480 0 164157440

result:

ok correct!

Test #63:

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

input:

713613312 0
122478066 0

output:

12
0 0 713613312 0
0 0 356806656 0
0 0 178403328 0
89201664 0 178403328 0
89201664 0 133802496 0
111502080 0 133802496 0
111502080 0 122652288 0
117077184 0 122652288 0
119864736 0 122652288 0
121258512 0 122652288 0
121955400 0 122652288 0
122303844 0 122652288 0

result:

ok correct!

Test #64:

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

input:

0 122953728
0 4427655

output:

13
0 0 0 122953728
0 0 0 61476864
0 0 0 30738432
0 0 0 15369216
0 0 0 7684608
0 3842304 0 7684608
0 3842304 0 5763456
0 3842304 0 4802880
0 4322592 0 4802880
0 4322592 0 4562736
0 4322592 0 4442664
0 4382628 0 4442664
0 4412646 0 4442664

result:

ok correct!

Test #65:

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

input:

0 268435456
0 36705241

output:

28
0 0 0 268435456
0 0 0 134217728
0 0 0 67108864
0 33554432 0 67108864
0 33554432 0 50331648
0 33554432 0 41943040
0 33554432 0 37748736
0 35651584 0 37748736
0 36700160 0 37748736
0 36700160 0 37224448
0 36700160 0 36962304
0 36700160 0 36831232
0 36700160 0 36765696
0 36700160 0 36732928
0 367001...

result:

ok correct!

Test #66:

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

input:

0 805306368
0 482227593

output:

28
0 0 0 805306368
0 402653184 0 805306368
0 402653184 0 603979776
0 402653184 0 503316480
0 452984832 0 503316480
0 478150656 0 503316480
0 478150656 0 490733568
0 478150656 0 484442112
0 481296384 0 484442112
0 481296384 0 482869248
0 482082816 0 482869248
0 482082816 0 482476032
0 482082816 0 482...

result:

ok correct!

Test #67:

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

input:

805306368 0
635586921 0

output:

28
0 0 805306368 0
402653184 0 805306368 0
603979776 0 805306368 0
603979776 0 704643072 0
603979776 0 654311424 0
629145600 0 654311424 0
629145600 0 641728512 0
635437056 0 641728512 0
635437056 0 638582784 0
635437056 0 637009920 0
635437056 0 636223488 0
635437056 0 635830272 0
635437056 0 63563...

result:

ok correct!

Test #68:

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

input:

0 805306368
0 421144629

output:

28
0 0 0 805306368
0 402653184 0 805306368
0 402653184 0 603979776
0 402653184 0 503316480
0 402653184 0 452984832
0 402653184 0 427819008
0 415236096 0 427819008
0 415236096 0 421527552
0 418381824 0 421527552
0 419954688 0 421527552
0 420741120 0 421527552
0 421134336 0 421527552
0 421134336 0 421...

result:

ok correct!

Test #69:

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

input:

268435456 0
149676330 0

output:

27
0 0 268435456 0
134217728 0 268435456 0
134217728 0 201326592 0
134217728 0 167772160 0
134217728 0 150994944 0
142606336 0 150994944 0
146800640 0 150994944 0
148897792 0 150994944 0
148897792 0 149946368 0
149422080 0 149946368 0
149422080 0 149684224 0
149553152 0 149684224 0
149618688 0 14968...

result:

ok correct!

Extra Test:

score: 0
Extra Test Passed