QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#938250 | #10140. Jump Civilization | Tarantula | 100 ✓ | 233ms | 83704kb | C++14 | 2.7kb | 2025-03-16 21:00:18 | 2025-03-16 21:00:19 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int maxn = 300005;
int n, m;
int v[maxn];
int a[maxn], b[maxn], c[maxn];
int sz[maxn], son[maxn];
vector<int> s[maxn];
vector<int> d[maxn];
vector<int> tmp;
stack<int> st;
int ans[maxn];
struct BIT {
int sum[maxn];
int lowbit(int x) {return x & -x;}
void update(int x, int val) {for (; x <= n + 1; x += lowbit(x)) sum[x] += val;}
int query(int x) {int res = 0; for (; x > 0; x -= lowbit(x)) res += sum[x]; return res;}
} t1, t2;
void build() {
st.push(0);
for (int i = 1; i <= n; i++) {
while (v[st.top()] < v[i]) st.pop();
d[st.top()].push_back(i);
st.push(i);
}
}
void dfs1(int x) {
sz[x] = 1;
for (int i = 0; i < d[x].size(); i++) {
int y = d[x][i];
a[y] = a[x] + d[x].size() - i - 1, b[y] = b[x] + i + 1;
c[y] = c[x] + d[y].size();
dfs1(y); sz[x] += sz[y];
if (son[x] == 0 || sz[y] > sz[son[x]]) son[x] = y;
}
}
void clear(int x) {
if (x) t1.update(b[x], -1);
for (auto y : d[x]) clear(y);
}
void heige(int x) {
tmp.push_back(x);
for (auto y : d[x]) heige(y);
}
void dfs2(int x) {
if (son[x] == 0) {t1.update(b[x], 1); return;}
for (auto y : d[x])
if (y != son[x]) {dfs2(y); clear(y);}
dfs2(son[x]);
vector<int> f;
int p = 0;
for (int i = d[x].size() - 1; i >= 0; i--) {
int y = d[x][i];
if (y == son[x]) {p = i; break;}
tmp.clear(); heige(y);
for (auto j : tmp) ans[j] += t2.query(min(m - a[j] + c[x], n + 1));
for (auto j : tmp) t2.update(b[j], 1), s[son[x]].push_back(m - b[j] + c[x]), f.push_back(j);
}
for (auto y : f) t2.update(b[y], -1), t1.update(b[y], 1);
for (int i = p - 1; i >= 0; i--) {
int y = d[x][i];
tmp.clear(); heige(y);
for (auto j : tmp) ans[j] += t1.query(min(m - a[j] + c[x], n + 1));
for (auto j : tmp) t1.update(b[j], 1);
}
ans[x] += t1.query(min(m + b[x], n + 1));
if (x) t1.update(b[x], 1);
}
void dfs3(int x) {
for (auto i : s[x])
if (i >= 0) t2.update(min(i + 1, n + 1), 1);
ans[x] += t2.query(n + 1) - t2.query(a[x]);
for (auto y : d[x]) dfs3(y);
for (auto i : s[x])
if (i >= 0) t2.update(min(i + 1, n - 1), -1);
}
signed main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> n >> m;
for (int i = 1; i < n; i++) cin >> v[i];
v[n] = n + 1, v[0] = n + 2;
build();
c[0] = d[0].size();
dfs1(0); dfs2(0); dfs3(0);
for (int i = 1; i <= n; i++) cout << ans[i] + 1 << ' ';
cout << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 6
Accepted
Test #1:
score: 6
Accepted
time: 4ms
memory: 28396kb
input:
5 1 4 3 4 5
output:
3 2 2 2 1
result:
ok single line: '3 2 2 2 1 '
Test #2:
score: 6
Accepted
time: 1ms
memory: 32488kb
input:
6 2 2 3 5 5 6
output:
3 4 4 3 2 1
result:
ok single line: '3 4 4 3 2 1 '
Test #3:
score: 6
Accepted
time: 3ms
memory: 30516kb
input:
2000 1159 136 3 4 136 83 82 81 9 81 11 81 76 14 76 28 28 18 26 25 22 22 25 25 25 26 28 28 29 30 31 72 33 71 71 37 37 70 70 69 42 42 43 69 45 46 68 48 67 50 67 52 53 57 55 56 57 58 64 60 61 62 63 64 66 66 67 68 69 70 71 72 73 76 75 76 81 81 81 80 81 82 83 95 95 95 87 95 95 91 91 92 95 94 95 130 127 1...
output:
2000 1999 1998 1997 1996 1995 1994 1993 1992 1991 1990 1989 1988 1987 1986 1985 1984 1983 1982 1981 1980 1979 1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 1953 1952 1951 1950 1949 1948 1947 1946 1945 1944 1943 1942 1941 ...
result:
ok single line: '2000 1999 1998 1997 1996 1995 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #4:
score: 6
Accepted
time: 5ms
memory: 28436kb
input:
1990 714 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 1...
output:
1721 1724 1727 1730 1733 1736 1739 1742 1745 1748 1751 1754 1757 1760 1763 1766 1769 1772 1775 1778 1781 1784 1787 1790 1793 1796 1799 1802 1805 1808 1810 1812 1814 1816 1818 1820 1822 1824 1826 1828 1830 1832 1834 1836 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 ...
result:
ok single line: '1721 1724 1727 1730 1733 1736 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #5:
score: 6
Accepted
time: 3ms
memory: 30524kb
input:
1995 1204 1995 1982 4 1949 6 1629 9 9 1520 13 13 13 1425 17 17 17 359 20 20 123 22 27 26 26 26 27 106 30 30 106 33 33 81 38 38 38 38 81 43 43 43 43 52 47 47 47 52 52 52 52 52 75 55 55 68 61 61 61 61 61 63 63 66 66 66 68 68 75 75 75 75 75 75 75 81 77 81 79 81 81 83 83 106 85 88 88 88 97 91 91 97 97 9...
output:
1995 1994 1993 1992 1991 1990 1989 1988 1987 1986 1985 1984 1983 1982 1981 1980 1979 1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 1953 1952 1951 1950 1949 1948 1947 1946 1945 1944 1943 1942 1941 1940 1939 1938 1937 1936 ...
result:
ok single line: '1995 1994 1993 1992 1991 1990 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #6:
score: 6
Accepted
time: 2ms
memory: 30516kb
input:
2000 839 2000 1155 571 559 409 194 106 72 17 16 12 14 14 15 16 17 22 20 20 21 22 38 32 27 26 27 31 31 30 31 32 35 35 35 38 37 38 50 44 44 44 43 44 47 47 47 50 50 50 66 57 53 54 57 56 57 58 61 61 61 65 65 64 65 66 71 68 69 71 71 72 97 78 77 77 77 78 91 83 81 83 83 87 86 86 87 91 89 90 91 94 94 94 96 ...
output:
2000 1999 1998 1997 1996 1995 1994 1993 1992 1991 1990 1989 1988 1987 1986 1985 1984 1983 1982 1981 1980 1979 1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 1953 1952 1951 1950 1949 1948 1947 1946 1945 1944 1943 1942 1941 ...
result:
ok single line: '2000 1999 1998 1997 1996 1995 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Subtask #2:
score: 27
Accepted
Test #7:
score: 27
Accepted
time: 68ms
memory: 39340kb
input:
100000 36 100000 5647 2999 2022 84 16 11 11 10 11 15 14 14 15 16 74 62 44 20 22 22 24 24 43 28 28 28 31 31 31 38 33 35 35 37 37 38 41 40 41 43 43 44 54 54 50 48 50 50 51 53 53 54 55 60 57 58 60 60 62 62 73 65 65 67 67 68 71 70 71 72 73 74 81 80 77 80 80 80 81 83 83 84 1441 617 145 141 106 106 103 98...
output:
99994 99999 92922 39533 5496 4439 3837 3836 3557 3834 4128 3832 3831 4125 4430 4721 4122 3148 2655 2787 2786 2903 2902 3016 2506 2505 2504 2646 2645 2644 2776 2361 2498 2497 2639 2638 2770 2887 2768 2885 2999 2998 3123 3286 3285 2879 2760 2877 2876 2990 3115 3114 3277 3512 3789 3274 3509 3786 3785 4...
result:
ok single line: '99994 99999 92922 39533 5496 4... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #8:
score: 27
Accepted
time: 23ms
memory: 50300kb
input:
100000 15 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100...
output:
17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 ...
result:
ok single line: '17 17 17 17 17 17 17 17 17 17 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #9:
score: 27
Accepted
time: 51ms
memory: 38132kb
input:
100000 50 99989 99982 99635 5 6 99632 99630 12 12 11 12 99626 99626 16 16 99626 99230 99230 99229 21 99228 53 39 39 39 27 38 38 30 36 32 35 35 35 36 37 38 39 53 43 42 43 46 46 46 47 53 49 53 51 53 53 99228 55 99227 58 58 99227 99227 99225 99216 99215 64 99215 99196 67 68 165 71 71 165 75 74 75 76 78...
output:
874 905 943 957 1004 1049 1070 1066 1065 1023 1063 1102 1130 1153 1152 1205 1202 1234 1257 1258 1305 1322 1275 1274 1273 1187 1228 1227 1094 1136 1045 1091 1090 1089 1131 1177 1218 1260 1305 1173 1125 1171 1212 1211 1210 1252 1297 1250 1295 1248 1293 1292 1346 1352 1398 1420 1419 1462 1487 1485 1489...
result:
ok single line: '874 905 943 957 1004 1049 1070... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #10:
score: 27
Accepted
time: 23ms
memory: 39572kb
input:
95123 13 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 95123 951...
output:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 ...
result:
ok single line: '15 15 15 15 15 15 15 15 15 15 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #11:
score: 27
Accepted
time: 48ms
memory: 39696kb
input:
100000 50 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 32 32 32 32 32 32 32 32 32 32 32 32 32 99709 37 37 37 37 99534 42 42 42 42 99408 51 51 51 51 51 51 51 51 98967 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 98723...
output:
13810 17178 21070 25422 30240 35411 40874 46458 52089 57636 62978 68052 72787 77100 80968 84413 87411 89967 92098 92097 92096 92095 92094 92093 92092 92091 92090 92089 92088 92087 92086 93847 95273 95272 95271 95270 96414 97325 97324 97323 97322 98013 98535 98534 98533 98532 98531 98530 98529 98528 ...
result:
ok single line: '13810 17178 21070 25422 30240 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Subtask #3:
score: 11
Accepted
Test #12:
score: 11
Accepted
time: 64ms
memory: 54484kb
input:
280000 21 2 3 5 5 6 7 8 9 10 11 12 14 14 15 16 17 18 19 20 21 22 23 25 25 27 27 28 30 30 32 32 33 35 35 37 37 39 39 41 41 42 44 44 46 46 48 48 50 50 51 53 53 55 55 56 57 59 59 61 61 63 63 65 65 67 67 68 70 70 72 72 74 74 75 77 77 78 79 80 81 83 83 84 86 86 87 88 90 90 92 92 94 94 95 97 97 99 99 100 ...
output:
25 26 26 25 26 27 27 28 29 30 31 31 30 31 32 33 34 34 35 36 36 36 37 36 37 36 37 38 37 38 37 37 38 37 38 37 38 37 37 36 37 37 36 36 35 35 34 34 33 34 34 33 34 33 33 33 34 33 34 33 34 33 33 32 33 32 33 33 32 33 32 32 31 32 32 31 31 31 31 31 32 31 31 32 31 31 31 31 30 30 29 29 28 29 30 29 29 28 29 29 ...
result:
ok single line: '25 26 26 25 26 27 27 28 29 30 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #13:
score: 11
Accepted
time: 76ms
memory: 54716kb
input:
290000 220 3 3 4 5 7 7 9 9 10 12 12 13 14 16 16 17 18 19 20 21 23 23 25 25 26 27 29 29 31 31 33 33 35 35 36 38 38 40 40 41 43 43 44 46 46 48 48 49 50 52 52 53 55 55 57 57 59 59 61 61 63 63 65 65 67 67 68 70 70 71 72 73 74 75 77 77 78 79 81 81 83 83 85 85 86 88 88 90 90 91 93 93 94 96 96 98 98 99 100...
output:
322 321 322 323 324 323 324 323 323 324 323 323 323 323 322 322 323 324 325 326 327 326 327 326 327 327 328 327 328 327 327 326 326 325 325 326 325 325 324 324 325 324 324 325 324 325 324 324 325 325 324 325 325 324 324 323 324 323 324 323 323 322 323 322 322 321 322 323 322 322 322 323 324 325 325 ...
result:
ok single line: '322 321 322 323 324 323 324 32... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #14:
score: 11
Accepted
time: 75ms
memory: 55168kb
input:
300000 15298 2 3 4 6 6 7 9 9 10 11 12 13 14 16 16 18 18 19 21 21 23 23 24 26 26 28 28 30 30 32 32 34 34 36 36 38 38 40 40 41 43 43 45 45 46 47 48 49 50 52 52 53 55 55 57 57 58 60 60 61 62 64 64 65 67 67 69 69 71 71 73 73 75 75 76 77 78 79 81 81 82 83 84 85 86 87 88 89 90 91 92 94 94 96 96 98 98 99 1...
output:
22950 22951 22952 22952 22951 22951 22951 22950 22951 22951 22952 22952 22952 22952 22951 22952 22951 22951 22951 22950 22951 22950 22950 22951 22950 22950 22949 22949 22948 22948 22947 22947 22946 22946 22945 22946 22945 22945 22944 22945 22945 22944 22944 22943 22943 22944 22945 22946 22946 22946 ...
result:
ok single line: '22950 22951 22952 22952 22951 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #15:
score: 11
Accepted
time: 74ms
memory: 55168kb
input:
300000 30169 2 3 5 5 6 7 9 9 10 11 13 13 15 15 16 17 19 19 20 21 22 24 24 26 26 27 29 29 30 31 33 33 35 35 36 38 38 40 40 41 43 43 44 46 46 48 48 49 50 52 52 53 54 55 57 57 58 59 61 61 63 63 64 66 66 67 69 69 71 71 73 73 75 75 77 77 78 79 80 82 82 84 84 86 86 87 89 89 90 92 92 94 94 95 96 98 98 100 ...
output:
45222 45222 45223 45222 45223 45224 45224 45223 45223 45223 45224 45223 45223 45222 45222 45222 45222 45221 45221 45222 45222 45222 45221 45222 45221 45222 45223 45222 45222 45222 45222 45221 45222 45221 45221 45222 45221 45222 45221 45222 45223 45222 45223 45224 45223 45224 45223 45224 45225 45225 ...
result:
ok single line: '45222 45222 45223 45222 45223 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #16:
score: 11
Accepted
time: 70ms
memory: 55180kb
input:
300000 185013 3 3 4 6 6 8 8 9 11 11 12 14 14 16 16 18 18 19 21 21 22 24 24 26 26 28 28 29 30 31 33 33 34 36 36 38 38 40 40 41 43 43 44 46 46 48 48 49 50 52 52 54 54 55 57 57 58 60 60 62 62 63 64 66 66 68 68 69 70 72 72 74 74 75 76 77 79 79 80 81 82 84 84 86 86 88 88 89 90 92 92 93 94 96 96 97 99 99 ...
output:
277994 277993 277993 277994 277993 277994 277993 277994 277995 277994 277995 277996 277995 277995 277994 277994 277993 277994 277994 277993 277994 277995 277994 277994 277993 277993 277992 277993 277994 277995 277996 277995 277995 277995 277994 277995 277994 277994 277993 277994 277994 277993 277993...
result:
ok single line: '277994 277993 277993 277994 27... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Subtask #4:
score: 37
Accepted
Test #17:
score: 37
Accepted
time: 61ms
memory: 38288kb
input:
100000 94583 4 4 4 99999 18 10 10 9 10 13 12 13 16 16 16 17 18 99920 20 99920 99920 25 24 25 99920 99919 99912 29 30 31 99912 33 34 99912 36 99912 131 131 50 41 50 43 50 49 49 47 48 49 50 52 52 63 54 63 61 57 61 61 61 61 62 63 69 65 68 68 68 69 100 76 73 73 74 75 76 86 85 85 82 82 82 85 84 85 86 99 ...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #18:
score: 37
Accepted
time: 23ms
memory: 40456kb
input:
100000 88969 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 ...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #19:
score: 37
Accepted
time: 53ms
memory: 39420kb
input:
100000 50503 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 99994 14 14 99985 19 19 19 19 99977 30 30 30 30 30 30 30 30 30 30 99962 34 34 34 99800 43 43 43 43 43 43 43 43 99489 46 46 97589 50 50 50 96561 56 56 56 56 56 95292 63 63 63 63 63 63 94680 67 67 67 21811 74 74 74 74 7...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #20:
score: 37
Accepted
time: 66ms
memory: 39472kb
input:
100000 16804 100000 25939 19295 13255 10508 3543 1094 803 77 49 24 17 16 16 16 17 21 21 21 21 24 24 24 29 26 27 29 29 37 31 34 34 34 36 36 37 42 42 41 41 42 44 44 49 47 47 48 49 64 62 54 53 54 55 56 60 59 59 60 61 62 63 64 77 73 67 69 69 70 71 72 73 74 76 76 77 794 257 109 89 88 85 84 85 88 87 88 89...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #21:
score: 37
Accepted
time: 53ms
memory: 37468kb
input:
100000 92 4 3 4 100000 99999 99999 8 11 10 11 12 696 696 685 17 17 18 685 682 295 293 285 24 269 39 35 35 29 30 35 35 34 34 35 36 39 38 39 160 41 43 43 44 157 155 48 48 152 152 152 150 139 139 55 59 58 58 59 138 61 82 82 69 66 66 67 69 69 70 71 72 82 74 81 76 77 81 79 80 81 82 134 134 125 124 124 12...
output:
1544 1519 1542 1564 1590 1611 1634 1654 1632 1652 1673 1690 1689 1648 1602 1601 1624 1644 1598 1301 1278 1219 1126 1143 1036 1025 1024 1008 1014 1021 1020 1011 1010 1017 1020 1025 1018 1023 1030 989 995 994 1000 1007 991 975 974 981 980 979 970 948 947 927 934 925 924 931 936 898 909 908 861 837 836...
result:
ok single line: '1544 1519 1542 1564 1590 1611 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #22:
score: 37
Accepted
time: 67ms
memory: 38900kb
input:
100000 79 100000 100000 100000 7 7 7 100000 10 10 99996 17 17 17 17 17 17 99979 24 24 24 24 24 24 99971 27 27 99966 99864 99711 36 36 36 36 36 36 99462 41 41 41 41 97922 44 44 95546 46 44498 51 51 51 51 14132 54 54 11354 60 60 60 60 60 2544 63 63 684 66 66 475 72 72 72 72 72 130 77 77 77 77 105 80 8...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #23:
score: 37
Accepted
time: 66ms
memory: 38012kb
input:
100000 99 100000 33081 7196 5045 1478 1406 178 157 62 20 17 16 16 16 16 17 20 19 20 29 27 27 25 25 27 27 29 29 42 34 34 33 34 35 36 37 42 40 40 42 42 59 57 53 46 51 51 51 50 51 53 53 55 55 56 57 59 59 60 62 62 73 64 65 72 68 68 72 70 72 72 73 152 92 87 82 80 80 80 82 82 84 84 85 86 87 90 89 90 91 92...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #24:
score: 37
Accepted
time: 60ms
memory: 39996kb
input:
100000 1590 100000 100000 99543 9 7 7 9 9 11 11 12 99543 15 15 16 99543 99543 99543 99540 99454 99454 84 24 25 26 83 78 77 77 77 77 33 74 74 36 72 38 56 40 56 42 43 55 54 46 54 51 49 50 51 53 53 54 55 56 71 69 69 66 61 65 65 64 65 66 67 68 69 70 71 72 74 74 77 77 77 78 83 81 81 83 83 84 85 86 99454 ...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #25:
score: 37
Accepted
time: 22ms
memory: 39772kb
input:
100000 1547 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 1...
output:
1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 1549 ...
result:
ok single line: '1549 1549 1549 1549 1549 1549 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #26:
score: 37
Accepted
time: 57ms
memory: 40796kb
input:
100000 1695 100000 100000 100000 5 99883 99879 8 99734 10 99544 12 96859 14 96855 18 18 18 90135 20 87219 71402 24 24 65036 61837 29 29 29 9632 1933 1251 33 956 37 37 37 158 156 42 42 42 126 44 82 46 78 48 61 51 51 56 56 56 56 56 58 58 61 61 61 69 63 67 67 67 67 69 69 74 73 73 73 74 78 78 78 78 80 8...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #27:
score: 37
Accepted
time: 68ms
memory: 39000kb
input:
99900 919 99900 75828 11045 7383 2605 653 126 110 55 31 18 13 17 17 17 17 18 22 21 21 22 23 24 27 27 27 31 30 30 31 43 43 34 35 39 38 38 39 43 41 43 43 54 53 50 50 49 49 50 52 52 53 54 55 77 65 63 63 63 61 62 63 65 65 73 73 71 70 70 71 72 73 76 76 76 77 108 107 96 81 89 89 88 88 87 87 88 89 91 91 96...
output:
99900 99899 99898 99897 99896 99895 99894 99893 99892 99891 99890 99889 99888 99887 99886 99885 99884 99883 99882 99881 99880 99879 99878 99877 99876 99875 99874 99873 99872 99871 99870 99869 99868 99867 99866 99865 99864 99863 99862 99861 99860 99859 99858 99857 99856 99855 99854 99853 99852 99851 ...
result:
ok single line: '99900 99899 99898 99897 99896 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #28:
score: 37
Accepted
time: 53ms
memory: 37732kb
input:
100000 28672 4 4 4 99855 99855 99798 9 9 200 12 12 200 14 177 177 177 176 176 20 176 60 60 27 25 26 27 60 32 31 31 32 33 60 35 37 37 60 50 40 50 42 50 50 47 46 47 49 49 50 51 52 53 54 60 57 57 59 59 60 176 175 64 64 65 66 67 146 145 145 143 75 73 74 75 134 77 79 79 80 81 134 134 134 87 86 87 96 89 9...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #29:
score: 37
Accepted
time: 29ms
memory: 42264kb
input:
100000 21855 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 ...
output:
77524 77530 77536 77542 77548 77554 77560 77566 77572 77578 77584 77590 77596 77602 77608 77614 77620 77626 77632 77638 77644 77650 77656 77662 77668 77674 77680 77686 77692 77698 77704 77710 77716 77722 77728 77734 77740 77746 77752 77758 77764 77770 77776 77782 77788 77794 77800 77806 77812 77818 ...
result:
ok single line: '77524 77530 77536 77542 77548 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #30:
score: 37
Accepted
time: 57ms
memory: 39032kb
input:
100000 21270 100000 100000 100000 100000 7 7 100000 10 10 99984 99944 14 14 99845 99743 99736 19 19 99633 22 22 98468 97392 25 88196 27 70317 30 30 46693 32 34608 35 35 3826 1674 969 39 595 41 591 43 196 47 47 47 174 49 139 90 52 86 57 57 57 57 59 59 71 62 62 68 64 68 68 68 68 71 71 71 74 74 74 76 7...
output:
100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99952 99951...
result:
ok single line: '100000 99999 99998 99997 99996... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #31:
score: 37
Accepted
time: 70ms
memory: 38792kb
input:
99900 22503 99900 56894 5283 3699 534 408 274 231 118 13 13 13 88 84 27 23 18 20 20 21 23 23 27 26 26 27 58 35 32 31 32 34 34 35 36 42 42 42 41 41 42 43 47 47 47 47 58 49 57 57 53 53 57 57 56 57 58 73 69 69 64 63 64 65 67 67 69 69 73 73 73 73 81 79 78 77 78 79 81 81 82 84 84 88 86 87 88 104 102 102 ...
output:
99900 99899 99898 99897 99896 99895 99894 99893 99892 99891 99890 99889 99888 99887 99886 99885 99884 99883 99882 99881 99880 99879 99878 99877 99876 99875 99874 99873 99872 99871 99870 99869 99868 99867 99866 99865 99864 99863 99862 99861 99860 99859 99858 99857 99856 99855 99854 99853 99852 99851 ...
result:
ok single line: '99900 99899 99898 99897 99896 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Subtask #5:
score: 19
Accepted
Test #32:
score: 19
Accepted
time: 184ms
memory: 49804kb
input:
300000 250603 2 300000 22 14 11 9 8 9 10 11 12 14 14 22 22 22 19 19 20 22 22 300000 299994 26 26 28 28 29 46 46 46 42 35 35 39 38 38 39 42 41 42 44 44 46 46 48 48 49 50 102 102 102 54 55 56 102 85 60 60 61 62 80 80 75 71 71 71 71 70 71 74 73 74 75 80 80 80 79 80 81 85 84 84 85 87 87 90 90 90 91 94 9...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #33:
score: 19
Accepted
time: 81ms
memory: 68692kb
input:
300000 101493 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #34:
score: 19
Accepted
time: 194ms
memory: 55512kb
input:
300000 292865 300000 300000 300000 299972 299968 299942 8 299396 10 298712 14 14 14 296673 17 17 293321 20 20 281656 278920 25 25 25 269165 27 194685 31 31 31 64845 34 34 4625 36 4002 40 40 40 1795 42 1730 551 45 324 291 48 157 52 52 52 114 114 58 58 58 58 105 60 100 64 64 64 100 82 68 68 78 72 72 7...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #35:
score: 19
Accepted
time: 229ms
memory: 55988kb
input:
300000 210231 300000 269235 155955 79102 35813 28870 7958 551 506 263 224 193 40 40 19 19 18 19 34 24 23 23 24 34 33 28 28 30 30 32 32 33 34 36 36 39 38 39 40 95 42 76 70 50 49 48 48 49 50 56 52 56 56 56 56 70 58 67 66 63 62 63 66 65 66 67 68 69 70 73 73 73 76 76 76 83 79 79 81 81 83 83 90 87 87 87 ...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #36:
score: 19
Accepted
time: 184ms
memory: 51456kb
input:
300000 21 299998 299997 299997 5 6 299992 15 14 14 12 12 14 14 15 299992 299992 18 19 299990 299989 22 299986 299766 37 37 30 28 30 30 31 35 35 35 35 37 37 299721 39 41 41 46 46 46 46 46 299657 51 49 50 51 299657 299651 299651 299651 56 95 61 59 61 61 95 63 93 66 66 83 83 69 83 83 83 73 81 78 78 78 ...
output:
79 93 106 122 139 157 172 155 154 134 133 151 150 165 180 192 206 222 239 257 275 293 308 274 273 206 190 204 203 221 241 240 239 238 263 262 291 253 276 275 296 295 294 293 292 313 307 256 279 304 328 256 268 278 261 287 259 230 257 256 282 226 253 177 176 199 198 173 196 195 194 125 146 91 90 89 8...
result:
ok single line: '79 93 106 122 139 157 172 155 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #37:
score: 19
Accepted
time: 67ms
memory: 60012kb
input:
300000 17 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300...
output:
19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 ...
result:
ok single line: '19 19 19 19 19 19 19 19 19 19 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #38:
score: 19
Accepted
time: 200ms
memory: 54804kb
input:
300000 36 300000 300000 299964 5 299769 12 12 12 12 12 12 299765 14 299630 297683 18 18 293519 22 22 22 293474 26 26 26 274149 31 31 31 31 248971 34 34 206147 39 39 39 39 180651 128114 6423 44 44 231 49 49 49 49 192 52 52 87 55 55 68 59 59 59 62 62 62 68 66 66 66 68 68 83 74 74 74 74 74 80 79 79 79 ...
output:
27218 33575 40954 49420 58924 69427 69426 69425 69424 69423 69422 80866 93209 106386 120150 134352 134351 148850 163355 163354 163353 177729 191042 191041 191040 204933 208855 208854 208853 208852 222441 216925 216924 229293 180415 180414 180413 180412 189363 178032 138214 45879 45878 52912 28382 28...
result:
ok single line: '27218 33575 40954 49420 58924 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #39:
score: 19
Accepted
time: 227ms
memory: 55748kb
input:
300000 37 300000 70843 4335 888 382 127 65 35 27 21 12 16 15 15 16 18 18 21 21 21 27 26 24 25 26 27 29 29 31 31 35 35 34 35 63 56 48 40 40 46 45 45 44 45 46 48 48 54 53 51 52 53 54 56 56 63 58 62 60 62 62 63 65 65 90 75 68 74 73 72 72 73 74 75 85 80 78 80 80 83 83 83 84 85 90 87 89 89 90 91 121 104 ...
output:
299773 299898 246730 92890 44939 7823 4020 3272 2145 1799 1088 1254 1086 1085 1251 1480 1479 1791 1790 1789 2133 1787 1243 1472 1784 2128 2506 2505 2888 2887 3249 3248 2884 3246 3623 3244 2496 1771 1770 2114 1768 1767 1453 1765 2109 2487 2486 2869 2484 1759 2103 2481 2864 3226 3225 3602 2860 3222 28...
result:
ok single line: '299773 299898 246730 92890 449... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #40:
score: 19
Accepted
time: 191ms
memory: 52492kb
input:
300000 2723 299982 20 20 20 7 7 20 17 16 16 16 15 15 15 16 17 19 19 20 299679 22 299679 24 25 299677 27 28 29 31 31 32 299677 46 46 38 38 38 46 42 41 42 43 46 45 46 299672 48 50 50 56 56 53 54 55 56 299672 299664 299660 60 299658 299658 299656 64 299656 299623 74 74 74 72 71 72 74 74 299619 298845 2...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #41:
score: 19
Accepted
time: 80ms
memory: 59736kb
input:
300000 1487 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 3...
output:
1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 1489 ...
result:
ok single line: '1489 1489 1489 1489 1489 1489 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #42:
score: 19
Accepted
time: 187ms
memory: 54588kb
input:
300000 7146 300000 300000 300000 300000 8 8 8 299943 11 11 298793 17 17 17 17 17 293449 23 23 23 23 23 280493 26 26 239025 28 216403 34 34 34 34 34 62432 37 37 31819 41 41 41 23984 46 46 46 46 23866 51 51 51 51 1591 57 57 57 57 57 834 63 63 63 63 63 754 71 71 71 71 71 71 71 628 76 76 76 76 253 82 82...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #43:
score: 19
Accepted
time: 233ms
memory: 55872kb
input:
300000 12425 300000 182175 33012 13128 11861 3621 1187 1090 883 51 28 15 15 15 25 24 23 19 20 21 23 23 24 25 26 27 28 45 34 33 33 33 34 41 39 37 38 39 40 41 44 44 44 45 47 47 48 51 51 51 551 402 331 188 98 60 58 60 60 81 69 66 66 65 66 69 69 69 71 71 77 76 76 76 76 77 81 79 80 81 88 87 86 85 86 87 8...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #44:
score: 19
Accepted
time: 181ms
memory: 49824kb
input:
300000 2912 2 300000 6 5 6 7 14 9 13 12 12 13 14 300000 299996 299996 27 23 23 21 23 23 26 26 26 27 28 78 30 74 32 41 41 41 41 41 41 41 41 41 74 74 73 70 48 48 48 56 56 51 52 55 55 55 56 70 70 68 60 68 62 67 67 67 67 67 68 69 70 73 73 73 74 78 76 77 78 299996 299985 299985 84 84 84 299985 299985 87 ...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #45:
score: 19
Accepted
time: 65ms
memory: 83704kb
input:
300000 2152 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 3...
output:
2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 ...
result:
ok single line: '2154 2154 2154 2154 2154 2154 ... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #46:
score: 19
Accepted
time: 208ms
memory: 56156kb
input:
300000 5329 300000 300000 299976 5 299545 7 293250 9 284978 11 268160 184328 14 143491 18 18 18 80106 22 22 22 49246 25 25 7632 27 2337 29 917 32 32 134 36 36 36 41 41 41 41 41 111 106 44 61 50 50 50 50 50 55 54 54 54 55 61 58 58 61 61 61 97 63 73 65 67 67 73 70 70 73 73 73 87 76 76 79 79 79 82 82 8...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '
Test #47:
score: 19
Accepted
time: 233ms
memory: 55852kb
input:
300000 12508 300000 112843 615 217 208 162 80 63 50 13 12 13 38 29 22 18 18 19 22 22 22 26 24 25 26 28 28 29 33 31 32 33 38 37 37 37 38 42 41 41 42 47 47 46 46 47 49 49 50 53 52 53 55 55 56 59 58 59 63 63 62 63 74 68 66 68 68 69 71 71 72 73 74 76 76 80 80 79 80 155 89 89 84 87 87 87 88 89 141 107 99...
output:
300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok single line: '300000 299999 299998 299997 29... 13 12 11 10 9 8 7 6 5 4 3 2 1 '