QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#233308 | #2705. Mixtape Management | Fyind# | AC ✓ | 0ms | 3892kb | C++20 | 1.0kb | 2023-10-31 16:16:32 | 2023-10-31 16:16:33 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define sz(x) ((int)x.size())
int main() {
#ifdef LLOCAL
freopen("a.in", "r", stdin);
#endif
ios_base::sync_with_stdio(0); cin.tie(0);
int n; cin >> n;
vector<int> A(n+1);
vector<int> pos(n+1);
vector<string> ans(n+1);
for (int i = 1;i <= n; ++i) {
cin >> A[i];
pos[A[i]] = i;
}
string s = "1";
auto getch = [&](int x) {
string ret = "";
while (x) {
ret += '0'+(x%10);
x /= 10;
}
reverse(ret.begin(),ret.end());
while (sz(ret) < 2) ret = "0" + ret;
return ret;
};
// cout << getch(0) << endl;
// assert(getch(0) == "00");
for (int i = 1;i <= n; ++i) {
string cur = "1";
cur += getch(i-1);
ans[i] = cur;
}
for (int i = 1;i <= n; ++i) {
for (int j = 1;j < i; ++j) ans[pos[i]] += "0";
}
for (int i = 1;i <= n; ++i) cout << ans[i] << " ";
cout << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3640kb
input:
1 1
output:
100
result:
ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
2 1 2
output:
100 1010
result:
ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
2 2 1
output:
1000 101
result:
ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
3 1 2 3
output:
100 1010 10200
result:
ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
3 1 3 2
output:
100 10100 1020
result:
ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3884kb
input:
3 2 1 3
output:
1000 101 10200
result:
ok
Test #7:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
3 2 3 1
output:
1000 10100 102
result:
ok
Test #8:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
3 3 1 2
output:
10000 101 1020
result:
ok
Test #9:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
3 3 2 1
output:
10000 1010 102
result:
ok
Test #10:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
7 4 2 6 1 5 7 3
output:
100000 1010 10200000 103 1040000 105000000 10600
result:
ok
Test #11:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
13 1 2 3 4 5 6 7 8 9 10 11 12 13
output:
100 1010 10200 103000 1040000 10500000 106000000 1070000000 10800000000 109000000000 1100000000000 11100000000000 112000000000000
result:
ok
Test #12:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
97 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:
100 1010 10200 103000 1040000 10500000 106000000 1070000000 10800000000 109000000000 1100000000000 11100000000000 112000000000000 1130000000000000 11400000000000000 115000000000000000 1160000000000000000 11700000000000000000 118000000000000000000 1190000000000000000000 12000000000000000000000 121000...
result:
ok
Test #13:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
100 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
output:
100 1010 10200 103000 1040000 10500000 106000000 1070000000 10800000000 109000000000 1100000000000 11100000000000 112000000000000 1130000000000000 11400000000000000 115000000000000000 1160000000000000000 11700000000000000000 118000000000000000000 1190000000000000000000 12000000000000000000000 121000...
result:
ok
Test #14:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
10 10 9 8 7 6 5 4 3 2 1
output:
100000000000 10100000000 1020000000 103000000 10400000 1050000 106000 10700 1080 109
result:
ok
Test #15:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
99 99 98 97 96 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 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
output:
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok
Test #16:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
100 100 99 98 97 96 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 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
output:
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok
Test #17:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
15 9 11 1 4 7 13 12 2 10 5 15 14 6 8 3
output:
10000000000 1010000000000 102 103000 104000000 105000000000000 10600000000000 1070 108000000000 1090000 11000000000000000 1110000000000000 11200000 1130000000 11400
result:
ok
Test #18:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
38 4 12 9 7 18 35 31 17 21 8 20 13 28 32 19 11 34 36 33 15 5 16 22 27 37 23 2 3 1 25 10 6 26 14 38 29 24 30
output:
100000 10100000000000 10200000000 103000000 10400000000000000000 1050000000000000000000000000000000000 106000000000000000000000000000000 1070000000000000000 10800000000000000000000 1090000000 1100000000000000000000 111000000000000 112000000000000000000000000000 1130000000000000000000000000000000 114...
result:
ok
Test #19:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
67 33 53 54 42 30 9 21 27 36 58 39 48 43 66 13 28 14 37 47 67 5 11 19 18 32 57 31 17 55 64 60 29 24 3 44 4 12 7 40 10 25 8 59 2 52 49 61 51 46 45 50 41 22 38 16 1 6 65 56 62 23 35 63 34 26 20 15
output:
10000000000000000000000000000000000 1010000000000000000000000000000000000000000000000000000 10200000000000000000000000000000000000000000000000000000 10300000000000000000000000000000000000000000 10400000000000000000000000000000 10500000000 10600000000000000000000 10700000000000000000000000000 1080000...
result:
ok
Test #20:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
100 37 7 16 86 32 92 43 42 28 19 97 26 79 80 62 100 41 12 58 60 82 44 46 84 78 8 15 94 21 71 23 89 56 54 30 13 34 98 14 4 85 76 5 96 74 91 73 72 11 25 22 39 3 75 48 29 45 95 6 9 10 77 69 35 87 1 47 27 52 38 36 2 99 68 81 20 59 88 93 53 63 65 49 17 90 66 55 64 67 83 33 24 31 70 18 40 57 61 51 50
output:
100000000000000000000000000000000000000 101000000 102000000000000000 1030000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1040000000000000000000000000000000 1050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 106000000000...
result:
ok
Test #21:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
4 4 1 3 2
output:
100000 101 10200 1030
result:
ok
Test #22:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
100 55 74 58 90 99 6 92 46 48 78 97 64 61 21 52 12 13 25 53 60 51 22 98 68 95 8 94 37 75 71 67 93 11 85 88 16 30 40 47 89 26 28 80 4 69 66 73 91 50 39 86 65 77 76 63 31 32 10 44 100 2 18 42 56 34 15 59 20 3 79 87 49 81 7 57 23 45 83 38 82 41 29 35 5 33 96 17 72 14 54 70 84 27 43 24 9 19 36 1 62
output:
100000000000000000000000000000000000000000000000000000000 1010000000000000000000000000000000000000000000000000000000000000000000000000 102000000000000000000000000000000000000000000000000000000000 10300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10400000000...
result:
ok
Test #23:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
100 100 43 21 75 86 53 6 55 12 95 71 18 5 40 19 4 68 65 79 23 47 77 41 42 74 93 27 60 76 39 32 66 84 46 57 35 30 78 51 80 13 99 50 26 82 52 20 94 91 85 36 98 17 10 7 72 63 14 9 16 44 45 73 87 59 56 62 70 1 90 15 97 81 89 34 96 24 37 38 33 92 2 11 67 3 54 58 69 61 29 28 48 64 25 8 22 83 49 88 31
output:
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 101000000000000000000000000000000000000000000 10200000000000000000000 10300000000000000000000000000000000000000000000000000000000000000000000000000 1040000000000000000000000000000000000000000000000...
result:
ok
Test #24:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
100 79 58 16 13 97 84 6 36 68 28 92 34 94 9 56 70 8 66 45 86 61 80 69 91 10 37 15 17 88 18 64 43 50 1 52 95 32 53 93 19 5 30 85 100 25 78 7 98 22 81 27 39 55 48 2 24 89 54 90 49 35 59 26 67 51 47 99 75 73 57 44 38 82 40 3 74 96 46 83 77 65 33 21 11 72 60 42 23 41 29 4 63 20 76 71 12 62 14 87 31
output:
100000000000000000000000000000000000000000000000000000000000000000000000000000000 101000000000000000000000000000000000000000000000000000000000 102000000000000000 103000000000000 104000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1050000000000000000000...
result:
ok
Test #25:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
100 33 21 66 11 79 13 27 53 63 32 65 74 31 38 54 52 80 44 90 56 88 28 96 69 58 35 19 34 64 30 76 37 12 17 45 22 15 4 89 91 93 72 55 1 26 86 97 47 20 16 51 2 62 29 14 77 85 78 18 6 9 67 81 5 84 98 7 75 43 99 83 8 61 73 49 95 57 92 50 40 36 46 60 39 100 25 59 10 87 41 94 82 48 70 3 71 24 42 23 68
output:
10000000000000000000000000000000000 10100000000000000000000 10200000000000000000000000000000000000000000000000000000000000000000 1030000000000 104000000000000000000000000000000000000000000000000000000000000000000000000000000 105000000000000 10600000000000000000000000000 10700000000000000000000000000...
result:
ok
Test #26:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
100 100 99 98 97 96 95 94 93 92 88 83 78 81 89 86 90 80 91 84 87 79 85 82 77 76 75 69 70 71 72 73 74 62 66 65 60 67 57 68 56 54 64 58 53 55 59 63 61 52 51 50 49 39 44 34 48 38 45 40 46 33 41 42 37 35 36 43 47 32 31 30 29 28 27 26 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 7 6 5 4 3 2 1
output:
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok
Test #27:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
100 9 1 8 6 7 3 2 14 15 10 12 4 11 5 13 20 21 22 23 24 25 68 69 39 38 37 36 35 34 33 32 31 30 29 28 27 100 99 98 97 53 67 52 47 40 64 62 57 46 43 50 49 58 65 42 45 60 54 48 61 63 56 66 44 41 55 59 51 16 17 18 90 84 73 71 79 70 81 72 87 86 74 88 89 77 96 75 76 91 82 83 80 93 94 85 78 92 95 19 26
output:
10000000000 101 1020000000 10300000 104000000 10500 1060 1070000000000000 10800000000000000 109000000000 11000000000000 111000 1120000000000 1130000 114000000000000 1150000000000000000000 11600000000000000000000 117000000000000000000000 1180000000000000000000000 11900000000000000000000000 1200000000...
result:
ok
Test #28:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
100 98 99 100 87 88 89 90 91 92 93 94 95 96 97 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 66 67 68 69 63 64 65 62 49 48 59 55 60 51 58 41 46 57 47 42 40 44 56 52 45 54 50 53 61 43 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
output:
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok
Test #29:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
100 97 98 99 100 96 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 66 63 38 55 39 33 28 50 59 56 67 49 48 64 29 34 47 58 57 32 36 54 30 60 53 62 46 42 65 35 44 51 37 68 61 41 31 40 45 52 43 27 26 25 24 23 22 21 20 19 18 17 14 16 15 13 12 6 9 7 10 8 5 4 11 3 1 2
output:
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok
Test #30:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
100 4 3 7 8 1 11 6 2 9 13 12 5 10 15 14 16 17 18 19 20 21 22 23 24 25 32 46 31 43 38 27 50 35 37 33 49 34 26 48 42 45 47 28 51 36 41 30 39 44 40 29 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 77 78 79 80 84 83 82 81 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
output:
100000 10100 102000000 1030000000 104 1050000000000 10600000 1070 10800000000 109000000000000 11000000000000 1110000 112000000000 11300000000000000 1140000000000000 115000000000000000 1160000000000000000 11700000000000000000 118000000000000000000 1190000000000000000000 12000000000000000000000 121000...
result:
ok
Test #31:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
100 42 83 90 35 92 99 33 88 70 49 91 48 39 41 73 61 69 77 62 53 32 55 76 43 47 60 44 38 87 74 89 51 40 100 56 75 86 45 57 58 71 34 84 85 97 67 66 94 95 72 63 93 64 54 98 68 80 81 78 46 36 37 65 96 82 50 79 31 52 59 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
output:
10000000000000000000000000000000000000000000 1010000000000000000000000000000000000000000000000000000000000000000000000000000000000 10200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1030000000000000000000000000000000000 10400000000000000000000000000000000000...
result:
ok
Test #32:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
100 87 81 97 89 72 67 75 62 91 84 83 88 66 61 78 86 70 63 96 71 85 94 82 73 65 76 90 92 64 99 95 100 80 69 74 93 68 98 79 77 50 51 52 53 54 55 56 57 58 59 60 49 48 47 46 45 44 43 42 41 40 39 38 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
output:
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10100000000000000000000000000000000000000000000000000000000000000000000000000000000 102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10300000000000000000000000...
result:
ok
Test #33:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
100 8 6 1 19 15 7 17 11 13 4 16 12 10 9 14 2 3 5 18 26 69 45 23 56 75 43 29 47 44 60 59 38 48 31 61 24 30 28 70 21 46 57 71 33 25 41 34 55 42 54 67 77 50 76 35 58 51 72 73 39 36 64 63 65 53 40 68 32 74 22 37 20 27 52 66 62 49 78 79 80 81 82 83 84 85 86 87 88 91 90 89 92 93 94 95 96 97 98 99 100
output:
1000000000 10100000 102 103000000000000000000 10400000000000000 105000000 1060000000000000000 1070000000000 108000000000000 109000 110000000000000000 11100000000000 112000000000 11300000000 1140000000000000 1150 11600 1170000 11800000000000000000 1190000000000000000000000000 120000000000000000000000...
result:
ok
Test #34:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
100 91 92 93 94 95 96 97 98 99 100 88 89 90 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 55 54 53 52 51 50 49 48 47 45 41 37 38 43 46 40 36 42 44 39 26 34 30 29 23 25 28 32 33 31 27 24 35 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
output:
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 103000000000000...
result:
ok
Test #35:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
100 100 99 98 97 96 88 89 90 91 92 93 94 95 85 86 87 83 82 84 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 56 57 58 59 60 61 62 63 64 65 66 52 53 54 55 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 25 26 27 28 20 14 21 17 15 18 23 24 22 16 19 11 9 13 10 4 7 6 12 8 5 3 1 2
output:
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok
Test #36:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
100 1 2 3 6 5 4 8 7 9 12 11 10 14 16 15 13 17 18 19 21 20 22 23 24 25 28 27 26 29 30 31 32 46 45 44 43 42 41 40 39 38 37 36 35 34 33 48 49 52 51 47 50 63 61 58 56 53 59 57 54 62 60 55 76 75 74 73 72 71 70 69 68 67 66 65 64 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 100 99 98 97 96 95
output:
100 1010 10200 10300000 1040000 105000 1060000000 107000000 10800000000 10900000000000 1100000000000 111000000000 1120000000000000 113000000000000000 11400000000000000 115000000000000 1160000000000000000 11700000000000000000 118000000000000000000 11900000000000000000000 1200000000000000000000 121000...
result:
ok
Test #37:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
100 41 73 74 27 83 36 35 34 33 99 43 56 57 58 59 60 61 62 63 64 65 66 67 9 8 7 6 5 46 13 12 11 10 14 54 55 97 93 94 92 96 95 98 24 25 26 100 71 72 77 78 79 80 81 82 68 69 70 75 37 38 39 40 21 23 22 4 17 16 15 47 50 49 48 76 18 32 31 30 29 28 45 51 2 3 1 19 20 42 44 91 90 89 88 87 53 52 85 84 86
output:
1000000000000000000000000000000000000000000 101000000000000000000000000000000000000000000000000000000000000000000000000 1020000000000000000000000000000000000000000000000000000000000000000000000000 10300000000000000000000000000 1040000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok