QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#225751 | #5176. 多控制反转 | hos_lyric | 100 ✓ | 1ms | 4144kb | C++14 | 6.7kb | 2023-10-25 04:57:05 | 2023-10-25 04:57:05 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
struct Op {
int t, x, y, z;
friend ostream &operator<<(ostream &os, const Op &op) {
return os << "(" << op.t << "; " << op.x << "," << op.y << "," << op.z << ")";
}
};
int N, M, Q, C;
vector<Op> ops;
void oper(int x) {
assert(0 <= x); assert(x < M);
ops.push_back(Op{1, x, -1, -1});
}
void oper(int x, int y) {
assert(0 <= x); assert(x < M);
assert(0 <= y); assert(y < M);
assert(x != y);
ops.push_back(Op{2, x, y, -1});
}
void oper(int x, int y, int z) {
assert(0 <= x); assert(x < M);
assert(0 <= y); assert(y < M);
assert(0 <= z); assert(z < M);
assert(x != y); assert(x != z); assert(y != z);
ops.push_back(Op{3, x, y, z});
}
void judge(int t) {
for (int p = 0; p < 1 << (t ? M : (N + 1)); ++p) {
int q = p, r = p;
if (!(~q & ((1 << N) - 1))) q ^= 1 << N;
for (const auto &op : ops) {
switch (op.t) {
case 1: r ^= 1 << op.x; break;
case 2: if (r >> op.x & 1) r ^= 1 << op.y; break;
case 3: if ((r >> op.x & 1) && (r >> op.y & 1)) r ^= 1 << op.z; break;
default: assert(false);
}
}
if (q != r) {
cerr << "FAIL" << endl;
r = p;
for (const auto &op : ops) {
for (int i = 0; i < M; ++i) cerr << (r >> i & 1);
cerr << " " << op << endl;
switch (op.t) {
case 1: r ^= 1 << op.x; break;
case 2: r ^= (r >> op.x & 1) << op.y; break;
case 3: r ^= (r >> op.x & r >> op.y & 1) << op.z; break;
default: assert(false);
}
}
for (int i = 0; i < M; ++i) cerr << (r >> i & 1);
cerr << endl;
}
assert(q == r);
}
}
/*
n=1
a0 b0
b0+a0
n=2
a0 a1 b0 b1
b1+a1b0
b0+a0
b1+a0a1
b0
n=2 another
a0 a1 b0 b1
b0+a0
b1+a0a1+a1b0
b0
b1+a0a1
n=3
a0 a1 a2 b0 b1 b2
b2+a2b1
b1+a1b0
b0+a0
b1+a0a1
b0
b2+a0a1a2
b0+a0
b1+a1b0
b0
b1
->
a0 a1 a2 b0 b1 b2
b2+a2b1
b1+a1b0
b0+a0
b1+a0a1
b2+a0a1a2
b1+a1b0
b0
b1
n=3 another
a0 a1 a2 b0 b1 b2
b1+a1b0
b0+a0
b1+a0a1
b2+a0a1a2+a2b1
b1+a1b0
b0
b1
b2+a0a1a2
n=4
a0 a1 a2 a3 b0 b1 b2 b3
b3+a3b2
b2+a2b1
b1+a1b0
b0+a0
b1+a0a1
b2+a0a1a2
b1+a1b0
b0
b1
b3+a0a1a2a3
b1+a1b0
b0+a0
b1+a0a1
b2+a2b1
b1+a1b0
b0
b1
b2
->
a0 a1 a2 a3 b0 b1 b2 b3
b3+a3b2
b2+a2b1
b1+a1b0
b0+a0
b1+a0a1
b2+a0a1a2
b3+a0a1a2a3
b2+a2b1
b1+a1b0
b0
b1
b2
*/
// tar += \prod as
void solve(const vector<int> &as, const vector<int> &bs, int tar) {
const int n = as.size();
if (n == 0) {
oper(tar);
} else if (n == 1) {
oper(as[0], tar);
} else if ((int)bs.size() >= n - 1) {
for (int h = 0; h < 2; ++h) {
oper(as[n - 1], bs[n - 2], tar);
for (int j = n - 1; --j >= 1; ) oper(as[j], bs[j - 1], bs[j]);
oper(as[0], bs[0]);
for (int j = 1; j < n - 1; ++j) oper(as[j], bs[j - 1], bs[j]);
}
} else {
assert(bs.size() >= 1);
const int half = (n + 1) / 2;
for (int h = 0; h < 2; ++h) {
{
vector<int> aas, bbs;
for (int i = 0; i < half; ++i) aas.push_back(as[i]);
for (int i = half; i < n; ++i) bbs.push_back(as[i]);
bbs.push_back(tar);
solve(aas, bbs, bs[0]);
}
{
vector<int> aas, bbs;
for (int i = half; i < n; ++i) aas.push_back(as[i]);
aas.push_back(bs[0]);
for (int i = 0; i < half; ++i) bbs.push_back(as[i]);
solve(aas, bbs, tar);
}
}
}
}
int main() {
for (; ~scanf("%d%d%d%d", &N, &M, &Q, &C); ) {
ops.clear();
vector<int> as, bs;
for (int u = 0; u < N; ++u) as.push_back(u);
for (int u = N + 1; u < M; ++u) bs.push_back(u);
solve(as, bs, N);
printf("%d\n", (int)ops.size());
for (const auto &op : ops) {
switch (op.t) {
case 1: printf("1 %d\n", op.x); break;
case 2: printf("2 %d %d\n", op.x, op.y); break;
case 3: printf("3 %d %d %d\n", op.x, op.y, op.z); break;
default: assert(false);
}
}
#ifdef LOCAL
judge(1);
#endif
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 15
Accepted
Test #1:
score: 15
Accepted
time: 0ms
memory: 3824kb
input:
0 2 1 1
output:
1 1 0
result:
ok OK.
Test #2:
score: 0
Accepted
time: 0ms
memory: 4124kb
input:
13 28 105 1
output:
48 3 12 25 13 3 11 24 25 3 10 23 24 3 9 22 23 3 8 21 22 3 7 20 21 3 6 19 20 3 5 18 19 3 4 17 18 3 3 16 17 3 2 15 16 3 1 14 15 2 0 14 3 1 14 15 3 2 15 16 3 3 16 17 3 4 17 18 3 5 18 19 3 6 19 20 3 7 20 21 3 8 21 22 3 9 22 23 3 10 23 24 3 11 24 25 3 12 25 13 3 11 24 25 3 10 23 24 3 9 22 23 3 8 21 22 3 ...
result:
ok OK.
Test #3:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
5 12 41 1
output:
16 3 4 9 5 3 3 8 9 3 2 7 8 3 1 6 7 2 0 6 3 1 6 7 3 2 7 8 3 3 8 9 3 4 9 5 3 3 8 9 3 2 7 8 3 1 6 7 2 0 6 3 1 6 7 3 2 7 8 3 3 8 9
result:
ok OK.
Test #4:
score: 0
Accepted
time: 1ms
memory: 4120kb
input:
20 42 161 1
output:
76 3 19 39 20 3 18 38 39 3 17 37 38 3 16 36 37 3 15 35 36 3 14 34 35 3 13 33 34 3 12 32 33 3 11 31 32 3 10 30 31 3 9 29 30 3 8 28 29 3 7 27 28 3 6 26 27 3 5 25 26 3 4 24 25 3 3 23 24 3 2 22 23 3 1 21 22 2 0 21 3 1 21 22 3 2 22 23 3 3 23 24 3 4 24 25 3 5 25 26 3 6 26 27 3 7 27 28 3 8 28 29 3 9 29 30 ...
result:
ok OK.
Subtask #2:
score: 10
Accepted
Dependency #1:
100%
Accepted
Test #5:
score: 10
Accepted
time: 0ms
memory: 3844kb
input:
48 98 385 2
output:
188 3 47 95 48 3 46 94 95 3 45 93 94 3 44 92 93 3 43 91 92 3 42 90 91 3 41 89 90 3 40 88 89 3 39 87 88 3 38 86 87 3 37 85 86 3 36 84 85 3 35 83 84 3 34 82 83 3 33 81 82 3 32 80 81 3 31 79 80 3 30 78 79 3 29 77 78 3 28 76 77 3 27 75 76 3 26 74 75 3 25 73 74 3 24 72 73 3 23 71 72 3 22 70 71 3 21 69 70...
result:
ok OK.
Test #6:
score: 0
Accepted
time: 0ms
memory: 4128kb
input:
41 84 329 2
output:
160 3 40 81 41 3 39 80 81 3 38 79 80 3 37 78 79 3 36 77 78 3 35 76 77 3 34 75 76 3 33 74 75 3 32 73 74 3 31 72 73 3 30 71 72 3 29 70 71 3 28 69 70 3 27 68 69 3 26 67 68 3 25 66 67 3 24 65 66 3 23 64 65 3 22 63 64 3 21 62 63 3 20 61 62 3 19 60 61 3 18 59 60 3 17 58 59 3 16 57 58 3 15 56 57 3 14 55 56...
result:
ok OK.
Test #7:
score: 0
Accepted
time: 0ms
memory: 4128kb
input:
50 102 401 2
output:
196 3 49 99 50 3 48 98 99 3 47 97 98 3 46 96 97 3 45 95 96 3 44 94 95 3 43 93 94 3 42 92 93 3 41 91 92 3 40 90 91 3 39 89 90 3 38 88 89 3 37 87 88 3 36 86 87 3 35 85 86 3 34 84 85 3 33 83 84 3 32 82 83 3 31 81 82 3 30 80 81 3 29 79 80 3 28 78 79 3 27 77 78 3 26 76 77 3 25 75 76 3 24 74 75 3 23 73 74...
result:
ok OK.
Subtask #3:
score: 10
Accepted
Dependency #2:
100%
Accepted
Test #8:
score: 10
Accepted
time: 0ms
memory: 3792kb
input:
0 2 1 3
output:
1 1 0
result:
ok OK.
Test #9:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
19 40 153 3
output:
72 3 18 37 19 3 17 36 37 3 16 35 36 3 15 34 35 3 14 33 34 3 13 32 33 3 12 31 32 3 11 30 31 3 10 29 30 3 9 28 29 3 8 27 28 3 7 26 27 3 6 25 26 3 5 24 25 3 4 23 24 3 3 22 23 3 2 21 22 3 1 20 21 2 0 20 3 1 20 21 3 2 21 22 3 3 22 23 3 4 23 24 3 5 24 25 3 6 25 26 3 7 26 27 3 8 27 28 3 9 28 29 3 10 29 30 ...
result:
ok OK.
Test #10:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
47 96 377 3
output:
184 3 46 93 47 3 45 92 93 3 44 91 92 3 43 90 91 3 42 89 90 3 41 88 89 3 40 87 88 3 39 86 87 3 38 85 86 3 37 84 85 3 36 83 84 3 35 82 83 3 34 81 82 3 33 80 81 3 32 79 80 3 31 78 79 3 30 77 78 3 29 76 77 3 28 75 76 3 27 74 75 3 26 73 74 3 25 72 73 3 24 71 72 3 23 70 71 3 22 69 70 3 21 68 69 3 20 67 68...
result:
ok OK.
Test #11:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
25 52 201 3
output:
96 3 24 49 25 3 23 48 49 3 22 47 48 3 21 46 47 3 20 45 46 3 19 44 45 3 18 43 44 3 17 42 43 3 16 41 42 3 15 40 41 3 14 39 40 3 13 38 39 3 12 37 38 3 11 36 37 3 10 35 36 3 9 34 35 3 8 33 34 3 7 32 33 3 6 31 32 3 5 30 31 3 4 29 30 3 3 28 29 3 2 27 28 3 1 26 27 2 0 26 3 1 26 27 3 2 27 28 3 3 28 29 3 4 2...
result:
ok OK.
Test #12:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
50 102 401 3
output:
196 3 49 99 50 3 48 98 99 3 47 97 98 3 46 96 97 3 45 95 96 3 44 94 95 3 43 93 94 3 42 92 93 3 41 91 92 3 40 90 91 3 39 89 90 3 38 88 89 3 37 87 88 3 36 86 87 3 35 85 86 3 34 84 85 3 33 83 84 3 32 82 83 3 31 81 82 3 30 80 81 3 29 79 80 3 28 78 79 3 27 77 78 3 26 76 77 3 25 75 76 3 24 74 75 3 23 73 74...
result:
ok OK.
Subtask #4:
score: 10
Accepted
Test #13:
score: 10
Accepted
time: 0ms
memory: 3820kb
input:
0 2 1 4
output:
1 1 0
result:
ok OK.
Test #14:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
18 20 325 4
output:
136 3 8 16 19 3 7 15 16 3 6 14 15 3 5 13 14 3 4 12 13 3 3 11 12 3 2 10 11 3 1 9 10 2 0 9 3 1 9 10 3 2 10 11 3 3 11 12 3 4 12 13 3 5 13 14 3 6 14 15 3 7 15 16 3 8 16 19 3 7 15 16 3 6 14 15 3 5 13 14 3 4 12 13 3 3 11 12 3 2 10 11 3 1 9 10 2 0 9 3 1 9 10 3 2 10 11 3 3 11 12 3 4 12 13 3 5 13 14 3 6 14 1...
result:
ok OK.
Test #15:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
14 16 197 4
output:
104 3 6 12 15 3 5 11 12 3 4 10 11 3 3 9 10 3 2 8 9 3 1 7 8 2 0 7 3 1 7 8 3 2 8 9 3 3 9 10 3 4 10 11 3 5 11 12 3 6 12 15 3 5 11 12 3 4 10 11 3 3 9 10 3 2 8 9 3 1 7 8 2 0 7 3 1 7 8 3 2 8 9 3 3 9 10 3 4 10 11 3 5 11 12 3 15 6 14 3 13 5 6 3 12 4 5 3 11 3 4 3 10 2 3 3 9 1 2 3 8 0 1 2 7 0 3 8 0 1 3 9 1 2 ...
result:
ok OK.
Test #16:
score: 0
Accepted
time: 0ms
memory: 3832kb
input:
20 22 401 4
output:
152 3 9 18 21 3 8 17 18 3 7 16 17 3 6 15 16 3 5 14 15 3 4 13 14 3 3 12 13 3 2 11 12 3 1 10 11 2 0 10 3 1 10 11 3 2 11 12 3 3 12 13 3 4 13 14 3 5 14 15 3 6 15 16 3 7 16 17 3 8 17 18 3 9 18 21 3 8 17 18 3 7 16 17 3 6 15 16 3 5 14 15 3 4 13 14 3 3 12 13 3 2 11 12 3 1 10 11 2 0 10 3 1 10 11 3 2 11 12 3 ...
result:
ok OK.
Subtask #5:
score: 20
Accepted
Dependency #4:
100%
Accepted
Test #17:
score: 20
Accepted
time: 0ms
memory: 3832kb
input:
18 20 325 5
output:
136 3 8 16 19 3 7 15 16 3 6 14 15 3 5 13 14 3 4 12 13 3 3 11 12 3 2 10 11 3 1 9 10 2 0 9 3 1 9 10 3 2 10 11 3 3 11 12 3 4 12 13 3 5 13 14 3 6 14 15 3 7 15 16 3 8 16 19 3 7 15 16 3 6 14 15 3 5 13 14 3 4 12 13 3 3 11 12 3 2 10 11 3 1 9 10 2 0 9 3 1 9 10 3 2 10 11 3 3 11 12 3 4 12 13 3 5 13 14 3 6 14 1...
result:
ok OK.
Test #18:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
17 19 290 5
output:
128 3 8 16 18 3 7 15 16 3 6 14 15 3 5 13 14 3 4 12 13 3 3 11 12 3 2 10 11 3 1 9 10 2 0 9 3 1 9 10 3 2 10 11 3 3 11 12 3 4 12 13 3 5 13 14 3 6 14 15 3 7 15 16 3 8 16 18 3 7 15 16 3 6 14 15 3 5 13 14 3 4 12 13 3 3 11 12 3 2 10 11 3 1 9 10 2 0 9 3 1 9 10 3 2 10 11 3 3 11 12 3 4 12 13 3 5 13 14 3 6 14 1...
result:
ok OK.
Test #19:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
20 22 401 5
output:
152 3 9 18 21 3 8 17 18 3 7 16 17 3 6 15 16 3 5 14 15 3 4 13 14 3 3 12 13 3 2 11 12 3 1 10 11 2 0 10 3 1 10 11 3 2 11 12 3 3 12 13 3 4 13 14 3 5 14 15 3 6 15 16 3 7 16 17 3 8 17 18 3 9 18 21 3 8 17 18 3 7 16 17 3 6 15 16 3 5 14 15 3 4 13 14 3 3 12 13 3 2 11 12 3 1 10 11 2 0 10 3 1 10 11 3 2 11 12 3 ...
result:
ok OK.
Subtask #6:
score: 10
Accepted
Test #20:
score: 10
Accepted
time: 1ms
memory: 4088kb
input:
14 16 393 6
output:
104 3 6 12 15 3 5 11 12 3 4 10 11 3 3 9 10 3 2 8 9 3 1 7 8 2 0 7 3 1 7 8 3 2 8 9 3 3 9 10 3 4 10 11 3 5 11 12 3 6 12 15 3 5 11 12 3 4 10 11 3 3 9 10 3 2 8 9 3 1 7 8 2 0 7 3 1 7 8 3 2 8 9 3 3 9 10 3 4 10 11 3 5 11 12 3 15 6 14 3 13 5 6 3 12 4 5 3 11 3 4 3 10 2 3 3 9 1 2 3 8 0 1 2 7 0 3 8 0 1 3 9 1 2 ...
result:
ok OK.
Test #21:
score: 0
Accepted
time: 0ms
memory: 3912kb
input:
39 41 1093 6
output:
304 3 19 38 40 3 18 37 38 3 17 36 37 3 16 35 36 3 15 34 35 3 14 33 34 3 13 32 33 3 12 31 32 3 11 30 31 3 10 29 30 3 9 28 29 3 8 27 28 3 7 26 27 3 6 25 26 3 5 24 25 3 4 23 24 3 3 22 23 3 2 21 22 3 1 20 21 2 0 20 3 1 20 21 3 2 21 22 3 3 22 23 3 4 23 24 3 5 24 25 3 6 25 26 3 7 26 27 3 8 27 28 3 9 28 29...
result:
ok OK.
Test #22:
score: 0
Accepted
time: 1ms
memory: 4120kb
input:
0 2 1 6
output:
1 1 0
result:
ok OK.
Test #23:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
50 52 1401 6
output:
392 3 24 48 51 3 23 47 48 3 22 46 47 3 21 45 46 3 20 44 45 3 19 43 44 3 18 42 43 3 17 41 42 3 16 40 41 3 15 39 40 3 14 38 39 3 13 37 38 3 12 36 37 3 11 35 36 3 10 34 35 3 9 33 34 3 8 32 33 3 7 31 32 3 6 30 31 3 5 29 30 3 4 28 29 3 3 27 28 3 2 26 27 3 1 25 26 2 0 25 3 1 25 26 3 2 26 27 3 3 27 28 3 4 ...
result:
ok OK.
Subtask #7:
score: 10
Accepted
Dependency #2:
100%
Accepted
Dependency #4:
100%
Accepted
Test #24:
score: 10
Accepted
time: 1ms
memory: 3784kb
input:
93 95 745 7
output:
736 3 46 92 94 3 45 91 92 3 44 90 91 3 43 89 90 3 42 88 89 3 41 87 88 3 40 86 87 3 39 85 86 3 38 84 85 3 37 83 84 3 36 82 83 3 35 81 82 3 34 80 81 3 33 79 80 3 32 78 79 3 31 77 78 3 30 76 77 3 29 75 76 3 28 74 75 3 27 73 74 3 26 72 73 3 25 71 72 3 24 70 71 3 23 69 70 3 22 68 69 3 21 67 68 3 20 66 67...
result:
ok OK.
Test #25:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
82 84 657 7
output:
648 3 40 80 83 3 39 79 80 3 38 78 79 3 37 77 78 3 36 76 77 3 35 75 76 3 34 74 75 3 33 73 74 3 32 72 73 3 31 71 72 3 30 70 71 3 29 69 70 3 28 68 69 3 27 67 68 3 26 66 67 3 25 65 66 3 24 64 65 3 23 63 64 3 22 62 63 3 21 61 62 3 20 60 61 3 19 59 60 3 18 58 59 3 17 57 58 3 16 56 57 3 15 55 56 3 14 54 55...
result:
ok OK.
Test #26:
score: 0
Accepted
time: 1ms
memory: 4144kb
input:
100 102 801 7
output:
792 3 49 98 101 3 48 97 98 3 47 96 97 3 46 95 96 3 45 94 95 3 44 93 94 3 43 92 93 3 42 91 92 3 41 90 91 3 40 89 90 3 39 88 89 3 38 87 88 3 37 86 87 3 36 85 86 3 35 84 85 3 34 83 84 3 33 82 83 3 32 81 82 3 31 80 81 3 30 79 80 3 29 78 79 3 28 77 78 3 27 76 77 3 26 75 76 3 25 74 75 3 24 73 74 3 23 72 7...
result:
ok OK.
Subtask #8:
score: 15
Accepted
Dependency #3:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #7:
100%
Accepted
Test #27:
score: 15
Accepted
time: 1ms
memory: 4144kb
input:
94 96 753 8
output:
744 3 46 92 95 3 45 91 92 3 44 90 91 3 43 89 90 3 42 88 89 3 41 87 88 3 40 86 87 3 39 85 86 3 38 84 85 3 37 83 84 3 36 82 83 3 35 81 82 3 34 80 81 3 33 79 80 3 32 78 79 3 31 77 78 3 30 76 77 3 29 75 76 3 28 74 75 3 27 73 74 3 26 72 73 3 25 71 72 3 24 70 71 3 23 69 70 3 22 68 69 3 21 67 68 3 20 66 67...
result:
ok OK.
Test #28:
score: 0
Accepted
time: 1ms
memory: 4144kb
input:
70 72 561 8
output:
552 3 34 68 71 3 33 67 68 3 32 66 67 3 31 65 66 3 30 64 65 3 29 63 64 3 28 62 63 3 27 61 62 3 26 60 61 3 25 59 60 3 24 58 59 3 23 57 58 3 22 56 57 3 21 55 56 3 20 54 55 3 19 53 54 3 18 52 53 3 17 51 52 3 16 50 51 3 15 49 50 3 14 48 49 3 13 47 48 3 12 46 47 3 11 45 46 3 10 44 45 3 9 43 44 3 8 42 43 3...
result:
ok OK.
Test #29:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
100 102 801 8
output:
792 3 49 98 101 3 48 97 98 3 47 96 97 3 46 95 96 3 45 94 95 3 44 93 94 3 43 92 93 3 42 91 92 3 41 90 91 3 40 89 90 3 39 88 89 3 38 87 88 3 37 86 87 3 36 85 86 3 35 84 85 3 34 83 84 3 33 82 83 3 32 81 82 3 31 80 81 3 30 79 80 3 29 78 79 3 28 77 78 3 27 76 77 3 26 75 76 3 25 74 75 3 24 73 74 3 23 72 7...
result:
ok OK.
Extra Test:
score: 0
Extra Test Passed