QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#296788#7868. 天空度假山庄OccDreamer100 ✓43ms3868kbC++14902b2024-01-03 16:31:322024-01-03 16:31:32

Judging History

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

  • [2024-01-03 16:31:32]
  • 评测
  • 测评结果:100
  • 用时:43ms
  • 内存:3868kb
  • [2024-01-03 16:31:32]
  • 提交

answer

//code by Emissary
#include<bits/stdc++.h>

using namespace std;

const int MAXN = 1e6+5;

int n, k;

inline int getmod(int x){
	if(x<=n) return x;
	return x-n;
}

signed main(){
	scanf("%d%d",&n,&k);
	for(int i=1;i<n;++i){
		int u=max(k-1,0), d=u/4, now=getmod(i+4);
		for(int j=0;j<d;++j){
			printf("%d ",now);
			printf("%d ",i+1); now=getmod(now+2);;
			printf("%d ",now);
			printf("%d ",i); now=getmod(now+2);
		}
		u=k-d*4;
		if(u==2){
			printf("%d ",now);
			printf("%d ",i+1);
		}
		if(u==1){
			printf("%d ",i+1);
		}
		if(u==3){
			printf("%d ",now); now=getmod(now+2);
			printf("%d %d ",now,i+1);
		}
		if(u==4){
			printf("%d ",now); now=getmod(now+2);
			printf("%d %d %d ",now,i,i+1);
		}
	}
	return 0;
}





































































详细

Subtask #1:

score: 5
Accepted

Test #1:

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

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

input:

5166 2

output:

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

result:

ok correct

Test #3:

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

input:

7445 2

output:

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

result:

ok correct

Test #4:

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

input:

1295 2

output:

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

result:

ok correct

Subtask #2:

score: 20
Accepted

Test #5:

score: 20
Accepted
time: 24ms
memory: 3856kb

input:

86132 9

output:

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

result:

ok correct

Test #6:

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

input:

73452 11

output:

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

result:

ok correct

Test #7:

score: 0
Accepted
time: 17ms
memory: 3680kb

input:

23283 20

output:

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

result:

ok correct

Test #8:

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

input:

36944 17

output:

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

result:

ok correct

Test #9:

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

input:

61927 10

output:

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

result:

ok correct

Subtask #3:

score: 20
Accepted

Dependency #2:

100%
Accepted

Test #10:

score: 20
Accepted
time: 1ms
memory: 3856kb

input:

111 17

output:

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

result:

ok correct

Test #11:

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

input:

462 86

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 6 3 8 2 10 3 12 2 14 3 16 2 18 3 20 2 22 3 24 2 26 3 28 2 30 3 32 2 34 3 36 2 38 3 40 2 ...

result:

ok correct

Test #12:

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

input:

262 43

output:

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

result:

ok correct

Test #13:

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

input:

672 125

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #14:

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

input:

747 127

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #15:

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

input:

404 72

output:

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

result:

ok correct

Subtask #4:

score: 20
Accepted

Test #16:

score: 20
Accepted
time: 18ms
memory: 3636kb

input:

1777 229

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #17:

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

input:

1129 229

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #18:

score: 0
Accepted
time: 43ms
memory: 3640kb

input:

4253 233

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #19:

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

input:

2311 233

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #20:

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

input:

6712 114

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 6 3 8 2 1...

result:

ok correct

Test #21:

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

input:

1050 114

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 6 3 8 2 1...

result:

ok correct

Test #22:

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

input:

1132 514

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #23:

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

input:

1130 514

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

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: 27ms
memory: 3692kb

input:

1151 564

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #25:

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

input:

1042 511

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #26:

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

input:

1170 575

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #27:

score: 0
Accepted
time: 33ms
memory: 3712kb

input:

1249 615

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #28:

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

input:

746 364

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #29:

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

input:

1146 565

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #30:

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

input:

554 265

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #31:

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

input:

1061 519

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #32:

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

input:

173 78

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 6 3 8 2 10 3 12 2 14 3 16 2 18 3 20 2 22 3 24 2 26 3 28 2 30 3 32 2 34 3 36 2 38 3 40 2 42 3 44 2 46 3 48 2 ...

result:

ok correct

Test #33:

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

input:

884 430

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #34:

score: 0
Accepted
time: 22ms
memory: 3564kb

input:

1089 537

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct

Test #35:

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

input:

433 207

output:

5 2 7 1 9 2 11 1 13 2 15 1 17 2 19 1 21 2 23 1 25 2 27 1 29 2 31 1 33 2 35 1 37 2 39 1 41 2 43 1 45 2 47 1 49 2 51 1 53 2 55 1 57 2 59 1 61 2 63 1 65 2 67 1 69 2 71 1 73 2 75 1 77 2 79 1 81 2 83 1 85 2 87 1 89 2 91 1 93 2 95 1 97 2 99 1 101 2 103 1 105 2 107 1 109 2 111 1 113 2 115 1 117 2 119 1 121...

result:

ok correct