QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#535687#8903. Тайное посланиеDimash#9 155ms34840kbC++231.4kb2024-08-28 13:26:122024-08-28 13:26:12

Judging History

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

  • [2024-08-28 13:26:12]
  • 评测
  • 测评结果:9
  • 用时:155ms
  • 内存:34840kb
  • [2024-08-28 13:26:12]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
    
typedef long long ll;
const int  N = 1e6 + 12, MOD = 998244353;


int a[N];
void encode(int n,int k) {
    set<int> st;
    for(int i = 1;i <= k;i++) {
        cin >> a[i];
        st.insert(a[i]);
    }
    for(int i = 1;i <= k;i++) {
        int t = a[i] - 1;
        while(true) {
            if(!t) t = n;
            if(st.count(t)) {
                t--;
            } else {
                cout << t << ' ';
                st.insert(t);
                break;
            }
        }
    }
    cout << '\n';
}
void decode(int n,int k) {
    set<int> st;
    for(int i = 1;i <= k;i++) {
        cin >> a[i];
        st.insert(a[i]);
    }
    for(int i = 1;i <= k;i++) {
        int t = a[i] +1;
        while(true) {
            if(t == n + 1) t = 1;
            if(st.count(t)) {
                t++;
            } else {
                cout << t << ' ';
                st.insert(t);
                break;
            }
        }
    }
    cout << '\n';
}
void test() {
    int a;
    cin >> a;
    int m;
    cin >> m;
    while(m--) {
        int n,k;
        cin >> n >> k;
        if(a == 1) {
            encode(n,k);
        } else {
            decode(n,k);
        }
    }
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int t = 1; 
    // cin >> t;
    while(t--) {
        test();
    }
}

详细

Subtask #1:

score: 9
Accepted

Test #1:

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

input:

1
1
5000 1
1666

output:

1665 

input:

2
1
5000 1
1665

output:

1666 

result:

ok correct! (1 test case)

Test #2:

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

input:

1
1
5000 1
4081

output:

4080 

input:

2
1
5000 1
4080

output:

4081 

result:

ok correct! (1 test case)

Test #3:

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

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:

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

input:

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

output:

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

result:

ok correct! (500 test cases)

Test #4:

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

input:

1
100
5 1
1
38 1
31
6 1
3
32 1
12
49 1
7
21 1
8
15 1
5
10 1
7
11 1
3
31 1
1
19 1
8
9 1
3
27 1
27
36 1
18
13 1
12
17 1
6
18 1
16
46 1
21
36 1
1
13 1
3
44 1
34
29 1
5
19 1
1
43 1
7
22 1
19
39 1
36
19 1
2
4 1
3
36 1
26
44 1
4
6 1
5
47 1
29
23 1
8
7 1
7
45 1
35
37 1
9
18 1
11
2 1
1
44 1
3
22 1
22
43 1
9...

output:

5 
30 
2 
11 
6 
7 
4 
6 
2 
31 
7 
2 
26 
17 
11 
5 
15 
20 
36 
2 
33 
4 
19 
6 
18 
35 
1 
2 
25 
3 
4 
28 
7 
6 
34 
8 
10 
2 
2 
21 
8 
2 
5 
32 
15 
24 
24 
12 
4 
9 
13 
1 
1 
20 
1 
4 
1 
2 
1 
26 
8 
22 
2 
5 
7 
33 
7 
36 
2 
4 
35 
20 
16 
33 
1 
24 
1 
2 
1 
5 
3 
1 
4 
8 
8 
25 
28 
11 ...

input:

2
100
24 1
16
6 1
1
44 1
25
47 1
47
36 1
28
38 1
36
9 1
2
15 1
1
13 1
2
4 1
4
43 1
3
25 1
22
13 1
5
38 1
35
41 1
24
22 1
21
21 1
20
7 1
6
29 1
4
9 1
2
24 1
24
36 1
36
28 1
22
13 1
11
37 1
8
21 1
1
44 1
33
23 1
7
20 1
4
21 1
7
14 1
10
37 1
33
30 1
5
43 1
8
22 1
18
48 1
20
14 1
1
19 1
1
3 1
2
17 1
5
4...

output:

17 
2 
26 
1 
29 
37 
3 
2 
3 
1 
4 
23 
6 
36 
25 
22 
21 
7 
5 
3 
1 
1 
23 
12 
9 
2 
34 
8 
5 
8 
11 
34 
6 
9 
19 
21 
2 
2 
3 
6 
7 
27 
18 
5 
29 
3 
16 
3 
11 
12 
9 
1 
1 
2 
5 
4 
5 
14 
1 
2 
3 
31 
13 
10 
6 
2 
2 
8 
1 
12 
4 
27 
1 
13 
4 
1 
5 
26 
2 
35 
3 
7 
36 
8 
8 
8 
16 
9 
5 
...

result:

ok correct! (100 test cases)

Subtask #2:

score: 0
Wrong Answer

Test #5:

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

input:

1
1
5000 2
90 2207

output:

89 2206 

input:

2
1
5000 2
89 2206

output:

90 2207 

result:

ok correct! (1 test case)

Test #6:

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

input:

1
1
5000 2
2142 3937

output:

2141 3936 

input:

2
1
5000 2
2141 3936

output:

2142 3937 

result:

ok correct! (1 test case)

Test #7:

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

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:

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

input:

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

output:

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

result:

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

Subtask #3:

score: 0
Stage 1: Program answer Time Limit Exceeded

Test #10:

score: 0
Stage 1: Program answer Time Limit Exceeded

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:

3 5 2 1 300000 299996 16 18 15 22 24 27 31 30 35 40 44 43 50 52 55 57 59 54 49 63 48 47 42 39 38 70 37 34 74 76 87 89 91 86 96 98 95 94 106 105 109 104 103 102 116 115 120 119 114 85 125 129 128 137 136 135 141 143 148 147 146 152 154 157 156 145 134 164 167 171 170 169 176 182 181 180 186 190 189 1...

input:


output:


result:


Subtask #4:

score: 0
Wrong Answer

Test #16:

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

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:

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

input:

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

output:

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

result:

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

Subtask #5:

score: 0
Wrong Answer

Test #17:

score: 9
Accepted
time: 153ms
memory: 32924kb

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:

883 1149 3662 8800 12243 12285 12379 12405 15957 18961 23630 23705 26156 30338 30373 34574 37124 48952 50416 51664 54113 54299 55775 58494 63401 63486 67515 69175 70682 72866 73467 74809 80998 87486 93186 97367 97543 97890 101279 105463 110295 122350 124948 131539 136868 136935 141502 143254 146415 ...

input:

2
1
1000000000 300000
883 1149 3662 8800 12243 12285 12379 12405 15957 18961 23630 23705 26156 30338 30373 34574 37124 48952 50416 51664 54113 54299 55775 58494 63401 63486 67515 69175 70682 72866 73467 74809 80998 87486 93186 97367 97543 97890 101279 105463 110295 122350 124948 131539 136868 136935...

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: 150ms
memory: 34460kb

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:

73 126 243 247 275 298 311 324 491 500 526 533 551 558 614 630 689 732 782 785 827 842 873 958 1099 1105 1108 1174 1208 1214 1232 1235 1299 1314 1375 1390 1457 1492 1547 1630 1659 1663 1670 1700 1709 1730 1766 1811 1814 1834 1866 1887 1902 1917 1922 1962 1985 2006 2032 2048 2053 2114 2129 2132 2134 ...

input:

2
1
10000000 300000
73 126 243 247 275 298 311 324 491 500 526 533 551 558 614 630 689 732 782 785 827 842 873 958 1099 1105 1108 1174 1208 1214 1232 1235 1299 1314 1375 1390 1457 1492 1547 1630 1659 1663 1670 1700 1709 1730 1766 1811 1814 1834 1866 1887 1902 1917 1922 1962 1985 2006 2032 2048 2053 ...

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: 145ms
memory: 34840kb

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:

1 6 13 15 18 20 24 26 29 33 36 39 41 43 45 47 49 53 58 63 65 69 72 75 77 81 83 86 88 90 93 95 98 100 105 108 110 114 117 120 127 131 135 137 142 144 147 149 151 153 157 159 161 163 165 170 172 175 177 179 181 184 188 191 193 196 199 202 205 207 211 213 217 220 222 227 234 237 239 241 243 249 251 253...

input:

2
1
1000000 300000
1 6 13 15 18 20 24 26 29 33 36 39 41 43 45 47 49 53 58 63 65 69 72 75 77 81 83 86 88 90 93 95 98 100 105 108 110 114 117 120 127 131 135 137 142 144 147 149 151 153 157 159 161 163 165 170 172 175 177 179 181 184 188 191 193 196 199 202 205 207 211 213 217 220 222 227 234 237 239 ...

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: 155ms
memory: 34348kb

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:

1000000000 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 17...

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
Stage 1: Program answer Time Limit Exceeded

Test #30:

score: 9
Accepted
time: 150ms
memory: 32900kb

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:

408756051 408756978 408759606 408760031 408760050 408761092 408761415 408761493 408761725 408764754 408767604 408776554 408778462 408781170 408781315 408782319 408785970 408787247 408787811 408790956 408791685 408794838 408794849 408796476 408797482 408799151 408799164 408799297 408806127 408809964 ...

input:

2
1
1000000000 300000
408756051 408756978 408759606 408760031 408760050 408761092 408761415 408761493 408761725 408764754 408767604 408776554 408778462 408781170 408781315 408782319 408785970 408787247 408787811 408790956 408791685 408794838 408794849 408796476 408797482 408799151 408799164 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: 0
Stage 1: Program answer Time Limit Exceeded

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:

101762 101761 101765 101771 101770 101778 101777 101776 101782 101784 101775 101774 101769 101789 101768 101792 101794 101767 101797 101800 101802 101804 101799 101760 101759 101758 101757 101811 101813 101815 101756 101755 101754 101753 101752 101822 101751 101825 101827 101831 101833 101830 101838...

input:


output:


result:


Subtask #7:

score: 0
Wrong Answer

Test #45:

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

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:

7 11 10 24 38 40 43 45 42 37 49 36 53 55 59 63 67 69 71 75 79 88 87 96 98 102 109 111 116 115 114 121 120 130 129 128 127 140 156 165 169 172 188 187 191 194 193 186 209 217 219 221 216 228 234 237 239 248 250 247 253 265 264 269 273 275 281 285 287 290 289 284 283 280 304 303 302 308 301 315 320 32...

input:

2
1
5000 1000
7 10 11 24 36 37 38 40 42 43 45 49 53 55 59 63 67 69 71 75 79 87 88 96 98 102 109 111 114 115 116 120 121 127 128 129 130 140 156 165 169 172 186 187 188 191 193 194 209 216 217 219 221 228 234 237 239 247 248 250 253 264 265 269 273 275 280 281 283 284 285 287 289 290 301 302 303 304 ...

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: 0
Wrong Answer
time: 1ms
memory: 3676kb

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:

9 8 12 15 14 18 7 6 23 22 26 5 29 4 33 35 32 42 45 44 49 48 41 53 40 39 38 58 3 2 62 64 66 69 68 1 74 73 77 80 79 5000 4999 4998 4997 4996 90 92 95 98 97 94 89 103 88 110 109 113 108 107 117 121 124 123 120 119 131 133 136 135 140 150 152 149 155 148 147 146 160 163 166 171 170 169 175 178 177 181 1...

input:

2
1
5000 1500
1 2 3 4 5 6 7 8 9 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 107 108 109 110 113 117 119 120 121 123 124 131 133 135 136 140 145 146 147 148 149 150 152 155 160 162 163 165 166 168 169 170 171 175 177 178 ...

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 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 182 186 187 189 1...

result:

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

Subtask #8:

score: 0
Wrong Answer

Test #55:

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

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:

100 7 6 5 11 16 21 23 20 26 19 18 31 30 15 41 44 46 49 51 53 55 61 70 78 80 84 83 89 93 

input:

2
1
100 30
5 6 7 11 15 16 18 19 20 21 23 26 30 31 41 44 46 49 51 53 55 61 70 78 80 83 84 89 93 100

output:

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 1 

result:

wrong answer Integer parameter [name=R_i] equals to 8, 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