QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#853209 | #9987. 骑行计划 | test_algth | AC ✓ | 114ms | 47272kb | C++17 | 1.6kb | 2025-01-11 16:09:54 | 2025-01-11 16:09:57 |
Judging History
answer
#include <bits/stdc++.h>
const int MAXN = 155;
const int MAXM = 1.01E4;
int dp[MAXN][MAXN][MAXN], f[MAXN][MAXN][MAXN], W[MAXM], D[MAXM], T[MAXM], S[MAXN], tag[MAXN][MAXN], Cost[MAXN][MAXN][MAXN];
int N, M, cost;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
std::cin >> N >> M >> cost;
for (int i = 1; i <= N; ++i) {
std::cin >> S[i];
}
for (int i = 1; i <= N; ++i) {
for (int j = 1; j <= N; ++j) {
for (int x = 0; x < MAXN; ++x) {
dp[i][j][x] = tag[i][x] = f[i][j][x] = 1e9;
}
tag[i][0] = 0;
}
}
for (int i = 1; i <= N; ++i) {
for (int x = 0; x <= 150; ++x) {
int ans = 0;
for (int j = i; j <= N; ++j) {
ans += std::max(0, S[j] - x) * cost;
Cost[i][j][x] = ans;
}
}
}
for (int i = 1; i <= M; ++i) {
std::cin >> W[i] >> D[i] >> T[i];
for (int j = 1; j <= D[i]; ++j)
tag[j][T[i]] = std::min(tag[j][T[i]], W[i]);
}
for (int x = 150; ~x; --x) {
for (int len = 1; len <= N; ++len) {
for (int l = 1, r = l + len - 1; r <= N; ++l, ++r) {
dp[l][r][x] = std::min(f[l][r][x + 1], Cost[l][r][x]);
for (int k = l; k < r; ++k) {
dp[l][r][x] = std::min(dp[l][r][x], dp[l][k][x] + dp[k + 1][r][x]);
}
f[l][r][x] = std::min(f[l][r][x + 1], dp[l][r][x] + tag[len][x]);
}
}
}
int ans = 1e9;
for (int x = 0; x <= 150; ++x) {
ans = std::min(ans, f[1][N][x]);
}
std::cout << ans << '\n';
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 15ms
memory: 33200kb
input:
85 5408 4856 52 43 38 21 33 28 24 46 4 66 14 51 63 24 69 35 50 9 63 58 43 69 1 28 59 56 50 63 12 23 41 6 19 9 41 45 14 52 6 7 1 24 30 9 33 54 71 38 55 28 61 10 21 13 22 56 29 24 19 27 9 3 25 54 45 50 9 42 13 5 32 37 56 51 24 3 12 37 68 29 69 40 53 50 69 486593 41 10 175445 13 5 1271250 9 35 7064 1 2...
output:
1440909
result:
ok single line: '1440909'
Test #2:
score: 0
Accepted
time: 96ms
memory: 46860kb
input:
149 1277 4355 43 52 37 18 41 38 5 57 33 37 50 51 60 31 57 64 16 15 16 51 40 65 52 71 45 24 47 74 4 64 53 37 4 73 10 35 51 49 18 21 28 2 45 29 46 50 73 17 11 66 12 6 58 56 23 67 41 64 23 71 70 72 25 7 15 58 63 58 46 51 70 65 34 65 60 17 37 2 62 53 17 74 34 18 19 3 16 21 67 43 65 64 44 14 54 71 54 65 ...
output:
2479892
result:
ok single line: '2479892'
Test #3:
score: 0
Accepted
time: 62ms
memory: 45532kb
input:
128 135 4945 20 16 3 30 17 19 18 25 7 25 1 23 18 19 29 13 13 23 30 2 25 28 7 8 19 2 31 30 22 7 7 16 26 31 15 20 3 20 29 15 26 4 23 29 19 13 7 7 24 12 11 24 8 2 5 2 18 21 25 1 5 31 22 22 23 13 19 20 23 19 10 20 14 12 23 8 18 31 14 12 25 27 5 18 27 12 5 26 22 3 13 23 16 11 29 4 22 3 9 29 26 29 13 10 2...
output:
1986485
result:
ok single line: '1986485'
Test #4:
score: 0
Accepted
time: 0ms
memory: 20312kb
input:
36 581 2377 52 79 10 73 39 70 65 43 76 81 32 54 45 45 28 56 34 35 38 16 56 78 56 39 19 4 57 11 8 31 69 53 69 73 49 58 475218 7 48 140593 4 21 6733 3 1 281348 5 27 14745 7 10 103948 6 9 21841 3 26 560211 5 71 5291 1 3 711 1 3 9948 1 15 2894 2 1 34177 1 25 187269 14 8 442896 9 22 252252 7 43 401946 13...
output:
434045
result:
ok single line: '434045'
Test #5:
score: 0
Accepted
time: 88ms
memory: 46136kb
input:
142 1462 6716 20 30 35 17 36 1 8 15 9 37 10 1 39 18 6 2 28 36 28 37 7 2 35 15 39 37 37 30 23 12 28 4 2 2 29 10 18 9 24 31 7 21 25 36 21 17 31 20 17 30 7 39 3 10 37 32 16 23 21 19 33 18 20 37 11 29 18 12 29 28 22 27 4 12 24 6 2 32 19 2 39 9 11 18 37 10 7 3 19 3 30 6 7 36 9 14 6 8 19 33 11 30 29 13 9 ...
output:
1463622
result:
ok single line: '1463622'
Test #6:
score: 0
Accepted
time: 24ms
memory: 38964kb
input:
95 7993 2085 5 24 3 23 29 10 30 3 2 29 10 22 25 25 1 15 13 10 9 32 29 29 17 21 8 27 22 26 19 6 3 28 26 5 19 11 27 13 18 23 27 30 8 6 9 2 33 18 29 4 20 27 16 7 1 11 10 21 13 8 27 6 10 3 19 25 29 33 32 4 23 14 22 6 16 8 9 19 18 2 24 24 5 13 32 33 17 27 28 24 5 31 27 24 14 90658 7 7 17303 11 1 118486 4...
output:
241704
result:
ok single line: '241704'
Test #7:
score: 0
Accepted
time: 2ms
memory: 20348kb
input:
41 6420 2466 59 27 59 46 72 65 44 29 94 40 9 27 89 68 56 92 17 86 83 14 11 65 6 37 93 36 58 79 6 13 12 54 63 58 44 25 83 74 38 18 41 83339 1 85 36883 3 31 162666 2 57 34382 6 5 303388 17 23 4074 2 1 508895 4 67 14436 2 58 7798 3 3 25055 1 15 27194 3 5 366 1 1 4453 2 3 77937 1 56 1285 1 1 116054 2 37...
output:
350353
result:
ok single line: '350353'
Test #8:
score: 0
Accepted
time: 67ms
memory: 45328kb
input:
129 113 1675 72 64 57 113 57 94 119 127 128 89 1 82 54 107 113 69 104 125 39 2 2 119 122 45 31 122 114 40 35 46 126 47 110 39 2 6 41 22 19 16 103 47 52 59 34 83 93 45 117 119 118 6 88 71 31 43 8 107 28 12 46 92 12 120 34 53 91 39 78 85 111 4 97 20 64 5 41 42 86 40 68 43 86 38 56 87 55 15 120 107 95 ...
output:
3856152
result:
ok single line: '3856152'
Test #9:
score: 0
Accepted
time: 102ms
memory: 46960kb
input:
149 1294 8999 105 14 91 19 84 48 11 86 1 122 119 10 127 3 56 96 134 95 55 45 86 105 71 91 5 67 146 67 50 128 68 133 71 95 88 134 142 107 25 103 128 46 142 134 150 5 73 105 52 60 106 106 150 110 87 67 138 11 113 84 130 40 47 82 54 52 126 18 83 72 138 20 46 128 44 14 122 21 140 64 67 39 35 70 63 15 77...
output:
13943325
result:
ok single line: '13943325'
Test #10:
score: 0
Accepted
time: 7ms
memory: 26668kb
input:
61 9269 2408 19 29 6 20 42 49 25 41 3 9 49 18 44 16 12 41 28 11 12 37 17 31 29 36 33 38 9 19 38 13 1 18 51 3 48 21 20 49 4 12 30 27 20 24 36 34 50 13 8 36 49 36 16 46 16 40 32 8 30 33 7 3655 1 6 41694 1 36 124873 12 6 42922 22 7 281166 15 8 10621 3 2 31136 3 5 78061 3 15 24993 7 2 86162 5 40 62817 2...
output:
248422
result:
ok single line: '248422'
Test #11:
score: 0
Accepted
time: 41ms
memory: 39604kb
input:
113 2070 5907 77 38 61 39 85 26 60 1 12 36 63 14 20 26 1 37 25 38 46 76 42 60 51 28 45 33 1 64 33 38 9 31 3 34 7 61 46 24 84 4 3 30 16 5 19 85 24 65 36 14 76 51 27 74 12 30 11 35 22 18 22 81 69 68 8 53 40 31 14 35 23 68 38 81 11 62 9 38 56 4 32 42 46 2 42 8 35 68 83 25 62 38 16 52 10 49 56 65 48 23 ...
output:
3160933
result:
ok single line: '3160933'
Test #12:
score: 0
Accepted
time: 12ms
memory: 27148kb
input:
76 4006 4199 75 39 100 37 7 93 80 62 38 69 66 108 42 4 19 108 6 31 32 101 36 53 86 41 31 99 22 1 98 43 97 70 53 6 28 12 15 88 35 63 93 16 16 27 108 57 19 22 1 72 74 86 15 51 106 45 15 8 12 89 26 18 102 91 4 14 100 100 16 51 51 99 27 69 87 43 36224 1 22 112456 2 26 324023 18 7 35607 1 16 64802 8 20 1...
output:
1898173
result:
ok single line: '1898173'
Test #13:
score: 0
Accepted
time: 65ms
memory: 45748kb
input:
132 334 1946 55 22 5 58 37 49 70 77 59 148 2 26 124 95 135 64 93 106 135 95 42 110 10 137 34 94 81 131 10 140 38 66 20 90 64 67 2 32 55 43 100 119 102 131 60 35 19 141 146 88 90 46 109 87 30 89 142 105 142 40 122 136 78 12 42 141 19 22 10 5 127 53 132 7 75 37 110 5 19 55 74 83 8 30 41 22 141 139 13 ...
output:
2054866
result:
ok single line: '2054866'
Test #14:
score: 0
Accepted
time: 48ms
memory: 43208kb
input:
116 2889 7589 52 33 81 142 101 7 99 80 130 2 57 104 104 38 65 106 62 103 31 126 4 130 107 29 136 124 10 28 119 36 80 36 21 4 59 49 87 130 127 73 43 21 132 96 43 101 32 105 21 115 5 123 97 20 57 77 41 104 9 127 4 96 48 4 113 31 20 32 35 93 132 107 103 60 113 102 93 114 60 138 64 97 7 43 89 69 33 94 3...
output:
5063435
result:
ok single line: '5063435'
Test #15:
score: 0
Accepted
time: 98ms
memory: 46512kb
input:
145 1579 2149 21 52 42 71 36 29 49 48 55 19 12 1 14 31 17 46 43 72 76 4 34 72 11 47 51 30 17 42 81 74 88 59 16 47 6 63 56 84 72 52 20 48 72 70 38 25 29 46 26 49 36 7 74 62 18 20 48 37 59 34 39 33 74 54 5 27 81 88 33 16 88 56 75 46 24 65 17 38 69 48 63 35 40 22 66 74 27 27 84 56 60 16 59 89 15 75 53 ...
output:
1633994
result:
ok single line: '1633994'
Test #16:
score: 0
Accepted
time: 44ms
memory: 39284kb
input:
111 73 6688 51 28 4 14 45 25 32 62 21 55 7 45 37 17 73 73 82 44 63 61 58 10 21 31 36 56 55 10 10 36 6 15 69 74 20 25 42 40 4 79 44 25 47 10 61 39 47 47 57 64 64 73 41 77 56 71 1 24 31 57 50 31 70 87 70 31 26 9 62 62 27 33 23 44 27 28 75 45 25 85 3 81 46 16 4 15 51 34 72 80 81 12 82 80 74 56 11 58 27...
output:
11046253
result:
ok single line: '11046253'
Test #17:
score: 0
Accepted
time: 104ms
memory: 46692kb
input:
148 8383 4483 12 103 74 47 101 59 64 100 53 3 54 32 51 100 11 35 7 25 71 58 101 46 23 29 7 66 65 38 94 99 93 26 18 91 40 104 58 17 60 49 78 75 100 36 59 70 19 35 56 30 30 58 75 52 3 54 11 75 88 22 14 67 27 83 82 102 29 84 63 23 35 106 86 94 29 106 74 46 9 5 48 54 30 99 101 100 34 18 65 32 31 100 84 ...
output:
3147099
result:
ok single line: '3147099'
Test #18:
score: 0
Accepted
time: 91ms
memory: 45816kb
input:
138 9789 9124 88 11 62 45 47 26 64 13 54 98 29 21 93 67 49 29 24 112 25 51 70 111 67 53 84 80 78 94 57 111 97 62 30 93 115 54 72 22 50 8 20 68 64 105 119 92 98 35 105 88 111 96 74 124 8 121 96 88 7 24 44 91 95 57 3 133 70 89 17 84 37 74 8 34 89 125 2 96 69 107 97 75 97 112 36 57 115 41 127 71 132 11...
output:
6805747
result:
ok single line: '6805747'
Test #19:
score: 0
Accepted
time: 93ms
memory: 46572kb
input:
145 8161 8117 39 97 44 49 130 138 74 34 88 108 74 76 113 88 68 2 96 77 93 25 42 12 10 53 107 80 11 56 26 57 110 48 82 49 68 70 20 58 76 30 30 26 13 75 22 64 57 80 43 116 77 46 81 56 42 122 3 49 110 88 125 136 120 13 81 120 72 110 10 15 117 119 111 36 86 89 32 18 141 63 23 35 137 83 41 97 118 36 120 ...
output:
6589745
result:
ok single line: '6589745'
Test #20:
score: 0
Accepted
time: 90ms
memory: 47020kb
input:
145 6320 7791 71 77 47 76 107 49 57 86 54 7 57 58 69 76 2 72 41 56 103 25 11 83 63 102 58 96 70 80 7 10 5 69 71 102 23 37 103 62 108 110 80 64 42 2 20 84 61 26 41 91 7 6 2 41 91 74 68 16 50 77 102 45 53 85 20 25 60 35 3 83 37 72 10 54 87 43 64 20 42 35 51 45 80 38 95 13 54 45 79 76 2 41 64 16 21 69 ...
output:
4738756
result:
ok single line: '4738756'
Test #21:
score: 0
Accepted
time: 59ms
memory: 42888kb
input:
123 5191 7314 3 43 71 70 17 100 57 54 125 87 79 135 113 70 94 76 134 120 69 81 76 27 7 21 13 59 82 130 25 24 115 100 73 39 97 29 32 121 62 112 63 63 70 16 129 70 2 128 31 133 34 77 113 93 33 62 69 57 127 15 103 14 22 134 57 89 64 6 104 73 11 127 39 20 100 22 77 81 104 19 22 29 60 104 118 122 131 51 ...
output:
6699933
result:
ok single line: '6699933'
Test #22:
score: 0
Accepted
time: 85ms
memory: 45908kb
input:
140 8820 1748 36 35 1 76 91 104 88 108 7 84 65 59 50 101 94 75 38 42 94 8 116 71 7 21 83 47 124 63 60 49 55 12 121 112 69 65 36 75 109 102 117 81 35 38 7 42 79 75 32 92 51 67 30 78 66 82 81 92 14 33 1 114 30 93 71 65 118 48 54 33 12 57 38 55 73 119 116 80 34 71 10 25 87 83 44 39 103 77 32 99 49 93 9...
output:
1280215
result:
ok single line: '1280215'
Test #23:
score: 0
Accepted
time: 111ms
memory: 46884kb
input:
148 3766 9880 2 13 52 112 142 14 133 35 7 14 32 54 94 9 28 78 32 128 138 78 8 78 61 30 51 37 86 84 143 46 113 117 86 43 116 53 113 70 6 131 40 70 125 65 33 31 86 144 99 36 26 114 27 126 77 76 54 146 24 46 86 93 45 35 14 28 89 97 117 133 134 68 5 25 50 28 80 15 102 138 75 94 80 96 114 20 66 129 66 12...
output:
9356788
result:
ok single line: '9356788'
Test #24:
score: 0
Accepted
time: 71ms
memory: 45940kb
input:
135 4658 8257 67 107 61 114 15 130 69 30 62 1 59 117 68 118 79 35 124 57 126 57 137 14 29 103 11 104 94 53 126 23 21 74 71 122 50 79 59 103 37 117 131 37 85 63 30 8 40 122 101 108 42 110 87 100 137 12 131 19 126 12 45 105 53 90 16 101 52 104 57 113 27 27 79 109 38 99 117 82 133 100 69 127 62 3 30 19...
output:
6635655
result:
ok single line: '6635655'
Test #25:
score: 0
Accepted
time: 96ms
memory: 46968kb
input:
147 9099 1044 118 129 78 65 54 129 89 81 31 19 27 87 7 12 93 65 75 122 5 94 71 37 123 2 104 85 15 13 69 94 28 116 52 27 74 20 95 96 113 4 63 74 102 26 95 68 50 77 78 18 79 115 104 68 13 124 124 114 39 111 118 78 2 74 80 33 60 16 9 50 60 112 110 46 99 105 106 95 108 94 42 116 13 127 115 13 114 98 19 ...
output:
693831
result:
ok single line: '693831'
Test #26:
score: 0
Accepted
time: 72ms
memory: 46108kb
input:
133 3212 6307 38 105 121 128 1 40 129 12 121 87 66 21 127 99 75 46 5 92 43 132 24 87 80 73 106 100 127 105 126 12 37 21 8 32 2 35 3 86 133 44 7 21 14 7 60 80 25 52 43 69 28 49 32 80 17 69 4 22 99 41 43 96 75 41 131 21 66 99 82 112 62 88 41 92 135 68 57 89 127 91 32 46 137 19 124 95 64 88 27 47 137 1...
output:
5047794
result:
ok single line: '5047794'
Test #27:
score: 0
Accepted
time: 88ms
memory: 46808kb
input:
143 5656 5361 127 41 4 27 72 93 14 133 73 59 90 35 45 55 28 80 36 19 66 78 136 69 29 98 43 125 18 128 69 127 106 39 120 117 95 48 55 48 95 15 49 45 58 116 116 110 134 43 29 73 136 107 47 128 95 48 79 4 14 62 124 131 120 74 101 122 36 48 78 81 90 125 28 135 13 2 55 118 117 90 17 25 25 116 103 55 7 83...
output:
3824896
result:
ok single line: '3824896'
Test #28:
score: 0
Accepted
time: 99ms
memory: 47096kb
input:
144 3875 5116 37 125 23 29 146 6 67 111 56 70 67 62 61 29 24 137 17 63 12 17 89 145 109 3 46 70 105 6 43 103 145 145 63 123 109 50 20 132 102 111 33 50 12 24 41 137 137 58 27 94 73 62 123 94 87 2 3 6 63 30 62 26 74 68 101 64 9 22 106 14 39 142 118 121 63 129 105 131 32 67 95 89 36 22 29 5 1 80 79 42...
output:
5811938
result:
ok single line: '5811938'
Test #29:
score: 0
Accepted
time: 98ms
memory: 46720kb
input:
147 4220 1564 118 5 96 139 112 60 134 64 130 142 59 48 11 31 99 128 22 38 100 53 117 128 73 111 146 128 59 32 127 142 124 124 5 20 147 135 66 100 136 24 67 109 21 64 110 131 51 131 109 46 139 100 116 66 68 109 79 87 91 92 57 20 22 129 19 137 84 78 82 38 74 126 65 92 59 116 58 140 69 19 137 103 16 76...
output:
1764428
result:
ok single line: '1764428'
Test #30:
score: 0
Accepted
time: 105ms
memory: 47096kb
input:
150 3288 3199 28 75 39 31 129 95 139 9 104 92 70 48 48 65 10 57 24 81 75 115 25 117 13 131 32 63 122 85 85 12 64 70 37 141 63 98 118 122 3 14 81 128 135 11 61 81 1 111 56 130 62 99 17 93 90 16 55 25 42 138 79 64 34 8 84 67 15 143 52 127 25 7 140 27 7 131 33 24 39 23 89 60 33 109 22 138 50 94 72 121 ...
output:
3013422
result:
ok single line: '3013422'
Test #31:
score: 0
Accepted
time: 94ms
memory: 46956kb
input:
150 4589 2309 129 28 20 24 129 140 100 90 88 82 13 63 50 14 41 32 108 24 129 1 118 97 53 88 100 2 56 131 113 28 37 52 106 102 135 41 106 51 149 131 87 124 3 86 131 4 136 43 149 86 23 22 19 104 73 73 28 44 4 23 44 99 126 39 6 17 119 79 52 138 78 109 41 50 10 3 50 141 100 18 118 124 115 132 8 108 96 6...
output:
2333999
result:
ok single line: '2333999'
Test #32:
score: 0
Accepted
time: 104ms
memory: 47272kb
input:
150 5798 585 45 84 95 127 63 28 62 136 14 127 111 26 45 141 150 149 57 68 146 75 39 24 16 27 63 113 80 60 84 74 75 104 83 64 145 96 36 55 5 131 26 101 65 8 40 98 17 140 8 58 76 65 83 112 81 90 35 30 115 86 44 10 79 126 58 129 16 148 122 51 39 102 124 25 130 86 110 72 130 18 130 58 10 2 65 123 53 50 ...
output:
534012
result:
ok single line: '534012'
Test #33:
score: 0
Accepted
time: 100ms
memory: 47048kb
input:
150 1548 5751 37 97 129 62 78 116 139 31 14 29 102 6 120 41 4 73 129 25 144 75 7 58 129 22 61 132 54 72 85 27 59 39 33 119 5 34 21 22 73 36 31 68 56 90 47 23 48 29 23 58 43 70 5 125 42 102 14 144 138 83 110 39 110 30 63 16 94 104 74 135 83 107 128 79 108 81 66 105 118 21 56 62 133 29 8 46 141 141 76...
output:
10027965
result:
ok single line: '10027965'
Test #34:
score: 0
Accepted
time: 105ms
memory: 47084kb
input:
150 3292 8229 18 58 28 12 9 86 20 96 46 114 121 69 24 58 83 79 132 105 6 131 136 47 31 78 80 10 28 25 77 42 148 98 55 73 88 50 128 132 108 25 51 57 121 83 39 47 79 136 49 120 60 85 131 82 107 10 27 90 37 90 45 139 124 34 118 6 56 88 133 56 9 21 55 74 115 57 85 55 109 82 125 24 64 127 103 46 118 31 7...
output:
7613217
result:
ok single line: '7613217'
Test #35:
score: 0
Accepted
time: 108ms
memory: 46976kb
input:
150 4155 3319 22 25 1 5 43 147 134 84 72 65 138 79 72 44 39 70 57 114 124 92 27 146 101 8 94 7 71 22 111 68 22 105 49 103 12 127 20 65 21 4 81 88 99 138 140 29 61 148 125 145 6 126 1 30 146 10 132 70 127 15 143 90 124 146 37 94 29 103 35 106 18 144 35 53 136 123 77 1 63 23 148 54 101 57 77 140 27 4 ...
output:
3000421
result:
ok single line: '3000421'
Test #36:
score: 0
Accepted
time: 109ms
memory: 47124kb
input:
150 3178 1420 9 129 112 17 116 93 4 99 103 6 97 89 145 67 25 51 146 101 143 128 39 23 118 31 28 91 65 132 135 56 48 12 115 55 22 18 78 89 140 41 6 149 41 127 120 109 78 140 68 51 10 19 7 121 144 31 12 95 59 3 74 120 36 38 127 7 6 100 49 96 7 36 102 143 97 68 4 78 96 113 133 132 117 124 77 7 97 61 17...
output:
1167380
result:
ok single line: '1167380'
Test #37:
score: 0
Accepted
time: 94ms
memory: 47088kb
input:
150 2508 2245 71 91 90 9 83 40 59 97 53 39 17 121 147 30 107 112 76 67 147 28 46 5 46 99 63 18 114 95 128 29 143 110 11 134 135 47 138 76 77 30 66 130 35 85 49 108 109 132 54 92 37 20 30 71 117 62 148 57 41 126 147 128 129 16 97 83 54 104 73 83 41 118 115 65 32 146 68 45 41 108 50 107 144 37 100 130...
output:
2383824
result:
ok single line: '2383824'
Test #38:
score: 0
Accepted
time: 104ms
memory: 47068kb
input:
150 6577 2847 143 123 84 116 55 77 119 50 23 143 22 33 80 103 1 140 142 86 104 16 34 24 30 75 120 15 71 92 74 41 18 95 34 132 31 147 90 79 62 50 108 95 100 51 24 101 10 85 73 133 103 42 17 66 144 21 126 149 51 52 33 138 104 145 104 53 109 139 53 136 28 69 54 31 136 148 50 21 81 53 76 133 57 28 1 141...
output:
3441593
result:
ok single line: '3441593'
Test #39:
score: 0
Accepted
time: 114ms
memory: 47028kb
input:
150 5189 9947 4 45 73 140 66 44 114 69 74 8 77 91 69 1 80 109 124 142 104 68 110 127 6 137 14 64 54 41 18 27 61 124 80 6 130 112 57 7 75 147 49 118 78 78 121 44 86 55 88 87 117 57 81 63 57 7 123 34 116 144 134 149 122 108 104 113 95 87 28 3 142 89 18 66 24 117 105 71 30 105 86 124 124 29 118 3 96 35...
output:
10448970
result:
ok single line: '10448970'
Test #40:
score: 0
Accepted
time: 108ms
memory: 47020kb
input:
150 3315 281 51 130 111 34 101 73 114 38 43 122 91 130 9 16 109 54 91 85 88 57 115 145 9 65 137 48 49 65 86 68 76 125 123 35 22 10 76 44 33 121 25 70 33 107 49 122 136 66 147 13 15 18 140 49 36 99 23 130 28 116 148 130 86 81 88 93 144 149 54 66 132 35 31 108 80 52 126 5 121 84 89 15 112 127 24 73 38...
output:
399388
result:
ok single line: '399388'