QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#265403#7868. 天空度假山庄Nesraychan100 ✓32ms3944kbC++142.0kb2023-11-25 18:15:112023-11-25 18:15:11

Judging History

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

  • [2023-11-25 18:15:11]
  • 评测
  • 测评结果:100
  • 用时:32ms
  • 内存:3944kb
  • [2023-11-25 18:15:11]
  • 提交

answer

#include<bits/stdc++.h>
#define IL inline
#define reg register
#define N 1000100
IL int read()
{
    reg int x=0; reg char ch=getchar();
    while(ch<'0'||ch>'9')ch=getchar();
    while(ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar();
    return x;
}

int n,k;

IL int num(reg int x){return x=(x%n+n)%n,x?x:n;}

main()
{
    n=read(),k=read();

    if(k%4==2)
    {
        for(reg int i=2,t,j,f;i<=n;i+=2)
        {
            t=num(i+k+6),f=0;
            for(j=1;j<=k;j+=2,f^=1)printf("%d %d ",t,i-f),t=num(t-1);
            if(i==n)break;
            for(j=1;j<=k-2;j+=2,f^=1)printf("%d %d ",t,i-f),t=num(t-1);
            printf("%d %d ",t,i+1);
        }
        puts(""),exit(0);
    }

    if(k%4==1)
    {
        for(reg int i=2,t,j,f;i<=n;i+=2)
        {
            t=num(i+k+6),f=0;
            for(j=1;j<k;j+=2,f^=1)printf("%d %d ",i-f,t),t=num(t-1);
            printf("%d ",i-f),f^=1; if(i==n)break;
            for(j=1;j<k;j+=2,f^=1)printf("%d %d ",t,i-f),t=num(t-1);
            printf("%d ",i+1);
        }
        puts(""),exit(0);
    }

    if(k%4==0)
    {
        for(reg int i=2,t,d,j,f;i<=n;i+=2)
        {
            t=num(i+k+6),d=num(t-4),f=0;
            for(j=1;j<=k-4;j+=2,f^=1)printf("%d %d ",d,i-f),d=num(d-1);
            printf("%d %d %d %d ",num(t),num(t-2),i-1,i),f^=1;
            if(i==n)break;
            for(j=1;j<=k-4;j+=2,f^=1)printf("%d %d ",d,i-f),d=num(d-1);
            printf("%d %d %d %d ",num(t-1),num(t-3),i,i+1);           
        }
        puts(""),exit(0);
    }

    if(k%4==3)
    {
        for(reg int i=2,t,d,j,f;i<=n;i+=2)
        {
            t=num(i+k+6),d=num(t-3),f=0;
            for(j=1;j<=k-3;j+=2,f^=1)printf("%d %d ",d,i-f),d=num(d-1);
            printf("%d %d %d ",num(t),num(t-2),i),f^=1;
            if(i==n)break;
            for(j=1;j<k;j+=2,f^=1)printf("%d %d ",i-f,d),d=num(d-1);
            printf("%d ",i+1);           
        }
        puts(""),exit(0);       
    }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

8216 1

output:

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 10...

result:

ok correct

Test #2:

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

input:

5166 2

output:

10 2 9 3 12 4 11 5 14 6 13 7 16 8 15 9 18 10 17 11 20 12 19 13 22 14 21 15 24 16 23 17 26 18 25 19 28 20 27 21 30 22 29 23 32 24 31 25 34 26 33 27 36 28 35 29 38 30 37 31 40 32 39 33 42 34 41 35 44 36 43 37 46 38 45 39 48 40 47 41 50 42 49 43 52 44 51 45 54 46 53 47 56 48 55 49 58 50 57 51 60 52 59 ...

result:

ok correct

Test #3:

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

input:

7445 2

output:

10 2 9 3 12 4 11 5 14 6 13 7 16 8 15 9 18 10 17 11 20 12 19 13 22 14 21 15 24 16 23 17 26 18 25 19 28 20 27 21 30 22 29 23 32 24 31 25 34 26 33 27 36 28 35 29 38 30 37 31 40 32 39 33 42 34 41 35 44 36 43 37 46 38 45 39 48 40 47 41 50 42 49 43 52 44 51 45 54 46 53 47 56 48 55 49 58 50 57 51 60 52 59 ...

result:

ok correct

Test #4:

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

input:

1295 2

output:

10 2 9 3 12 4 11 5 14 6 13 7 16 8 15 9 18 10 17 11 20 12 19 13 22 14 21 15 24 16 23 17 26 18 25 19 28 20 27 21 30 22 29 23 32 24 31 25 34 26 33 27 36 28 35 29 38 30 37 31 40 32 39 33 42 34 41 35 44 36 43 37 46 38 45 39 48 40 47 41 50 42 49 43 52 44 51 45 54 46 53 47 56 48 55 49 58 50 57 51 60 52 59 ...

result:

ok correct

Subtask #2:

score: 20
Accepted

Test #5:

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

input:

86132 9

output:

2 17 1 16 2 15 1 14 2 13 1 12 2 11 1 10 2 3 4 19 3 18 4 17 3 16 4 15 3 14 4 13 3 12 4 5 6 21 5 20 6 19 5 18 6 17 5 16 6 15 5 14 6 7 8 23 7 22 8 21 7 20 8 19 7 18 8 17 7 16 8 9 10 25 9 24 10 23 9 22 10 21 9 20 10 19 9 18 10 11 12 27 11 26 12 25 11 24 12 23 11 22 12 21 11 20 12 13 14 29 13 28 14 27 13...

result:

ok correct

Test #6:

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

input:

73452 11

output:

16 2 15 1 14 2 13 1 19 17 2 1 12 2 11 1 10 2 9 1 8 3 18 4 17 3 16 4 15 3 21 19 4 3 14 4 13 3 12 4 11 3 10 5 20 6 19 5 18 6 17 5 23 21 6 5 16 6 15 5 14 6 13 5 12 7 22 8 21 7 20 8 19 7 25 23 8 7 18 8 17 7 16 8 15 7 14 9 24 10 23 9 22 10 21 9 27 25 10 9 20 10 19 9 18 10 17 9 16 11 26 12 25 11 24 12 23 ...

result:

ok correct

Test #7:

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

input:

23283 20

output:

24 2 23 1 22 2 21 1 20 2 19 1 18 2 17 1 28 26 1 2 16 1 15 2 14 1 13 2 12 1 11 2 10 1 9 2 27 25 2 3 26 4 25 3 24 4 23 3 22 4 21 3 20 4 19 3 30 28 3 4 18 3 17 4 16 3 15 4 14 3 13 4 12 3 11 4 29 27 4 5 28 6 27 5 26 6 25 5 24 6 23 5 22 6 21 5 32 30 5 6 20 5 19 6 18 5 17 6 16 5 15 6 14 5 13 6 31 29 6 7 3...

result:

ok correct

Test #8:

score: 0
Accepted
time: 26ms
memory: 3760kb

input:

36944 17

output:

2 25 1 24 2 23 1 22 2 21 1 20 2 19 1 18 2 17 1 16 2 15 1 14 2 13 1 12 2 11 1 10 2 3 4 27 3 26 4 25 3 24 4 23 3 22 4 21 3 20 4 19 3 18 4 17 3 16 4 15 3 14 4 13 3 12 4 5 6 29 5 28 6 27 5 26 6 25 5 24 6 23 5 22 6 21 5 20 6 19 5 18 6 17 5 16 6 15 5 14 6 7 8 31 7 30 8 29 7 28 8 27 7 26 8 25 7 24 8 23 7 2...

result:

ok correct

Test #9:

score: 0
Accepted
time: 25ms
memory: 3872kb

input:

61927 10

output:

18 2 17 1 16 2 15 1 14 2 13 1 12 2 11 1 10 2 9 3 20 4 19 3 18 4 17 3 16 4 15 3 14 4 13 3 12 4 11 5 22 6 21 5 20 6 19 5 18 6 17 5 16 6 15 5 14 6 13 7 24 8 23 7 22 8 21 7 20 8 19 7 18 8 17 7 16 8 15 9 26 10 25 9 24 10 23 9 22 10 21 9 20 10 19 9 18 10 17 11 28 12 27 11 26 12 25 11 24 12 23 11 22 12 21 ...

result:

ok correct

Subtask #3:

score: 20
Accepted

Dependency #2:

100%
Accepted

Test #10:

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

input:

111 17

output:

2 25 1 24 2 23 1 22 2 21 1 20 2 19 1 18 2 17 1 16 2 15 1 14 2 13 1 12 2 11 1 10 2 3 4 27 3 26 4 25 3 24 4 23 3 22 4 21 3 20 4 19 3 18 4 17 3 16 4 15 3 14 4 13 3 12 4 5 6 29 5 28 6 27 5 26 6 25 5 24 6 23 5 22 6 21 5 20 6 19 5 18 6 17 5 16 6 15 5 14 6 7 8 31 7 30 8 29 7 28 8 27 7 26 8 25 7 24 8 23 7 2...

result:

ok correct

Test #11:

score: 0
Accepted
time: 2ms
memory: 3944kb

input:

462 86

output:

94 2 93 1 92 2 91 1 90 2 89 1 88 2 87 1 86 2 85 1 84 2 83 1 82 2 81 1 80 2 79 1 78 2 77 1 76 2 75 1 74 2 73 1 72 2 71 1 70 2 69 1 68 2 67 1 66 2 65 1 64 2 63 1 62 2 61 1 60 2 59 1 58 2 57 1 56 2 55 1 54 2 53 1 52 2 51 1 50 2 49 1 48 2 47 1 46 2 45 1 44 2 43 1 42 2 41 1 40 2 39 1 38 2 37 1 36 2 35 1 ...

result:

ok correct

Test #12:

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

input:

262 43

output:

48 2 47 1 46 2 45 1 44 2 43 1 42 2 41 1 40 2 39 1 38 2 37 1 36 2 35 1 34 2 33 1 32 2 31 1 30 2 29 1 51 49 2 1 28 2 27 1 26 2 25 1 24 2 23 1 22 2 21 1 20 2 19 1 18 2 17 1 16 2 15 1 14 2 13 1 12 2 11 1 10 2 9 1 8 3 50 4 49 3 48 4 47 3 46 4 45 3 44 4 43 3 42 4 41 3 40 4 39 3 38 4 37 3 36 4 35 3 34 4 33...

result:

ok correct

Test #13:

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

input:

672 125

output:

2 133 1 132 2 131 1 130 2 129 1 128 2 127 1 126 2 125 1 124 2 123 1 122 2 121 1 120 2 119 1 118 2 117 1 116 2 115 1 114 2 113 1 112 2 111 1 110 2 109 1 108 2 107 1 106 2 105 1 104 2 103 1 102 2 101 1 100 2 99 1 98 2 97 1 96 2 95 1 94 2 93 1 92 2 91 1 90 2 89 1 88 2 87 1 86 2 85 1 84 2 83 1 82 2 81 1...

result:

ok correct

Test #14:

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

input:

747 127

output:

132 2 131 1 130 2 129 1 128 2 127 1 126 2 125 1 124 2 123 1 122 2 121 1 120 2 119 1 118 2 117 1 116 2 115 1 114 2 113 1 112 2 111 1 110 2 109 1 108 2 107 1 106 2 105 1 104 2 103 1 102 2 101 1 100 2 99 1 98 2 97 1 96 2 95 1 94 2 93 1 92 2 91 1 90 2 89 1 88 2 87 1 86 2 85 1 84 2 83 1 82 2 81 1 80 2 79...

result:

ok correct

Test #15:

score: 0
Accepted
time: 2ms
memory: 3876kb

input:

404 72

output:

76 2 75 1 74 2 73 1 72 2 71 1 70 2 69 1 68 2 67 1 66 2 65 1 64 2 63 1 62 2 61 1 60 2 59 1 58 2 57 1 56 2 55 1 54 2 53 1 52 2 51 1 50 2 49 1 48 2 47 1 46 2 45 1 44 2 43 1 80 78 1 2 42 1 41 2 40 1 39 2 38 1 37 2 36 1 35 2 34 1 33 2 32 1 31 2 30 1 29 2 28 1 27 2 26 1 25 2 24 1 23 2 22 1 21 2 20 1 19 2 ...

result:

ok correct

Subtask #4:

score: 20
Accepted

Test #16:

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

input:

1777 229

output:

2 237 1 236 2 235 1 234 2 233 1 232 2 231 1 230 2 229 1 228 2 227 1 226 2 225 1 224 2 223 1 222 2 221 1 220 2 219 1 218 2 217 1 216 2 215 1 214 2 213 1 212 2 211 1 210 2 209 1 208 2 207 1 206 2 205 1 204 2 203 1 202 2 201 1 200 2 199 1 198 2 197 1 196 2 195 1 194 2 193 1 192 2 191 1 190 2 189 1 188 ...

result:

ok correct

Test #17:

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

input:

1129 229

output:

2 237 1 236 2 235 1 234 2 233 1 232 2 231 1 230 2 229 1 228 2 227 1 226 2 225 1 224 2 223 1 222 2 221 1 220 2 219 1 218 2 217 1 216 2 215 1 214 2 213 1 212 2 211 1 210 2 209 1 208 2 207 1 206 2 205 1 204 2 203 1 202 2 201 1 200 2 199 1 198 2 197 1 196 2 195 1 194 2 193 1 192 2 191 1 190 2 189 1 188 ...

result:

ok correct

Test #18:

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

input:

4253 233

output:

2 241 1 240 2 239 1 238 2 237 1 236 2 235 1 234 2 233 1 232 2 231 1 230 2 229 1 228 2 227 1 226 2 225 1 224 2 223 1 222 2 221 1 220 2 219 1 218 2 217 1 216 2 215 1 214 2 213 1 212 2 211 1 210 2 209 1 208 2 207 1 206 2 205 1 204 2 203 1 202 2 201 1 200 2 199 1 198 2 197 1 196 2 195 1 194 2 193 1 192 ...

result:

ok correct

Test #19:

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

input:

2311 233

output:

2 241 1 240 2 239 1 238 2 237 1 236 2 235 1 234 2 233 1 232 2 231 1 230 2 229 1 228 2 227 1 226 2 225 1 224 2 223 1 222 2 221 1 220 2 219 1 218 2 217 1 216 2 215 1 214 2 213 1 212 2 211 1 210 2 209 1 208 2 207 1 206 2 205 1 204 2 203 1 202 2 201 1 200 2 199 1 198 2 197 1 196 2 195 1 194 2 193 1 192 ...

result:

ok correct

Test #20:

score: 0
Accepted
time: 28ms
memory: 3772kb

input:

6712 114

output:

122 2 121 1 120 2 119 1 118 2 117 1 116 2 115 1 114 2 113 1 112 2 111 1 110 2 109 1 108 2 107 1 106 2 105 1 104 2 103 1 102 2 101 1 100 2 99 1 98 2 97 1 96 2 95 1 94 2 93 1 92 2 91 1 90 2 89 1 88 2 87 1 86 2 85 1 84 2 83 1 82 2 81 1 80 2 79 1 78 2 77 1 76 2 75 1 74 2 73 1 72 2 71 1 70 2 69 1 68 2 67...

result:

ok correct

Test #21:

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

input:

1050 114

output:

122 2 121 1 120 2 119 1 118 2 117 1 116 2 115 1 114 2 113 1 112 2 111 1 110 2 109 1 108 2 107 1 106 2 105 1 104 2 103 1 102 2 101 1 100 2 99 1 98 2 97 1 96 2 95 1 94 2 93 1 92 2 91 1 90 2 89 1 88 2 87 1 86 2 85 1 84 2 83 1 82 2 81 1 80 2 79 1 78 2 77 1 76 2 75 1 74 2 73 1 72 2 71 1 70 2 69 1 68 2 67...

result:

ok correct

Test #22:

score: 0
Accepted
time: 21ms
memory: 3764kb

input:

1132 514

output:

522 2 521 1 520 2 519 1 518 2 517 1 516 2 515 1 514 2 513 1 512 2 511 1 510 2 509 1 508 2 507 1 506 2 505 1 504 2 503 1 502 2 501 1 500 2 499 1 498 2 497 1 496 2 495 1 494 2 493 1 492 2 491 1 490 2 489 1 488 2 487 1 486 2 485 1 484 2 483 1 482 2 481 1 480 2 479 1 478 2 477 1 476 2 475 1 474 2 473 1 ...

result:

ok correct

Test #23:

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

input:

1130 514

output:

522 2 521 1 520 2 519 1 518 2 517 1 516 2 515 1 514 2 513 1 512 2 511 1 510 2 509 1 508 2 507 1 506 2 505 1 504 2 503 1 502 2 501 1 500 2 499 1 498 2 497 1 496 2 495 1 494 2 493 1 492 2 491 1 490 2 489 1 488 2 487 1 486 2 485 1 484 2 483 1 482 2 481 1 480 2 479 1 478 2 477 1 476 2 475 1 474 2 473 1 ...

result:

ok correct

Subtask #5:

score: 35
Accepted

Dependency #1:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #24:

score: 35
Accepted
time: 19ms
memory: 3880kb

input:

1151 564

output:

568 2 567 1 566 2 565 1 564 2 563 1 562 2 561 1 560 2 559 1 558 2 557 1 556 2 555 1 554 2 553 1 552 2 551 1 550 2 549 1 548 2 547 1 546 2 545 1 544 2 543 1 542 2 541 1 540 2 539 1 538 2 537 1 536 2 535 1 534 2 533 1 532 2 531 1 530 2 529 1 528 2 527 1 526 2 525 1 524 2 523 1 522 2 521 1 520 2 519 1 ...

result:

ok correct

Test #25:

score: 0
Accepted
time: 19ms
memory: 3772kb

input:

1042 511

output:

516 2 515 1 514 2 513 1 512 2 511 1 510 2 509 1 508 2 507 1 506 2 505 1 504 2 503 1 502 2 501 1 500 2 499 1 498 2 497 1 496 2 495 1 494 2 493 1 492 2 491 1 490 2 489 1 488 2 487 1 486 2 485 1 484 2 483 1 482 2 481 1 480 2 479 1 478 2 477 1 476 2 475 1 474 2 473 1 472 2 471 1 470 2 469 1 468 2 467 1 ...

result:

ok correct

Test #26:

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

input:

1170 575

output:

580 2 579 1 578 2 577 1 576 2 575 1 574 2 573 1 572 2 571 1 570 2 569 1 568 2 567 1 566 2 565 1 564 2 563 1 562 2 561 1 560 2 559 1 558 2 557 1 556 2 555 1 554 2 553 1 552 2 551 1 550 2 549 1 548 2 547 1 546 2 545 1 544 2 543 1 542 2 541 1 540 2 539 1 538 2 537 1 536 2 535 1 534 2 533 1 532 2 531 1 ...

result:

ok correct

Test #27:

score: 0
Accepted
time: 28ms
memory: 3764kb

input:

1249 615

output:

620 2 619 1 618 2 617 1 616 2 615 1 614 2 613 1 612 2 611 1 610 2 609 1 608 2 607 1 606 2 605 1 604 2 603 1 602 2 601 1 600 2 599 1 598 2 597 1 596 2 595 1 594 2 593 1 592 2 591 1 590 2 589 1 588 2 587 1 586 2 585 1 584 2 583 1 582 2 581 1 580 2 579 1 578 2 577 1 576 2 575 1 574 2 573 1 572 2 571 1 ...

result:

ok correct

Test #28:

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

input:

746 364

output:

368 2 367 1 366 2 365 1 364 2 363 1 362 2 361 1 360 2 359 1 358 2 357 1 356 2 355 1 354 2 353 1 352 2 351 1 350 2 349 1 348 2 347 1 346 2 345 1 344 2 343 1 342 2 341 1 340 2 339 1 338 2 337 1 336 2 335 1 334 2 333 1 332 2 331 1 330 2 329 1 328 2 327 1 326 2 325 1 324 2 323 1 322 2 321 1 320 2 319 1 ...

result:

ok correct

Test #29:

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

input:

1146 565

output:

2 573 1 572 2 571 1 570 2 569 1 568 2 567 1 566 2 565 1 564 2 563 1 562 2 561 1 560 2 559 1 558 2 557 1 556 2 555 1 554 2 553 1 552 2 551 1 550 2 549 1 548 2 547 1 546 2 545 1 544 2 543 1 542 2 541 1 540 2 539 1 538 2 537 1 536 2 535 1 534 2 533 1 532 2 531 1 530 2 529 1 528 2 527 1 526 2 525 1 524 ...

result:

ok correct

Test #30:

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

input:

554 265

output:

2 273 1 272 2 271 1 270 2 269 1 268 2 267 1 266 2 265 1 264 2 263 1 262 2 261 1 260 2 259 1 258 2 257 1 256 2 255 1 254 2 253 1 252 2 251 1 250 2 249 1 248 2 247 1 246 2 245 1 244 2 243 1 242 2 241 1 240 2 239 1 238 2 237 1 236 2 235 1 234 2 233 1 232 2 231 1 230 2 229 1 228 2 227 1 226 2 225 1 224 ...

result:

ok correct

Test #31:

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

input:

1061 519

output:

524 2 523 1 522 2 521 1 520 2 519 1 518 2 517 1 516 2 515 1 514 2 513 1 512 2 511 1 510 2 509 1 508 2 507 1 506 2 505 1 504 2 503 1 502 2 501 1 500 2 499 1 498 2 497 1 496 2 495 1 494 2 493 1 492 2 491 1 490 2 489 1 488 2 487 1 486 2 485 1 484 2 483 1 482 2 481 1 480 2 479 1 478 2 477 1 476 2 475 1 ...

result:

ok correct

Test #32:

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

input:

173 78

output:

86 2 85 1 84 2 83 1 82 2 81 1 80 2 79 1 78 2 77 1 76 2 75 1 74 2 73 1 72 2 71 1 70 2 69 1 68 2 67 1 66 2 65 1 64 2 63 1 62 2 61 1 60 2 59 1 58 2 57 1 56 2 55 1 54 2 53 1 52 2 51 1 50 2 49 1 48 2 47 1 46 2 45 1 44 2 43 1 42 2 41 1 40 2 39 1 38 2 37 1 36 2 35 1 34 2 33 1 32 2 31 1 30 2 29 1 28 2 27 1 ...

result:

ok correct

Test #33:

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

input:

884 430

output:

438 2 437 1 436 2 435 1 434 2 433 1 432 2 431 1 430 2 429 1 428 2 427 1 426 2 425 1 424 2 423 1 422 2 421 1 420 2 419 1 418 2 417 1 416 2 415 1 414 2 413 1 412 2 411 1 410 2 409 1 408 2 407 1 406 2 405 1 404 2 403 1 402 2 401 1 400 2 399 1 398 2 397 1 396 2 395 1 394 2 393 1 392 2 391 1 390 2 389 1 ...

result:

ok correct

Test #34:

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

input:

1089 537

output:

2 545 1 544 2 543 1 542 2 541 1 540 2 539 1 538 2 537 1 536 2 535 1 534 2 533 1 532 2 531 1 530 2 529 1 528 2 527 1 526 2 525 1 524 2 523 1 522 2 521 1 520 2 519 1 518 2 517 1 516 2 515 1 514 2 513 1 512 2 511 1 510 2 509 1 508 2 507 1 506 2 505 1 504 2 503 1 502 2 501 1 500 2 499 1 498 2 497 1 496 ...

result:

ok correct

Test #35:

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

input:

433 207

output:

212 2 211 1 210 2 209 1 208 2 207 1 206 2 205 1 204 2 203 1 202 2 201 1 200 2 199 1 198 2 197 1 196 2 195 1 194 2 193 1 192 2 191 1 190 2 189 1 188 2 187 1 186 2 185 1 184 2 183 1 182 2 181 1 180 2 179 1 178 2 177 1 176 2 175 1 174 2 173 1 172 2 171 1 170 2 169 1 168 2 167 1 166 2 165 1 164 2 163 1 ...

result:

ok correct