QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#535719 | #8903. Тайное послание | Dimash# | 100 ✓ | 289ms | 22432kb | C++23 | 2.6kb | 2024-08-28 13:49:58 | 2024-08-28 13:49:59 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e6 + 12, MOD = 998244353;
int a[N];
set<pair<int,int>> rr;
void ins(int x) {
auto it = rr.upper_bound(make_pair(x,(int)2e9));
it--;
auto [l,r] = (*it);
if(x > l) {
rr.insert({l,x - 1});
}
if(x < r) {
rr.insert({x + 1,r});
}
rr.erase({l,r});
}
int find_nx(int x) {
auto it = (*rr.rbegin());
if(it.second <= x) return -1;
auto it1 = rr.upper_bound(make_pair(x,(int)2e9));
if(it1 != rr.begin()) {
it1--;
}
if((*it1).second <= x) {
it1++;
}
return (x >= (*it1).first ? x + 1 : (*it1).first);
}
int find_prev(int x) {
auto it = (*rr.begin());
if(it.first >= x) return -1;
auto it1 = (rr.lower_bound(make_pair(x,0)));
it1--;
return min(x - 1,(*it1).second);
}
// 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 encode(int n,int k) {
rr.clear();
rr.insert({1,n});
for(int i = 1;i <= k;i++) {
cin >> a[i];
ins(a[i]);
}
for(int i = 1;i <= k;i++) {
int ans = find_prev(a[i]);
if(ans == -1) {
ans = find_prev(n + 1);
}
cout << ans << ' ';
ins(ans);
}
cout << '\n';
}
void decode(int n,int k) {
rr.clear();
rr.insert({1,n});
for(int i = 1;i <= k;i++) {
cin >> a[i];
ins(a[i]);
}
vector<int> res;
for(int i = 1;i <= k;i++) {
int ans = find_nx(a[i]);
if(ans == -1) {
ans = find_nx(0);
}
res.push_back(ans);
ins(ans);
}
sort(res.begin(),res.end());
for(int i:res) {
cout << i << ' ';
}
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();
}
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 9
Accepted
Test #1:
score: 9
Accepted
time: 0ms
memory: 3552kb
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: 3556kb
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: 3620kb
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: 11
Accepted
Test #5:
score: 11
Accepted
time: 0ms
memory: 3864kb
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: 3864kb
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: 11
Accepted
time: 1ms
memory: 3860kb
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 1 4 1 4 1 5 4 5 4 5 3 4 4 6 2 4 3 4 2 4 4 5 3 6 1 3 2 3 3 4 2 5 1 3 2 4 2 4 2 4 2 3 1 3 3 6 1 2 2 3 3 4 1 3 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 1 3 3 5 1 6 1 2 3 4 3 4 3 6 1 3 1 5 1 3 1 5 1 4 2 5 1 6 ...
result:
ok correct! (833 test cases)
Test #8:
score: 11
Accepted
time: 1ms
memory: 3828kb
input:
1 500 7 2 1 7 7 2 2 5 8 2 1 3 8 2 3 7 7 2 1 7 9 2 4 8 7 2 2 7 10 2 2 3 8 2 3 5 9 2 6 9 7 2 1 2 10 2 1 5 7 2 4 6 9 2 5 7 8 2 5 6 8 2 2 6 8 2 1 8 7 2 2 6 8 2 6 8 8 2 6 7 10 2 6 9 9 2 1 2 9 2 1 2 10 2 4 5 9 2 6 9 8 2 4 8 7 2 1 6 9 2 8 9 8 2 1 7 10 2 3 7 8 2 4 8 9 2 1 6 7 2 2 6 8 2 1 7 10 2 9 10 8 2 3 4...
output:
6 5 1 4 8 2 2 6 6 5 3 7 1 6 1 10 2 4 5 8 7 6 10 4 3 5 4 6 4 3 1 5 7 6 1 5 5 7 5 4 5 8 9 8 9 8 3 2 5 8 3 7 7 5 7 6 8 6 2 6 3 7 9 5 1 5 8 6 8 7 2 1 1 8 3 8 2 8 3 6 2 5 3 2 3 7 3 7 4 3 3 6 1 5 1 3 4 3 3 7 1 8 7 9 2 4 6 5 1 6 5 8 8 5 1 5 5 7 2 7...
input:
2 500 9 2 7 8 8 2 1 8 9 2 1 4 10 2 1 6 8 2 6 7 7 2 4 5 9 2 1 7 10 2 1 7 7 2 2 4 10 2 1 9 7 2 1 5 9 2 1 2 10 2 5 9 7 2 1 3 9 2 6 9 7 2 6 7 8 2 4 8 7 2 2 4 8 2 2 8 10 2 1 4 8 2 1 2 7 2 1 6 8 2 4 7 10 2 5 9 10 2 1 2 8 2 3 8 8 2 1 5 10 2 9 10 7 2 3 7 7 2 1 3 9 2 1 6 10 2 2 5 10 2 1 8 8 2 4 7 9 2 6 9 7 2...
output:
1 9 2 3 2 5 2 7 1 8 6 7 2 8 2 8 3 5 2 10 2 6 3 4 6 10 2 4 1 7 1 2 1 5 3 5 1 3 2 5 3 4 2 7 5 8 6 10 3 4 1 4 2 6 1 2 1 4 2 4 2 7 3 6 2 9 5 8 1 7 4 7 7 8 1 5 2 7 1 2 4 6 4 5 7 9 7 9 2 7 3 7 2 6 2 7 3 9 7 8 1 6 3 4 4 7 7 9 1 9 4 7 5 9 1 3 2 6 2 ...
result:
ok correct! (500 test cases)
Test #9:
score: 11
Accepted
time: 0ms
memory: 3852kb
input:
1 100 48 2 2 12 47 2 13 16 50 2 28 41 37 2 15 25 44 2 4 9 41 2 18 24 45 2 27 39 40 2 11 24 37 2 16 18 30 2 15 18 45 2 11 17 40 2 4 20 47 2 19 39 33 2 22 30 47 2 2 45 47 2 19 47 35 2 8 11 33 2 6 13 42 2 6 41 33 2 32 33 48 2 5 35 43 2 1 12 34 2 14 20 36 2 14 25 42 2 18 24 36 2 6 30 31 2 19 27 46 2 2 3...
output:
1 11 12 15 27 40 14 24 3 8 17 23 26 38 10 23 15 17 14 17 10 16 3 19 18 38 21 29 1 44 18 46 7 10 5 12 5 40 31 30 4 34 43 11 13 19 13 24 17 23 5 29 18 26 1 35 20 27 2 36 23 28 10 18 7 31 22 21 18 17 12 43 5 45 38 40 3 20 32 35 10 22 15 19 31 30 14 32 44 32 ...
input:
2 100 48 2 1 11 48 2 14 35 30 2 10 22 41 2 17 23 41 2 6 18 35 2 7 10 40 2 3 19 44 2 32 44 48 2 14 32 48 2 12 43 32 2 13 24 42 2 17 23 46 2 5 45 36 2 5 29 33 2 27 28 36 2 3 19 41 2 23 25 42 2 11 25 40 2 10 31 31 2 27 29 37 2 14 24 33 2 18 32 45 2 10 16 32 2 14 15 39 2 6 36 32 2 21 22 44 2 3 8 46 2 15...
output:
2 12 15 36 11 23 18 24 7 19 8 11 4 20 1 33 15 33 13 44 14 25 18 24 6 46 6 30 29 30 4 20 24 26 12 26 11 32 28 30 15 25 19 33 11 17 16 17 7 37 23 24 4 9 16 20 19 35 2 45 28 41 8 25 27 39 4 25 6 40 26 27 8 32 11 23 6 11 6 41 3 37 7 31 19 47 23 29 11 25 22 30...
result:
ok correct! (100 test cases)
Subtask #3:
score: 9
Accepted
Test #10:
score: 9
Accepted
time: 75ms
memory: 8020kb
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:
2 1 300000 150000 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...
output:
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 187 191 192 195 196...
result:
ok correct! (1 test case)
Test #11:
score: 9
Accepted
time: 54ms
memory: 8172kb
input:
1 1 300000 150000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 21 22 25 26 28 29 30 34 35 36 37 39 40 41 42 43 44 45 47 48 49 51 53 54 55 56 57 59 60 61 62 63 64 65 66 69 70 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 89 91 92 93 94 95 96 97 98 99 100 101 102 103 106 107 108 109 110 111 112 113 115...
output:
299997 299988 299987 299978 299977 299974 299961 299955 299952 299947 299946 299941 299938 299934 299930 299929 299920 18 20 299916 24 23 27 299906 299905 33 32 31 299899 38 299893 299891 299890 299886 299884 299882 46 299875 299871 50 52 299860 299857 299856 299854 58 299853 299848 299825 299824 29...
input:
2 1 300000 150000 18 20 23 24 27 31 32 33 38 46 50 52 58 67 68 71 73 88 90 104 105 114 120 121 128 129 145 156 158 159 165 168 174 178 182 187 195 198 201 206 207 211 214 223 224 227 231 238 239 241 250 252 253 256 257 266 268 277 278 282 284 296 298 302 306 311 314 316 320 321 322 324 326 327 328 3...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 21 22 25 26 28 29 30 34 35 36 37 39 40 41 42 43 44 45 47 48 49 51 53 54 55 56 57 59 60 61 62 63 64 65 66 69 70 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 89 91 92 93 94 95 96 97 98 99 100 101 102 103 106 107 108 109 110 111 112 113 115 116 117 118 119 1...
result:
ok correct! (1 test case)
Test #12:
score: 9
Accepted
time: 72ms
memory: 7132kb
input:
1 1 300000 150000 1 3 4 6 7 8 11 12 14 15 17 18 19 21 23 25 26 28 32 33 35 37 38 40 41 42 43 46 49 50 52 54 55 56 57 58 60 61 63 67 68 69 70 71 72 74 76 78 79 84 85 86 87 88 89 90 91 93 95 97 98 99 100 101 102 104 105 106 107 109 110 111 112 113 114 117 118 119 124 125 129 131 132 134 136 137 138 13...
output:
300000 2 299997 5 299996 299993 10 9 13 299992 16 299991 299988 20 22 24 299984 27 31 30 34 36 29 39 299982 299980 299978 45 48 47 51 53 44 299974 299970 299966 59 299964 62 66 65 64 299961 299955 299954 73 75 77 299951 83 82 81 80 299950 299949 299945 299943 92 94 96 299939 299937 299936 299932 299...
input:
2 1 300000 150000 2 5 9 10 13 16 20 22 24 27 29 30 31 34 36 39 44 45 47 48 51 53 59 62 64 65 66 73 75 77 80 81 82 83 92 94 96 103 108 115 116 120 121 122 123 126 127 128 130 133 135 142 144 146 153 157 160 163 166 168 180 183 185 186 187 190 192 194 195 197 198 205 207 208 212 218 219 220 224 226 22...
output:
1 3 4 6 7 8 11 12 14 15 17 18 19 21 23 25 26 28 32 33 35 37 38 40 41 42 43 46 49 50 52 54 55 56 57 58 60 61 63 67 68 69 70 71 72 74 76 78 79 84 85 86 87 88 89 90 91 93 95 97 98 99 100 101 102 104 105 106 107 109 110 111 112 113 114 117 118 119 124 125 129 131 132 134 136 137 138 139 140 141 143 145 ...
result:
ok correct! (1 test case)
Test #13:
score: 9
Accepted
time: 17ms
memory: 3640kb
input:
1 10000 6 3 1 4 5 6 3 1 2 4 20 10 3 4 5 10 12 14 16 17 18 20 8 4 5 6 7 8 2 1 2 20 10 2 3 8 9 11 12 13 15 18 19 14 7 1 3 4 6 9 13 14 14 7 1 2 3 7 9 10 11 10 5 1 2 5 7 9 30 15 1 6 7 8 10 12 13 14 16 17 18 19 22 26 30 26 13 3 5 6 7 8 9 11 12 16 17 18 24 25 6 3 1 4 6 8 4 1 4 6 7 16 8 2 3 5 9 10 13 15 16...
output:
6 3 2 6 5 3 2 1 19 9 11 13 15 8 7 6 4 3 2 1 1 1 20 7 6 10 5 4 14 17 16 12 2 11 5 8 10 7 14 13 12 6 8 5 4 10 8 4 6 3 29 5 4 3 9 11 2 28 15 27 25 24 21 23 20 2 4 1 26 23 22 10 21 15 14 13 20 19 5 3 2 8 3 5 2 1 14 4 8 7 12 11 6 1 4 7 6 3 3 2 2 1 26 5 4 8 3 12 11 2 23 22 18 21 20 12 11...
input:
2 10000 28 14 1 2 5 7 9 10 12 13 17 20 24 25 27 28 14 7 1 2 4 6 7 9 14 4 2 1 2 14 7 1 2 3 5 7 8 12 24 12 1 5 6 8 10 12 14 15 17 19 21 23 18 9 4 6 8 9 10 13 14 17 18 30 15 1 3 7 9 11 12 13 15 16 17 19 23 26 28 29 18 9 1 6 8 11 12 13 14 16 18 2 1 1 24 12 1 3 4 7 9 10 14 15 16 17 21 24 22 11 2 5 9 10 1...
output:
3 4 6 8 11 14 15 16 18 19 21 22 23 26 3 5 8 10 11 12 13 3 4 4 6 9 10 11 13 14 2 3 4 7 9 11 13 16 18 20 22 24 1 2 3 5 7 11 12 15 16 2 4 5 6 8 10 14 18 20 21 22 24 25 27 30 2 3 4 5 7 9 10 15 17 2 2 5 6 8 11 12 13 18 19 20 22 23 1 3 4 6 7 8 11 12 13 17 22 2 4 5 11 12 15 17 18 20 21 22 1 2 ...
result:
ok correct! (10000 test cases)
Test #14:
score: 9
Accepted
time: 28ms
memory: 3828kb
input:
1 1000 298 149 1 5 6 7 9 12 14 16 17 22 23 24 27 28 32 33 35 36 37 38 39 40 42 43 44 45 49 51 52 54 55 61 62 63 65 66 67 68 69 72 73 74 75 76 79 81 83 84 87 91 92 93 98 101 107 108 110 113 114 115 116 117 120 124 126 128 131 134 135 137 138 140 141 144 145 147 148 149 150 151 152 156 160 166 167 168...
output:
298 4 3 2 8 11 13 15 10 21 20 19 26 25 31 30 34 29 18 297 296 295 41 294 292 291 48 50 47 53 46 60 59 58 64 57 56 290 280 71 70 279 278 277 78 80 82 77 86 90 89 88 97 100 106 105 109 112 111 104 103 102 119 123 125 127 130 133 132 136 129 139 122 143 142 146 121 118 99 96 95 155 159 165 164 163 162 ...
input:
2 1000 200 100 1 2 3 5 7 10 13 16 17 18 19 21 22 24 25 27 28 30 31 34 36 37 39 40 41 45 46 47 51 52 53 54 59 60 63 64 65 66 67 68 70 72 80 82 86 87 90 92 94 95 96 97 98 99 100 102 104 105 107 108 111 114 115 120 127 129 130 133 138 140 141 143 144 146 147 149 150 151 152 154 158 162 164 166 169 173 ...
output:
4 6 8 9 11 12 14 15 20 23 26 29 32 33 35 38 42 43 44 48 49 50 55 56 57 58 61 62 69 71 73 74 75 76 77 78 79 81 83 84 85 88 89 91 93 101 103 106 109 110 112 113 116 117 118 119 121 122 123 124 125 126 128 131 132 134 135 136 137 139 142 145 148 153 155 156 157 159 160 161 163 165 167 168 170 171 172 1...
result:
ok correct! (1000 test cases)
Test #15:
score: 9
Accepted
time: 39ms
memory: 3900kb
input:
1 100 2202 1101 1 6 7 8 11 12 13 16 17 19 22 24 25 29 32 33 38 40 41 43 44 45 46 52 60 61 62 64 66 68 69 70 73 74 77 78 80 81 84 88 89 91 95 96 98 99 100 101 102 103 105 106 108 109 110 116 117 118 119 121 124 125 126 127 129 132 134 136 138 139 140 141 142 143 145 146 147 148 149 150 151 152 154 15...
output:
2202 5 4 3 10 9 2 15 14 18 21 23 20 28 31 30 37 39 36 42 35 34 27 51 59 58 57 63 65 67 56 55 72 71 76 75 79 54 83 87 86 90 94 93 97 92 85 82 53 50 104 49 107 48 47 115 114 113 112 120 123 122 111 26 128 131 133 135 137 130 2201 2199 2198 2195 144 2193 2192 2190 2189 2188 2187 2186 153 2183 2179 157 ...
input:
2 100 2180 1090 1 3 4 7 8 9 12 14 15 20 24 25 26 28 29 30 31 32 34 36 37 42 43 45 50 51 53 54 56 57 58 59 62 63 66 67 68 70 72 73 76 77 78 80 81 84 88 90 91 92 95 97 99 100 101 104 105 108 111 112 113 115 117 118 119 120 121 122 123 124 126 127 130 134 136 138 140 143 144 146 147 148 150 154 155 156...
output:
2 5 6 10 11 13 16 17 18 19 21 22 23 27 33 35 38 39 40 41 44 46 47 48 49 52 55 60 61 64 65 69 71 74 75 79 82 83 85 86 87 89 93 94 96 98 102 103 106 107 109 110 114 116 125 128 129 131 132 133 135 137 139 141 142 145 149 151 152 153 158 160 161 162 164 165 166 168 169 174 177 178 181 182 183 185 187 1...
result:
ok correct! (100 test cases)
Subtask #4:
score: 7
Accepted
Test #16:
score: 7
Accepted
time: 1ms
memory: 3628kb
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 1 4 1 1 1 3 6 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 1 3 2 4 1 2 1 2 1 3 1 2 4 3 3 3 6 1 3 4 2 1 1 3 5 1 3 3 2 1 1 2 1 1 2 1 3 2 3 5 1 3 3 3 2 2 2 5 4 5 1 2 3 1 6 2 3...
result:
ok correct! (714 test cases)
Subtask #5:
score: 9
Accepted
Test #17:
score: 9
Accepted
time: 289ms
memory: 22432kb
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: 275ms
memory: 21604kb
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: 267ms
memory: 20592kb
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: 9
Accepted
time: 220ms
memory: 19092kb
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:
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 167 169 171 173 175 177...
result:
ok correct! (1 test case)
Test #21:
score: 9
Accepted
time: 281ms
memory: 21608kb
input:
1 1 1000000000 300000 1 3 6 8 10 12 16 18 20 22 24 26 28 30 32 35 38 41 46 48 54 57 63 67 69 72 74 77 79 84 86 90 92 94 97 99 102 108 110 113 115 121 123 130 133 135 138 141 144 146 150 153 155 160 165 167 172 176 178 180 183 189 191 193 196 198 201 203 205 207 211 213 216 221 228 230 233 236 238 24...
output:
1000000000 2 5 7 9 11 15 17 19 21 23 25 27 29 31 34 37 40 45 47 53 56 62 66 68 71 73 76 78 83 85 89 91 93 96 98 101 107 109 112 114 120 122 129 132 134 137 140 143 145 149 152 154 159 164 166 171 175 177 179 182 188 190 192 195 197 200 202 204 206 210 212 215 220 227 229 232 235 237 239 245 247 249 ...
input:
2 1 1000000000 300000 2 5 7 9 11 15 17 19 21 23 25 27 29 31 34 37 40 45 47 53 56 62 66 68 71 73 76 78 83 85 89 91 93 96 98 101 107 109 112 114 120 122 129 132 134 137 140 143 145 149 152 154 159 164 166 171 175 177 179 182 188 190 192 195 197 200 202 204 206 210 212 215 220 227 229 232 235 237 239 2...
output:
1 3 6 8 10 12 16 18 20 22 24 26 28 30 32 35 38 41 46 48 54 57 63 67 69 72 74 77 79 84 86 90 92 94 97 99 102 108 110 113 115 121 123 130 133 135 138 141 144 146 150 153 155 160 165 167 172 176 178 180 183 189 191 193 196 198 201 203 205 207 211 213 216 221 228 230 233 236 238 240 246 248 250 254 258 ...
result:
ok correct! (1 test case)
Test #22:
score: 9
Accepted
time: 271ms
memory: 21708kb
input:
1 1 1000000000 300000 999000001 999000004 999000012 999000017 999000020 999000022 999000024 999000026 999000028 999000030 999000033 999000035 999000037 999000040 999000044 999000046 999000048 999000053 999000062 999000069 999000072 999000074 999000076 999000078 999000080 999000082 999000084 99900008...
output:
999000000 999000003 999000011 999000016 999000019 999000021 999000023 999000025 999000027 999000029 999000032 999000034 999000036 999000039 999000043 999000045 999000047 999000052 999000061 999000068 999000071 999000073 999000075 999000077 999000079 999000081 999000083 999000085 999000088 999000090 ...
input:
2 1 1000000000 300000 999000000 999000003 999000011 999000016 999000019 999000021 999000023 999000025 999000027 999000029 999000032 999000034 999000036 999000039 999000043 999000045 999000047 999000052 999000061 999000068 999000071 999000073 999000075 999000077 999000079 999000081 999000083 99900008...
output:
999000001 999000004 999000012 999000017 999000020 999000022 999000024 999000026 999000028 999000030 999000033 999000035 999000037 999000040 999000044 999000046 999000048 999000053 999000062 999000069 999000072 999000074 999000076 999000078 999000080 999000082 999000084 999000086 999000089 999000091 ...
result:
ok correct! (1 test case)
Test #23:
score: 9
Accepted
time: 212ms
memory: 19092kb
input:
1 1 600000 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 167 1...
output:
600000 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 17...
input:
2 1 600000 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 168...
output:
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 167 169 171 173 175 177...
result:
ok correct! (1 test case)
Test #24:
score: 9
Accepted
time: 14ms
memory: 3860kb
input:
1 30000 6 1 5 4 2 1 3 2 1 1 2 1 1 8 1 4 2 1 1 4 2 1 3 5 1 2 3 1 1 6 2 2 4 10 5 1 3 5 7 9 5 2 1 4 9 1 8 8 1 4 3 1 1 8 4 1 3 5 7 8 3 1 4 7 8 3 1 4 6 3 1 1 2 1 1 3 1 2 2 1 1 3 1 1 10 3 2 5 7 10 3 2 6 9 9 4 1 4 6 8 10 4 1 3 6 8 7 3 1 4 6 9 3 2 4 8 5 2 1 4 2 1 1 3 1 2 9 1 8 8 4 1 3 5 7 3 1 2 9 4 1 4 6 8 ...
output:
4 4 2 2 2 3 2 4 2 1 3 1 3 10 2 4 6 8 5 3 7 3 3 8 2 4 6 8 3 6 8 3 5 3 2 1 2 3 1 4 6 1 5 8 9 3 5 7 10 2 5 7 7 3 5 1 3 7 5 3 2 1 7 8 2 4 6 1 9 3 5 7 4 8 6 1 6 1 4 2 8 2 4 6 6 2 4 6 2 4 2 4 8 2 4 6 4 1 5 1 3 8 2 4 6 1 6 2 4 6 2 4 4 2 2 5 3 1 5 2 ...
input:
2 30000 3 1 1 4 1 4 2 1 2 5 1 1 6 1 1 3 1 3 5 1 5 5 1 3 9 1 6 5 2 2 5 6 3 2 4 6 5 2 1 3 8 3 1 3 6 6 3 2 4 6 4 2 2 4 7 1 7 4 2 2 4 9 3 1 5 7 10 2 2 10 7 1 7 9 3 3 5 9 10 3 1 4 7 4 2 2 4 7 2 4 7 2 1 2 8 1 8 2 1 2 2 1 2 10 5 2 4 6 8 10 9 4 3 5 7 9 3 1 3 6 2 4 6 5 2 1 3 8 4 2 4 6 8 6 1 1 4 2 2 4 9 1 3 3...
output:
2 1 1 2 2 1 1 4 7 1 3 1 3 5 2 4 2 4 7 1 3 5 1 3 1 1 3 2 6 8 1 3 1 1 4 6 2 5 8 1 3 1 5 1 1 1 1 1 3 5 7 9 1 4 6 8 1 1 5 2 4 1 3 5 7 2 1 3 4 2 1 3 1 4 6 8 3 7 1 4 6 8 1 1 1 3 1 3 2 1 3 7 1 5 7 4 2 1 4 2 4 2 4 1 3 6 8 5 1 3 5 7 1 3 4 6 3 6 1 ...
result:
ok correct! (30000 test cases)
Test #25:
score: 9
Accepted
time: 20ms
memory: 3580kb
input:
1 1000 248 98 1 4 6 9 12 14 18 20 23 25 27 29 31 34 36 38 41 43 46 48 50 52 55 57 60 62 65 68 71 73 76 79 81 84 87 89 92 96 100 102 105 108 111 113 116 118 121 123 125 128 130 132 134 138 140 142 145 147 149 151 155 158 160 162 165 168 170 172 174 177 180 184 186 189 191 194 196 199 201 203 206 208 ...
output:
248 3 5 8 11 13 17 19 22 24 26 28 30 33 35 37 40 42 45 47 49 51 54 56 59 61 64 67 70 72 75 78 80 83 86 88 91 95 99 101 104 107 110 112 115 117 120 122 124 127 129 131 133 137 139 141 144 146 148 150 154 157 159 161 164 167 169 171 173 176 179 183 185 188 190 193 195 198 200 202 205 207 210 212 215 2...
input:
2 1000 208 90 2 4 6 8 10 13 15 17 20 22 24 26 29 31 33 36 38 40 43 46 48 50 52 55 57 59 61 63 66 68 71 73 75 78 81 83 85 87 89 91 94 96 99 101 103 106 108 110 113 115 117 119 122 124 126 129 131 134 138 140 143 145 147 149 152 154 156 158 161 163 165 167 169 171 173 176 178 180 182 186 188 191 193 1...
output:
1 3 5 7 9 11 14 16 18 21 23 25 27 30 32 34 37 39 41 44 47 49 51 53 56 58 60 62 64 67 69 72 74 76 79 82 84 86 88 90 92 95 97 100 102 104 107 109 111 114 116 118 120 123 125 127 130 132 135 139 141 144 146 148 150 153 155 157 159 162 164 166 168 170 172 174 177 179 181 183 187 189 192 194 196 199 201 ...
result:
ok correct! (1000 test cases)
Test #26:
score: 9
Accepted
time: 26ms
memory: 3956kb
input:
1 100 2709 278 8 16 18 36 40 46 51 55 65 68 97 115 117 128 131 157 161 163 167 171 174 184 197 236 262 265 269 301 304 307 311 317 338 340 354 361 368 385 389 391 415 431 446 450 455 462 469 515 518 530 532 543 549 552 558 578 588 592 610 620 625 630 636 665 682 706 709 723 739 748 751 761 765 770 7...
output:
7 15 17 35 39 45 50 54 64 67 96 114 116 127 130 156 160 162 166 170 173 183 196 235 261 264 268 300 303 306 310 316 337 339 353 360 367 384 388 390 414 430 445 449 454 461 468 514 517 529 531 542 548 551 557 577 587 591 609 619 624 629 635 664 681 705 708 722 738 747 750 760 764 769 787 796 817 823 ...
input:
2 100 2598 600 5 7 11 19 22 24 27 30 33 36 39 43 52 55 57 60 63 68 72 77 81 85 93 99 101 106 112 115 118 121 127 135 140 145 150 153 156 169 180 183 193 197 201 204 209 214 217 220 222 225 231 236 240 244 247 251 255 258 264 266 270 276 279 281 284 290 292 297 303 307 316 321 325 329 333 335 337 341...
output:
1 6 8 12 20 23 25 28 31 34 37 40 44 53 56 58 61 64 69 73 78 82 86 94 100 102 107 113 116 119 122 128 136 141 146 151 154 157 170 181 184 194 198 202 205 210 215 218 221 223 226 232 237 241 245 248 252 256 259 265 267 271 277 280 282 285 291 293 298 304 308 317 322 326 330 334 336 338 342 349 352 356...
result:
ok correct! (100 test cases)
Test #27:
score: 9
Accepted
time: 68ms
memory: 3876kb
input:
1 10000 684778493 25 35243363 58546853 102083056 125854247 134425699 162497412 163249035 246325159 246412329 249954620 254425090 277960843 319175235 321220843 380361372 381977208 396040413 408016409 449388147 459444481 464094718 512615935 514577714 547930406 601513819 540828616 22 312191 57504628 60...
output:
35243362 58546852 102083055 125854246 134425698 162497411 163249034 246325158 246412328 249954619 254425089 277960842 319175234 321220842 380361371 381977207 396040412 408016408 449388146 459444480 464094717 512615934 514577713 547930405 601513818 312190 57504627 60978752 101195260 110073234 113772...
input:
2 10000 503458243 21 18568034 64259545 78115551 112150684 157465152 179922799 249926128 259935066 278664749 303353397 307353445 327232761 364371566 377808424 407708598 415943560 433327418 445390916 446025960 473501503 492920674 39958599 28 26251 653758 785249 3541646 5638059 7139717 8821204 9152464 ...
output:
18568035 64259546 78115552 112150685 157465153 179922800 249926129 259935067 278664750 303353398 307353446 327232762 364371567 377808425 407708599 415943561 433327419 445390917 446025961 473501504 492920675 26252 653759 785250 3541647 5638060 7139718 8821205 9152465 12025607 12858249 12895826 14129...
result:
ok correct! (10000 test cases)
Test #28:
score: 9
Accepted
time: 99ms
memory: 3640kb
input:
1 1000 980734876 298 631485 891002 3796671 5541647 8178135 11132013 13273977 20202318 20688205 22353387 36947383 39190102 39889382 40855788 42824207 43431589 43532897 47389025 48905139 49307045 56935787 61922782 62814336 64721467 66153154 68588666 76786249 77330755 81917548 84386796 84404919 8680468...
output:
631484 891001 3796670 5541646 8178134 11132012 13273976 20202317 20688204 22353386 36947382 39190101 39889381 40855787 42824206 43431588 43532896 47389024 48905138 49307044 56935786 61922781 62814335 64721466 66153153 68588665 76786248 77330754 81917547 84386795 84404918 86804687 88845167 89027732 9...
input:
2 1000 84148050 260 185007 527202 767095 1447383 1591336 1673511 1763680 1823703 2167702 2171269 2294374 2421256 2741671 2881289 3165639 3461276 3516450 3824386 4019699 5058117 5158982 5344145 5960092 6253716 6395013 6847722 6982497 7240374 7284401 7550140 7882299 8133382 8833469 9336444 9966697 112...
output:
185008 527203 767096 1447384 1591337 1673512 1763681 1823704 2167703 2171270 2294375 2421257 2741672 2881290 3165640 3461277 3516451 3824387 4019700 5058118 5158983 5344146 5960093 6253717 6395014 6847723 6982498 7240375 7284402 7550141 7882300 8133383 8833470 9336445 9966698 11290917 11531938 11701...
result:
ok correct! (1000 test cases)
Test #29:
score: 9
Accepted
time: 123ms
memory: 3988kb
input:
1 100 335372428 2082 696529 725775 787536 867123 1050888 1533281 1681175 1856557 2022664 2024567 2068960 2235324 2258249 2304888 2412211 2435791 2475712 3054029 3510562 3818864 3959552 4014667 4266733 4593580 4829651 5074107 5490077 5553136 5816596 6086443 6355960 6363039 6385267 6592282 6718919 708...
output:
696528 725774 787535 867122 1050887 1533280 1681174 1856556 2022663 2024566 2068959 2235323 2258248 2304887 2412210 2435790 2475711 3054028 3510561 3818863 3959551 4014666 4266732 4593579 4829650 5074106 5490076 5553135 5816595 6086442 6355959 6363038 6385266 6592281 6718918 7089737 7220306 7559607 ...
input:
2 100 231954147 2660 96197 254562 289417 294112 305738 375541 395274 535676 701930 727339 752665 760883 825736 845636 929517 1276072 1428054 1467850 1472901 1515603 1630049 1636102 1724135 1791641 1895938 1956292 2111538 2413756 2530981 2630039 2673423 2707850 2711913 2753540 2891387 2908283 2941774...
output:
96198 254563 289418 294113 305739 375542 395275 535677 701931 727340 752666 760884 825737 845637 929518 1276073 1428055 1467851 1472902 1515604 1630050 1636103 1724136 1791642 1895939 1956293 2111539 2413757 2530982 2630040 2673424 2707851 2711914 2753541 2891388 2908284 2941775 2956341 2963026 2991...
result:
ok correct! (100 test cases)
Subtask #6:
score: 9
Accepted
Test #30:
score: 9
Accepted
time: 282ms
memory: 20400kb
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: 9
Accepted
time: 138ms
memory: 11624kb
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:
2 1 1000000 300000 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 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: 214ms
memory: 17264kb
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:
853088 853087 853086 853092 853094 853100 853102 853104 853110 853114 853116 853118 853113 853125 853124 853136 853143 853146 853148 853150 853163 853162 853161 853167 853160 853159 853174 853177 853187 853196 853198 853201 853208 853212 853211 853217 853220 853222 853225 853224 853231 853236 853241...
input:
2 1 2000000 300000 853086 853087 853088 853092 853094 853100 853102 853104 853110 853113 853114 853116 853118 853124 853125 853136 853143 853146 853148 853150 853159 853160 853161 853162 853163 853167 853174 853177 853187 853196 853198 853201 853208 853211 853212 853217 853220 853222 853224 853225 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: 263ms
memory: 20292kb
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:
1561076 1561082 1561084 1561086 1561100 1561102 1561118 1561127 1561130 1561146 1561149 1561154 1561159 1561170 1561172 1561174 1561169 1561188 1561196 1561198 1561195 1561202 1561204 1561207 1561218 1561232 1561240 1561239 1561261 1561263 1561279 1561283 1561290 1561298 1561303 1561306 1561309 1561...
input:
2 1 4000000 300000 1561076 1561082 1561084 1561086 1561100 1561102 1561118 1561127 1561130 1561146 1561149 1561154 1561159 1561169 1561170 1561172 1561174 1561188 1561195 1561196 1561198 1561202 1561204 1561207 1561218 1561232 1561239 1561240 1561261 1561263 1561279 1561283 1561290 1561298 1561303 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: 187ms
memory: 15612kb
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:
805298422 805298421 805298420 805298426 805298428 805298430 805298419 805298433 805298438 805298440 805298443 805298447 805298450 805298449 805298446 805298445 805298442 805298457 805298459 805298462 805298465 805298468 805298470 805298472 805298476 805298475 805298474 805298480 805298467 805298483 ...
input:
2 1 1000000000 300000 805298419 805298420 805298421 805298422 805298426 805298428 805298430 805298433 805298438 805298440 805298442 805298443 805298445 805298446 805298447 805298449 805298450 805298456 805298457 805298459 805298461 805298462 805298464 805298465 805298467 805298468 805298470 80529847...
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: 9
Accepted
time: 166ms
memory: 11044kb
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:
1000000000 3 2 6 999999999 10 9 999999998 14 999999997 20 22 19 18 33 32 36 31 30 41 40 46 45 44 53 58 61 63 60 57 56 55 70 69 52 51 50 29 81 80 79 78 86 77 28 90 92 27 99 98 103 102 97 96 95 110 109 114 113 26 118 122 121 125 120 128 130 132 137 136 141 140 145 144 135 134 151 150 17 999999996 9999...
input:
2 1 1000000000 300000 2 3 6 9 10 14 17 18 19 20 22 26 27 28 29 30 31 32 33 36 40 41 44 45 46 50 51 52 53 55 56 57 58 60 61 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 1...
output:
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 162 163 165 169 170 1...
result:
ok correct! (1 test case)
Test #36:
score: 9
Accepted
time: 147ms
memory: 11452kb
input:
1 1 1000000000 300000 999500002 999500003 999500005 999500007 999500009 999500010 999500011 999500012 999500014 999500017 999500018 999500023 999500025 999500026 999500028 999500031 999500032 999500035 999500036 999500038 999500039 999500040 999500041 999500042 999500044 999500046 999500047 99950004...
output:
999500001 999500000 999500004 999500006 999500008 999499999 999499998 999499997 999500013 999500016 999500015 999500022 999500024 999500021 999500027 999500030 999500029 999500034 999500033 999500037 999500020 999500019 999499996 999499995 999500043 999500045 999499994 999500048 999500052 999500051 ...
input:
2 1 1000000000 300000 999400000 999400001 999400002 999400003 999400004 999400005 999400006 999400007 999400008 999400009 999400010 999400011 999400012 999400013 999400014 999400015 999400016 999400017 999400018 999400019 999400020 999400021 999400022 999400023 999400024 999400025 999400026 99940002...
output:
999500002 999500003 999500005 999500007 999500009 999500010 999500011 999500012 999500014 999500017 999500018 999500023 999500025 999500026 999500028 999500031 999500032 999500035 999500036 999500038 999500039 999500040 999500041 999500042 999500044 999500046 999500047 999500049 999500053 999500054 ...
result:
ok correct! (1 test case)
Test #37:
score: 9
Accepted
time: 57ms
memory: 6404kb
input:
1 1 1000000000 300000 978876240 978876241 978876242 978876243 978876244 978876245 978876246 978876247 978876248 978876249 978876250 978876251 978876252 978876253 978876254 978876255 978876256 978876257 978876258 978876259 978876260 978876261 978876262 978876263 978876264 978876265 978876266 97887626...
output:
978876239 978876238 978876237 978876236 978876235 978876234 978876233 978876232 978876231 978876230 978876229 978876228 978876227 978876226 978876225 978876224 978876223 978876222 978876221 978876220 978876219 978876218 978876217 978876216 978876215 978876214 978876213 978876212 978876211 978876210 ...
input:
2 1 1000000000 300000 978576240 978576241 978576242 978576243 978576244 978576245 978576246 978576247 978576248 978576249 978576250 978576251 978576252 978576253 978576254 978576255 978576256 978576257 978576258 978576259 978576260 978576261 978576262 978576263 978576264 978576265 978576266 97857626...
output:
978876240 978876241 978876242 978876243 978876244 978876245 978876246 978876247 978876248 978876249 978876250 978876251 978876252 978876253 978876254 978876255 978876256 978876257 978876258 978876259 978876260 978876261 978876262 978876263 978876264 978876265 978876266 978876267 978876268 978876269 ...
result:
ok correct! (1 test case)
Test #38:
score: 9
Accepted
time: 50ms
memory: 7824kb
input:
1 1 600000 300000 293429 293430 293431 293432 293433 293434 293435 293436 293437 293438 293439 293440 293441 293442 293443 293444 293445 293446 293447 293448 293449 293450 293451 293452 293453 293454 293455 293456 293457 293458 293459 293460 293461 293462 293463 293464 293465 293466 293467 293468 29...
output:
293428 293427 293426 293425 293424 293423 293422 293421 293420 293419 293418 293417 293416 293415 293414 293413 293412 293411 293410 293409 293408 293407 293406 293405 293404 293403 293402 293401 293400 293399 293398 293397 293396 293395 293394 293393 293392 293391 293390 293389 293388 293387 293386...
input:
2 1 600000 300000 1 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 ...
output:
293429 293430 293431 293432 293433 293434 293435 293436 293437 293438 293439 293440 293441 293442 293443 293444 293445 293446 293447 293448 293449 293450 293451 293452 293453 293454 293455 293456 293457 293458 293459 293460 293461 293462 293463 293464 293465 293466 293467 293468 293469 293470 293471...
result:
ok correct! (1 test case)
Test #39:
score: 9
Accepted
time: 14ms
memory: 3876kb
input:
1 30000 10 1 2 2 1 2 4 2 3 4 9 2 4 6 2 1 2 4 2 1 2 6 1 3 9 3 1 2 3 3 1 3 8 4 3 4 5 6 6 3 2 3 4 6 3 1 2 3 6 2 5 6 9 4 1 2 3 4 2 1 2 4 2 2 3 5 1 1 3 1 1 3 1 2 7 1 6 5 1 2 9 2 2 5 10 1 8 10 3 6 8 9 8 3 1 2 4 7 3 4 5 6 2 1 1 3 1 3 7 1 6 2 1 1 7 2 1 3 9 3 3 4 6 8 2 4 6 7 2 4 6 9 4 2 3 4 5 4 1 3 4 2 3 4 8...
output:
1 1 2 1 3 5 1 4 3 2 9 8 7 2 2 1 8 7 1 6 5 6 5 4 4 3 9 8 7 6 1 1 4 5 3 1 5 1 1 4 7 5 7 4 8 7 3 3 2 1 2 2 5 2 7 2 2 1 5 3 5 3 5 1 9 8 7 2 2 1 1 3 2 3 2 6 2 4 3 2 1 2 2 1 6 3 2 1 10 9 2 3 2 1 1 10 9 8 7 2 4 1 10 3 5 2 1 5 3 8 7 6 5 1 2 1 6 4 3 2...
input:
2 30000 3 1 1 5 1 3 10 3 3 4 7 8 3 3 4 6 2 1 1 3 1 3 2 1 1 6 3 4 5 6 5 1 2 7 1 2 3 1 2 8 4 1 2 3 4 4 1 2 9 3 1 3 9 7 2 1 2 3 1 1 9 4 2 3 4 5 8 4 1 2 3 4 7 3 1 6 7 5 2 1 5 5 2 1 2 7 2 3 5 9 4 1 2 8 9 5 1 5 10 2 5 8 10 2 2 10 9 3 3 8 9 7 3 1 2 7 10 5 1 2 3 4 5 2 1 1 6 3 1 5 6 6 3 1 5 6 8 2 3 6 4 2 3 4...
output:
2 4 5 6 8 5 7 8 2 1 2 1 2 3 3 3 3 5 6 7 8 3 2 4 5 3 4 2 6 7 8 9 5 6 7 8 2 3 4 2 3 3 4 4 6 3 4 5 6 1 6 9 1 3 1 2 4 3 4 5 6 7 8 9 10 2 2 3 4 2 3 4 4 7 1 2 2 3 4 5 3 4 7 8 1 3 5 6 5 6 7 8 1 2 3 4 5 1 2 4 3 2 3 4 5 6 8 1 4 1 2 5 9 1 4 2 4 5 1 2 3 4 ...
result:
ok correct! (30000 test cases)
Test #40:
score: 9
Accepted
time: 14ms
memory: 3860kb
input:
1 1000 207 67 66 68 70 71 72 73 74 76 78 80 81 83 84 85 86 88 89 90 92 94 95 96 99 101 102 104 105 108 109 111 113 115 117 119 120 122 123 125 126 127 130 131 132 134 135 136 138 139 140 142 144 146 147 148 149 151 153 154 155 157 158 159 161 162 165 166 168 258 46 78 82 85 92 95 99 102 103 106 107 ...
output:
65 67 69 64 63 62 61 75 77 79 60 82 59 58 57 87 56 55 91 93 54 53 98 100 97 103 52 107 106 110 112 114 116 118 51 121 50 124 49 48 129 128 47 133 46 45 137 44 43 141 143 145 42 41 40 150 152 39 38 156 37 36 160 35 164 163 167 77 81 84 91 94 98 101 100 105 104 109 112 115 117 122 127 126 130 125 136...
input:
2 1000 254 46 119 127 128 129 132 134 137 139 140 142 144 146 149 150 157 163 166 167 168 171 174 176 177 183 185 187 191 192 194 195 198 200 203 205 208 210 214 221 223 229 231 233 238 240 242 244 213 92 1 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...
output:
120 130 131 133 135 136 138 141 143 145 147 148 151 152 158 164 169 170 172 173 175 178 179 184 186 188 193 196 197 199 201 202 204 206 209 211 215 222 224 230 232 234 239 241 243 245 60 62 63 64 65 66 68 69 70 71 72 73 74 76 77 78 79 81 82 83 84 85 86 87 88 89 90 92 93 95 96 97 98 99 100 101 102 1...
result:
ok correct! (1000 test cases)
Test #41:
score: 9
Accepted
time: 17ms
memory: 3680kb
input:
1 100 2698 1244 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1117 1118 1119 1120 1121 1122 1123 1124...
output:
1063 1062 1061 1060 1059 1058 1057 1056 1055 1054 1053 1052 1076 1051 1050 1049 1048 1047 1046 1045 1044 1043 1042 1041 1040 1039 1091 1038 1037 1036 1035 1034 1033 1032 1031 1030 1029 1028 1027 1105 1026 1025 1024 1023 1022 1021 1020 1019 1018 1116 1017 1016 1015 1014 1013 1012 1011 1010 1126 1009 ...
input:
2 100 2622 261 283 287 293 302 303 306 309 311 315 316 319 320 331 340 341 351 361 363 367 369 372 379 382 391 393 406 409 418 422 426 427 446 448 458 460 461 462 468 471 480 481 483 490 493 497 506 512 515 517 537 540 545 548 556 560 562 563 571 574 576 577 579 589 590 591 594 602 605 607 610 624 6...
output:
284 288 294 304 305 307 310 312 317 318 321 322 332 342 343 352 362 364 368 370 373 380 383 392 394 407 410 419 423 428 429 447 449 459 463 464 465 469 472 482 484 485 491 494 498 507 513 516 518 538 541 546 549 557 561 564 565 572 575 578 580 581 592 593 595 596 603 606 608 611 625 631 634 640 644 ...
result:
ok correct! (100 test cases)
Test #42:
score: 9
Accepted
time: 68ms
memory: 3636kb
input:
1 10000 587171507 26 36711877 65929107 86763008 95982022 104961484 108731317 116257793 131216905 155938881 158979520 161095290 168461914 178935040 189219596 193659784 209980439 213771144 219133468 219140752 228760685 228888224 236945024 252628581 257908531 260743139 296343321 107645675 30 6272884 67...
output:
36711876 65929106 86763007 95982021 104961483 108731316 116257792 131216904 155938880 158979519 161095289 168461913 178935039 189219595 193659783 209980438 213771143 219133467 219140751 228760684 228888223 236945023 252628580 257908530 260743138 296343320 6272883 6771283 7219631 9785255 10501396 12...
input:
2 10000 662493294 20 223023059 232645343 235134607 245297722 254131201 347401251 352655935 354137754 376048257 386791961 389437442 403782962 418597563 449184562 459636806 462171034 469369344 475333451 522603502 539134252 334645408 21 9082377 14252823 22935541 37408870 47545346 66947589 79316979 9829...
output:
223023060 232645344 235134608 245297723 254131202 347401252 352655936 354137755 376048258 386791962 389437443 403782963 418597564 449184563 459636807 462171035 469369345 475333452 522603503 539134253 9082378 14252824 22935542 37408871 47545347 66947590 79316980 98291537 101420015 103678712 10797298...
result:
ok correct! (10000 test cases)
Test #43:
score: 9
Accepted
time: 98ms
memory: 3892kb
input:
1 1000 862470154 254 99696469 104882755 105689905 112730859 113403793 115661779 118250669 120242977 120997683 122815058 127931239 128138512 131624970 132661707 132667010 138091286 139450214 141315057 141866656 143542018 148203451 148686231 150055444 151674828 151737518 152082644 152570767 153099541 ...
output:
99696468 104882754 105689904 112730858 113403792 115661778 118250668 120242976 120997682 122815057 127931238 128138511 131624969 132661706 132667009 138091285 139450213 141315056 141866655 143542017 148203450 148686230 150055443 151674827 151737517 152082643 152570766 153099540 154079562 156757173 1...
input:
2 1000 869725508 292 326104593 328636678 329257138 330109148 335284708 336057921 336121819 336716651 337319486 340890251 340912967 341314693 342282241 342758349 342990844 345151114 346099330 348621266 349087510 352019057 354270010 355801426 356050850 358799000 359760881 361177130 366212979 367434081...
output:
326104594 328636679 329257139 330109149 335284709 336057922 336121820 336716652 337319487 340890252 340912968 341314694 342282242 342758350 342990845 345151115 346099331 348621267 349087511 352019058 354270011 355801427 356050851 358799001 359760882 361177131 366212980 367434082 368323054 369189942 ...
result:
ok correct! (1000 test cases)
Test #44:
score: 9
Accepted
time: 123ms
memory: 3788kb
input:
1 100 492026639 2654 232281839 232339849 232428424 232447337 232729258 232740243 232887822 232890314 233123782 233501097 233608165 233628278 233652911 233790948 234002111 234057061 234073509 234206152 234217636 234327281 234345766 234477159 234671941 234734932 234879704 235025093 235155173 235337602...
output:
232281838 232339848 232428423 232447336 232729257 232740242 232887821 232890313 233123781 233501096 233608164 233628277 233652910 233790947 234002110 234057060 234073508 234206151 234217635 234327280 234345765 234477158 234671940 234734931 234879703 235025092 235155172 235337601 235355199 235545233 ...
input:
2 100 188309538 2624 66628736 66629370 66636309 66642066 66654192 66798694 66862848 66871707 66928913 67013885 67048748 67125319 67139371 67142526 67207719 67300368 67322576 67343476 67363291 67382901 67445449 67459784 67477966 67534650 67631341 67716005 67718126 67722994 67790343 67803273 67819636 ...
output:
66628737 66629371 66636310 66642067 66654193 66798695 66862849 66871708 66928914 67013886 67048749 67125320 67139372 67142527 67207720 67300369 67322577 67343477 67363292 67382902 67445450 67459785 67477967 67534651 67631342 67716006 67718127 67722995 67790344 67803274 67819637 67848773 67877669 678...
result:
ok correct! (100 test cases)
Subtask #7:
score: 10
Accepted
Test #45:
score: 10
Accepted
time: 1ms
memory: 3704kb
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: 10
Accepted
time: 1ms
memory: 3932kb
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 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: 10
Accepted
time: 1ms
memory: 3704kb
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:
5000 4999 4998 4 7 6 4997 4996 4995 4994 14 4993 18 20 17 4992 4991 4990 27 26 31 35 34 39 38 33 30 4989 4988 4987 47 4986 4985 4984 54 53 52 4983 4982 4981 61 63 4980 67 66 71 70 4979 4978 4977 77 4976 4975 4974 4973 4972 4971 4970 86 4969 91 90 89 95 4968 4967 4966 4965 4964 102 4963 4962 4961 108...
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:
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 141 142 143 1...
result:
ok correct! (1 test case)
Test #48:
score: 10
Accepted
time: 1ms
memory: 3896kb
input:
1 1 5000 2500 1 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 9...
output:
5000 4999 4998 4997 4996 4995 4994 4993 4992 4991 4990 4989 4988 4987 4986 4985 4984 4983 4982 4981 4980 4979 4978 4977 4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4943 4942 4941 ...
input:
2 1 5000 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2...
output:
1 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 ...
result:
ok correct! (1 test case)
Test #49:
score: 10
Accepted
time: 1ms
memory: 3864kb
input:
1 1 5000 1500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 51 52 53 54 56 58 60 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 104 105 106 107 108...
output:
5000 4999 4998 4997 4996 4995 4994 4993 4992 4991 4990 4989 4988 4987 4986 4985 17 4984 4983 4982 4981 4980 4979 4978 4977 4976 4975 4974 4973 31 4972 34 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 50 4957 4956 4955 55 57 59 62 61 4954 4953 4952 4951 69 4950 4949 4948 4947 ...
input:
2 1 5000 1500 17 31 34 50 55 57 59 61 62 69 80 103 114 119 126 127 131 136 137 144 147 152 155 158 159 165 181 192 193 200 211 218 220 236 239 240 241 243 267 268 269 272 280 294 295 298 323 326 328 331 332 349 351 368 370 371 373 374 376 377 381 382 398 399 400 404 409 415 416 417 424 426 458 480 4...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 51 52 53 54 56 58 60 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 104 105 106 107 108 109 110 111 1...
result:
ok correct! (1 test case)
Test #50:
score: 10
Accepted
time: 1ms
memory: 3880kb
input:
1 1 5000 1000 2502 2503 2505 2506 2507 2508 2512 2513 2514 2515 2517 2519 2520 2521 2522 2523 2525 2526 2527 2528 2530 2531 2533 2534 2535 2536 2537 2538 2540 2541 2542 2545 2546 2547 2548 2549 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2569 2571 2576 2577 2580 2582 2583 2584 2...
output:
2501 2500 2504 2499 2498 2497 2511 2510 2509 2496 2516 2518 2495 2494 2493 2492 2524 2491 2490 2489 2529 2488 2532 2487 2486 2485 2484 2483 2539 2482 2481 2544 2543 2480 2479 2478 2554 2553 2552 2551 2550 2477 2476 2475 2474 2473 2472 2471 2470 2568 2570 2575 2574 2579 2581 2578 2573 2572 2469 2468 ...
input:
2 1 5000 1000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2...
output:
2502 2503 2505 2506 2507 2508 2512 2513 2514 2515 2517 2519 2520 2521 2522 2523 2525 2526 2527 2528 2530 2531 2533 2534 2535 2536 2537 2538 2540 2541 2542 2545 2546 2547 2548 2549 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2569 2571 2576 2577 2580 2582 2583 2584 2585 2586 2587 ...
result:
ok correct! (1 test case)
Test #51:
score: 10
Accepted
time: 1ms
memory: 3872kb
input:
1 625 8 3 1 3 4 2 1 1 3 1 1 6 2 2 3 6 2 1 3 5 2 1 2 2 1 1 3 1 2 3 1 1 5 1 3 7 1 1 2 1 1 6 3 1 2 3 3 1 1 4 1 1 8 2 3 6 4 2 1 2 3 1 2 5 1 1 6 1 5 3 1 2 4 2 1 2 3 1 2 5 2 2 3 7 2 1 4 8 1 6 5 1 3 6 2 1 3 5 1 1 3 1 1 4 1 2 6 2 1 3 4 1 2 7 2 3 4 5 2 1 3 8 1 1 8 1 5 4 2 1 2 6 2 1 4 3 1 1 2 1 1 3 1 1 5 1 1 ...
output:
8 2 7 2 3 1 6 6 2 5 4 2 1 3 2 7 2 6 5 4 3 4 2 5 4 3 1 5 4 1 4 3 1 1 5 7 3 5 2 6 2 5 3 1 6 2 1 2 1 5 2 8 4 4 3 6 3 3 2 3 5 1 8 4 1 5 2 4 2 3 8 7 3 7 6 3 7 2 4 3 6 3 1 2 8 2 7 1 8 4 2 6 5 4 1 5 1 6 3 4 3 2 1 2 1 3 8 7 4 2 4 3 6 ...
input:
2 625 4 1 1 6 2 5 6 6 3 4 5 6 4 2 3 4 8 1 5 5 1 3 7 1 3 8 3 2 4 8 3 1 3 2 1 2 4 1 4 3 1 3 2 1 2 4 2 3 4 4 2 3 4 6 3 4 5 6 3 1 1 6 3 4 5 6 4 1 1 3 1 3 6 2 5 6 8 1 8 7 1 3 5 2 2 5 5 1 3 4 2 3 4 5 1 1 6 1 4 7 3 3 6 7 6 3 4 5 6 6 2 1 6 2 1 2 7 2 1 7 3 1 1 5 2 1 5 2 1 2 3 1 1 7 2 1 4 7 3 2 6 7 8 3 2 4 8 ...
output:
2 1 2 1 2 3 1 2 6 4 4 1 3 5 1 1 1 1 1 1 2 1 2 1 2 3 2 1 2 3 2 1 1 2 1 4 1 3 4 1 2 2 5 1 2 4 1 2 3 2 3 1 2 3 2 2 3 1 2 2 5 1 3 4 1 3 5 2 3 1 1 2 3 1 3 1 2 1 1 1 5 1 4 1 2 3 4 1 1 1 5 1 1 1 3 1 1 2 1 1 2 3 1 2 2 3 6 1 2 4 1 2 1 1 2...
result:
ok correct! (625 test cases)
Test #52:
score: 10
Accepted
time: 1ms
memory: 3572kb
input:
1 500 10 5 1 2 3 4 5 9 4 1 2 3 5 4 2 1 2 3 1 2 2 1 1 5 2 1 2 7 3 1 3 4 5 1 1 4 1 3 6 3 1 2 3 6 1 1 7 3 1 2 4 3 1 1 9 3 1 3 5 5 2 2 3 9 4 1 2 3 5 9 2 3 6 10 1 4 2 1 1 6 3 1 2 3 3 1 2 5 1 2 8 1 5 9 2 5 6 2 1 1 5 1 3 10 2 2 5 7 3 2 3 4 3 1 2 4 2 1 2 10 5 1 2 3 4 5 6 3 1 2 3 8 3 1 3 5 9 2 3 7 3 1 2 5 1 ...
output:
10 9 8 7 6 9 8 7 4 4 3 1 2 5 4 7 2 6 5 2 6 5 4 6 7 6 3 3 9 2 4 1 5 9 8 7 4 2 5 3 2 6 5 4 1 1 4 4 3 2 2 1 4 1 7 6 1 4 3 10 9 8 7 6 6 5 4 8 2 4 2 6 1 1 3 8 7 6 5 5 2 7 2 6 10 9 8 7 6 2 3 3 6 5 1 3 5 4 10 5 4 4 3 2 8 7 6 5 6 2 6 5 4 4 3 6 5 4 4 6...
input:
2 500 9 4 1 7 8 9 4 2 3 4 2 1 2 8 2 7 8 7 3 3 6 7 5 1 2 10 4 1 4 9 10 6 1 4 3 1 3 10 5 6 7 8 9 10 8 1 5 10 1 5 6 2 3 6 3 1 1 4 2 3 4 5 2 2 5 4 1 1 2 1 2 7 3 2 6 7 2 1 2 5 1 3 4 2 3 4 10 5 6 7 8 9 10 9 1 7 8 1 3 10 4 2 4 9 10 4 1 2 8 1 5 3 1 3 6 3 4 5 6 6 2 1 6 3 1 1 9 4 4 7 8 9 8 1 3 2 1 2 6 1 2 10 ...
output:
2 3 4 5 1 2 1 1 2 1 2 4 3 2 3 5 6 5 1 1 2 3 4 5 6 6 1 4 2 1 2 1 3 2 1 1 3 4 1 4 1 2 1 2 3 4 5 8 4 1 3 5 6 3 6 1 1 2 3 2 3 2 1 2 3 5 4 1 3 1 2 3 4 5 1 2 3 4 5 2 4 6 1 3 2 3 1 2 4 5 5 2 4 1 4 5 2 4 3 4 1 2 2 1 1 2 2 3 4 5 2 5 2 5 6 3 4 6 1 2 1 ...
result:
ok correct! (500 test cases)
Test #53:
score: 10
Accepted
time: 0ms
memory: 3824kb
input:
1 100 17 8 1 2 3 4 5 7 8 9 20 5 1 3 6 11 13 20 7 1 4 5 7 11 12 13 19 7 1 2 3 5 7 9 11 38 3 12 20 26 32 15 1 2 3 4 6 7 8 9 10 11 13 14 15 16 17 10 3 2 3 6 26 4 7 9 12 16 36 10 2 3 5 8 12 16 20 21 24 26 5 1 4 41 3 2 6 24 16 7 1 2 3 5 6 7 8 39 17 1 2 3 5 6 7 9 10 12 13 14 15 17 19 20 21 22 25 6 3 6 7 1...
output:
17 16 15 14 13 6 12 11 20 2 5 10 12 20 3 2 6 10 9 8 19 18 17 4 6 8 10 11 19 25 32 31 30 29 5 28 27 26 25 24 12 23 22 21 20 1 10 5 6 8 11 15 1 36 4 7 11 15 19 18 23 25 3 1 5 23 16 15 14 4 13 12 11 39 38 37 4 36 35 8 34 11 33 32 31 16 18 30 29 28 2 5 4 9 11 15 6 30 3 6 5 2 10 29 13 15 2...
input:
2 100 17 3 6 8 10 41 3 1 5 23 12 1 9 15 2 1 9 42 18 4 7 10 14 19 30 31 32 33 34 35 36 37 38 39 40 41 42 6 1 4 6 1 4 25 6 2 4 5 9 11 15 18 2 5 11 12 3 2 4 7 26 1 18 7 1 5 4 2 3 4 5 1 3 20 2 1 20 35 6 2 4 5 7 10 22 37 8 4 7 11 15 17 20 24 25 13 2 1 13 19 7 4 6 8 10 17 18 19 16 5 1 3 5 7 9 5 2 2 5 5 2 ...
output:
7 9 11 2 6 24 10 2 10 1 2 3 5 6 8 9 11 12 13 15 16 17 18 20 21 22 23 5 5 3 6 7 10 12 16 6 12 3 5 8 19 6 1 2 4 2 3 3 6 8 9 11 23 5 8 12 16 18 21 26 27 2 3 1 2 3 5 7 9 11 2 4 6 8 10 1 3 1 3 1 5 8 11 12 13 15 1 3 1 2 3 4 5 7 8 9 2 4 5 6 7 9 11 2 8 10 11 14 1 2 3 4 6 7 8 9 10...
result:
ok correct! (100 test cases)
Test #54:
score: 10
Accepted
time: 1ms
memory: 3868kb
input:
1 50 17 3 1 5 9 99 27 3 7 9 12 16 22 23 24 25 29 32 33 36 38 40 42 47 48 51 56 58 60 62 63 66 70 72 43 1 42 38 1 20 38 4 9 18 23 25 41 3 11 24 25 54 24 1 2 3 4 6 7 9 10 11 13 14 15 16 17 18 20 21 23 24 25 26 27 28 30 61 5 7 15 35 45 53 21 2 3 16 40 5 16 18 20 22 33 37 4 2 7 18 31 44 15 1 3 6 8 9 10 ...
output:
17 4 8 2 6 8 11 15 21 20 19 18 28 31 30 35 37 39 41 46 45 50 55 57 59 61 54 65 69 71 41 19 8 17 22 24 10 23 22 54 53 52 51 5 50 8 49 48 12 47 46 45 44 43 19 42 22 41 40 39 38 37 29 6 14 34 44 52 2 15 15 17 19 21 32 1 6 17 30 44 2 5 7 4 43 11 42 41 15 17 19 24 27 26 60 20 74 3 5 7 9 11 2...
input:
2 50 61 25 5 6 11 14 16 19 22 26 28 31 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 47 1 18 79 28 2 5 8 10 13 14 15 16 19 20 23 24 28 29 30 32 34 36 41 44 46 48 50 75 76 77 78 79 61 5 6 14 34 44 52 60 29 8 19 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 81 21 1 2 ...
output:
1 2 3 4 7 8 9 10 12 13 15 17 18 20 21 23 24 25 27 29 30 32 33 34 35 19 1 3 4 6 7 9 11 12 17 18 21 22 25 26 27 31 33 35 37 38 39 40 42 43 45 47 49 51 7 15 35 45 53 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 26 27 28 29 30 31 3 5 7 8 15 18 23 27 28 31 32 35 41 43 44 48 50 51 53 ...
result:
ok correct! (50 test cases)
Subtask #8:
score: 12
Accepted
Test #55:
score: 12
Accepted
time: 0ms
memory: 3852kb
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:
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: 3624kb
input:
1 1 100 10 1 3 19 30 33 65 79 91 92 95
output:
100 2 18 29 32 64 78 90 89 94
input:
2 1 100 10 2 18 29 32 64 78 89 90 94 100
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: 3620kb
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:
4 7 9 13 15 12 20 23 26 30 29 28 25 22 36 38 19 43 48 47 46 52 57 60 59 66 68 65 71 73 64 63 56 84 86 89 92 95 94 98
input:
2 1 100 40 4 7 9 12 13 15 19 20 22 23 25 26 28 29 30 36 38 43 46 47 48 52 56 57 59 60 63 64 65 66 68 71 73 84 86 89 92 94 95 98
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: 3576kb
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:
4 3 7 11 14 13 10 18 9 22 25 28 27 31 33 37 36 35 24 21 43 45 49 48 53 59 58 57 56 55 52 47 2 1 100 70 73 72 78 77 76 97 85 84 89 88 83 93 96 95
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: 3820kb
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:
27 30 29 26 25 24 37 36 23 22 42 21 20 19 18 50 49 48 54 17
input:
2 1 100 20 17 18 19 20 21 22 23 24 25 26 27 29 30 36 37 42 48 49 50 54
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: 3792kb
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 100 5 4 95 92 91 90 12 14 87 17 86 21 23 76 75 79 81 74 73 72 71 70 69 68 67 66 65 64
input:
2 1 100 30 1 4 5 12 14 17 21 23 64 65 66 67 68 69 70 71 72 73 74 75 76 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: 12
Accepted
time: 0ms
memory: 3864kb
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:
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 18 20 22 83 82 26 81 32 31 30 29 37 40 39 43 80 79 48 50 47 78 56 59
input:
2 1 100 40 18 20 22 26 29 30 31 32 37 39 40 43 47 48 50 56 59 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
output:
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
result:
ok correct! (1 test case)
Test #62:
score: 12
Accepted
time: 0ms
memory: 3856kb
input:
1 1 100 30 53 54 55 57 59 60 61 62 63 65 67 71 72 74 76 80 81 82 83 84 85 87 90 91 94 95 97 98 99 100
output:
52 51 50 56 58 49 48 47 46 64 66 70 69 73 75 79 78 77 68 45 44 86 89 88 93 92 96 43 42 41
input:
2 1 100 30 41 42 43 44 45 46 47 48 49 50 51 52 56 58 64 66 68 69 70 73 75 77 78 79 86 88 89 92 93 96
output:
53 54 55 57 59 60 61 62 63 65 67 71 72 74 76 80 81 82 83 84 85 87 90 91 94 95 97 98 99 100
result:
ok correct! (1 test case)
Test #63:
score: 12
Accepted
time: 0ms
memory: 3856kb
input:
1 1 100 40 1 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 96 97 98 99 100
output:
95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56
input:
2 1 100 40 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
output:
1 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 96 97 98 99 100
result:
ok correct! (1 test case)
Test #64:
score: 12
Accepted
time: 0ms
memory: 3856kb
input:
1 10 2 1 2 4 1 3 7 3 1 2 5 9 3 2 5 8 5 1 2 8 3 1 3 4 5 2 1 4 10 1 1 6 1 1 5 2 3 4
output:
1 2 7 6 4 1 4 7 1 8 2 7 5 3 10 6 2 1
input:
2 10 5 2 1 2 10 1 10 7 3 4 6 7 6 1 6 5 2 3 5 2 1 1 4 1 2 9 3 1 4 7 5 1 1 8 3 2 7 8
output:
3 4 1 1 2 5 1 1 4 2 3 2 5 8 2 1 3 4
result:
ok correct! (10 test cases)
Test #65:
score: 12
Accepted
time: 0ms
memory: 3864kb
input:
1 5 16 4 3 4 5 8 10 2 5 7 8 2 1 6 13 5 3 5 10 12 13 11 2 8 11
output:
2 1 16 7 4 6 8 5 2 4 9 11 8 7 10
input:
2 5 13 5 2 4 8 9 11 10 2 4 6 16 4 1 2 7 16 8 2 5 8 11 2 7 10
output:
3 5 10 12 13 5 7 3 4 5 8 1 6 8 11
result:
ok correct! (5 test cases)
Subtask #9:
score: 3
Accepted
Test #66:
score: 3
Accepted
time: 0ms
memory: 3808kb
input:
1 1 5000 100 19 71 363 365 392 404 520 539 563 567 717 729 851 930 937 1082 1088 1140 1311 1340 1351 1355 1357 1421 1455 1466 1472 1520 1598 1614 1758 1799 1827 1974 2062 2088 2136 2178 2183 2205 2232 2328 2355 2450 2469 2518 2535 2666 2723 2772 2782 2821 2833 2836 2896 2937 2940 3042 3066 3082 3191...
output:
18 70 362 364 391 403 519 538 562 566 716 728 850 929 936 1081 1087 1139 1310 1339 1350 1354 1356 1420 1454 1465 1471 1519 1597 1613 1757 1798 1826 1973 2061 2087 2135 2177 2182 2204 2231 2327 2354 2449 2468 2517 2534 2665 2722 2771 2781 2820 2832 2835 2895 2936 2939 3041 3065 3081 3190 3299 3322 33...
input:
2 1 5000 100 18 70 362 364 391 403 519 538 562 566 716 728 850 929 936 1081 1087 1139 1310 1339 1350 1354 1356 1420 1454 1465 1471 1519 1597 1613 1757 1798 1826 1973 2061 2087 2135 2177 2182 2204 2231 2327 2354 2449 2468 2517 2534 2665 2722 2771 2781 2820 2832 2835 2895 2936 2939 3041 3065 3081 3190...
output:
19 71 363 365 392 404 520 539 563 567 717 729 851 930 937 1082 1088 1140 1311 1340 1351 1355 1357 1421 1455 1466 1472 1520 1598 1614 1758 1799 1827 1974 2062 2088 2136 2178 2183 2205 2232 2328 2355 2450 2469 2518 2535 2666 2723 2772 2782 2821 2833 2836 2896 2937 2940 3042 3066 3082 3191 3300 3323 33...
result:
ok correct! (1 test case)
Test #67:
score: 3
Accepted
time: 1ms
memory: 3612kb
input:
1 1 5000 1000 4 12 16 69 81 88 91 101 106 107 108 113 115 118 131 135 136 139 141 145 152 154 160 163 164 172 173 180 182 185 197 201 205 219 225 227 230 242 251 252 266 267 274 277 278 280 282 294 295 298 300 301 304 307 312 321 325 326 328 334 343 344 345 346 348 351 359 380 382 383 390 394 398 40...
output:
3 11 15 68 80 87 90 100 105 104 103 112 114 117 130 134 133 138 140 144 151 153 159 162 161 171 170 179 181 184 196 200 204 218 224 226 229 241 250 249 265 264 273 276 275 279 281 293 292 297 299 296 303 306 311 320 324 323 327 333 342 341 340 339 347 350 358 379 381 378 389 393 397 404 408 407 413 ...
input:
2 1 5000 1000 3 11 15 68 80 87 90 100 103 104 105 112 114 117 130 133 134 138 140 144 151 153 159 161 162 170 171 179 181 184 196 200 204 218 224 226 229 241 249 250 264 265 273 275 276 279 281 292 293 296 297 299 303 306 311 320 323 324 327 333 339 340 341 342 347 350 358 378 379 381 389 393 397 40...
output:
4 12 16 69 81 88 91 101 106 107 108 113 115 118 131 135 136 139 141 145 152 154 160 163 164 172 173 180 182 185 197 201 205 219 225 227 230 242 251 252 266 267 274 277 278 280 282 294 295 298 300 301 304 307 312 321 325 326 328 334 343 344 345 346 348 351 359 380 382 383 390 394 398 405 409 410 414 ...
result:
ok correct! (1 test case)
Test #68:
score: 3
Accepted
time: 0ms
memory: 3688kb
input:
1 1 5000 1500 3 5 17 26 30 34 35 39 40 47 52 55 61 62 63 65 67 71 74 78 83 89 98 103 106 107 110 113 115 116 126 140 144 150 154 157 159 160 162 165 166 169 175 177 179 183 184 185 188 190 191 192 193 196 198 199 200 201 202 209 211 213 214 216 218 220 221 224 226 227 229 230 232 235 238 239 240 241...
output:
2 4 16 25 29 33 32 38 37 46 51 54 60 59 58 64 66 70 73 77 82 88 97 102 105 104 109 112 114 111 125 139 143 149 153 156 158 155 161 164 163 168 174 176 178 182 181 180 187 189 186 173 172 195 197 194 171 170 167 208 210 212 207 215 217 219 206 223 225 222 228 205 231 234 237 236 233 204 203 152 151 1...
input:
2 1 5000 1500 2 4 16 25 29 32 33 37 38 46 51 54 58 59 60 64 66 70 73 77 82 88 97 102 104 105 109 111 112 114 125 139 143 148 149 151 152 153 155 156 158 161 163 164 167 168 170 171 172 173 174 176 178 180 181 182 186 187 189 194 195 197 203 204 205 206 207 208 210 212 215 217 219 222 223 225 228 231...
output:
3 5 17 26 30 34 35 39 40 47 52 55 61 62 63 65 67 71 74 78 83 89 98 103 106 107 110 113 115 116 126 140 144 150 154 157 159 160 162 165 166 169 175 177 179 183 184 185 188 190 191 192 193 196 198 199 200 201 202 209 211 213 214 216 218 220 221 224 226 227 229 230 232 235 238 239 240 241 242 243 244 2...
result:
ok correct! (1 test case)
Test #69:
score: 3
Accepted
time: 1ms
memory: 3684kb
input:
1 1 5000 2000 5 6 7 8 10 14 15 17 18 20 21 24 26 28 31 35 37 38 39 41 42 43 45 46 47 51 52 53 56 57 60 61 62 67 69 76 77 78 80 84 85 86 91 100 101 103 104 105 106 109 111 114 116 118 121 123 125 131 134 136 137 138 141 146 147 148 149 150 151 159 160 162 163 166 169 170 171 176 177 178 179 183 184 1...
output:
4 3 2 1 9 13 12 16 11 19 5000 23 25 27 30 34 36 33 32 40 29 22 44 4999 4998 50 49 48 55 54 59 58 4995 66 68 75 74 73 79 83 82 81 90 99 98 102 97 96 95 108 110 113 115 117 120 122 124 130 133 135 132 129 140 145 144 143 142 139 128 158 157 161 156 165 168 167 164 175 174 173 172 182 181 186 188 185 1...
input:
2 1 5000 2000 1 2 3 4 9 11 12 13 16 19 22 23 25 27 29 30 32 33 34 36 40 44 48 49 50 54 55 58 59 66 68 73 74 75 79 81 82 83 90 95 96 97 98 99 102 108 110 113 115 117 120 122 124 128 129 130 132 133 135 139 140 142 143 144 145 156 157 158 161 164 165 167 168 172 173 174 175 180 181 182 185 186 188 191...
output:
5 6 7 8 10 14 15 17 18 20 21 24 26 28 31 35 37 38 39 41 42 43 45 46 47 51 52 53 56 57 60 61 62 67 69 76 77 78 80 84 85 86 91 100 101 103 104 105 106 109 111 114 116 118 121 123 125 131 134 136 137 138 141 146 147 148 149 150 151 159 160 162 163 166 169 170 171 176 177 178 179 183 184 187 189 190 192...
result:
ok correct! (1 test case)
Test #70:
score: 3
Accepted
time: 1ms
memory: 3892kb
input:
1 1 5000 2300 2 8 11 15 16 17 20 23 24 25 28 29 30 35 36 37 38 42 43 45 47 48 49 52 53 54 55 58 70 72 73 75 76 77 80 83 85 86 88 91 92 93 94 96 98 99 100 101 109 110 115 120 121 125 126 128 129 134 139 144 146 150 154 157 158 160 162 164 166 169 170 172 174 175 177 178 180 182 183 184 185 190 192 19...
output:
1 7 10 14 13 12 19 22 21 18 27 26 9 34 33 32 31 41 40 44 46 39 6 51 50 5 4 57 69 71 68 74 67 66 79 82 84 81 87 90 89 78 65 95 97 64 63 62 108 107 114 119 118 124 123 127 122 133 138 143 145 149 153 156 155 159 161 163 165 168 167 171 173 152 176 151 179 181 148 147 142 189 191 188 198 200 197 196 20...
input:
2 1 5000 2300 1 4 5 6 7 9 10 12 13 14 18 19 21 22 26 27 31 32 33 34 39 40 41 44 46 50 51 57 62 63 64 65 66 67 68 69 71 74 78 79 81 82 84 87 89 90 95 97 107 108 114 118 119 122 123 124 127 133 138 142 143 145 147 148 149 151 152 153 155 156 159 161 163 165 167 168 171 173 176 179 181 188 189 191 196 ...
output:
2 8 11 15 16 17 20 23 24 25 28 29 30 35 36 37 38 42 43 45 47 48 49 52 53 54 55 58 70 72 73 75 76 77 80 83 85 86 88 91 92 93 94 96 98 99 100 101 109 110 115 120 121 125 126 128 129 134 139 144 146 150 154 157 158 160 162 164 166 169 170 172 174 175 177 178 180 182 183 184 185 190 192 193 199 201 202 ...
result:
ok correct! (1 test case)
Test #71:
score: 3
Accepted
time: 1ms
memory: 3704kb
input:
1 1 5000 1000 4 11 14 15 16 28 29 35 37 41 43 45 47 52 53 57 58 60 62 64 71 72 73 75 80 82 83 89 92 94 103 106 109 112 113 114 119 123 125 128 129 137 138 139 143 147 148 155 156 167 168 170 171 173 174 176 177 186 190 192 201 206 207 209 215 216 217 218 220 222 224 229 234 235 238 239 249 251 254 2...
output:
3 10 13 12 9 27 26 34 36 40 42 44 46 51 50 56 55 59 61 63 70 69 68 74 79 81 78 88 91 93 102 105 108 111 110 107 118 122 124 127 126 136 135 134 142 146 145 154 153 166 165 169 164 172 163 175 162 185 189 191 200 205 204 208 214 213 212 211 219 221 223 228 233 232 237 236 248 250 253 252 256 247 261 ...
input:
2 1 5000 1000 3 9 10 12 13 26 27 34 36 40 42 44 46 50 51 55 56 59 61 63 68 69 70 74 78 79 81 88 91 93 102 105 107 108 110 111 118 122 124 126 127 134 135 136 142 145 146 153 154 162 163 164 165 166 169 172 175 185 189 191 200 204 205 208 211 212 213 214 219 221 223 228 232 233 236 237 247 248 250 25...
output:
4 11 14 15 16 28 29 35 37 41 43 45 47 52 53 57 58 60 62 64 71 72 73 75 80 82 83 89 92 94 103 106 109 112 113 114 119 123 125 128 129 137 138 139 143 147 148 155 156 167 168 170 171 173 174 176 177 186 190 192 201 206 207 209 215 216 217 218 220 222 224 229 234 235 238 239 249 251 254 255 257 258 262...
result:
ok correct! (1 test case)
Test #72:
score: 3
Accepted
time: 1ms
memory: 3652kb
input:
1 1 5000 1300 908 910 911 912 914 916 918 919 921 922 923 927 928 929 930 933 934 939 940 941 943 944 946 948 949 950 951 952 957 958 959 963 964 967 971 972 973 983 984 985 986 987 988 989 990 991 992 993 994 996 997 999 1000 1001 1005 1007 1009 1010 1011 1012 1014 1015 1019 1021 1022 1023 1024 102...
output:
907 909 906 905 913 915 917 904 920 903 902 926 925 924 901 932 931 938 937 936 942 935 945 947 900 899 898 897 956 955 954 962 961 966 970 969 968 982 981 980 979 978 977 976 975 974 965 960 953 995 896 998 895 894 1004 1006 1008 1003 1002 893 1013 892 1018 1020 1017 1016 891 1025 1027 1030 1029 89...
input:
2 1 5000 1300 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 37...
output:
908 910 911 912 914 916 918 919 921 922 923 927 928 929 930 933 934 939 940 941 943 944 946 948 949 950 951 952 957 958 959 963 964 967 971 972 973 983 984 985 986 987 988 989 990 991 992 993 994 996 997 999 1000 1001 1005 1007 1009 1010 1011 1012 1014 1015 1019 1021 1022 1023 1024 1026 1028 1031 10...
result:
ok correct! (1 test case)
Test #73:
score: 3
Accepted
time: 1ms
memory: 3624kb
input:
1 1 5000 2000 1 2 3 4 10 12 13 16 18 22 23 24 25 27 28 29 30 31 32 34 36 37 38 39 42 46 47 49 51 53 55 56 58 59 61 62 63 65 66 67 68 70 71 72 73 74 75 77 78 80 81 82 83 84 85 88 89 95 96 97 101 102 103 104 110 111 112 113 115 116 117 118 119 121 122 123 124 125 127 128 129 131 132 133 135 136 140 14...
output:
4996 4995 4992 4987 9 11 8 15 17 21 20 19 14 26 7 6 5 4986 4985 33 35 4984 4983 4978 41 45 44 48 50 52 54 43 57 40 60 4973 4972 64 4970 4967 4966 69 4965 4964 4962 4959 4953 76 4950 79 4949 4945 4943 4942 4941 87 86 94 93 92 100 99 98 91 109 108 107 106 114 105 90 4938 4937 120 4932 4928 4927 4925 1...
input:
2 1 5000 2000 5 6 7 8 9 11 14 15 17 19 20 21 26 33 35 40 41 43 44 45 48 50 52 54 57 60 64 69 76 79 86 87 90 91 92 93 94 98 99 100 105 106 107 108 109 114 120 126 130 134 137 138 139 144 150 153 156 159 166 167 174 176 179 181 183 185 186 190 191 192 193 199 202 210 212 218 226 240 242 243 244 247 25...
output:
1 2 3 4 10 12 13 16 18 22 23 24 25 27 28 29 30 31 32 34 36 37 38 39 42 46 47 49 51 53 55 56 58 59 61 62 63 65 66 67 68 70 71 72 73 74 75 77 78 80 81 82 83 84 85 88 89 95 96 97 101 102 103 104 110 111 112 113 115 116 117 118 119 121 122 123 124 125 127 128 129 131 132 133 135 136 140 141 142 143 145 ...
result:
ok correct! (1 test case)
Test #74:
score: 3
Accepted
time: 1ms
memory: 3580kb
input:
1 1 5000 2100 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 15...
output:
83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 5000 4999 4998 4997 4996 4995 4994 4993 4992 4991 4990 4989 ...
input:
2 1 5000 2100 1 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 2984 2985 2986 2987 2988 2989 2990 2991 2992 2...
output:
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 ...
result:
ok correct! (1 test case)
Test #75:
score: 3
Accepted
time: 1ms
memory: 3668kb
input:
1 1 5000 1700 1 2 4 5 6 7 8 12 16 17 18 20 22 24 25 26 28 29 30 31 32 33 36 37 38 39 40 41 44 45 46 47 48 49 50 51 55 58 59 60 61 62 63 64 65 67 68 71 72 73 74 75 80 81 82 83 84 85 86 87 88 89 90 92 95 97 98 99 100 101 102 104 105 108 109 110 111 113 114 115 120 121 122 123 124 125 127 128 129 130 1...
output:
5000 4999 3 4998 4997 4996 4995 11 15 14 13 19 21 23 10 9 27 4994 4993 4992 4991 4990 35 34 4989 4988 4987 4986 43 42 4985 4984 4983 4982 4981 4980 54 57 56 53 52 4979 4978 4977 4976 66 4975 70 69 4974 4973 4972 79 78 77 76 4971 4970 4969 4968 4967 4966 4965 91 94 96 93 4964 4963 4962 4961 103 4960 ...
input:
2 1 5000 1700 3 9 10 11 13 14 15 19 21 23 27 34 35 42 43 52 53 54 56 57 66 69 70 76 77 78 79 91 93 94 96 103 106 107 112 116 117 118 119 126 132 135 138 140 141 144 145 147 150 152 155 158 161 162 167 169 171 172 173 174 176 177 178 181 183 186 187 191 192 194 195 196 205 207 209 213 216 231 241 242...
output:
1 2 4 5 6 7 8 12 16 17 18 20 22 24 25 26 28 29 30 31 32 33 36 37 38 39 40 41 44 45 46 47 48 49 50 51 55 58 59 60 61 62 63 64 65 67 68 71 72 73 74 75 80 81 82 83 84 85 86 87 88 89 90 92 95 97 98 99 100 101 102 104 105 108 109 110 111 113 114 115 120 121 122 123 124 125 127 128 129 130 131 133 134 136...
result:
ok correct! (1 test case)
Test #76:
score: 3
Accepted
time: 1ms
memory: 3856kb
input:
1 1 5000 1200 3003 3007 3008 3009 3010 3012 3013 3014 3016 3017 3018 3019 3020 3022 3023 3024 3026 3027 3028 3029 3031 3032 3033 3034 3036 3039 3040 3041 3043 3044 3045 3048 3049 3052 3053 3056 3058 3059 3060 3062 3065 3066 3067 3069 3070 3073 3075 3077 3078 3079 3081 3082 3083 3084 3085 3087 3088 3...
output:
3002 3006 3005 3004 3001 3011 3000 2999 3015 2998 2997 2996 2995 3021 2994 2993 3025 2992 2991 2990 3030 2989 2988 2987 3035 3038 3037 2986 3042 2985 2984 3047 3046 3051 3050 3055 3057 3054 2983 3061 3064 3063 2982 3068 2981 3072 3074 3076 3071 2980 3080 2979 2978 2977 2976 3086 2975 3090 3093 3095 ...
input:
2 1 5000 1200 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2...
output:
3003 3007 3008 3009 3010 3012 3013 3014 3016 3017 3018 3019 3020 3022 3023 3024 3026 3027 3028 3029 3031 3032 3033 3034 3036 3039 3040 3041 3043 3044 3045 3048 3049 3052 3053 3056 3058 3059 3060 3062 3065 3066 3067 3069 3070 3073 3075 3077 3078 3079 3081 3082 3083 3084 3085 3087 3088 3091 3094 3096 ...
result:
ok correct! (1 test case)
Test #77:
score: 3
Accepted
time: 1ms
memory: 3860kb
input:
1 500 6 1 4 6 3 1 2 6 10 5 3 4 5 8 10 7 1 3 9 2 2 3 9 3 7 8 9 10 1 9 2 1 2 9 2 4 6 10 5 3 4 6 8 9 10 4 3 7 8 10 2 1 2 8 1 4 2 1 1 8 1 7 7 2 2 5 7 1 2 10 4 2 4 9 10 3 1 1 6 2 3 4 7 3 1 5 6 9 2 2 4 9 1 5 9 3 5 8 9 8 4 1 2 5 6 10 1 3 3 1 3 4 1 1 10 1 6 6 3 3 4 5 8 3 1 3 4 7 2 4 6 5 1 3 4 2 1 2 6 3 3 4 ...
output:
3 5 4 3 2 1 9 7 6 2 1 9 6 5 4 8 1 3 5 2 1 5 7 10 2 6 5 9 1 3 2 6 1 4 1 1 3 8 7 3 2 1 7 4 3 1 3 4 4 7 6 8 7 4 3 2 2 4 5 2 1 6 8 2 7 3 5 2 4 3 2 1 5 9 8 3 5 1 5 7 2 3 1 8 7 2 1 5 10 1 4 8 9 5 4 8 2 1 2 1 2 1 8 4 3 1 6 1 5 5 4 1 2 9 7 3 6 5 2 5 2 1...
input:
2 500 9 2 2 9 5 1 1 9 2 3 9 5 2 4 5 8 2 5 6 4 1 1 9 1 4 2 1 2 10 2 8 9 7 3 2 3 7 6 1 1 4 2 1 3 4 1 4 10 3 3 5 8 8 3 1 4 6 8 3 2 5 7 10 3 1 4 10 9 1 2 4 2 1 2 2 1 1 6 2 2 5 3 1 2 7 1 7 4 2 1 3 9 3 5 7 8 8 1 1 4 2 2 3 5 2 4 5 8 1 3 10 5 3 5 6 7 9 5 2 2 5 9 1 3 7 2 2 6 3 1 2 10 2 3 5 4 2 1 3 4 1 3 9 3 ...
output:
1 3 2 1 4 1 2 7 8 2 5 1 1 10 1 4 5 2 2 4 1 4 6 9 2 5 7 3 6 8 2 3 5 3 3 4 2 3 6 3 1 2 4 1 6 9 2 1 4 1 2 4 1 2 4 8 10 1 3 4 3 7 3 4 6 2 4 4 4 7 9 1 2 1 3 4 7 3 4 2 3 3 1 3 5 3 6 7 2 5 4 5 2 3 8 9 4 1 2 4 6 5 1 2 2 8 1 6 7 2 6 5 7 10 3 4 3 4 3...
result:
ok correct! (500 test cases)
Test #78:
score: 3
Accepted
time: 1ms
memory: 3848kb
input:
1 50 2 1 1 46 8 7 10 17 18 26 27 31 43 47 22 6 7 10 14 15 16 17 18 19 21 22 24 25 26 35 36 37 40 43 44 45 46 39 7 5 6 11 13 16 22 23 60 27 1 2 5 6 8 12 14 18 19 20 23 24 25 26 27 30 32 38 40 42 43 46 50 51 56 57 58 85 16 10 16 18 22 27 34 38 40 42 48 49 56 66 76 81 85 89 13 2 15 20 31 44 51 57 59 62...
output:
2 6 9 16 15 25 24 30 42 5 4 9 13 12 11 8 3 2 20 1 23 47 42 34 33 32 39 41 38 31 30 4 3 10 12 15 21 20 60 59 4 3 7 11 13 17 16 15 22 21 10 9 55 29 31 37 39 41 36 45 49 48 54 53 52 9 15 17 21 26 33 37 39 41 47 46 55 65 75 80 84 1 14 19 30 43 50 56 58 61 69 68 74 76 6 23 25 29 34 36 40 51 62 70 ...
input:
2 50 3 1 2 4 1 1 27 5 6 10 12 14 23 51 6 3 21 26 41 42 51 73 4 20 28 32 46 52 20 4 5 8 13 15 19 20 24 26 29 32 33 36 41 43 44 45 46 50 52 55 4 6 23 47 55 39 7 3 4 10 12 15 20 21 85 16 9 15 17 21 26 33 37 39 41 46 47 55 65 75 80 84 46 8 6 9 15 16 24 25 30 42 35 9 8 10 12 13 15 16 19 26 35 88 42 4 6 8...
output:
3 2 7 11 13 15 24 1 4 22 27 43 44 21 29 33 47 1 2 6 7 9 14 16 21 22 25 27 30 34 35 37 42 47 48 49 51 1 7 24 48 5 6 11 13 16 22 23 10 16 18 22 27 34 38 40 42 48 49 56 66 76 81 85 7 10 17 18 26 27 31 43 1 9 11 14 17 18 20 21 27 1 2 3 5 7 9 12 13 14 16 20 21 23 26 27 33 40 42 43 46 47 48 49 ...
result:
ok correct! (50 test cases)
Subtask #10:
score: 7
Accepted
Test #79:
score: 7
Accepted
time: 6ms
memory: 4364kb
input:
1 1 300000 10000 43 78 83 84 146 195 197 227 230 242 250 270 275 280 288 313 317 358 363 456 497 533 535 537 549 569 573 600 623 685 717 726 730 740 745 758 763 793 796 801 811 820 823 835 848 900 908 910 935 941 951 955 961 1009 1051 1093 1177 1183 1230 1294 1321 1332 1368 1403 1483 1500 1511 1574 ...
output:
42 77 82 81 145 194 196 226 229 241 249 269 274 279 287 312 316 357 362 455 496 532 534 536 548 568 572 599 622 684 716 725 729 739 744 757 762 792 795 800 810 819 822 834 847 899 907 909 934 940 950 954 960 1008 1050 1092 1176 1182 1229 1293 1320 1331 1367 1402 1482 1499 1510 1573 1572 1593 1601 16...
input:
2 1 300000 10000 42 77 81 82 145 194 196 226 229 241 249 269 274 279 287 312 316 357 362 455 496 532 534 536 548 568 572 599 622 684 716 725 729 739 744 757 762 792 795 800 810 819 822 834 847 899 907 909 934 940 950 954 960 1008 1050 1092 1176 1182 1229 1293 1320 1331 1367 1402 1482 1499 1510 1572 ...
output:
43 78 83 84 146 195 197 227 230 242 250 270 275 280 288 313 317 358 363 456 497 533 535 537 549 569 573 600 623 685 717 726 730 740 745 758 763 793 796 801 811 820 823 835 848 900 908 910 935 941 951 955 961 1009 1051 1093 1177 1183 1230 1294 1321 1332 1368 1403 1483 1500 1511 1574 1575 1594 1602 16...
result:
ok correct! (1 test case)
Test #80:
score: 7
Accepted
time: 29ms
memory: 6024kb
input:
1 1 300000 50000 1 4 11 13 15 22 36 40 41 44 45 46 49 56 57 67 70 83 86 90 92 95 103 108 113 116 122 128 134 141 144 153 154 156 163 164 171 172 181 194 196 197 205 206 207 209 223 231 239 249 259 261 266 281 288 291 301 311 318 319 326 339 368 371 381 383 393 395 403 407 416 418 436 440 442 447 452...
output:
300000 3 10 12 14 21 35 39 38 43 42 37 48 55 54 66 69 82 85 89 91 94 102 107 112 115 121 127 133 140 143 152 151 155 162 161 170 169 180 193 195 192 204 203 202 208 222 230 238 248 258 260 265 280 287 290 300 310 317 316 325 338 367 370 380 382 392 394 402 406 415 417 435 439 441 446 451 454 453 461...
input:
2 1 300000 50000 3 10 12 14 21 35 37 38 39 42 43 48 54 55 66 69 82 85 89 91 94 102 107 112 115 121 127 133 140 143 151 152 155 161 162 169 170 180 192 193 195 202 203 204 208 222 230 238 248 258 260 265 280 287 290 300 310 316 317 325 338 367 370 380 382 392 394 402 406 415 417 435 439 441 446 451 4...
output:
1 4 11 13 15 22 36 40 41 44 45 46 49 56 57 67 70 83 86 90 92 95 103 108 113 116 122 128 134 141 144 153 154 156 163 164 171 172 181 194 196 197 205 206 207 209 223 231 239 249 259 261 266 281 288 291 301 311 318 319 326 339 368 371 381 383 393 395 403 407 416 418 436 440 442 447 452 455 456 462 464 ...
result:
ok correct! (1 test case)
Test #81:
score: 7
Accepted
time: 48ms
memory: 6872kb
input:
1 1 300000 80000 3 7 8 13 18 20 21 22 23 28 31 39 42 44 45 49 51 61 68 69 78 79 80 84 92 101 102 107 111 114 115 116 117 118 120 121 123 128 129 132 136 138 141 143 156 160 165 168 169 170 172 175 179 193 195 197 203 206 210 213 217 218 223 235 240 250 255 258 259 260 262 268 276 287 289 290 293 294...
output:
2 6 5 12 17 19 16 15 14 27 30 38 41 43 40 48 50 60 67 66 77 76 75 83 91 100 99 106 110 113 112 109 108 105 119 104 122 127 126 131 135 137 140 142 155 159 164 167 166 163 171 174 178 192 194 196 202 205 209 212 216 215 222 234 239 249 254 257 256 253 261 267 275 286 288 285 292 291 295 284 298 301 3...
input:
2 1 300000 80000 2 5 6 12 14 15 16 17 19 27 30 38 40 41 43 48 50 60 66 67 75 76 77 83 91 99 100 104 105 106 108 109 110 112 113 119 122 126 127 131 135 137 140 142 155 159 163 164 166 167 171 174 178 192 194 196 202 205 209 212 215 216 222 234 239 249 253 254 256 257 261 267 275 284 285 286 288 291 ...
output:
3 7 8 13 18 20 21 22 23 28 31 39 42 44 45 49 51 61 68 69 78 79 80 84 92 101 102 107 111 114 115 116 117 118 120 121 123 128 129 132 136 138 141 143 156 160 165 168 169 170 172 175 179 193 195 197 203 206 210 213 217 218 223 235 240 250 255 258 259 260 262 268 276 287 289 290 293 294 296 297 299 302 ...
result:
ok correct! (1 test case)
Test #82:
score: 7
Accepted
time: 60ms
memory: 7672kb
input:
1 1 300000 120000 2 3 5 9 10 13 14 15 22 23 24 27 29 34 37 39 42 44 46 48 51 53 58 61 62 64 70 71 75 76 77 78 85 86 88 89 90 91 92 101 102 104 107 109 110 111 113 114 115 116 125 127 130 131 133 134 136 138 139 142 145 149 151 153 155 156 158 160 162 166 170 171 175 176 177 179 180 181 182 183 184 1...
output:
1 300000 4 8 7 12 11 6 21 20 19 26 28 33 36 38 41 43 45 47 50 52 57 60 59 63 69 68 74 73 72 67 84 83 87 82 81 80 79 100 99 103 106 108 105 98 112 97 96 95 124 126 129 128 132 123 135 137 122 141 144 148 150 152 154 147 157 159 161 165 169 168 174 173 172 178 167 164 163 146 143 140 188 191 193 195 1...
input:
2 1 300000 120000 1 4 6 7 8 11 12 19 20 21 26 28 33 36 38 41 43 45 47 50 52 57 59 60 63 67 68 69 72 73 74 79 80 81 82 83 84 87 95 96 97 98 99 100 103 105 106 108 112 122 123 124 126 128 129 132 135 137 140 141 143 144 146 147 148 150 152 154 157 159 161 163 164 165 167 168 169 172 173 174 178 187 18...
output:
2 3 5 9 10 13 14 15 22 23 24 27 29 34 37 39 42 44 46 48 51 53 58 61 62 64 70 71 75 76 77 78 85 86 88 89 90 91 92 101 102 104 107 109 110 111 113 114 115 116 125 127 130 131 133 134 136 138 139 142 145 149 151 153 155 156 158 160 162 166 170 171 175 176 177 179 180 181 182 183 184 185 189 192 194 196...
result:
ok correct! (1 test case)
Test #83:
score: 7
Accepted
time: 49ms
memory: 6724kb
input:
1 1 300000 150000 1 2 3 4 6 7 8 9 10 11 12 13 14 15 19 20 21 22 23 24 25 26 27 28 29 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 66 68 69 70 71 72 73 75 76 77 78 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 105 106 107...
output:
300000 299993 299992 299991 5 299985 299980 299972 299966 299956 299941 299939 299931 299918 18 17 16 299890 299886 299885 299878 299844 299830 299823 299815 30 299801 299776 299769 299763 299758 299743 299742 39 299733 299724 299720 299707 299699 299683 299676 299674 299670 299659 299650 299636 299...
input:
2 1 300000 150000 5 16 17 18 30 39 56 67 74 82 100 104 114 118 125 130 164 174 193 195 201 208 209 210 237 239 251 264 275 277 282 292 300 302 305 326 328 345 350 358 364 370 371 373 376 386 387 393 395 425 426 427 428 441 442 446 451 452 465 473 488 494 515 527 529 539 542 551 553 566 576 582 588 5...
output:
1 2 3 4 6 7 8 9 10 11 12 13 14 15 19 20 21 22 23 24 25 26 27 28 29 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 66 68 69 70 71 72 73 75 76 77 78 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 105 106 107 108 109 110 111 1...
result:
ok correct! (1 test case)
Test #84:
score: 7
Accepted
time: 26ms
memory: 5912kb
input:
1 1 300000 50000 2 3 4 5 13 18 19 21 22 26 32 43 47 51 54 56 60 62 72 79 80 86 87 88 89 91 103 105 108 111 116 149 152 160 162 171 173 175 176 184 187 190 211 212 213 218 219 222 224 227 233 234 242 246 249 251 252 254 265 268 273 275 281 292 294 297 298 303 306 308 311 326 329 330 331 341 344 347 3...
output:
1 299999 299998 299995 12 17 16 20 15 25 31 42 46 50 53 55 59 61 71 78 77 85 84 83 82 90 102 104 107 110 115 148 151 159 161 170 172 174 169 183 186 189 210 209 208 217 216 221 223 226 232 231 241 245 248 250 247 253 264 267 272 274 280 291 293 296 295 302 305 307 310 325 328 327 324 340 343 346 359...
input:
2 1 300000 50000 1 12 15 16 17 20 25 31 42 46 50 53 55 59 61 71 77 78 82 83 84 85 90 102 104 107 110 115 148 151 159 161 169 170 172 174 183 186 189 208 209 210 216 217 221 223 226 231 232 241 245 247 248 250 253 264 267 272 274 280 291 293 295 296 302 305 307 310 324 325 327 328 340 343 346 359 362...
output:
2 3 4 5 13 18 19 21 22 26 32 43 47 51 54 56 60 62 72 79 80 86 87 88 89 91 103 105 108 111 116 149 152 160 162 171 173 175 176 184 187 190 211 212 213 218 219 222 224 227 233 234 242 246 249 251 252 254 265 268 273 275 281 292 294 297 298 303 306 308 311 326 329 330 331 341 344 347 360 363 366 369 38...
result:
ok correct! (1 test case)
Test #85:
score: 7
Accepted
time: 28ms
memory: 4752kb
input:
1 1 300000 80000 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31 32 33 35 37 38 40 42 43 44 45 47 48 49 50 51 52 53 56 57 60 61 62 64 66 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 84 85 86 88 89 90 91 92 93 94 95 97 98 100 101 102 104 105 106 107 108 109 110 111 113 ...
output:
299991 299965 299957 299945 299941 299938 299936 8 299932 299930 299929 299924 299910 299905 299902 299895 299894 299891 299887 299872 299847 299845 299841 299838 299831 299827 299823 299820 30 299815 299812 34 36 299811 39 41 299804 299795 299790 46 299789 299786 299763 299759 299746 299745 55 54 5...
input:
2 1 300000 80000 8 30 34 36 39 41 46 54 55 58 59 63 65 67 83 87 96 99 103 112 118 128 140 159 160 161 162 163 165 175 187 188 189 190 198 199 204 205 210 215 227 229 238 244 245 246 254 255 281 284 290 294 298 300 304 306 311 319 322 327 333 338 344 350 351 352 354 361 363 373 378 391 394 400 406 41...
output:
1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31 32 33 35 37 38 40 42 43 44 45 47 48 49 50 51 52 53 56 57 60 61 62 64 66 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 84 85 86 88 89 90 91 92 93 94 95 97 98 100 101 102 104 105 106 107 108 109 110 111 113 114 115 116 117 1...
result:
ok correct! (1 test case)
Test #86:
score: 7
Accepted
time: 47ms
memory: 6604kb
input:
1 1 300000 100000 1 3 6 8 9 11 12 19 20 21 22 27 28 29 31 32 38 40 43 44 46 47 48 52 55 56 61 65 66 68 69 70 72 76 83 90 92 97 99 100 102 104 105 106 108 109 114 115 116 121 122 124 125 126 128 129 131 132 134 135 136 137 138 145 146 147 148 150 155 157 160 161 162 163 165 166 167 173 175 176 178 17...
output:
300000 2 5 7 4 10 299999 18 17 16 15 26 25 24 30 23 37 39 42 41 45 36 35 51 54 53 60 64 63 67 62 59 71 75 82 89 91 96 98 95 101 103 94 93 107 88 113 112 111 120 119 123 118 117 127 110 130 87 133 86 85 84 81 144 143 142 141 149 154 156 159 158 153 152 164 151 140 172 174 171 177 170 169 182 181 168 ...
input:
2 1 300000 100000 2 4 5 7 10 13 14 15 16 17 18 23 24 25 26 30 33 34 35 36 37 39 41 42 45 49 50 51 53 54 57 58 59 60 62 63 64 67 71 73 74 75 77 78 79 80 81 82 84 85 86 87 88 89 91 93 94 95 96 98 101 103 107 110 111 112 113 117 118 119 120 123 127 130 133 139 140 141 142 143 144 149 151 152 153 154 15...
output:
1 3 6 8 9 11 12 19 20 21 22 27 28 29 31 32 38 40 43 44 46 47 48 52 55 56 61 65 66 68 69 70 72 76 83 90 92 97 99 100 102 104 105 106 108 109 114 115 116 121 122 124 125 126 128 129 131 132 134 135 136 137 138 145 146 147 148 150 155 157 160 161 162 163 165 166 167 173 175 176 178 179 180 183 184 185 ...
result:
ok correct! (1 test case)
Test #87:
score: 7
Accepted
time: 42ms
memory: 7596kb
input:
1 1 300000 90000 3 4 5 7 8 10 11 12 14 15 16 18 19 21 22 23 24 27 29 30 31 32 33 34 35 36 37 38 39 40 42 45 46 49 50 51 52 53 54 57 58 59 61 63 64 65 67 68 69 72 75 78 81 82 83 84 85 87 88 91 92 93 96 97 98 99 102 104 105 106 107 108 111 112 113 114 115 117 118 119 120 121 122 124 125 127 128 129 13...
output:
2 1 300000 6 299999 9 299998 299997 13 299996 299995 17 299994 20 299993 299992 299991 26 28 25 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 41 44 43 48 47 299980 299979 299978 299977 56 55 299976 60 62 299975 299974 66 299973 299972 71 74 77 80 79 76 73 70 86 299971 90 89 2...
input:
2 1 300000 90000 1 2 6 9 13 17 20 25 26 28 41 43 44 47 48 55 56 60 62 66 70 71 73 74 76 77 79 80 86 89 90 94 95 100 101 103 109 110 116 123 126 131 135 136 138 140 141 142 143 144 145 146 148 152 154 155 157 161 162 163 165 168 170 173 175 176 177 178 180 184 185 186 189 191 194 197 198 199 203 204 ...
output:
3 4 5 7 8 10 11 12 14 15 16 18 19 21 22 23 24 27 29 30 31 32 33 34 35 36 37 38 39 40 42 45 46 49 50 51 52 53 54 57 58 59 61 63 64 65 67 68 69 72 75 78 81 82 83 84 85 87 88 91 92 93 96 97 98 99 102 104 105 106 107 108 111 112 113 114 115 117 118 119 120 121 122 124 125 127 128 129 130 132 133 134 137...
result:
ok correct! (1 test case)
Test #88:
score: 7
Accepted
time: 39ms
memory: 5820kb
input:
1 1 300000 110000 130000 130002 130003 130004 130005 130006 130007 130008 130009 130010 130011 130013 130016 130017 130019 130020 130021 130022 130024 130025 130026 130027 130028 130029 130030 130031 130033 130035 130037 130038 130039 130040 130041 130042 130043 130044 130046 130047 130049 130050 13...
output:
129999 130001 129998 129997 129996 129995 129994 129993 129992 129991 129990 130012 130015 130014 130018 129989 129988 129987 130023 129986 129985 129984 129983 129982 129981 129980 130032 130034 130036 129979 129978 129977 129976 129975 129974 129973 130045 129972 130048 129971 130051 129970 130054...
input:
2 1 300000 110000 80000 80001 80002 80003 80004 80005 80006 80007 80008 80009 80010 80011 80012 80013 80014 80015 80016 80017 80018 80019 80020 80021 80022 80023 80024 80025 80026 80027 80028 80029 80030 80031 80032 80033 80034 80035 80036 80037 80038 80039 80040 80041 80042 80043 80044 80045 80046 ...
output:
130000 130002 130003 130004 130005 130006 130007 130008 130009 130010 130011 130013 130016 130017 130019 130020 130021 130022 130024 130025 130026 130027 130028 130029 130030 130031 130033 130035 130037 130038 130039 130040 130041 130042 130043 130044 130046 130047 130049 130050 130052 130053 130055...
result:
ok correct! (1 test case)
Test #89:
score: 7
Accepted
time: 26ms
memory: 4764kb
input:
1 1 300000 140000 1 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 ...
output:
252151 252150 252149 252148 252147 252146 252145 252144 252143 252142 252141 252140 252139 252138 252137 252136 252135 252134 252133 252132 252131 252130 252129 252128 252127 252126 252125 252124 252123 252122 252121 252120 252119 252118 252117 252116 252115 252114 252113 252112 252111 252110 252109...
input:
2 1 300000 140000 112152 112153 112154 112155 112156 112157 112158 112159 112160 112161 112162 112163 112164 112165 112166 112167 112168 112169 112170 112171 112172 112173 112174 112175 112176 112177 112178 112179 112180 112181 112182 112183 112184 112185 112186 112187 112188 112189 112190 112191 11...
output:
1 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 ...
result:
ok correct! (1 test case)
Test #90:
score: 7
Accepted
time: 14ms
memory: 3796kb
input:
1 30000 5 2 3 4 6 2 1 5 5 1 4 4 1 1 4 1 4 2 1 1 7 2 3 6 5 2 1 2 3 1 3 2 1 2 4 2 1 3 6 1 1 2 1 1 10 2 2 5 10 2 1 3 7 3 1 2 4 3 1 2 6 1 2 10 3 1 3 8 5 1 2 5 2 1 4 9 1 7 6 3 2 4 5 4 1 4 10 5 4 5 6 9 10 2 1 1 10 2 6 9 5 2 2 4 7 2 6 7 5 1 2 5 1 5 5 2 1 5 2 1 1 2 1 1 4 2 1 4 10 3 7 8 10 9 4 5 6 7 9 5 2 4 ...
output:
2 1 6 4 3 4 3 2 2 5 5 4 2 1 4 2 6 2 1 4 10 2 7 6 3 1 1 10 2 7 1 5 3 6 1 3 6 3 3 2 1 8 7 2 5 8 1 3 5 4 1 4 4 3 2 2 3 2 6 5 9 4 3 2 8 3 2 5 1 1 3 5 1 8 6 1 3 5 4 1 4 3 1 5 4 3 4 1 1 5 1 9 1 9 4 7 1 4 3 2 1 5 4 2 1 6 9 2 8 3 2 6 8 2 1 5 1 ...
input:
2 30000 8 1 5 8 2 3 7 4 1 3 9 1 9 10 3 5 6 10 8 3 2 3 5 5 1 5 7 2 4 5 4 2 1 2 9 1 7 10 5 1 3 4 5 6 10 1 8 10 2 5 7 5 2 4 5 8 1 8 4 2 2 4 4 1 4 10 3 1 2 9 8 1 1 10 1 6 3 1 1 6 3 4 5 6 10 1 1 5 2 1 2 9 4 1 2 4 9 3 1 3 3 1 1 6 2 2 6 7 3 1 2 4 9 2 6 7 5 1 3 9 3 4 6 9 5 1 2 2 1 2 4 2 2 4 3 1 3 10 2 5 8 8...
output:
6 4 8 4 1 1 7 8 4 6 7 1 6 7 3 4 8 2 7 8 9 10 9 6 8 1 2 1 1 3 1 3 4 10 2 7 2 1 2 3 2 3 4 3 5 6 7 1 2 1 3 3 5 6 8 9 4 1 5 7 3 1 1 3 1 6 9 4 5 7 8 1 5 6 6 1 1 2 3 2 1 4 6 1 2 7 3 3 4 2 3 1 1 4 2 3 4 7 2 3 5 1 3 6 3 5 4 5 3 9 1 2 5 9 3 4 1 4 5...
result:
ok correct! (30000 test cases)
Test #91:
score: 7
Accepted
time: 14ms
memory: 3828kb
input:
1 3000 97 27 3 9 13 14 15 18 20 21 35 46 48 54 56 57 58 59 63 64 73 76 77 82 86 88 90 91 92 94 38 5 7 9 12 13 14 17 18 19 20 22 24 25 26 28 29 31 43 46 50 53 55 56 57 62 64 65 66 68 69 71 82 83 85 86 89 91 94 74 22 4 5 6 13 17 21 29 32 33 34 35 38 39 41 44 56 58 62 66 67 69 73 67 19 1 2 8 12 13 19 2...
output:
2 8 12 11 10 17 19 16 34 45 47 53 55 52 51 50 62 61 72 75 74 81 85 87 89 84 83 4 6 8 11 10 3 16 15 2 1 21 23 93 92 27 90 30 42 45 49 52 54 51 48 61 63 60 59 67 58 70 81 80 84 79 88 87 78 3 2 1 12 16 20 28 31 30 27 26 37 36 40 43 55 57 61 65 64 68 72 67 66 7 11 10 18 22 26 28 25 24 37 36 35 43 46 ...
input:
2 3000 81 20 4 14 15 26 30 31 37 39 40 44 46 47 51 58 59 62 64 65 67 72 97 21 6 11 12 18 29 40 42 44 56 58 69 75 79 80 81 84 86 87 90 95 97 71 22 2 3 9 14 19 20 23 29 37 42 43 45 52 54 57 58 59 61 64 67 68 71 52 20 3 10 11 13 14 18 19 20 23 31 34 35 38 40 44 45 46 47 48 49 72 22 4 5 11 12 16 17 22 2...
output:
5 16 17 27 32 33 38 41 42 45 48 49 52 60 61 63 66 68 69 73 1 7 13 14 19 30 41 43 45 57 59 70 76 82 83 85 88 89 91 92 96 1 4 5 10 15 21 22 24 30 38 44 46 47 53 55 60 62 63 65 66 69 70 1 2 4 5 12 15 16 17 21 22 24 25 32 36 37 39 41 50 51 52 1 2 3 6 7 8 13 14 18 19 25 28 29 30 31 41 46 57 63 65 68 ...
result:
ok correct! (3000 test cases)
Test #92:
score: 7
Accepted
time: 20ms
memory: 3812kb
input:
1 300 515 177 2 5 6 7 8 9 13 17 26 38 46 50 52 55 57 59 60 61 62 68 70 72 80 82 86 87 88 93 94 103 104 105 106 111 116 122 123 126 127 129 134 138 140 144 146 147 149 150 152 155 159 162 164 166 168 169 171 172 177 182 183 188 190 191 198 199 202 204 208 210 213 216 218 222 223 225 227 228 229 233 2...
output:
1 4 3 515 513 512 12 16 25 37 45 49 51 54 56 58 53 48 47 67 69 71 79 81 85 84 83 92 91 102 101 100 99 110 115 121 120 125 124 128 133 137 139 143 145 142 148 141 151 154 158 161 163 165 167 160 170 157 176 181 180 187 189 186 197 196 201 203 207 209 212 215 217 221 220 224 226 219 214 232 238 240 25...
input:
2 300 684 56 5 28 38 41 52 60 84 96 124 127 136 161 166 183 193 198 220 221 223 259 263 273 302 312 327 338 339 340 373 385 404 415 429 431 446 447 449 453 459 460 469 470 489 491 499 527 533 541 559 564 577 617 634 644 667 670 965 197 3 6 12 13 16 19 20 26 36 41 42 50 56 61 65 70 72 77 81 82 96 98 ...
output:
6 29 39 42 53 61 85 97 125 128 137 162 167 184 194 199 222 224 225 260 264 274 303 313 328 341 342 343 374 386 405 416 430 432 448 450 451 454 461 462 471 472 490 492 500 528 534 542 560 565 578 618 635 645 668 671 4 7 14 15 17 21 22 27 37 43 44 51 57 62 66 71 73 78 83 84 97 99 104 106 109 112 123 ...
result:
ok correct! (300 test cases)
Subtask #11:
score: 7
Accepted
Test #93:
score: 7
Accepted
time: 3ms
memory: 3872kb
input:
1 1 1000000000 5000 142830 837372 1031624 1394124 1397380 1577671 1619716 1895054 2004216 2067374 2120527 2234328 2549170 3097800 3390668 3567753 3775237 4797343 4814389 4971353 5607418 5619485 5903034 6036068 6083563 6154402 6274315 6596441 6869140 7332716 7670739 7711787 7715259 7964665 8009716 81...
output:
142829 837371 1031623 1394123 1397379 1577670 1619715 1895053 2004215 2067373 2120526 2234327 2549169 3097799 3390667 3567752 3775236 4797342 4814388 4971352 5607417 5619484 5903033 6036067 6083562 6154401 6274314 6596440 6869139 7332715 7670738 7711786 7715258 7964664 8009715 8145748 8505442 870600...
input:
2 1 1000000000 5000 142829 837371 1031623 1394123 1397379 1577670 1619715 1895053 2004215 2067373 2120526 2234327 2549169 3097799 3390667 3567752 3775236 4797342 4814388 4971352 5607417 5619484 5903033 6036067 6083562 6154401 6274314 6596440 6869139 7332715 7670738 7711786 7715258 7964664 8009715 81...
output:
142830 837372 1031624 1394124 1397380 1577671 1619716 1895054 2004216 2067374 2120527 2234328 2549170 3097800 3390668 3567753 3775237 4797343 4814389 4971353 5607418 5619485 5903034 6036068 6083563 6154402 6274315 6596441 6869140 7332716 7670739 7711787 7715259 7964665 8009716 8145749 8505443 870600...
result:
ok correct! (1 test case)
Test #94:
score: 7
Accepted
time: 3ms
memory: 4148kb
input:
1 1 30000 5000 3 6 12 24 27 31 35 44 49 51 56 63 67 68 70 72 77 81 85 86 90 94 105 108 115 122 131 132 140 148 149 170 172 175 181 186 191 196 200 202 204 210 218 221 227 229 230 231 232 234 235 239 241 255 284 286 289 290 291 300 302 303 306 318 322 324 327 345 348 367 373 375 378 380 386 389 404 4...
output:
2 5 11 23 26 30 34 43 48 50 55 62 66 65 69 71 76 80 84 83 89 93 104 107 114 121 130 129 139 147 146 169 171 174 180 185 190 195 199 201 203 209 217 220 226 228 225 224 223 233 222 238 240 254 283 285 288 287 282 299 301 298 305 317 321 323 326 344 347 366 372 374 377 379 385 388 403 405 430 441 443 ...
input:
2 1 30000 5000 2 5 11 23 26 30 34 43 48 50 55 62 65 66 69 71 76 80 83 84 89 93 104 107 114 121 129 130 139 146 147 169 171 174 180 185 190 195 199 201 203 209 217 220 222 223 224 225 226 228 233 238 240 254 282 283 285 287 288 298 299 301 305 317 321 323 326 344 347 366 372 374 377 379 385 388 403 4...
output:
3 6 12 24 27 31 35 44 49 51 56 63 67 68 70 72 77 81 85 86 90 94 105 108 115 122 131 132 140 148 149 170 172 175 181 186 191 196 200 202 204 210 218 221 227 229 230 231 232 234 235 239 241 255 284 286 289 290 291 300 302 303 306 318 322 324 327 345 348 367 373 375 378 380 386 389 404 406 431 442 444 ...
result:
ok correct! (1 test case)
Test #95:
score: 7
Accepted
time: 2ms
memory: 3708kb
input:
1 1 1000000000 5000 387339264 387339266 387339267 387339268 387339270 387339271 387339272 387339273 387339274 387339275 387339276 387339277 387339278 387339279 387339280 387339281 387339282 387339285 387339287 387339288 387339289 387339291 387339292 387339293 387339294 387339296 387339297 387339299 ...
output:
387339263 387339265 387339262 387339261 387339269 387339260 387339259 387339258 387339257 387339256 387339255 387339254 387339253 387339252 387339251 387339250 387339249 387339284 387339286 387339283 387339248 387339290 387339247 387339246 387339245 387339295 387339244 387339298 387339243 387339242 ...
input:
2 1 1000000000 5000 387336263 387336264 387336265 387336266 387336267 387336268 387336269 387336270 387336271 387336272 387336273 387336274 387336275 387336276 387336277 387336278 387336279 387336280 387336281 387336282 387336283 387336284 387336285 387336286 387336287 387336288 387336289 387336290 ...
output:
387339264 387339266 387339267 387339268 387339270 387339271 387339272 387339273 387339274 387339275 387339276 387339277 387339278 387339279 387339280 387339281 387339282 387339285 387339287 387339288 387339289 387339291 387339292 387339293 387339294 387339296 387339297 387339299 387339300 387339301 ...
result:
ok correct! (1 test case)
Test #96:
score: 7
Accepted
time: 2ms
memory: 4008kb
input:
1 1 1000000000 5000 639409160 639409161 639409162 639409163 639409164 639409171 639409172 639409175 639409178 639409180 639409182 639409183 639409184 639409185 639409186 639409188 639409190 639409192 639409193 639409194 639409197 639409200 639409201 639409202 639409203 639409205 639409207 639409208 ...
output:
639409159 639409158 639409157 639409156 639409155 639409170 639409169 639409174 639409177 639409179 639409181 639409176 639409173 639409168 639409167 639409187 639409189 639409191 639409166 639409165 639409196 639409199 639409198 639409195 639409154 639409204 639409206 639409153 639409213 639409212 ...
input:
2 1 1000000000 5000 639409073 639409074 639409075 639409076 639409077 639409078 639409079 639409080 639409081 639409082 639409083 639409084 639409085 639409086 639409087 639409088 639409089 639409090 639409091 639409092 639409093 639409094 639409095 639409096 639409097 639409098 639409099 639409100 ...
output:
639409160 639409161 639409162 639409163 639409164 639409171 639409172 639409175 639409178 639409180 639409182 639409183 639409184 639409185 639409186 639409188 639409190 639409192 639409193 639409194 639409197 639409200 639409201 639409202 639409203 639409205 639409207 639409208 639409214 639409215 ...
result:
ok correct! (1 test case)
Test #97:
score: 7
Accepted
time: 3ms
memory: 3872kb
input:
1 1 1000000000 5000 1 3 7 9 15 17 18 22 23 24 27 33 35 45 48 50 52 53 64 70 71 78 81 86 87 90 91 94 99 100 105 107 108 121 127 130 136 140 146 149 153 155 159 161 169 171 175 176 182 194 204 205 208 210 213 232 234 240 241 242 245 248 253 254 266 273 275 276 280 288 289 290 291 298 300 301 305 306 3...
output:
999999999 2 6 8 14 16 13 21 20 19 26 32 34 44 47 49 51 46 63 69 68 77 80 85 84 89 88 93 98 97 104 106 103 120 126 129 135 139 145 148 152 154 158 160 168 170 174 173 181 193 203 202 207 209 212 231 233 239 238 237 244 247 252 251 265 272 274 271 279 287 286 285 284 297 299 296 304 303 317 319 323 32...
input:
2 1 1000000000 5000 2 6 8 13 14 16 19 20 21 26 32 34 44 46 47 49 51 63 68 69 77 80 84 85 88 89 93 97 98 103 104 106 120 126 129 135 139 145 148 152 154 158 160 168 170 173 174 181 193 202 203 207 209 212 231 233 237 238 239 244 247 251 252 265 271 272 274 279 284 285 286 287 296 297 299 303 304 317 ...
output:
1 3 7 9 15 17 18 22 23 24 27 33 35 45 48 50 52 53 64 70 71 78 81 86 87 90 91 94 99 100 105 107 108 121 127 130 136 140 146 149 153 155 159 161 169 171 175 176 182 194 204 205 208 210 213 232 234 240 241 242 245 248 253 254 266 273 275 276 280 288 289 290 291 298 300 301 305 306 318 320 324 325 330 3...
result:
ok correct! (1 test case)
Test #98:
score: 7
Accepted
time: 3ms
memory: 4048kb
input:
1 1 1000000000 5000 1 10 11 18 21 23 24 26 27 32 33 34 38 40 46 56 57 61 63 66 67 70 73 74 76 77 85 89 90 91 92 93 94 97 98 100 102 105 107 108 111 116 120 126 128 129 132 135 139 141 145 153 155 161 165 166 168 169 172 174 178 181 182 184 187 192 194 200 205 209 211 215 222 224 225 228 231 236 245 ...
output:
1000000000 9 8 17 20 22 19 25 16 31 30 29 37 39 45 55 54 60 62 65 64 69 72 71 75 68 84 88 87 86 83 82 81 96 95 99 101 104 106 103 110 115 119 125 127 124 131 134 138 140 144 152 154 160 164 163 167 162 171 173 177 180 179 183 186 191 193 199 204 208 210 214 221 223 220 227 230 235 244 247 254 259 25...
input:
2 1 1000000000 5000 8 9 16 17 19 20 22 25 29 30 31 37 39 45 54 55 60 62 64 65 68 69 71 72 75 81 82 83 84 86 87 88 95 96 99 101 103 104 106 110 115 119 124 125 127 131 134 138 140 144 152 154 160 162 163 164 167 171 173 177 179 180 183 186 191 193 199 204 208 210 214 220 221 223 227 230 235 244 247 2...
output:
1 10 11 18 21 23 24 26 27 32 33 34 38 40 46 56 57 61 63 66 67 70 73 74 76 77 85 89 90 91 92 93 94 97 98 100 102 105 107 108 111 116 120 126 128 129 132 135 139 141 145 153 155 161 165 166 168 169 172 174 178 181 182 184 187 192 194 200 205 209 211 215 222 224 225 228 231 236 245 248 255 260 261 265 ...
result:
ok correct! (1 test case)
Test #99:
score: 7
Accepted
time: 3ms
memory: 3884kb
input:
1 1 1000000000 5000 999975001 999975004 999975005 999975009 999975013 999975015 999975017 999975020 999975032 999975033 999975040 999975041 999975042 999975055 999975061 999975063 999975066 999975072 999975076 999975086 999975097 999975102 999975105 999975111 999975117 999975122 999975129 999975142 ...
output:
999975000 999975003 999975002 999975008 999975012 999975014 999975016 999975019 999975031 999975030 999975039 999975038 999975037 999975054 999975060 999975062 999975065 999975071 999975075 999975085 999975096 999975101 999975104 999975110 999975116 999975121 999975128 999975141 999975140 999975155 ...
input:
2 1 1000000000 5000 999975000 999975002 999975003 999975008 999975012 999975014 999975016 999975019 999975030 999975031 999975037 999975038 999975039 999975054 999975060 999975062 999975065 999975071 999975075 999975085 999975096 999975101 999975104 999975110 999975116 999975121 999975128 999975140 ...
output:
999975001 999975004 999975005 999975009 999975013 999975015 999975017 999975020 999975032 999975033 999975040 999975041 999975042 999975055 999975061 999975063 999975066 999975072 999975076 999975086 999975097 999975102 999975105 999975111 999975117 999975122 999975129 999975142 999975143 999975156 ...
result:
ok correct! (1 test case)
Test #100:
score: 7
Accepted
time: 2ms
memory: 3816kb
input:
1 1 1000000000 5000 623189688 623189689 623189690 623189691 623189692 623189693 623189694 623189695 623189696 623189697 623189698 623189699 623189700 623189701 623189702 623189703 623189704 623189705 623189706 623189707 623189708 623189709 623189710 623189711 623189712 623189713 623189714 623189715 ...
output:
623189687 623189686 623189685 623189684 623189683 623189682 623189681 623189680 623189679 623189678 623189677 623189676 623189675 623189674 623189673 623189672 623189671 623189670 623189669 623189668 623189667 623189666 623189665 623189664 623189663 623189662 623189661 623189660 623189659 623189658 ...
input:
2 1 1000000000 5000 623184688 623184689 623184690 623184691 623184692 623184693 623184694 623184695 623184696 623184697 623184698 623184699 623184700 623184701 623184702 623184703 623184704 623184705 623184706 623184707 623184708 623184709 623184710 623184711 623184712 623184713 623184714 623184715 ...
output:
623189688 623189689 623189690 623189691 623189692 623189693 623189694 623189695 623189696 623189697 623189698 623189699 623189700 623189701 623189702 623189703 623189704 623189705 623189706 623189707 623189708 623189709 623189710 623189711 623189712 623189713 623189714 623189715 623189716 623189717 ...
result:
ok correct! (1 test case)
Test #101:
score: 7
Accepted
time: 1ms
memory: 3664kb
input:
1 100 102234216 28 821836 12050893 19180771 27315903 30061799 30407373 33923060 35794838 40454507 40648598 41441128 46060216 48940648 48953100 52065427 52936567 54507464 57351436 60291379 60420114 64281695 68513184 74295066 77796659 85307683 85338464 89185551 94023035 950323965 11 510509 184260338 1...
output:
821835 12050892 19180770 27315902 30061798 30407372 33923059 35794837 40454506 40648597 41441127 46060215 48940647 48953099 52065426 52936566 54507463 57351435 60291378 60420113 64281694 68513183 74295065 77796658 85307682 85338463 89185550 94023034 510508 184260337 186570176 187133918 256740887 38...
input:
2 100 654661061 12 9335549 31554847 44840685 139058209 208780249 252534591 273020900 570345312 585432807 586381815 595246176 648103724 453925392 28 25955930 35651383 54313446 86653854 106777935 117318976 136362704 137444680 140329253 147795873 149253578 249933143 252373190 254956129 261840811 280361...
output:
9335550 31554848 44840686 139058210 208780250 252534592 273020901 570345313 585432808 586381816 595246177 648103725 25955931 35651384 54313447 86653855 106777936 117318977 136362705 137444681 140329254 147795874 149253579 249933144 252373191 254956130 261840812 280361832 311314575 342403749 3648185...
result:
ok correct! (100 test cases)
Test #102:
score: 7
Accepted
time: 1ms
memory: 3568kb
input:
1 100 87 25 1 4 9 12 17 26 28 32 35 40 41 46 50 51 60 63 64 65 71 80 81 82 84 86 87 15 5 3 4 5 9 14 11 5 1 2 4 10 11 37 2 12 17 33 2 30 31 26 11 1 4 5 13 14 15 18 20 21 22 24 36 17 4 5 7 8 9 10 12 17 18 20 24 25 27 28 32 35 36 95 46 2 3 7 8 10 11 14 16 17 19 25 26 28 29 30 33 34 37 40 41 49 50 51 59...
output:
85 3 8 11 16 25 27 31 34 39 38 45 49 48 59 62 61 58 70 79 78 77 83 76 75 2 1 15 8 13 9 8 3 7 6 11 16 29 28 26 3 2 12 11 10 17 19 16 9 23 3 2 6 1 34 33 11 16 15 19 23 22 26 21 31 30 29 1 90 6 5 9 4 13 15 12 18 24 23 27 22 21 32 31 36 39 38 48 47 46 58 60 57 56 55 54 66 53 70 74 78 77 76 82 84 ...
input:
2 100 32 3 15 26 28 17 5 3 4 12 13 15 48 21 3 4 5 8 9 10 11 13 14 18 21 24 26 27 28 31 32 33 42 43 44 8 1 7 58 11 1 8 19 29 31 40 44 45 48 50 51 37 15 6 7 8 9 14 16 19 22 24 25 26 32 35 36 37 63 25 4 6 9 10 11 13 14 17 20 21 23 24 30 31 32 36 38 41 43 44 48 51 56 59 61 90 23 1 6 13 27 34 35 40 41 42...
output:
16 27 29 5 6 14 16 17 6 7 12 15 16 17 19 20 22 23 25 29 30 34 35 36 37 38 45 46 47 8 2 9 20 30 32 41 46 47 49 52 53 1 2 3 10 11 12 13 15 17 20 23 27 28 29 33 5 7 12 15 16 18 19 22 25 26 27 28 33 34 35 37 39 42 45 46 49 52 57 60 62 2 7 14 28 36 37 45 47 48 49 50 52 54 55 60 62 69 70 74 77 78 7...
result:
ok correct! (100 test cases)
Subtask #12:
score: 7
Accepted
Test #103:
score: 7
Accepted
time: 288ms
memory: 20452kb
input:
1 1 1000000000 300000 8140 24077 33879 40646 41993 42253 46535 46774 47773 60778 68389 80128 81700 85026 86191 87771 88028 94612 95473 96265 97011 99471 104013 107579 109028 113542 119019 121123 125874 131041 132036 133211 145619 147729 149546 149727 151921 155596 156260 166214 170584 173155 177356 ...
output:
8139 24076 33878 40645 41992 42252 46534 46773 47772 60777 68388 80127 81699 85025 86190 87770 88027 94611 95472 96264 97010 99470 104012 107578 109027 113541 119018 121122 125873 131040 132035 133210 145618 147728 149545 149726 151920 155595 156259 166213 170583 173154 177355 181382 181676 181794 1...
input:
2 1 1000000000 300000 8139 24076 33878 40645 41992 42252 46534 46773 47772 60777 68388 80127 81699 85025 86190 87770 88027 94611 95472 96264 97010 99470 104012 107578 109027 113541 119018 121122 125873 131040 132035 133210 145618 147728 149545 149726 151920 155595 156259 166213 170583 173154 177355 ...
output:
8140 24077 33879 40646 41993 42253 46535 46774 47773 60778 68389 80128 81700 85026 86191 87771 88028 94612 95473 96265 97011 99471 104013 107579 109028 113542 119019 121123 125874 131041 132036 133211 145619 147729 149546 149727 151921 155596 156260 166214 170584 173155 177356 181383 181677 181795 1...
result:
ok correct! (1 test case)
Test #104:
score: 7
Accepted
time: 162ms
memory: 12760kb
input:
1 1 600000 300000 4 5 8 11 13 15 16 18 20 23 25 26 29 30 31 36 37 38 39 40 43 44 45 46 47 48 49 50 52 58 61 62 63 64 66 67 69 70 71 74 76 78 80 82 83 84 85 92 93 94 95 98 100 102 103 105 106 107 110 114 115 116 117 118 122 124 130 133 134 135 136 138 139 140 141 143 145 146 151 152 156 157 159 160 1...
output:
3 2 7 10 12 14 9 17 19 22 24 21 28 27 6 35 34 33 32 1 42 41 600000 599999 599996 599994 599990 599988 51 57 60 59 56 55 65 54 68 53 599985 73 75 77 79 81 72 599983 599981 91 90 89 88 97 99 101 96 104 87 86 109 113 112 111 108 599980 121 123 129 132 131 128 127 137 126 125 120 142 144 119 150 149 155...
input:
2 1 600000 300000 1 2 3 6 7 9 10 12 14 17 19 21 22 24 27 28 32 33 34 35 41 42 51 53 54 55 56 57 59 60 65 68 72 73 75 77 79 81 86 87 88 89 90 91 96 97 99 101 104 108 109 111 112 113 119 120 121 123 125 126 127 128 129 131 132 137 142 144 147 148 149 150 153 154 155 158 163 164 165 168 170 172 173 177...
output:
4 5 8 11 13 15 16 18 20 23 25 26 29 30 31 36 37 38 39 40 43 44 45 46 47 48 49 50 52 58 61 62 63 64 66 67 69 70 71 74 76 78 80 82 83 84 85 92 93 94 95 98 100 102 103 105 106 107 110 114 115 116 117 118 122 124 130 133 134 135 136 138 139 140 141 143 145 146 151 152 156 157 159 160 161 162 166 167 169...
result:
ok correct! (1 test case)
Test #105:
score: 7
Accepted
time: 236ms
memory: 16808kb
input:
1 1 1000000 300000 1 6 9 11 12 18 19 23 24 26 31 33 34 35 36 37 39 47 48 58 59 60 63 69 73 78 81 90 91 93 94 96 110 111 118 121 124 125 128 131 135 136 139 140 142 144 147 151 153 154 162 171 180 181 186 195 198 201 204 208 211 218 219 222 224 226 227 236 238 240 242 245 249 252 256 259 265 267 275 ...
output:
1000000 5 8 10 7 17 16 22 21 25 30 32 29 28 27 20 38 46 45 57 56 55 62 68 72 77 80 89 88 92 87 95 109 108 117 120 123 122 127 130 134 133 138 137 141 143 146 150 152 149 161 170 179 178 185 194 197 200 203 207 210 217 216 221 223 225 220 235 237 239 241 244 248 251 255 258 264 266 274 281 280 279 28...
input:
2 1 1000000 300000 5 7 8 10 16 17 20 21 22 25 27 28 29 30 32 38 45 46 55 56 57 62 68 72 77 80 87 88 89 92 95 108 109 117 120 122 123 127 130 133 134 137 138 141 143 146 149 150 152 161 170 178 179 185 194 197 200 203 207 210 216 217 220 221 223 225 235 237 239 241 244 248 251 255 258 264 266 274 279...
output:
1 6 9 11 12 18 19 23 24 26 31 33 34 35 36 37 39 47 48 58 59 60 63 69 73 78 81 90 91 93 94 96 110 111 118 121 124 125 128 131 135 136 139 140 142 144 147 151 153 154 162 171 180 181 186 195 198 201 204 208 211 218 219 222 224 226 227 236 238 240 242 245 249 252 256 259 265 267 275 282 283 284 287 291...
result:
ok correct! (1 test case)
Test #106:
score: 7
Accepted
time: 143ms
memory: 11540kb
input:
1 1 1000000000 300000 868765587 868765588 868765590 868765591 868765597 868765598 868765599 868765601 868765602 868765603 868765604 868765605 868765606 868765608 868765610 868765612 868765614 868765617 868765620 868765624 868765625 868765626 868765627 868765629 868765630 868765631 868765634 86876563...
output:
868765586 868765585 868765589 868765584 868765596 868765595 868765594 868765600 868765593 868765592 868765583 868765582 868765581 868765607 868765609 868765611 868765613 868765616 868765619 868765623 868765622 868765621 868765618 868765628 868765615 868765580 868765633 868765632 868765636 868765638 ...
input:
2 1 1000000000 300000 868665587 868665588 868665589 868665590 868665591 868665592 868665593 868665594 868665595 868665596 868665597 868665598 868665599 868665600 868665601 868665602 868665603 868665604 868665605 868665606 868665607 868665608 868665609 868665610 868665611 868665612 868665613 86866561...
output:
868765587 868765588 868765590 868765591 868765597 868765598 868765599 868765601 868765602 868765603 868765604 868765605 868765606 868765608 868765610 868765612 868765614 868765617 868765620 868765624 868765625 868765626 868765627 868765629 868765630 868765631 868765634 868765635 868765637 868765639 ...
result:
ok correct! (1 test case)
Test #107:
score: 7
Accepted
time: 198ms
memory: 16980kb
input:
1 1 1000000000 300000 158108569 158108571 158108575 158108576 158108578 158108579 158108580 158108581 158108588 158108592 158108593 158108597 158108600 158108607 158108609 158108610 158108617 158108618 158108630 158108641 158108642 158108643 158108644 158108647 158108648 158108653 158108658 15810865...
output:
158108568 158108570 158108574 158108573 158108577 158108572 158108567 158108566 158108587 158108591 158108590 158108596 158108599 158108606 158108608 158108605 158108616 158108615 158108629 158108640 158108639 158108638 158108637 158108646 158108645 158108652 158108657 158108656 158108662 158108668 ...
input:
2 1 1000000000 300000 158108566 158108567 158108568 158108570 158108572 158108573 158108574 158108577 158108587 158108590 158108591 158108596 158108599 158108605 158108606 158108608 158108615 158108616 158108629 158108637 158108638 158108639 158108640 158108645 158108646 158108652 158108656 15810865...
output:
158108569 158108571 158108575 158108576 158108578 158108579 158108580 158108581 158108588 158108592 158108593 158108597 158108600 158108607 158108609 158108610 158108617 158108618 158108630 158108641 158108642 158108643 158108644 158108647 158108648 158108653 158108658 158108659 158108663 158108669 ...
result:
ok correct! (1 test case)
Test #108:
score: 7
Accepted
time: 214ms
memory: 16256kb
input:
1 1 1000000000 300000 873070146 873070147 873070148 873070149 873070151 873070152 873070154 873070158 873070160 873070167 873070168 873070173 873070176 873070177 873070179 873070182 873070184 873070185 873070190 873070193 873070195 873070197 873070204 873070207 873070211 873070214 873070217 87307021...
output:
873070145 873070144 873070143 873070142 873070150 873070141 873070153 873070157 873070159 873070166 873070165 873070172 873070175 873070174 873070178 873070181 873070183 873070180 873070189 873070192 873070194 873070196 873070203 873070206 873070210 873070213 873070216 873070215 873070219 873070234 ...
input:
2 1 1000000000 300000 873070141 873070142 873070143 873070144 873070145 873070150 873070153 873070157 873070159 873070165 873070166 873070172 873070174 873070175 873070178 873070180 873070181 873070183 873070189 873070192 873070194 873070196 873070203 873070206 873070210 873070213 873070215 87307021...
output:
873070146 873070147 873070148 873070149 873070151 873070152 873070154 873070158 873070160 873070167 873070168 873070173 873070176 873070177 873070179 873070182 873070184 873070185 873070190 873070193 873070195 873070197 873070204 873070207 873070211 873070214 873070217 873070218 873070220 873070235 ...
result:
ok correct! (1 test case)
Test #109:
score: 7
Accepted
time: 254ms
memory: 18640kb
input:
1 1 1000000000 300000 492256081 492256090 492256092 492256098 492256103 492256104 492256107 492256112 492256114 492256116 492256118 492256128 492256132 492256134 492256142 492256146 492256163 492256167 492256170 492256182 492256185 492256188 492256189 492256202 492256216 492256228 492256229 49225623...
output:
492256080 492256089 492256091 492256097 492256102 492256101 492256106 492256111 492256113 492256115 492256117 492256127 492256131 492256133 492256141 492256145 492256162 492256166 492256169 492256181 492256184 492256187 492256186 492256201 492256215 492256227 492256226 492256235 492256246 492256245 ...
input:
2 1 1000000000 300000 492256080 492256089 492256091 492256097 492256101 492256102 492256106 492256111 492256113 492256115 492256117 492256127 492256131 492256133 492256141 492256145 492256162 492256166 492256169 492256181 492256184 492256186 492256187 492256201 492256215 492256226 492256227 49225623...
output:
492256081 492256090 492256092 492256098 492256103 492256104 492256107 492256112 492256114 492256116 492256118 492256128 492256132 492256134 492256142 492256146 492256163 492256167 492256170 492256182 492256185 492256188 492256189 492256202 492256216 492256228 492256229 492256236 492256247 492256248 ...
result:
ok correct! (1 test case)
Test #110:
score: 7
Accepted
time: 207ms
memory: 16448kb
input:
1 1 1000000000 300000 1 3 4 5 7 9 10 11 14 15 19 20 22 23 24 25 31 34 36 37 41 49 53 54 56 60 63 65 66 68 69 73 74 77 78 80 83 84 86 89 90 92 93 95 104 109 110 113 114 115 116 117 119 121 124 131 132 133 135 138 140 141 143 145 146 150 157 160 166 167 172 175 177 178 179 180 181 190 191 192 193 196 ...
output:
999999999 2 999999998 999999995 6 8 999999994 999999993 13 12 18 17 21 16 999999991 999999987 30 33 35 32 40 48 52 51 55 59 62 64 61 67 58 72 71 76 75 79 82 81 85 88 87 91 70 94 103 108 107 112 111 106 105 102 118 120 123 130 129 128 134 137 139 136 142 144 127 149 156 159 165 164 171 174 176 173 17...
input:
2 1 1000000000 300000 2 6 8 12 13 16 17 18 21 30 32 33 35 40 48 51 52 55 58 59 61 62 64 67 70 71 72 75 76 79 81 82 85 87 88 91 94 102 103 105 106 107 108 111 112 118 120 123 127 128 129 130 134 136 137 139 142 144 149 156 159 163 164 165 168 169 170 171 173 174 176 182 183 184 185 186 187 188 189 19...
output:
1 3 4 5 7 9 10 11 14 15 19 20 22 23 24 25 31 34 36 37 41 49 53 54 56 60 63 65 66 68 69 73 74 77 78 80 83 84 86 89 90 92 93 95 104 109 110 113 114 115 116 117 119 121 124 131 132 133 135 138 140 141 143 145 146 150 157 160 166 167 172 175 177 178 179 180 181 190 191 192 193 196 198 199 201 203 204 20...
result:
ok correct! (1 test case)
Test #111:
score: 7
Accepted
time: 212ms
memory: 16296kb
input:
1 1 1000000000 300000 2 6 15 18 20 24 29 33 34 35 36 40 42 47 50 51 55 59 60 61 62 68 76 78 79 80 88 94 99 100 107 114 115 121 128 129 131 133 137 138 146 149 155 157 162 165 167 168 170 173 175 176 180 182 185 188 191 193 203 207 208 214 215 221 229 237 238 239 243 245 248 251 256 260 265 266 275 2...
output:
1 5 14 17 19 23 28 32 31 30 27 39 41 46 49 48 54 58 57 56 53 67 75 77 74 73 87 93 98 97 106 113 112 120 127 126 130 132 136 135 145 148 154 156 161 164 166 163 169 172 174 171 179 181 184 187 190 192 202 206 205 213 212 220 228 236 235 234 242 244 247 250 255 259 264 263 274 276 273 279 283 286 285 ...
input:
2 1 1000000000 300000 1 5 14 17 19 23 27 28 30 31 32 39 41 46 48 49 53 54 56 57 58 67 73 74 75 77 87 93 97 98 106 112 113 120 126 127 130 132 135 136 145 148 154 156 161 163 164 166 169 171 172 174 179 181 184 187 190 192 202 205 206 212 213 220 228 234 235 236 242 244 247 250 255 259 263 264 270 27...
output:
2 6 15 18 20 24 29 33 34 35 36 40 42 47 50 51 55 59 60 61 62 68 76 78 79 80 88 94 99 100 107 114 115 121 128 129 131 133 137 138 146 149 155 157 162 165 167 168 170 173 175 176 180 182 185 188 191 193 203 207 208 214 215 221 229 237 238 239 243 245 248 251 256 260 265 266 275 277 278 280 284 287 288...
result:
ok correct! (1 test case)
Test #112:
score: 7
Accepted
time: 260ms
memory: 19444kb
input:
1 1 1000000000 300000 998000004 998000021 998000022 998000037 998000046 998000050 998000053 998000058 998000084 998000085 998000086 998000091 998000098 998000102 998000103 998000107 998000113 998000115 998000120 998000123 998000134 998000141 998000145 998000146 998000154 998000162 998000166 99800016...
output:
998000003 998000020 998000019 998000036 998000045 998000049 998000052 998000057 998000083 998000082 998000081 998000090 998000097 998000101 998000100 998000106 998000112 998000114 998000119 998000122 998000133 998000140 998000144 998000143 998000153 998000161 998000165 998000168 998000183 998000192 ...
input:
2 1 1000000000 300000 998000003 998000019 998000020 998000036 998000045 998000049 998000052 998000057 998000081 998000082 998000083 998000090 998000097 998000100 998000101 998000106 998000112 998000114 998000119 998000122 998000133 998000140 998000143 998000144 998000153 998000161 998000165 99800016...
output:
998000004 998000021 998000022 998000037 998000046 998000050 998000053 998000058 998000084 998000085 998000086 998000091 998000098 998000102 998000103 998000107 998000113 998000115 998000120 998000123 998000134 998000141 998000145 998000146 998000154 998000162 998000166 998000169 998000184 998000193 ...
result:
ok correct! (1 test case)
Test #113:
score: 7
Accepted
time: 44ms
memory: 6392kb
input:
1 1 1000000000 300000 806819891 806819892 806819893 806819894 806819895 806819896 806819897 806819898 806819899 806819900 806819901 806819902 806819903 806819904 806819905 806819906 806819907 806819908 806819909 806819910 806819911 806819912 806819913 806819914 806819915 806819916 806819917 80681991...
output:
806819890 806819889 806819888 806819887 806819886 806819885 806819884 806819883 806819882 806819881 806819880 806819879 806819878 806819877 806819876 806819875 806819874 806819873 806819872 806819871 806819870 806819869 806819868 806819867 806819866 806819865 806819864 806819863 806819862 806819861 ...
input:
2 1 1000000000 300000 806519891 806519892 806519893 806519894 806519895 806519896 806519897 806519898 806519899 806519900 806519901 806519902 806519903 806519904 806519905 806519906 806519907 806519908 806519909 806519910 806519911 806519912 806519913 806519914 806519915 806519916 806519917 80651991...
output:
806819891 806819892 806819893 806819894 806819895 806819896 806819897 806819898 806819899 806819900 806819901 806819902 806819903 806819904 806819905 806819906 806819907 806819908 806819909 806819910 806819911 806819912 806819913 806819914 806819915 806819916 806819917 806819918 806819919 806819920 ...
result:
ok correct! (1 test case)
Test #114:
score: 7
Accepted
time: 26ms
memory: 3664kb
input:
1 30000 13 3 3 8 11 9 3 4 6 9 29 6 1 2 8 11 12 24 13 6 1 2 6 11 12 13 5 1 2 6 1 5 19 8 5 8 10 11 13 14 17 18 21 2 2 14 25 10 1 2 3 5 6 9 10 12 15 24 2 1 2 28 3 6 12 16 17 8 1 3 7 9 11 12 13 16 25 10 1 6 8 10 12 14 17 20 21 22 23 6 2 5 13 15 18 19 5 2 2 4 30 10 2 6 13 15 16 18 20 22 27 30 23 3 5 18 2...
output:
2 7 10 3 5 8 29 28 7 10 9 23 10 9 5 8 7 4 1 4 4 7 9 6 12 3 16 15 1 13 25 23 22 4 21 8 7 11 14 20 1 5 11 15 17 2 6 8 10 5 4 15 25 5 7 9 11 13 16 19 18 15 1 4 12 14 17 16 1 3 1 5 12 14 11 17 19 21 26 29 4 17 19 7 12 5 2 1 7 1 4 5 7 2 6 2 11 2 6 5 11 10 22 2 17 16 8 11 5 3 2...
input:
2 30000 29 6 4 6 8 10 11 18 6 1 3 21 1 3 12 4 7 8 9 12 19 9 1 2 3 4 7 8 9 13 16 26 3 16 19 21 2 1 1 5 1 2 26 10 1 6 8 10 13 14 20 22 25 26 2 1 1 5 1 1 6 2 2 5 28 2 2 3 3 1 1 8 3 5 6 7 2 1 2 10 3 1 4 10 4 1 2 26 10 1 4 6 8 12 15 20 22 24 25 9 3 3 4 5 6 2 1 3 6 2 3 4 29 4 4 9 12 20 13 6 2 3 5 7 9 10 1...
output:
5 7 9 12 13 19 4 4 1 2 10 11 5 6 10 11 12 14 15 17 18 17 20 22 2 3 2 3 4 7 9 11 15 16 21 23 2 2 3 6 4 5 2 1 2 8 1 2 3 5 3 2 3 5 7 9 13 16 21 23 26 6 7 8 2 4 5 6 5 10 13 21 4 6 8 11 12 13 3 4 6 8 11 16 5 12 21 27 28 2 5 12 15 3 17 18 3 9 13 14 18 20 25 7 9 14 2 4 6 10 1...
result:
ok correct! (30000 test cases)
Test #115:
score: 7
Accepted
time: 49ms
memory: 3624kb
input:
1 30000 281971123 7 33631922 75311185 158598709 197494595 198632634 245261877 271751303 627038929 9 249717199 275320717 292755279 351724583 407946662 415852217 464636955 542224500 572959653 766933745 4 65054845 390488464 421976924 599003581 133997827 9 514674 40836413 47691426 72196590 75845486 8115...
output:
33631921 75311184 158598708 197494594 198632633 245261876 271751302 249717198 275320716 292755278 351724582 407946661 415852216 464636954 542224499 572959652 65054844 390488463 421976923 599003580 514673 40836412 47691425 72196589 75845485 81157377 94628658 96533427 116338495 46547810 54061166 7...
input:
2 30000 859015756 5 184121719 278480193 407188536 627173560 765041615 486633594 3 144299427 286208895 308654457 709146856 4 71996774 260748174 287966615 547744019 541054797 1 43515813 571855680 5 6667155 188577000 212306471 266706752 508345535 602486406 10 33090369 182685096 247159602 391325129 4575...
output:
184121720 278480194 407188537 627173561 765041616 144299428 286208896 308654458 71996775 260748175 287966616 547744020 43515814 6667156 188577001 212306472 266706753 508345536 33090370 182685097 247159603 391325130 457510369 510501602 513365458 540603468 553515369 563780276 34703706 73556197 7...
result:
ok correct! (30000 test cases)
Test #116:
score: 7
Accepted
time: 55ms
memory: 3872kb
input:
1 3000 113 51 1 5 9 10 17 18 23 24 25 27 28 30 32 33 34 36 38 39 42 43 45 48 49 51 56 58 60 62 63 65 71 81 82 83 84 85 87 89 91 93 97 99 100 102 103 104 106 108 109 110 111 188 85 3 4 5 7 9 11 13 14 17 20 21 23 26 28 29 32 34 36 37 39 46 48 49 53 57 60 62 63 65 66 72 76 79 80 82 83 87 89 92 96 97 98...
output:
113 4 8 7 16 15 22 21 20 26 19 29 31 14 13 35 37 12 41 40 44 47 46 50 55 57 59 61 54 64 70 80 79 78 77 76 86 88 90 92 96 98 95 101 94 75 105 107 74 73 72 2 1 188 6 8 10 12 183 16 19 18 22 25 27 24 31 33 35 30 38 45 47 44 52 56 59 61 58 64 55 71 75 78 77 81 74 86 88 91 95 94 93 90 85 101 84 73 105 7...
input:
2 3000 254 66 3 9 11 13 19 22 23 24 26 29 47 56 61 66 68 69 70 75 80 84 90 91 92 93 101 102 104 106 107 112 122 127 135 138 140 144 146 149 150 151 153 154 158 162 167 172 176 180 183 186 189 208 209 211 215 219 220 221 225 227 229 239 246 251 252 254 136 59 1 2 4 5 6 7 8 9 14 19 25 28 30 36 39 42 4...
output:
1 2 4 10 12 14 20 25 27 28 30 31 48 57 62 67 71 72 73 76 81 85 94 95 96 97 103 105 108 109 110 113 123 128 136 139 141 145 147 152 155 156 157 159 160 163 168 173 177 181 184 187 190 210 212 213 216 222 223 224 226 228 230 240 247 253 3 10 11 12 13 15 16 17 18 20 21 26 29 31 37 40 46 48 49 50 51 54...
result:
ok correct! (3000 test cases)
Test #117:
score: 7
Accepted
time: 65ms
memory: 3800kb
input:
1 3000 678745064 74 4516447 5019813 19652760 47391032 54268539 55823139 72762643 77852009 102945112 105432222 107251951 117777415 127065944 156399883 157781923 166870884 178523517 183163207 183783008 185196952 204200963 204738698 220412637 231536161 238702583 240261966 251177887 255911428 259555167 ...
output:
4516446 5019812 19652759 47391031 54268538 55823138 72762642 77852008 102945111 105432221 107251950 117777414 127065943 156399882 157781922 166870883 178523516 183163206 183783007 185196951 204200962 204738697 220412636 231536160 238702582 240261965 251177886 255911427 259555166 262004733 270193507 ...
input:
2 3000 649052093 68 22810360 43137439 59101675 67985383 76585703 116719898 121903003 129698192 139693388 146223175 158540359 159035207 160966765 166331873 177656306 189594559 192292795 200533543 206445400 208773823 220687366 224271362 230243997 239944357 253123679 274578592 302686239 320894100 32180...
output:
22810361 43137440 59101676 67985384 76585704 116719899 121903004 129698193 139693389 146223176 158540360 159035208 160966766 166331874 177656307 189594560 192292796 200533544 206445401 208773824 220687367 224271363 230243998 239944358 253123680 274578593 302686240 320894101 321806256 323656346 32664...
result:
ok correct! (3000 test cases)
Test #118:
score: 7
Accepted
time: 75ms
memory: 3868kb
input:
1 300 1691 704 5 13 15 16 18 19 21 22 25 28 30 31 32 33 35 39 42 45 48 50 51 57 62 64 66 71 72 73 75 77 79 80 81 83 84 88 89 90 91 92 95 99 101 106 107 108 109 112 114 115 122 124 129 130 131 133 134 137 144 148 150 153 154 161 162 163 164 165 168 169 170 180 183 188 189 196 197 201 207 208 211 212 ...
output:
4 12 14 11 17 10 20 9 24 27 29 26 23 8 34 38 41 44 47 49 46 56 61 63 65 70 69 68 74 76 78 67 60 82 59 87 86 85 58 55 94 98 100 105 104 103 102 111 113 110 121 123 128 127 126 132 125 136 143 147 149 152 151 160 159 158 157 156 167 166 155 179 182 187 186 195 194 200 206 205 210 209 204 216 215 214 2...
input:
2 300 1321 632 1 3 7 13 14 15 16 17 20 21 23 24 25 28 32 39 40 43 45 46 47 49 50 51 52 54 57 58 60 63 65 68 70 71 72 73 74 76 80 81 83 84 85 86 87 89 92 93 94 95 98 103 104 109 111 112 113 114 115 116 118 121 122 124 126 128 133 134 139 141 142 145 146 147 150 153 154 156 157 160 161 162 163 164 166...
output:
2 4 8 18 19 22 26 27 29 30 31 33 34 35 36 41 42 44 48 53 55 56 59 61 62 64 66 67 69 75 77 78 79 82 88 90 91 96 97 99 100 101 102 105 106 107 108 110 117 119 120 123 125 127 129 130 131 132 135 136 137 138 140 143 144 148 149 151 152 155 158 159 165 167 168 169 172 173 176 177 184 185 187 188 191 193...
result:
ok correct! (300 test cases)
Test #119:
score: 7
Accepted
time: 102ms
memory: 3624kb
input:
1 300 25785067 968 3801 4877 83649 104134 126201 133023 161629 163808 213014 317315 361955 386025 443492 465612 466110 473851 489173 517110 571269 577477 592378 626055 673931 682603 717290 732202 751033 751732 761804 784755 891508 948996 956816 1066874 1110192 1170447 1180929 1187441 1210077 1232495...
output:
3800 4876 83648 104133 126200 133022 161628 163807 213013 317314 361954 386024 443491 465611 466109 473850 489172 517109 571268 577476 592377 626054 673930 682602 717289 732201 751032 751731 761803 784754 891507 948995 956815 1066873 1110191 1170446 1180928 1187440 1210076 1232494 1238453 1276271 13...
input:
2 300 574927444 847 1534145 2077175 2118975 2418566 3134924 3540097 3600460 4295198 4577673 4940485 5396777 6491157 7008879 7365549 7398079 7823784 8164213 8352517 9651964 10732092 10757108 11917224 12651195 14167614 15052018 16448021 16974145 17469855 18695421 19390464 19870678 20088485 20959564 22...
output:
1534146 2077176 2118976 2418567 3134925 3540098 3600461 4295199 4577674 4940486 5396778 6491158 7008880 7365550 7398080 7823785 8164214 8352518 9651965 10732093 10757109 11917225 12651196 14167615 15052019 16448022 16974146 17469856 18695422 19390465 19870679 20088486 20959565 22501006 22647187 2344...
result:
ok correct! (300 test cases)
Extra Test:
score: 0
Extra Test Passed