QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#831583#8903. Тайное посланиеas_lyr0 63ms7516kbC++141.0kb2024-12-25 15:33:162024-12-25 15:33:22

Judging History

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

  • [2024-12-25 15:33:22]
  • 评测
  • 测评结果:0
  • 用时:63ms
  • 内存:7516kb
  • [2024-12-25 15:33:16]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
const int INF=2e9;
int id,n,k;
vector <int> T,R;
void work(){
	int mx=0,val=0;
	for(int i=0;i<k;i++){
		int res=(T[(i+1)%k]-T[i]+n-1)%n+1;
		if(res>mx){
			mx=res;
			val=n-T[i+1]+1;
		}
	}
	for(int &x:T)
		x=(x+val-1)%n+1;
	sort(T.begin(),T.end());
	int cnt=0;
	for(int i=0;i<k;i++){
		cnt++;
		for(int j=T[i]+1;cnt&&j<(i==k-1?INF:T[i+1]);j++){
			R.push_back((j-1)%n+1);
			cnt--;
		}
	}
	for(int &x:R)
		x=(x+n-val-1)%n+1;
	sort(R.begin(),R.end());
}
void solve(){
	scanf("%d%d",&n,&k);
	T.clear(),R.clear();
	for(int i=0;i<k;i++){
		int x;
		scanf("%d",&x);
		T.push_back(x);
	}
	if(id==1){
		work();
		for(int i=0;i<k;i++)
			printf("%d ",R[i]);
		puts("");
	}
	else{
		for(int &x:T)
			x=n-x+1;
		sort(T.begin(),T.end());
		work();
		for(int &x:R)
			x=n-x+1;
		sort(R.begin(),R.end());
		for(int i=0;i<k;i++)
			printf("%d ",R[i]);
		puts("");
	}
}
int main(){
	scanf("%d",&id);
	int T;
	scanf("%d",&T);
	while(T--)
		solve();
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer on the first run

Test #1:

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

input:

1
1
5000 1
1666

output:

1667 

input:

2
1
5000 1
1667

output:

1666 

result:

ok correct! (1 test case)

Test #2:

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

input:

1
1
5000 1
4081

output:

4082 

input:

2
1
5000 1
4082

output:

4081 

result:

ok correct! (1 test case)

Test #3:

score: 0
Wrong Answer on the first run

input:

1
500
8 1
1
9 1
6
7 1
5
7 1
2
8 1
6
5 1
5
8 1
7
5 1
3
6 1
2
9 1
2
8 1
6
10 1
5
5 1
2
10 1
2
9 1
3
4 1
2
10 1
3
7 1
4
10 1
2
4 1
3
6 1
1
6 1
2
5 1
1
6 1
2
8 1
1
8 1
8
10 1
3
6 1
1
8 1
1
9 1
5
10 1
1
4 1
3
10 1
8
5 1
5
10 1
9
6 1
1
10 1
1
9 1
5
7 1
5
9 1
3
7 1
1
7 1
5
5 1
4
6 1
1
6 1
3
8 1
1
4 1
1
9 1...

output:

2 
7 
6 
3 
7 
1 
0 
4 
3 
3 
7 
6 
3 
3 
4 
3 
4 
5 
3 
0 
2 
3 
2 
3 
2 
1 
4 
2 
2 
6 
2 
0 
9 
1 
0 
2 
2 
6 
6 
4 
2 
6 
0 
2 
4 
2 
2 
3 
0 
3 
3 
4 
0 
1 
0 
5 
3 
2 
7 
1 
4 
4 
2 
1 
1 
0 
1 
1 
7 
0 
1 
1 
4 
1 
0 
4 
3 
2 
4 
4 
4 
1 
7 
2 
0 
5 
3 
3 
6 
5 
0 
6 
1 
2 
2 
6 
0 
2 
0 
4 
...

input:


output:


result:

wrong answer Integer parameter [name=R_i] equals to 0, violates the range [1, 8] (test case 7)

Subtask #2:

score: 0
Wrong Answer on the first run

Test #5:

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

input:

1
1
5000 2
90 2207

output:

91 2208 

input:

2
1
5000 2
91 2208

output:

90 2207 

result:

ok correct! (1 test case)

Test #6:

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

input:

1
1
5000 2
2142 3937

output:

2143 3938 

input:

2
1
5000 2
2143 3938

output:

2142 3937 

result:

ok correct! (1 test case)

Test #7:

score: 0
Wrong Answer on the first run

input:

1
833
4 2
1 3
6 2
2 4
4 2
1 2
5 2
3 4
6 2
3 5
5 2
2 4
5 2
2 3
6 2
1 6
4 2
1 4
5 2
4 5
6 2
2 3
5 2
1 3
4 2
1 2
4 2
2 3
5 2
2 4
5 2
2 5
4 2
1 3
5 2
2 4
4 2
2 3
5 2
1 5
4 2
2 3
6 2
3 5
6 2
1 2
4 2
2 4
4 2
1 3
5 2
1 3
5 2
2 3
4 2
2 4
6 2
3 6
6 2
1 6
6 2
3 6
5 2
4 5
4 2
1 4
5 2
1 2
4 2
3 4
4 2
1 4
6 2
4 ...

output:

2 4 
3 5 
0 3 
0 1 
0 4 
0 3 
0 4 
2 3 
2 3 
0 1 
4 5 
2 4 
0 3 
0 1 
0 3 
1 3 
2 4 
0 3 
0 1 
2 3 
0 1 
0 4 
3 4 
1 3 
2 4 
2 4 
0 4 
1 3 
1 4 
2 3 
1 4 
0 1 
2 3 
3 4 
0 1 
2 3 
1 5 
0 1 
0 1 
0 1 
3 4 
0 1 
1 5 
0 1 
3 5 
0 1 
1 4 
0 1 
0 3 
2 4 
3 6 
3 4 
3 4 
0 3 
0 4 
0 1 
0 1 
0 5 
3 4 
2 3 
...

input:


output:


result:

wrong answer Integer parameter [name=R_i] equals to 0, violates the range [1, 4] (test case 3)

Subtask #3:

score: 0
Wrong Answer on the first run

Test #10:

score: 0
Wrong Answer on the first run

input:

1
1
300000 150000
4 6 7 8 9 10 17 19 20 23 25 28 32 33 36 41 45 46 51 53 56 58 60 61 62 64 65 66 67 68 69 71 72 73 75 77 88 90 92 93 97 99 100 101 107 108 110 111 112 113 117 118 121 122 123 124 126 130 131 138 139 140 142 144 149 150 151 153 155 158 159 160 161 165 168 172 173 174 177 183 184 185 1...

output:

1 2 3 5 11 12 13 14 15 16 18 21 22 24 26 27 29 30 31 34 35 37 38 39 40 42 43 44 47 48 49 50 52 54 55 57 59 63 70 74 76 78 79 80 81 82 83 84 85 86 87 89 91 94 95 96 98 102 103 104 105 106 109 114 115 116 119 120 125 127 128 129 132 133 134 135 136 137 141 143 145 146 147 148 152 154 156 157 162 163 1...

input:


output:


result:

wrong answer you used 9079 but it is a part of the encrypted message (test case 1)

Subtask #4:

score: 0
Wrong Answer on the first run

Test #16:

score: 0
Wrong Answer on the first run

input:

1
714
4 1
4
5 2
2 5
4 2
1 2
4 2
3 4
3 1
3
7 2
2 4
4 1
4
4 2
1 4
2 1
2
6 2
2 3
6 1
4
3 1
1
6 1
4
2 1
2
7 2
4 5
3 1
2
3 1
3
4 2
1 4
7 3
2 4 7
7 3
3 5 7
6 2
2 5
6 2
3 4
7 1
5
3 1
1
7 1
7
6 3
1 2 3
2 1
1
4 1
4
4 1
1
4 2
1 2
5 1
4
6 2
1 2
4 1
3
6 2
3 4
7 1
7
7 2
4 7
6 1
4
7 2
3 5
7 3
3 4 6
4 1
4
6 3
2 4 ...

output:

1 
1 3 
0 3 
0 1 
1 
3 5 
1 
2 3 
1 
4 5 
5 
2 
5 
1 
0 6 
3 
1 
2 3 
1 3 5 
1 4 6 
3 6 
5 6 
6 
2 
1 
0 4 5 
2 
1 
2 
3 4 
5 
3 4 
4 
4 5 
1 
1 5 
5 
4 6 
0 1 5 
1 
1 3 5 
5 
4 
1 4 
1 
4 5 
1 4 
7 
3 
1 
2 
3 
5 
0 2 5 
3 
1 
3 
1 
3 4 6 
1 
5 
2 3 
2 
5 
1 4 
1 
2 
4 5 
1 
1 
6 7 
2 3 
1 
2 3 
1 ...

input:


output:


result:

wrong answer Integer parameter [name=R_i] equals to 0, violates the range [1, 4] (test case 3)

Subtask #5:

score: 0
Wrong Answer

Test #17:

score: 9
Accepted
time: 47ms
memory: 7468kb

input:

1
1
1000000000 300000
884 1150 3663 8801 12244 12286 12380 12406 15958 18962 23631 23706 26157 30339 30374 34575 37125 48953 50417 51665 54114 54300 55776 58495 63402 63487 67516 69176 70683 72867 73468 74810 80999 87487 93187 97368 97544 97891 101280 105464 110296 122351 124949 131540 136869 136936...

output:

885 1151 3664 8802 12245 12287 12381 12407 15959 18963 23632 23707 26158 30340 30375 34576 37126 48954 50418 51666 54115 54301 55777 58496 63403 63488 67517 69177 70684 72868 73469 74811 81000 87488 93188 97369 97545 97892 101281 105465 110297 122352 124950 131541 136870 136937 141504 143256 146417 ...

input:

2
1
1000000000 300000
885 1151 3664 8802 12245 12287 12381 12407 15959 18963 23632 23707 26158 30340 30375 34576 37126 48954 50418 51666 54115 54301 55777 58496 63403 63488 67517 69177 70684 72868 73469 74811 81000 87488 93188 97369 97545 97892 101281 105465 110297 122352 124950 131541 136870 136937...

output:

884 1150 3663 8801 12244 12286 12380 12406 15958 18962 23631 23706 26157 30339 30374 34575 37125 48953 50417 51665 54114 54300 55776 58495 63402 63487 67516 69176 70683 72867 73468 74810 80999 87487 93187 97368 97544 97891 101280 105464 110296 122351 124949 131540 136869 136936 141503 143255 146416 ...

result:

ok correct! (1 test case)

Test #18:

score: 9
Accepted
time: 55ms
memory: 7380kb

input:

1
1
10000000 300000
74 127 244 248 276 299 312 325 492 501 527 534 552 559 615 631 690 733 783 786 828 843 874 959 1100 1106 1109 1175 1209 1215 1233 1236 1300 1315 1376 1391 1458 1493 1548 1631 1660 1664 1671 1701 1710 1731 1767 1812 1815 1835 1867 1888 1903 1918 1923 1963 1986 2007 2033 2049 2054 ...

output:

75 128 245 249 277 300 313 326 493 502 528 535 553 560 616 632 691 734 784 787 829 844 875 960 1101 1107 1110 1176 1210 1216 1234 1237 1301 1316 1377 1392 1459 1494 1549 1632 1661 1665 1672 1702 1711 1732 1768 1813 1816 1836 1868 1889 1904 1919 1924 1964 1987 2008 2034 2050 2055 2116 2131 2134 2136 ...

input:

2
1
10000000 300000
75 128 245 249 277 300 313 326 493 502 528 535 553 560 616 632 691 734 784 787 829 844 875 960 1101 1107 1110 1176 1210 1216 1234 1237 1301 1316 1377 1392 1459 1494 1549 1632 1661 1665 1672 1702 1711 1732 1768 1813 1816 1836 1868 1889 1904 1919 1924 1964 1987 2008 2034 2050 2055 ...

output:

74 127 244 248 276 299 312 325 492 501 527 534 552 559 615 631 690 733 783 786 828 843 874 959 1100 1106 1109 1175 1209 1215 1233 1236 1300 1315 1376 1391 1458 1493 1548 1631 1660 1664 1671 1701 1710 1731 1767 1812 1815 1835 1867 1888 1903 1918 1923 1963 1986 2007 2033 2049 2054 2115 2130 2133 2135 ...

result:

ok correct! (1 test case)

Test #19:

score: 9
Accepted
time: 47ms
memory: 7516kb

input:

1
1
1000000 300000
2 7 14 16 19 21 25 27 30 34 37 40 42 44 46 48 50 54 59 64 66 70 73 76 78 82 84 87 89 91 94 96 99 101 106 109 111 115 118 121 128 132 136 138 143 145 148 150 152 154 158 160 162 164 166 171 173 176 178 180 182 185 189 192 194 197 200 203 206 208 212 214 218 221 223 228 235 238 240 ...

output:

3 8 15 17 20 22 26 28 31 35 38 41 43 45 47 49 51 55 60 65 67 71 74 77 79 83 85 88 90 92 95 97 100 102 107 110 112 116 119 122 129 133 137 139 144 146 149 151 153 155 159 161 163 165 167 172 174 177 179 181 183 186 190 193 195 198 201 204 207 209 213 215 219 222 224 229 236 239 241 243 245 251 253 25...

input:

2
1
1000000 300000
3 8 15 17 20 22 26 28 31 35 38 41 43 45 47 49 51 55 60 65 67 71 74 77 79 83 85 88 90 92 95 97 100 102 107 110 112 116 119 122 129 133 137 139 144 146 149 151 153 155 159 161 163 165 167 172 174 177 179 181 183 186 190 193 195 198 201 204 207 209 213 215 219 222 224 229 236 239 241...

output:

2 7 14 16 19 21 25 27 30 34 37 40 42 44 46 48 50 54 59 64 66 70 73 76 78 82 84 87 89 91 94 96 99 101 106 109 111 115 118 121 128 132 136 138 143 145 148 150 152 154 158 160 162 164 166 171 173 176 178 180 182 185 189 192 194 197 200 203 206 208 212 214 218 221 223 228 235 238 240 242 244 250 252 254...

result:

ok correct! (1 test case)

Test #20:

score: 0
Wrong Answer
time: 53ms
memory: 7392kb

input:

1
1
1000000000 300000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 1...

output:

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 1...

input:

2
1
1000000000 300000
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166...

output:

3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 177 1...

result:

wrong answer Integer parameter [name=R_i] equals to 3, violates the range [1, 1] (test case 1)

Subtask #6:

score: 0
Wrong Answer

Test #30:

score: 9
Accepted
time: 45ms
memory: 7484kb

input:

1
1
1000000000 300000
408756052 408756979 408759607 408760032 408760051 408761093 408761416 408761494 408761726 408764755 408767605 408776555 408778463 408781171 408781316 408782320 408785971 408787248 408787812 408790957 408791686 408794839 408794850 408796477 408797483 408799152 408799165 40879929...

output:

408756053 408756980 408759608 408760033 408760052 408761094 408761417 408761495 408761727 408764756 408767606 408776556 408778464 408781172 408781317 408782321 408785972 408787249 408787813 408790958 408791687 408794840 408794851 408796478 408797484 408799153 408799166 408799299 408806129 408809966 ...

input:

2
1
1000000000 300000
408756053 408756980 408759608 408760033 408760052 408761094 408761417 408761495 408761727 408764756 408767606 408776556 408778464 408781172 408781317 408782321 408785972 408787249 408787813 408790958 408791687 408794840 408794851 408796478 408797484 408799153 408799166 40879929...

output:

408756052 408756979 408759607 408760032 408760051 408761093 408761416 408761494 408761726 408764755 408767605 408776555 408778463 408781171 408781316 408782320 408785971 408787248 408787812 408790957 408791686 408794839 408794850 408796477 408797483 408799152 408799165 408799298 408806128 408809965 ...

result:

ok correct! (1 test case)

Test #31:

score: 9
Accepted
time: 48ms
memory: 7472kb

input:

1
1
1000000 300000
101763 101764 101766 101772 101773 101779 101780 101781 101783 101785 101786 101787 101788 101790 101791 101793 101795 101796 101798 101801 101803 101805 101806 101807 101808 101809 101810 101812 101814 101816 101817 101818 101819 101820 101821 101823 101824 101826 101828 101832 1...

output:

101765 101767 101768 101774 101775 101782 101784 101789 101792 101794 101797 101799 101800 101802 101804 101811 101813 101815 101822 101825 101827 101829 101830 101831 101833 101836 101837 101838 101840 101841 101842 101845 101846 101847 101848 101851 101852 101853 101855 101857 101866 101868 101870...

input:

2
1
1000000 300000
101765 101767 101768 101774 101775 101782 101784 101789 101792 101794 101797 101799 101800 101802 101804 101811 101813 101815 101822 101825 101827 101829 101830 101831 101833 101836 101837 101838 101840 101841 101842 101845 101846 101847 101848 101851 101852 101853 101855 101857 1...

output:

101763 101764 101766 101772 101773 101779 101780 101781 101783 101785 101786 101787 101788 101790 101791 101793 101795 101796 101798 101801 101803 101805 101806 101807 101808 101809 101810 101812 101814 101816 101817 101818 101819 101820 101821 101823 101824 101826 101828 101832 101834 101835 101839...

result:

ok correct! (1 test case)

Test #32:

score: 9
Accepted
time: 43ms
memory: 7276kb

input:

1
1
2000000 300000
853089 853090 853091 853093 853095 853101 853103 853105 853111 853115 853117 853119 853120 853126 853127 853137 853144 853147 853149 853151 853164 853165 853166 853168 853169 853170 853175 853178 853188 853197 853199 853202 853209 853213 853214 853218 853221 853223 853226 853227 8...

output:

853092 853094 853096 853097 853098 853102 853104 853106 853112 853116 853118 853121 853122 853128 853129 853138 853145 853148 853150 853152 853167 853171 853172 853173 853174 853176 853177 853179 853189 853198 853200 853203 853210 853215 853216 853219 853222 853224 853228 853229 853233 853238 853243...

input:

2
1
2000000 300000
853092 853094 853096 853097 853098 853102 853104 853106 853112 853116 853118 853121 853122 853128 853129 853138 853145 853148 853150 853152 853167 853171 853172 853173 853174 853176 853177 853179 853189 853198 853200 853203 853210 853215 853216 853219 853222 853224 853228 853229 8...

output:

853089 853090 853091 853093 853095 853101 853103 853105 853111 853115 853117 853119 853120 853126 853127 853137 853144 853147 853149 853151 853164 853165 853166 853168 853169 853170 853175 853178 853188 853197 853199 853202 853209 853213 853214 853218 853221 853223 853226 853227 853232 853237 853242...

result:

ok correct! (1 test case)

Test #33:

score: 9
Accepted
time: 48ms
memory: 7388kb

input:

1
1
4000000 300000
1561077 1561083 1561085 1561087 1561101 1561103 1561119 1561128 1561131 1561147 1561150 1561155 1561160 1561171 1561173 1561175 1561176 1561189 1561197 1561199 1561200 1561203 1561205 1561208 1561219 1561233 1561241 1561242 1561262 1561264 1561280 1561284 1561291 1561299 1561304 1...

output:

1561078 1561084 1561086 1561088 1561102 1561104 1561120 1561129 1561132 1561148 1561151 1561156 1561161 1561172 1561174 1561177 1561178 1561190 1561198 1561201 1561202 1561204 1561206 1561209 1561220 1561234 1561243 1561244 1561263 1561265 1561281 1561285 1561292 1561300 1561305 1561308 1561311 1561...

input:

2
1
4000000 300000
1561078 1561084 1561086 1561088 1561102 1561104 1561120 1561129 1561132 1561148 1561151 1561156 1561161 1561172 1561174 1561177 1561178 1561190 1561198 1561201 1561202 1561204 1561206 1561209 1561220 1561234 1561243 1561244 1561263 1561265 1561281 1561285 1561292 1561300 1561305 1...

output:

1561077 1561083 1561085 1561087 1561101 1561103 1561119 1561128 1561131 1561147 1561150 1561155 1561160 1561171 1561173 1561175 1561176 1561189 1561197 1561199 1561200 1561203 1561205 1561208 1561219 1561233 1561241 1561242 1561262 1561264 1561280 1561284 1561291 1561299 1561304 1561307 1561310 1561...

result:

ok correct! (1 test case)

Test #34:

score: 9
Accepted
time: 48ms
memory: 7372kb

input:

1
1
1000000000 300000
805298423 805298424 805298425 805298427 805298429 805298431 805298432 805298434 805298439 805298441 805298444 805298448 805298451 805298452 805298453 805298454 805298455 805298458 805298460 805298463 805298466 805298469 805298471 805298473 805298477 805298478 805298479 80529848...

output:

805298426 805298428 805298430 805298433 805298435 805298436 805298437 805298438 805298440 805298442 805298445 805298449 805298456 805298457 805298459 805298461 805298462 805298464 805298465 805298467 805298468 805298470 805298472 805298474 805298480 805298483 805298488 805298490 805298491 805298492 ...

input:

2
1
1000000000 300000
805298426 805298428 805298430 805298433 805298435 805298436 805298437 805298438 805298440 805298442 805298445 805298449 805298456 805298457 805298459 805298461 805298462 805298464 805298465 805298467 805298468 805298470 805298472 805298474 805298480 805298483 805298488 80529849...

output:

805298423 805298424 805298425 805298427 805298429 805298431 805298432 805298434 805298439 805298441 805298444 805298448 805298451 805298452 805298453 805298454 805298455 805298458 805298460 805298463 805298466 805298469 805298471 805298473 805298477 805298478 805298479 805298481 805298482 805298484 ...

result:

ok correct! (1 test case)

Test #35:

score: 0
Wrong Answer
time: 63ms
memory: 7484kb

input:

1
1
1000000000 300000
1 4 5 7 8 11 12 13 15 16 21 23 24 25 34 35 37 38 39 42 43 47 48 49 54 59 62 64 65 66 67 68 71 72 73 74 75 76 82 83 84 85 87 88 89 91 93 94 100 101 104 105 106 107 108 111 112 115 116 117 119 123 124 126 127 129 131 133 138 139 142 143 146 147 148 149 152 153 154 155 156 157 158...

output:

2 6 9 10 14 17 18 19 20 22 26 27 28 29 36 40 41 44 45 46 50 51 52 53 55 60 63 69 70 77 78 79 80 81 86 90 92 95 96 97 98 99 102 103 109 110 113 114 118 120 121 122 125 128 130 132 134 135 136 137 140 141 144 145 150 151 159 160 161 164 166 167 168 171 172 174 175 178 180 181 182 183 185 189 190 191 1...

input:

2
1
1000000000 300000
2 6 9 10 14 17 18 19 20 22 26 27 28 29 36 40 41 44 45 46 50 51 52 53 55 60 63 69 70 77 78 79 80 81 86 90 92 95 96 97 98 99 102 103 109 110 113 114 118 120 121 122 125 128 130 132 134 135 136 137 140 141 144 145 150 151 159 160 161 164 166 167 168 171 172 174 175 178 180 181 182...

output:

4 5 7 8 11 12 13 15 16 21 23 24 25 34 35 37 38 39 42 43 47 48 49 54 59 62 64 65 66 67 68 71 72 73 74 75 76 82 83 84 85 87 88 89 91 93 94 100 101 104 105 106 107 108 111 112 115 116 117 119 123 124 126 127 129 131 133 138 139 142 143 146 147 148 149 152 153 154 155 156 157 158 162 163 165 169 170 173...

result:

wrong answer Integer parameter [name=R_i] equals to 4, violates the range [1, 1] (test case 1)

Subtask #7:

score: 0
Wrong Answer

Test #45:

score: 10
Accepted
time: 1ms
memory: 3916kb

input:

1
1
5000 1000
8 12 13 25 39 41 44 46 47 48 50 51 54 56 60 64 68 70 72 76 80 89 90 97 99 103 110 112 117 118 119 122 123 131 132 133 134 141 157 166 170 173 189 190 192 195 196 197 210 218 220 222 223 229 235 238 240 249 251 252 254 266 267 270 274 276 282 286 288 291 292 293 294 295 305 306 307 309 ...

output:

9 14 15 26 40 42 45 49 52 53 55 57 58 59 61 65 69 71 73 77 81 91 92 98 100 104 111 113 120 121 124 125 126 135 136 137 138 142 158 167 171 174 191 193 194 198 199 200 211 219 221 224 225 230 236 239 241 250 253 255 256 268 269 271 275 277 283 287 289 296 297 298 299 300 308 311 312 313 314 317 322 3...

input:

2
1
5000 1000
9 14 15 26 40 42 45 49 52 53 55 57 58 59 61 65 69 71 73 77 81 91 92 98 100 104 111 113 120 121 124 125 126 135 136 137 138 142 158 167 171 174 191 193 194 198 199 200 211 219 221 224 225 230 236 239 241 250 253 255 256 268 269 271 275 277 283 287 289 296 297 298 299 300 308 311 312 313...

output:

8 12 13 25 39 41 44 46 47 48 50 51 54 56 60 64 68 70 72 76 80 89 90 97 99 103 110 112 117 118 119 122 123 131 132 133 134 141 157 166 170 173 189 190 192 195 196 197 210 218 220 222 223 229 235 238 240 249 251 252 254 266 267 270 274 276 282 286 288 291 292 293 294 295 305 306 307 309 310 316 321 32...

result:

ok correct! (1 test case)

Test #46:

score: 10
Accepted
time: 1ms
memory: 3916kb

input:

1
1
5000 1500
10 11 13 16 17 19 20 21 24 25 27 28 30 31 34 36 37 43 46 47 50 51 52 54 55 56 57 59 60 61 63 65 67 70 71 72 75 76 78 81 82 83 84 85 86 87 91 93 96 99 100 101 102 104 105 111 112 114 115 116 118 122 125 126 127 128 132 134 137 138 141 151 153 154 156 157 158 159 161 164 167 172 173 174 ...

output:

12 14 15 18 22 23 26 29 32 33 35 38 39 40 41 42 44 45 48 49 53 58 62 64 66 68 69 73 74 77 79 80 88 89 90 92 94 95 97 98 103 106 107 108 109 110 113 117 119 120 121 123 124 129 130 131 133 135 136 139 140 142 143 144 145 146 147 148 149 150 152 155 160 162 163 165 166 168 169 170 171 175 177 178 181 ...

input:

2
1
5000 1500
12 14 15 18 22 23 26 29 32 33 35 38 39 40 41 42 44 45 48 49 53 58 62 64 66 68 69 73 74 77 79 80 88 89 90 92 94 95 97 98 103 106 107 108 109 110 113 117 119 120 121 123 124 129 130 131 133 135 136 139 140 142 143 144 145 146 147 148 149 150 152 155 160 162 163 165 166 168 169 170 171 17...

output:

10 11 13 16 17 19 20 21 24 25 27 28 30 31 34 36 37 43 46 47 50 51 52 54 55 56 57 59 60 61 63 65 67 70 71 72 75 76 78 81 82 83 84 85 86 87 91 93 96 99 100 101 102 104 105 111 112 114 115 116 118 122 125 126 127 128 132 134 137 138 141 151 153 154 156 157 158 159 161 164 167 172 173 174 176 179 180 18...

result:

ok correct! (1 test case)

Test #47:

score: 0
Wrong Answer
time: 1ms
memory: 3972kb

input:

1
1
5000 2000
1 2 3 5 8 9 10 11 12 13 15 16 19 21 22 23 24 25 28 29 32 36 37 40 41 42 43 44 45 46 48 49 50 51 55 56 57 58 59 60 62 64 65 68 69 72 73 74 75 76 78 79 80 81 82 83 84 85 87 88 92 93 94 96 97 98 99 100 101 103 104 105 106 109 112 115 116 117 118 119 120 123 126 128 130 132 133 135 136 139...

output:

4 6 7 14 17 18 20 26 27 30 31 33 34 35 38 39 47 52 53 54 61 63 66 67 70 71 77 86 89 90 91 95 102 107 108 110 111 113 114 121 122 124 125 127 129 131 134 137 138 140 144 145 149 152 153 159 162 163 164 165 170 179 182 187 188 191 193 196 198 199 201 203 204 206 208 210 211 214 215 224 226 235 241 242...

input:

2
1
5000 2000
4 6 7 14 17 18 20 26 27 30 31 33 34 35 38 39 47 52 53 54 61 63 66 67 70 71 77 86 89 90 91 95 102 107 108 110 111 113 114 121 122 124 125 127 129 131 134 137 138 140 144 145 149 152 153 159 162 163 164 165 170 179 182 187 188 191 193 196 198 199 201 203 204 206 208 210 211 214 215 224 2...

output:

2 3 5 8 9 10 11 12 13 15 16 19 21 22 23 24 25 28 29 32 36 37 40 41 42 43 44 45 46 48 49 50 51 55 56 57 58 59 60 62 64 65 68 69 72 73 74 75 76 78 79 80 81 82 83 84 85 87 88 92 93 94 96 97 98 99 100 101 103 104 105 106 109 112 115 116 117 118 119 120 123 126 128 130 132 133 135 136 139 141 142 143 146...

result:

wrong answer Integer parameter [name=R_i] equals to 2, violates the range [1, 1] (test case 1)

Subtask #8:

score: 0
Wrong Answer

Test #55:

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

input:

1
1
100 30
1 8 9 10 12 17 22 24 25 27 28 29 32 33 34 42 45 47 50 52 54 56 62 71 79 81 85 86 90 94

output:

2 11 13 14 15 18 23 26 30 31 35 36 37 38 39 43 46 48 51 53 55 57 63 72 80 82 87 88 91 95 

input:

2
1
100 30
2 11 13 14 15 18 23 26 30 31 35 36 37 38 39 43 46 48 51 53 55 57 63 72 80 82 87 88 91 95

output:

1 8 9 10 12 17 22 24 25 27 28 29 32 33 34 42 45 47 50 52 54 56 62 71 79 81 85 86 90 94 

result:

ok correct! (1 test case)

Test #56:

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

input:

1
1
100 10
1 3 19 30 33 65 79 91 92 95

output:

2 4 20 31 34 66 80 93 94 96 

input:

2
1
100 10
2 4 20 31 34 66 80 93 94 96

output:

1 3 19 30 33 65 79 91 92 95 

result:

ok correct! (1 test case)

Test #57:

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

input:

1
1
100 40
5 8 10 14 16 17 21 24 27 31 32 33 34 35 37 39 40 44 49 50 51 53 58 61 62 67 69 70 72 74 75 76 77 85 87 90 93 96 97 99

output:

1 6 9 11 15 18 19 22 25 28 36 38 41 42 43 45 46 47 48 52 54 55 56 59 63 64 68 71 73 78 79 80 81 82 86 88 91 94 98 100 

input:

2
1
100 40
1 6 9 11 15 18 19 22 25 28 36 38 41 42 43 45 46 47 48 52 54 55 56 59 63 64 68 71 73 78 79 80 81 82 86 88 91 94 98 100

output:

5 8 10 14 16 17 21 24 27 31 32 33 34 35 37 39 40 44 49 50 51 53 58 61 62 67 69 70 72 74 75 76 77 85 87 90 93 96 97 99 

result:

ok correct! (1 test case)

Test #58:

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

input:

1
1
100 50
5 6 8 12 15 16 17 19 20 23 26 29 30 32 34 38 39 40 41 42 44 46 50 51 54 60 61 62 63 64 65 66 67 68 69 71 74 75 79 80 81 82 86 87 90 91 92 94 98 99

output:

1 2 3 4 7 9 10 11 13 14 18 21 22 24 25 27 28 31 33 35 36 37 43 45 47 48 49 52 53 55 56 57 58 59 70 72 73 76 77 78 83 84 85 88 89 93 95 96 97 100 

input:

2
1
100 50
1 2 3 4 7 9 10 11 13 14 18 21 22 24 25 27 28 31 33 35 36 37 43 45 47 48 49 52 53 55 56 57 58 59 70 72 73 76 77 78 83 84 85 88 89 93 95 96 97 100

output:

5 6 8 12 15 16 17 19 20 23 26 29 30 32 34 38 39 40 41 42 44 46 50 51 54 60 61 62 63 64 65 66 67 68 69 71 74 75 79 80 81 82 86 87 90 91 92 94 98 99 

result:

ok correct! (1 test case)

Test #59:

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

input:

1
1
100 20
28 31 32 33 34 35 38 39 40 41 43 44 45 46 47 51 52 53 55 56

output:

29 36 37 42 48 49 50 54 57 58 59 60 61 62 63 64 65 66 67 68 

input:

2
1
100 20
29 36 37 42 48 49 50 54 57 58 59 60 61 62 63 64 65 66 67 68

output:

28 31 32 33 34 35 38 39 40 41 43 44 45 46 47 51 52 53 55 56 

result:

ok correct! (1 test case)

Test #60:

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

input:

1
1
100 30
2 3 6 7 8 9 10 11 13 15 16 18 19 22 24 77 78 80 82 83 84 85 88 89 93 94 96 97 98 99

output:

1 4 5 12 14 17 20 21 23 25 26 27 28 29 30 31 32 33 34 35 36 79 81 86 87 90 91 92 95 100 

input:

2
1
100 30
1 4 5 12 14 17 20 21 23 25 26 27 28 29 30 31 32 33 34 35 36 79 81 86 87 90 91 92 95 100

output:

2 3 6 7 8 9 10 11 13 15 16 18 19 22 24 77 78 80 82 83 84 85 88 89 93 94 96 97 98 99 

result:

ok correct! (1 test case)

Test #61:

score: 0
Wrong Answer
time: 0ms
memory: 3900kb

input:

1
1
100 40
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 21 23 24 25 27 28 33 34 35 36 38 41 42 44 45 46 49 51 52 53 57 60

output:

18 20 22 26 29 30 31 32 37 39 40 43 47 48 50 54 55 56 58 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 

input:

2
1
100 40
18 20 22 26 29 30 31 32 37 39 40 43 47 48 50 54 55 56 58 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

output:

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 21 23 24 25 27 28 33 34 35 36 38 41 42 44 45 46 49 51 52 53 57 60 101 

result:

wrong answer Integer parameter [name=R_i] equals to 2, violates the range [1, 1] (test case 1)

Subtask #9:

score: 0
Skipped

Subtask #10:

score: 0
Skipped

Subtask #11:

score: 0
Skipped

Subtask #12:

score: 0
Skipped