QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#825961#9770. Middle Pointucup-team018#AC ✓1ms3844kbC++231.7kb2024-12-22 01:04:482024-12-22 01:04:49

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3600kb

input:

2 2
1 1

output:

1
0 0 2 2 

result:

ok correct!

Test #2:

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

input:

8 8
5 0

output:

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

result:

ok correct!

Test #3:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:

0 0
0 0

output:

0

result:

ok correct!

Test #4:

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

input:

2024 0
1012 0

output:

1
0 0 2024 0 

result:

ok correct!

Test #5:

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

input:

2024 2024
2023 2023

output:

-1

result:

ok correct!

Test #6:

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

input:

8 6
7 3

output:

3
0 0 8 0 
4 0 8 0 
6 0 8 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: 1ms
memory: 3612kb

input:

1000000000 1000000000
70 0

output:

-1

result:

ok correct!

Test #9:

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

input:

3 6
2 4

output:

-1

result:

ok correct!

Test #10:

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

input:

7 7
7 2

output:

-1

result:

ok correct!

Test #11:

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

input:

6 2
5 2

output:

-1

result:

ok correct!

Test #12:

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

input:

5 7
5 5

output:

-1

result:

ok correct!

Test #13:

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

input:

4 7
2 3

output:

-1

result:

ok correct!

Test #14:

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

input:

8 2
2 2

output:

2
8 2 0 2 
4 2 0 2 

result:

ok correct!

Test #15:

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

input:

3 3
0 2

output:

-1

result:

ok correct!

Test #16:

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

input:

7 7
1 4

output:

-1

result:

ok correct!

Test #17:

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

input:

6 3
6 1

output:

-1

result:

ok correct!

Test #18:

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

input:

4 2
2 1

output:

1
0 0 4 2 

result:

ok correct!

Test #19:

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

input:

7 2
3 2

output:

-1

result:

ok correct!

Test #20:

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

input:

2 7
0 3

output:

-1

result:

ok correct!

Test #21:

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

input:

1 7
1 0

output:

0

result:

ok correct!

Test #22:

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

input:

5 1
0 0

output:

0

result:

ok correct!

Test #23:

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

input:

8 7
4 3

output:

-1

result:

ok correct!

Test #24:

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

input:

180057652 674822131
110693180 428023738

output:

-1

result:

ok correct!

Test #25:

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

input:

62347541 812142018
42922107 486416913

output:

-1

result:

ok correct!

Test #26:

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

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

input:

594119084 519068971
429116021 298715088

output:

-1

result:

ok correct!

Test #29:

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

input:

536870912 536870912
233225286 372408647

output:

29
0 536870912 0 0 
536870912 536870912 0 268435456 
0 268435456 268435456 402653184 
0 0 134217728 335544320 
67108864 167772160 268435456 402653184 
167772160 285212672 268435456 402653184 
134217728 335544320 218103808 343932928 
176160768 339738624 268435456 402653184 
268435456 402653184 222298...

result:

ok correct!

Test #30:

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

input:

536870912 536870912
242171716 210314503

output:

29
536870912 0 536870912 536870912 
536870912 268435456 536870912 536870912 
536870912 402653184 0 0 
0 0 268435456 201326592 
536870912 536870912 134217728 100663296 
268435456 201326592 335544320 318767104 
301989888 260046848 134217728 100663296 
335544320 318767104 218103808 180355072 
134217728...

result:

ok correct!

Test #31:

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

input:

536870912 536870912
251118145 48220392

output:

29
536870912 0 0 0 
0 0 268435456 0 
134217728 0 268435456 0 
536870912 536870912 201326592 0 
369098752 268435456 201326592 0 
201326592 0 285212672 134217728 
285212672 134217728 243269632 67108864 
264241152 100663296 268435456 0 
266338304 50331648 243269632 67108864 
254803968 58720256 24326963...

result:

ok correct!

Test #32:

score: 0
Accepted
time: 1ms
memory: 3588kb

input:

126070784 536870912
70206899 483718753

output:

29
0 0 0 536870912 
0 268435456 0 536870912 
0 536870912 0 402653184 
0 469762048 0 402653184 
0 436207616 0 402653184 
0 402653184 0 419430400 
0 411041792 0 419430400 
0 419430400 0 415236096 
0 415236096 0 417333248 
0 416284672 0 417333248 
0 417333248 0 416808960 
0 417071104 0 416808960 
0 416...

result:

ok correct!

Test #33:

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

input:

134541312 536870912
92168682 321624642

output:

28
134541312 0 134541312 536870912 
134541312 268435456 134541312 536870912 
134541312 536870912 134541312 402653184 
134541312 402653184 134541312 469762048 
134541312 436207616 134541312 469762048 
134541312 452984832 134541312 469762048 
134541312 461373440 134541312 469762048 
134541312 46556774...

result:

ok correct!

Test #34:

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

input:

605171712 536870912
492293004 159530531

output:

29
605171712 536870912 605171712 0 
605171712 0 605171712 268435456 
605171712 268435456 605171712 134217728 
605171712 134217728 605171712 201326592 
605171712 167772160 605171712 201326592 
605171712 184549376 605171712 201326592 
605171712 201326592 605171712 192937984 
605171712 192937984 605171...

result:

ok correct!

Test #35:

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

input:

816447488 872415232
107288296 282864296

output:

23
0 872415232 0 0 
0 436207616 0 0 
0 0 0 218103808 
0 109051904 0 218103808 
0 163577856 0 218103808 
0 218103808 0 190840832 
0 204472320 0 190840832 
0 197656576 0 190840832 
0 190840832 0 194248704 
816447488 872415232 0 192544768 
408223744 532480000 0 194248704 
0 192544768 204111872 36336435...

result:

ok correct!

Test #36:

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

input:

465043456 805306368
155625924 290419248

output:

24
0 805306368 0 0 
0 402653184 0 0 
0 201326592 0 0 
0 100663296 0 0 
0 0 0 50331648 
0 50331648 0 25165824 
0 37748736 0 25165824 
465043456 805306368 0 31457280 
0 31457280 232521728 418381824 
0 25165824 116260864 224919552 
58130432 125042688 232521728 418381824 
145326080 271712256 232521728 4...

result:

ok correct!

Test #37:

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

input:

246022144 587202560
78513033 233147565

output:

24
0 587202560 0 0 
0 293601280 0 0 
0 146800640 0 0 
0 0 0 73400320 
0 36700160 0 73400320 
0 55050240 0 73400320 
0 73400320 0 64225280 
246022144 587202560 0 68812800 
0 64225280 123011072 328007680 
123011072 328007680 61505536 196116480 
61505536 196116480 92258304 262062080 
0 68812800 7688192...

result:

ok correct!

Test #38:

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

input:

536870912 699163134
414335415 699163134

output:

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

result:

ok correct!

Test #39:

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

input:

536870912 292943687
423281845 292943687

output:

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

result:

ok correct!

Test #40:

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

input:

536870912 31948433
432228266 0

output:

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

result:

ok correct!

Test #41:

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

input:

603979776 243951872
111389958 152469920

output:

25
603979776 243951872 0 243951872 
0 243951872 301989888 243951872 
301989888 243951872 150994944 243951872 
226492416 243951872 150994944 243951872 
150994944 243951872 188743680 243951872 
188743680 243951872 169869312 243951872 
169869312 243951872 179306496 243951872 
174587904 243951872 179306...

result:

ok correct!

Test #42:

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

input:

603979776 892103744
85336938 585443082

output:

25
603979776 892103744 0 892103744 
301989888 892103744 0 892103744 
0 892103744 150994944 892103744 
75497472 892103744 150994944 892103744 
150994944 892103744 113246208 892103744 
113246208 892103744 132120576 892103744 
122683392 892103744 132120576 892103744 
127401984 892103744 132120576 89210...

result:

ok correct!

Test #43:

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

input:

67108864 893081440
6587231 502358310

output:

26
67108864 893081440 0 893081440 
33554432 893081440 0 893081440 
0 893081440 16777216 893081440 
16777216 893081440 8388608 893081440 
8388608 893081440 12582912 893081440 
10485760 893081440 12582912 893081440 
12582912 893081440 11534336 893081440 
12058624 893081440 11534336 893081440 
11534336...

result:

ok correct!

Test #44:

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

input:

536870912 536870912
233225286 536870912

output:

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

result:

ok correct!

Test #45:

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

input:

536870912 536870912
242171716 536870912

output:

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

result:

ok correct!

Test #46:

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

input:

536870912 536870912
536870912 48220392

output:

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

result:

ok correct!

Test #47:

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

input:

126070784 536870912
70206899 0

output:

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

result:

ok correct!

Test #48:

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

input:

536870912 536870912
33554432 1835008

output:

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

result:

ok correct!

Test #49:

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

input:

134541312 536870912
0 321624642

output:

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

result:

ok correct!

Test #50:

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

input:

605171712 536870912
605171712 159530531

output:

29
605171712 536870912 605171712 0 
605171712 0 605171712 268435456 
605171712 268435456 605171712 134217728 
605171712 201326592 605171712 134217728 
605171712 134217728 605171712 167772160 
605171712 150994944 605171712 167772160 
605171712 167772160 605171712 159383552 
605171712 163577856 605171...

result:

ok correct!

Test #51:

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

input:

816447488 872415232
107288296 872415232

output:

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

result:

ok correct!

Test #52:

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

input:

465043456 805306368
155625924 805306368

output:

17
465043456 805306368 0 805306368 
0 805306368 232521728 805306368 
232521728 805306368 116260864 805306368 
116260864 805306368 174391296 805306368 
174391296 805306368 145326080 805306368 
145326080 805306368 159858688 805306368 
159858688 805306368 152592384 805306368 
152592384 805306368 156225...

result:

ok correct!

Test #53:

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

input:

246022144 587202560
0 233147565

output:

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

result:

ok correct!

Test #54:

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

input:

536870912 699163134
0 699163134

output:

0

result:

ok correct!

Test #55:

score: 0
Accepted
time: 1ms
memory: 3512kb

input:

536870912 292943687
423281845 0

output:

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

result:

ok correct!

Test #56:

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

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 243951872 603979776 121975936 
603979776 182963904 603979776 121975936 

result:

ok correct!

Test #58:

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

input:

603979776 892103744
603979776 585443082

output:

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

result:

ok correct!

Test #59:

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

input:

67108864 893081440
6587231 893081440

output:

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

result:

ok correct!

Test #60:

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

input:

276307968 0
139739247 0

output:

13
0 0 276307968 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 
138153984 0 140312640 0 
140312640 0 139233312 0 
139233312 0 139772976 0 
139503144 0 139772976 0 
139638060 0 139772976 0 
13970...

result:

ok correct!

Test #61:

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

input:

0 365756416
0 136488936

output:

13
0 365756416 0 0 
0 0 0 182878208 
0 182878208 0 91439104 
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 137158656 0 136444288 
0 136801472 0 136444288 
0 136622880 0 136444288 
0 136444288 0 1...

result:

ok correct!

Test #62:

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

input:

0 214958080
0 164104960

output:

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

result:

ok correct!

Test #63:

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

input:

713613312 0
122478066 0

output:

12
713613312 0 0 0 
356806656 0 0 0 
0 0 178403328 0 
178403328 0 89201664 0 
89201664 0 133802496 0 
133802496 0 111502080 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: 3476kb

input:

0 122953728
0 4427655

output:

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

result:

ok correct!

Test #65:

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

input:

0 268435456
0 36705241

output:

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

result:

ok correct!

Test #66:

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

input:

0 805306368
0 482227593

output:

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

result:

ok correct!

Test #67:

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

input:

805306368 0
635586921 0

output:

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

result:

ok correct!

Test #68:

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

input:

0 805306368
0 421144629

output:

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

result:

ok correct!

Test #69:

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

input:

268435456 0
149676330 0

output:

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

result:

ok correct!

Extra Test:

score: 0
Extra Test Passed