QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#811724 | #9865. Dolls | wangjunrui | TL | 207ms | 4212kb | C++14 | 1.2kb | 2024-12-12 23:45:39 | 2024-12-12 23:45:44 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
constexpr int N = 1e5 + 5;
int n, a[N];
pair<int, int> st[N];
int top;
inline bool check(int l, int r)
{
vector<int> p, b;
for (int i = l; i <= r; ++i)
p.push_back(a[i]);
sort(p.begin(), p.end());
p.erase(unique(p.begin(), p.end()), p.end());
for (int i = l; i <= r; ++i)
b.push_back((int)(lower_bound(p.begin(), p.end(), a[i]) - p.begin()));
top = 0;
for (auto x : b)
{
st[++top] = make_pair(x, x);
while (top > 1 && (st[top].first == st[top - 1].second + 1 || st[top].second + 1 == st[top - 1].first))
{
st[top - 1].first = min(st[top].first, st[top - 1].first);
st[top - 1].second = max(st[top].second, st[top - 1].second);
--top;
}
}
return top == 1;
}
inline void _main()
{
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> a[i];
int res = 0;
for (int l = 1, r = 0; l <= n; l = r + 1)
{
int maxlen = 2;
while (check(l, l + maxlen))
maxlen <<= 1;
r = l;
for (int i = maxlen / 2; i >= 1; --i)
if (check(l, r + i))
r += i;
++res;
}
cout << n - res << '\n';
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int test = 1;
cin >> test;
while (test--)
_main();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3608kb
input:
8 4 2 1 4 3 4 1 4 2 3 4 3 1 4 2 5 1 3 5 2 4 5 1 4 2 5 3 5 2 5 3 1 4 6 1 3 6 5 2 4 6 2 5 1 3 6 4
output:
3 3 2 3 3 3 4 4
result:
ok 8 numbers
Test #2:
score: 0
Accepted
time: 14ms
memory: 3504kb
input:
5913 1 1 2 1 2 2 2 1 3 1 2 3 3 1 3 2 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...
result:
ok 10000 numbers
Test #10:
score: 0
Accepted
time: 39ms
memory: 3616kb
input:
1000 100 36 19 15 23 80 24 92 12 63 82 17 71 52 53 62 37 30 5 87 14 27 42 47 38 67 39 40 77 6 11 22 58 83 26 86 50 64 54 81 89 60 85 74 55 96 100 2 32 75 49 93 51 41 57 68 10 3 95 79 21 98 69 99 20 56 91 59 76 28 94 66 44 46 70 43 97 7 16 48 29 84 61 9 65 13 31 34 45 33 1 73 72 78 35 88 90 4 25 8 18...
output:
83 82 85 82 82 81 82 82 83 82 81 82 81 83 83 80 83 84 83 84 80 81 80 81 80 82 84 82 84 84 84 83 84 83 84 82 82 86 82 82 83 82 80 82 82 81 81 82 80 80 83 81 83 82 85 83 84 84 83 81 82 81 80 84 84 81 82 83 84 84 84 82 82 83 83 82 82 84 81 80 80 82 81 82 84 84 79 83 83 82 84 81 81 81 84 84 85 83 84 82 ...
result:
ok 1000 numbers
Test #11:
score: 0
Accepted
time: 43ms
memory: 3624kb
input:
100 1000 550 971 302 95 28 284 617 922 674 216 841 488 304 342 88 271 306 556 106 206 22 722 319 730 603 112 877 59 910 921 490 973 35 323 495 9 507 869 834 542 391 86 359 69 837 830 498 645 852 974 790 766 255 98 269 231 452 720 728 925 652 214 91 484 878 592 217 763 487 400 868 66 328 195 923 955 ...
output:
822 826 827 836 825 819 833 828 819 825 826 829 825 828 827 823 826 832 827 822 826 833 824 827 819 821 819 824 830 815 833 831 822 828 835 829 827 824 836 829 822 833 823 830 823 825 823 828 835 827 823 821 831 826 826 822 826 822 831 836 825 829 832 833 825 830 828 822 827 820 831 840 826 827 830 ...
result:
ok 100 numbers
Test #12:
score: 0
Accepted
time: 43ms
memory: 3596kb
input:
10 10000 4850 5255 5139 5540 1874 1076 4021 6824 4366 2054 2715 278 8256 4808 9269 3125 6278 690 6792 1562 3953 8690 6144 7653 8183 215 8338 6985 2329 6752 4704 3988 4919 9621 7203 1326 1144 8757 8689 7857 5536 9109 6881 1575 9834 8480 3599 2264 6399 7509 1483 6113 4446 9198 3827 5026 9359 1920 2 58...
output:
8244 8292 8266 8266 8270 8268 8239 8301 8265 8266
result:
ok 10 numbers
Test #13:
score: 0
Accepted
time: 44ms
memory: 3984kb
input:
1 100000 65813 44976 27024 51682 49956 83974 25996 21531 19397 20599 92239 41915 7525 99787 88995 7744 57150 76091 65404 74838 7825 29089 56605 44061 96855 45149 27163 61304 89985 96663 49997 20030 5553 10271 82109 56297 63936 56938 70627 55278 48648 99848 57194 49805 12947 24396 89020 60081 91704 2...
output:
82890
result:
ok 1 number(s): "82890"
Test #14:
score: 0
Accepted
time: 43ms
memory: 4204kb
input:
1 100000 50722 38722 90419 41256 74876 8214 21148 56089 88335 74461 33657 56600 89905 19438 57682 63625 64494 75702 89792 50592 37838 47295 43625 41092 22443 96062 96634 51120 6091 7840 40589 52576 73629 19138 91330 87912 44736 47778 84323 13015 33417 43829 15749 70533 46525 62093 730 28892 57331 25...
output:
82785
result:
ok 1 number(s): "82785"
Test #15:
score: 0
Accepted
time: 40ms
memory: 3948kb
input:
1 100000 92873 72001 16167 20008 52308 41952 48402 65424 83412 84698 68596 60976 97619 49108 89909 89736 29780 43827 1986 13672 60043 55406 98807 3496 39199 29815 22754 6084 67063 17628 52362 99556 49910 40783 76657 89537 76353 50767 30236 67661 91879 63851 70741 42544 49633 52188 38311 3518 28161 2...
output:
82812
result:
ok 1 number(s): "82812"
Test #16:
score: 0
Accepted
time: 44ms
memory: 3936kb
input:
1 100000 20431 83310 820 16219 28968 62873 63951 89752 16084 48968 27027 81952 22686 6714 4088 3019 87383 86202 80611 24689 7446 29556 35629 98297 73337 4547 76107 3453 64206 9121 24373 56750 19864 23253 67070 35690 25148 17262 81311 1654 24102 8986 81510 3427 73473 46406 34340 53968 81468 44939 821...
output:
82809
result:
ok 1 number(s): "82809"
Test #17:
score: 0
Accepted
time: 44ms
memory: 4212kb
input:
1 100000 20087 54208 64276 91104 47820 82132 55150 12497 33294 19794 44029 14396 68130 6392 29353 41142 53989 84626 96440 386 39480 20441 93666 14640 49401 61671 38112 73783 65806 46364 89330 35881 36351 90901 29354 43421 99169 64838 68806 37441 14336 50084 61268 49821 64435 29886 24794 11699 91120 ...
output:
82790
result:
ok 1 number(s): "82790"
Test #18:
score: 0
Accepted
time: 44ms
memory: 4184kb
input:
1 100000 20254 11754 73709 51729 85661 17352 77578 74426 51064 65113 6439 95100 27915 9673 31613 36401 76752 10857 44742 54534 37924 71443 13050 3422 94619 92539 76048 53825 38014 23328 11970 79360 19444 91326 29279 16874 75187 59387 89879 57733 91660 32700 37052 90977 7589 51679 39691 82491 29345 1...
output:
82805
result:
ok 1 number(s): "82805"
Test #19:
score: 0
Accepted
time: 207ms
memory: 3624kb
input:
1000 100 51 52 53 54 56 57 58 88 89 90 78 75 74 71 73 72 76 77 81 82 83 85 84 86 87 79 80 70 69 68 64 65 66 67 59 61 62 60 63 91 92 94 95 96 93 100 99 98 97 55 47 44 45 46 38 37 39 36 43 42 41 40 50 48 49 32 33 34 35 27 28 29 30 31 26 25 10 21 20 19 22 23 24 17 16 11 12 13 14 15 18 1 3 2 4 5 9 8 7 6...
output:
99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 ...
result:
ok 1000 numbers
Test #20:
score: 0
Accepted
time: 194ms
memory: 3552kb
input:
1000 100 8 3 88 89 100 84 83 35 49 53 57 66 65 63 61 73 30 24 18 10 15 23 27 26 43 45 46 44 42 41 22 21 19 20 13 17 14 16 25 40 39 36 37 38 34 33 31 32 28 29 9 7 5 6 4 1 2 11 12 47 48 50 99 98 93 94 95 96 97 85 86 87 90 92 91 55 56 58 52 54 76 75 62 60 59 64 71 70 69 68 67 74 72 77 78 79 80 81 82 51...
output:
98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 99 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 ...
result:
ok 1000 numbers
Test #21:
score: 0
Accepted
time: 158ms
memory: 3616kb
input:
1000 100 63 25 15 56 89 74 65 62 5 2 4 3 1 33 32 31 34 35 36 37 39 38 30 29 23 22 28 27 26 24 8 7 6 9 16 17 20 19 21 18 10 12 13 14 11 42 41 40 51 52 53 50 45 44 46 48 49 47 43 54 59 55 57 58 64 67 66 73 71 72 70 68 69 61 60 75 85 84 86 87 88 91 90 92 93 96 95 94 98 97 99 83 82 81 80 78 79 76 77 100...
output:
97 98 97 97 97 97 97 97 97 97 97 97 98 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 98 97 98 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 98 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 98 97 97 97 97 97 97 97 98 97 97 97 ...
result:
ok 1000 numbers
Test #22:
score: 0
Accepted
time: 134ms
memory: 3504kb
input:
1000 100 96 100 99 95 65 81 77 80 75 74 72 66 61 39 36 45 42 43 34 33 29 26 25 27 60 58 52 50 49 47 82 23 22 19 20 18 15 92 93 90 83 88 13 10 9 6 8 4 5 97 94 89 79 76 87 86 85 71 73 67 64 53 55 31 37 32 41 48 24 17 14 16 1 3 2 7 11 12 54 38 44 40 62 63 57 59 51 56 46 21 30 35 28 98 91 84 78 70 69 68...
output:
96 97 96 96 96 96 96 96 96 96 97 96 96 96 96 96 96 96 96 96 96 96 96 97 96 96 97 96 96 96 97 96 96 96 96 96 96 96 96 96 96 96 97 97 96 97 96 96 96 96 96 96 96 96 96 97 96 96 96 97 96 96 96 96 96 97 96 97 97 96 97 96 96 96 96 96 96 96 96 96 96 97 96 96 96 96 96 97 96 96 96 96 96 97 96 97 96 96 96 96 ...
result:
ok 1000 numbers
Test #23:
score: 0
Accepted
time: 114ms
memory: 3664kb
input:
1000 100 2 86 84 76 14 53 58 59 46 45 44 83 77 97 75 61 65 74 27 17 9 7 34 28 4 5 6 40 26 49 52 42 54 55 64 63 56 98 99 96 82 87 93 100 70 22 23 10 19 3 1 11 8 15 13 71 16 18 20 32 24 36 35 37 39 41 48 47 43 66 60 51 50 68 69 95 94 73 78 81 80 88 89 85 92 79 31 30 33 12 29 25 21 38 90 91 57 62 72 67...
output:
95 95 96 95 95 96 95 96 95 95 96 95 96 95 95 95 95 95 95 96 95 95 96 95 96 95 95 95 95 95 95 96 95 95 95 95 95 95 96 96 95 95 95 96 95 96 95 95 95 95 95 95 96 96 95 95 96 95 95 95 95 96 95 95 96 95 96 96 95 95 95 95 95 96 95 95 96 96 96 95 95 96 96 96 96 95 95 95 95 95 95 97 95 95 95 95 95 96 95 95 ...
result:
ok 1000 numbers
Test #24:
score: -100
Time Limit Exceeded
input:
100 1000 197 196 201 200 199 198 202 203 193 194 195 179 178 177 192 191 190 189 188 186 185 187 184 180 181 182 183 175 176 174 262 261 260 259 263 252 251 253 254 257 258 256 255 246 247 245 248 250 249 236 237 238 240 239 235 231 234 233 232 230 229 241 242 244 243 223 221 222 219 220 214 213 212...