QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#188998#2705. Mixtape ManagementBeevo#AC ✓0ms3872kbC++20912b2023-09-26 18:44:352023-09-26 18:44:37

Judging History

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

  • [2023-09-26 18:44:37]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3872kb
  • [2023-09-26 18:44:35]
  • 提交

answer

#include <bits/stdc++.h>

#define el '\n'
#define Beevo ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

typedef long long ll;
typedef long double ld;

using namespace std;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

void testCase() {
    int n;
    cin >> n;

    vector<string> v(n);
    for (int i = 0, a; i < n; i++)
        cin >> a, v[i] = string(a, '0');

    v[0][0] = '1';

    for (int i = 1; i < n; i++) {
        int j;
        for (j = 0; j < min(v[i].size(), v[i - 1].size()); j++)
            v[i][j] = v[i - 1][j];

        j--;

        while (v[i][j] == '9')
            v[i][j] = '0', j--;

        v[i][j]++;
    }

    assert(is_sorted(v.begin(), v.end()));

    for (auto &i: v)
        cout << i << ' ';
}

signed main() {
    Beevo

    int t = 1;
//    cin >> t;

    while (t--)
        testCase();
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3676kb

input:

1
1

output:

1 

result:

ok 

Test #2:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

2
1 2

output:

1 20 

result:

ok 

Test #3:

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

input:

2
2 1

output:

10 2 

result:

ok 

Test #4:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

3
1 2 3

output:

1 20 210 

result:

ok 

Test #5:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

3
1 3 2

output:

1 200 21 

result:

ok 

Test #6:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

3
2 1 3

output:

10 2 300 

result:

ok 

Test #7:

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

input:

3
2 3 1

output:

10 110 2 

result:

ok 

Test #8:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

3
3 1 2

output:

100 2 30 

result:

ok 

Test #9:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

3
3 2 1

output:

100 11 2 

result:

ok 

Test #10:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

7
4 2 6 1 5 7 3

output:

1000 11 120000 2 30000 3000100 301 

result:

ok 

Test #11:

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

input:

13
1 2 3 4 5 6 7 8 9 10 11 12 13

output:

1 20 210 2110 21110 211110 2111110 21111110 211111110 2111111110 21111111110 211111111110 2111111111110 

result:

ok 

Test #12:

score: 0
Accepted
time: 0ms
memory: 3580kb

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:

1 20 210 2110 21110 211110 2111110 21111110 211111110 2111111110 21111111110 211111111110 2111111111110 21111111111110 211111111111110 2111111111111110 21111111111111110 211111111111111110 2111111111111111110 21111111111111111110 211111111111111111110 2111111111111111111110 21111111111111111111110 2...

result:

ok 

Test #13:

score: 0
Accepted
time: 0ms
memory: 3700kb

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:

1 20 210 2110 21110 211110 2111110 21111110 211111110 2111111110 21111111110 211111111110 2111111111110 21111111111110 211111111111110 2111111111111110 21111111111111110 211111111111111110 2111111111111111110 21111111111111111110 211111111111111111110 2111111111111111111110 21111111111111111111110 2...

result:

ok 

Test #14:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

10
10 9 8 7 6 5 4 3 2 1

output:

1000000000 100000001 10000001 1000001 100001 10001 1001 101 11 2 

result:

ok 

Test #15:

score: 0
Accepted
time: 0ms
memory: 3600kb

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:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 100...

result:

ok 

Test #16:

score: 0
Accepted
time: 0ms
memory: 3624kb

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:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 ...

result:

ok 

Test #17:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

15
9 11 1 4 7 13 12 2 10 5 15 14 6 8 3

output:

100000000 10000000100 2 3000 3001000 3001001000000 300100100001 31 3200000000 32001 320020000000000 32002000000001 320021 32002200 321 

result:

ok 

Test #18:

score: 0
Accepted
time: 0ms
memory: 3680kb

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:

1000 100100000000 100100001 1001001 100100200000000000 10010020000000000100000000000000000 1001002000000000010000000000001 10010020000000001 100100200000000020000 10010021 10010022000000000000 1001002200001 1001002200002000000000000000 10010022000020000000000000010000 1001002200002000001 10010022001...

result:

ok 

Test #19:

score: 0
Accepted
time: 0ms
memory: 3616kb

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:

100000000000000000000000000000000 10000000000000000000000000000000100000000000000000000 100000000000000000000000000000001000000000000000000010 100000000000000000000000000000001000000001 100000000000000000000000000001 100000001 100000002000000000000 100000002000000000001000000 10000000200000000000100...

result:

ok 

Test #20:

score: 0
Accepted
time: 0ms
memory: 3580kb

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:

1000000000000000000000000000000000000 1000001 1000002000000000 10000020000000010000000000000000000000000000000000000000000000000000000000000000000000 10000020000000010000000000000001 10000020000000010000000000000002000000000000000000000000000000000000000000000000000000000000 100000200000000100000000...

result:

ok 

Test #21:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

4
4 1 3 2

output:

1000 2 300 31 

result:

ok 

Test #22:

score: 0
Accepted
time: 0ms
memory: 3672kb

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:

1000000000000000000000000000000000000000000000000000000 10000000000000000000000000000000000000000000000000000010000000000000000000 1000000000000000000000000000000000000000000000000000001001 100000000000000000000000000000000000000000000000000000100200000000000000000000000000000000 1000000000000000000...

result:

ok 

Test #23:

score: 0
Accepted
time: 0ms
memory: 3568kb

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:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1000000000000000000000000000000000000000001 100000000000000000001 100000000000000000002000000000000000000000000000000000000000000000000000000 100000000000000000002000000000000000000000000000000000000...

result:

ok 

Test #24:

score: 0
Accepted
time: 0ms
memory: 3632kb

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:

1000000000000000000000000000000000000000000000000000000000000000000000000000000 1000000000000000000000000000000000000000000000000000000001 1000000000000001 1000000000001 1000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10000000000020000000000000000000...

result:

ok 

Test #25:

score: 0
Accepted
time: 0ms
memory: 3628kb

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:

100000000000000000000000000000000 100000000000000000001 100000000000000000002000000000000000000000000000000000000000000000 10000000001 1000000000200000000000000000000000000000000000000000000000000000000000000000000 1000000000201 100000000020200000000000000 1000000000202000000000000010000000000000000...

result:

ok 

Test #26:

score: 0
Accepted
time: 0ms
memory: 3868kb

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:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 ...

result:

ok 

Test #27:

score: 0
Accepted
time: 0ms
memory: 3856kb

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:

100000000 2 30000000 300001 3000020 301 31 32000000000000 320000000000010 3200000001 320000000200 3201 32020000000 32021 3202200000000 32022000000010000000 320220000000100000010 3202200000001000000110 32022000000010000001110 320220000000100000011110 3202200000001000000111110 320220000000100000011111...

result:

ok 

Test #28:

score: 0
Accepted
time: 0ms
memory: 3792kb

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:

10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 ...

result:

ok 

Test #29:

score: 0
Accepted
time: 0ms
memory: 3704kb

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:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 100...

result:

ok 

Test #30:

score: 0
Accepted
time: 0ms
memory: 3856kb

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:

1000 101 1020000 10200010 2 30000000000 300001 31 320000000 3200000010000 320000001001 32001 3200200000 320020000100000 32002000010001 3200200001000200 32002000010002010 320020000100020110 3200200001000201110 32002000010002011110 320020000100020111110 3200200001000201111110 32002000010002011111110 3...

result:

ok 

Test #31:

score: 0
Accepted
time: 0ms
memory: 3624kb

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:

100000000000000000000000000000000000000000 10000000000000000000000000000000000000000100000000000000000000000000000000000000000 100000000000000000000000000000000000000001000000000000000000000000000000000000000010000000 10000000000000000000000000000000001 1000000000000000000000000000000000200000000000...

result:

ok 

Test #32:

score: 0
Accepted
time: 0ms
memory: 3872kb

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:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000 100000000000000000000000000000000000000000000000000000000000000000000000000000001 1000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000 10000000000000000000000000000000...

result:

ok 

Test #33:

score: 0
Accepted
time: 0ms
memory: 3584kb

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:

10000000 100001 2 3000000000000000000 300000000000001 3000001 30000020000000000 30000020001 3000002000200 3001 3002000000000000 300200000001 3002000001 300200001 30020000200000 31 320 32100 321010000000000000 32101000000000000100000000 3210100000000000010000000100000000000000000000000000000000000000...

result:

ok 

Test #34:

score: 0
Accepted
time: 0ms
memory: 3872kb

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:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 100000000000000000000...

result:

ok 

Test #35:

score: 0
Accepted
time: 0ms
memory: 3868kb

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:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 ...

result:

ok 

Test #36:

score: 0
Accepted
time: 0ms
memory: 3696kb

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:

1 20 210 211000 21101 2111 21120000 2112001 211200200 211200201000 21120020101 2112002011 21120020120000 2112002012000100 211200201200011 2112002012001 21120020120020000 211200201200200010 2112002012002000110 211200201200200011100 21120020120020001111 2112002012002000111200 21120020120020001112010 2...

result:

ok 

Test #37:

score: 0
Accepted
time: 0ms
memory: 3624kb

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:

10000000000000000000000000000000000000000 1000000000000000000000000000000000000000100000000000000000000000000000000 10000000000000000000000000000000000000001000000000000000000000000000000010 100000000000000000000000001 100000000000000000000000002000000000000000000000000000000000000000000000000000000...

result:

ok