QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#439498 | #8781. Element-Wise Comparison | ucup-team3646 | ML | 279ms | 1045500kb | C++17 | 3.9kb | 2024-06-12 02:26:50 | 2024-06-12 02:26:50 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define elif else if
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define repname(a, b, c, d, e, ...) e
#define rep(...) repname(__VA_ARGS__, rep3, rep2, rep1, rep0)(__VA_ARGS__)
#define rep0(x) for (int rep_counter = 0; rep_counter < (x); ++rep_counter)
#define rep1(i, x) for (int i = 0; i < (x); ++i)
#define rep2(i, l, r) for (int i = (l); i < (r); ++i)
#define rep3(i, l, r, c) for (int i = (l); i < (r); i += (c))
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
struct ScalarInput
{
template <class T>
operator T()
{
T ret;
cin >> ret;
return ret;
}
};
struct VectorInput
{
size_t n;
VectorInput(size_t n) : n(n) {}
template <class T>
operator vector<T>()
{
vector<T> ret(n);
for (T &x : ret)
cin >> x;
return ret;
}
};
ScalarInput input() { return ScalarInput(); }
VectorInput input(size_t n) { return VectorInput(n); }
template <typename T>
void print(vector<T> a)
{
for (int i = 0; i < a.size(); i++)
{
cout << a[i] << " \n"[i + 1 == a.size()];
}
}
template <class T>
void print(T x)
{
cout << x << '\n';
}
template <class Head, class... Tail>
void print(Head &&head, Tail &&...tail)
{
cout << head << ' ';
print(forward<Tail>(tail)...);
}
template <typename T, typename F>
struct SlideWindowAggregation
{
// vector<T> a0, a1, r0, r1;
deque<T> a0, a1, r0, r1;
F f;
T I, f0, f1;
SlideWindowAggregation(F _f, T _i) : f(_f), I(_i), f0(_i), f1(_i) {}
private:
void push_s0(const T &x)
{
// a0.push_back(x);
// r0.push_back(f0 = f(x, f0));
a0.emplace_back(x);
r0.emplace_back(f0 = f(x, f0));
}
void push_s1(const T &x)
{
// a1.push_back(x);
// r1.push_back(f1 = f(f1, x));
a1.emplace_back(x);
r1.emplace_back(f1 = f(f1, x));
}
void transfer()
{
while (!a1.empty())
{
push_s0(a1.back());
a1.pop_back();
}
// while (!r1.empty())
// r1.pop_back();
r1.clear();
f1 = I;
}
public:
void push(const T &x)
{
if (a0.empty())
{
push_s0(x);
transfer();
}
else
{
push_s1(x);
}
}
void pop()
{
if (a0.empty())
transfer();
a0.pop_back();
r0.pop_back();
f0 = r0.empty() ? I : r0.back();
}
T query() { return f(f0, f1); }
};
using BS = bitset<50000>;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, m;
cin >> n >> m;
vector<int> p(n), inv(n);
rep(i, n)
{
cin >> p[i];
p[i]--;
inv[p[i]] = i;
}
// ll s = n - m + 1;
// if (s * s * (ll)n <= 5e6)
// {
// ll ans = 0;
// for (int i = 0; i < s; i++)
// {
// for (int j = i + 1; j < s; j++)
// {
// bool flag = true;
// for (int k = 0; k < m; k++)
// {
// if (p[i + k] > p[j + k])
// {
// flag = false;
// break;
// }
// }
// if (flag)
// {
// ans++;
// }
// }
// }
// cout << ans << endl;
// exit(0);
// }
vector<BS> dp(n);
BS B(0);
for (int i = n - 1; i >= 0; i--)
{
dp[inv[i]] = B >> inv[i];
B.set(inv[i], 1);
}
auto f = [](const BS &a, const BS &b)
{
return a & b;
};
BS e(0);
e.flip();
SlideWindowAggregation<BS, decltype(f)> swag(f, e);
{
swag.a1.resize(m);
swag.r1.resize(m);
swag.a1.clear();
swag.r1.clear();
}
for (int i = 0; i < m - 1; i++)
swag.push(dp[i]);
ll ans = 0;
for (int i = m - 1; i < n; i++)
{
swag.push(dp[i]);
ans += swag.query().count();
swag.pop();
}
cout << ans << endl;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3764kb
input:
5 3 5 2 1 3 4
output:
0
result:
ok answer is '0'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
5 2 3 1 4 2 5
output:
2
result:
ok answer is '2'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
4 2 1 2 3 4
output:
3
result:
ok answer is '3'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
4 2 4 3 2 1
output:
0
result:
ok answer is '0'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
1 1 1
output:
0
result:
ok answer is '0'
Test #6:
score: 0
Accepted
time: 124ms
memory: 308996kb
input:
50000 2 44045 29783 5389 7756 44022 45140 21967 5478 10868 49226 21775 31669 49836 13511 46116 14229 27206 31168 37389 3158 10658 41154 14635 18526 40540 6451 23197 46719 30593 13517 8604 46666 39189 43746 12778 3684 3194 36979 43020 14652 19549 31178 17144 27177 44336 2849 40220 11751 41993 32209 4...
output:
310780127
result:
ok answer is '310780127'
Test #7:
score: 0
Accepted
time: 118ms
memory: 309088kb
input:
50000 2 44015 31580 38779 29675 3269 12273 40322 471 4551 44568 21486 17093 43442 11483 9686 39913 36953 47673 34066 4943 28304 34228 9197 43349 1974 32227 8177 33236 24942 42131 34294 48071 17452 9633 18281 13817 27423 9880 15629 6991 20035 13601 39212 33548 8865 39161 48449 22164 36815 28852 43065...
output:
317708201
result:
ok answer is '317708201'
Test #8:
score: 0
Accepted
time: 128ms
memory: 308976kb
input:
50000 2 45828 16955 24033 12988 15675 6086 482 27940 30132 39389 14266 35347 46159 8317 24605 9737 30077 32664 6326 43387 7896 17806 20481 8573 8438 36474 33708 42437 8187 12300 13318 48764 34683 14983 40909 34874 47938 31131 12519 21122 22457 21062 32953 47733 46731 18062 1061 28388 27032 47303 390...
output:
309719539
result:
ok answer is '309719539'
Test #9:
score: 0
Accepted
time: 132ms
memory: 308992kb
input:
50000 2 17900 11121 24441 14321 9486 32843 40283 49359 21526 27801 47381 11444 24372 25999 16187 49470 11724 21419 31873 49053 47656 4516 33567 25021 42444 36150 1362 3711 31260 49923 19998 7275 2927 29522 40437 39439 30777 6413 17107 30917 48362 29997 47038 23951 25835 23665 2875 18889 10610 26400 ...
output:
313258830
result:
ok answer is '313258830'
Test #10:
score: 0
Accepted
time: 132ms
memory: 308996kb
input:
50000 2 29869 3482 18962 41513 1378 27297 29435 6651 12343 3742 27703 32031 15628 16084 12571 1726 30037 31904 2642 817 26607 21749 34528 33044 39980 26798 41826 37079 2809 33387 10169 47346 8551 24214 40572 43065 41730 32281 16630 47892 48890 34159 12884 8185 38452 15606 19304 8428 24230 31397 2232...
output:
313582202
result:
ok answer is '313582202'
Test #11:
score: 0
Accepted
time: 163ms
memory: 309812kb
input:
50000 25 24181 9781 31983 1958 1472 39943 17049 26890 16005 42039 40012 41453 7508 47251 35614 5522 27201 31665 6000 49393 17743 30487 44282 1097 39409 39745 43972 13876 33786 40423 41046 227 44642 27611 9775 21229 48475 7795 32834 15085 44154 45504 26464 45685 42844 44948 26372 30941 8490 8094 4343...
output:
58
result:
ok answer is '58'
Test #12:
score: 0
Accepted
time: 156ms
memory: 309684kb
input:
50000 25 6313 11310 29122 32400 9407 40175 21363 25205 29691 30033 29057 30793 36967 207 521 12478 24585 23970 5059 11072 43604 39890 37153 33289 32907 12925 22807 9811 13003 49978 46897 4643 36366 15146 47056 35036 620 17016 36024 2580 26634 22497 33728 49094 42598 29510 2588 11492 39217 19535 3568...
output:
64
result:
ok answer is '64'
Test #13:
score: 0
Accepted
time: 144ms
memory: 309760kb
input:
50000 25 7101 46567 42238 21041 47850 43080 21835 14601 21483 45662 8296 49277 44528 8471 16934 49649 1159 37986 23124 44670 27253 4997 22785 23185 23498 28808 42277 2373 4953 45403 17687 6448 6646 11865 37061 16908 43882 22053 18899 32888 3268 13484 8282 28369 45369 32118 19979 14248 18913 30053 37...
output:
4
result:
ok answer is '4'
Test #14:
score: 0
Accepted
time: 159ms
memory: 309768kb
input:
50000 25 9582 16768 44838 18085 12760 46386 18931 47470 38877 23660 42553 15072 1132 7328 39756 19422 43849 5886 9208 46852 49509 26185 42588 9415 41859 21884 49608 29541 6265 4552 30506 11148 40872 12019 7531 39615 10614 12159 2888 43822 43634 44176 10373 12227 32929 26749 20475 3280 27429 22261 80...
output:
28
result:
ok answer is '28'
Test #15:
score: 0
Accepted
time: 181ms
memory: 309632kb
input:
50000 25 18777 32602 29569 8351 12443 5109 46381 5184 35720 26389 29442 26751 49739 48691 22692 18229 45132 45826 46500 38936 3677 2482 3508 36713 12096 4589 31302 45887 18816 9740 42267 2275 7538 34775 41814 36968 10986 25755 13093 20616 34034 13055 36066 41746 36775 48968 33860 5503 17541 49741 47...
output:
38
result:
ok answer is '38'
Test #16:
score: 0
Accepted
time: 163ms
memory: 313776kb
input:
50000 250 15070 16717 48256 4440 24276 17592 15337 6219 15845 49955 49002 14123 11954 42720 46986 13584 375 6790 1018 42467 49666 37960 47896 26126 14305 30153 44783 26247 2186 19154 4711 38130 33117 11795 16035 32042 4312 28081 24406 3372 23671 23565 10262 43282 49792 44765 6270 23998 9630 20581 15...
output:
0
result:
ok answer is '0'
Test #17:
score: 0
Accepted
time: 178ms
memory: 313864kb
input:
50000 250 32999 12775 11772 25874 49304 23859 554 48744 41550 21015 2318 34857 5492 43354 48124 3085 26559 18025 19663 27397 8162 7119 40182 48201 19770 485 5753 11213 44460 3938 18529 23936 49880 39625 12123 18411 21408 25086 5584 32740 44856 10184 25518 26410 8154 32863 42006 2765 40280 3683 16878...
output:
0
result:
ok answer is '0'
Test #18:
score: 0
Accepted
time: 191ms
memory: 313776kb
input:
50000 250 22928 47986 35098 8383 11972 22510 8486 41493 48585 30306 9435 34574 29724 32291 40343 46791 8847 25642 29641 48794 16467 20293 6202 40891 16773 13914 41673 27631 27272 22449 37152 37469 19730 12587 31557 22560 33012 10545 47258 34608 42895 9384 20122 29378 8837 1349 35679 20535 4996 46113...
output:
0
result:
ok answer is '0'
Test #19:
score: 0
Accepted
time: 182ms
memory: 313912kb
input:
50000 250 36861 16192 49341 30106 1351 29655 21972 41150 4325 46324 24748 22273 34437 33000 14086 20930 2504 8074 41168 45497 2444 10511 46004 17140 13625 25174 13248 27153 6569 24280 19503 31955 3203 13349 44602 25448 21658 21387 771 35897 25841 27745 23112 17984 16445 1906 34864 14060 11635 12495 ...
output:
0
result:
ok answer is '0'
Test #20:
score: 0
Accepted
time: 188ms
memory: 313812kb
input:
50000 250 44651 6641 40279 35231 28207 38612 11107 8603 25675 23076 7141 23431 343 11668 30231 16527 34195 1024 41033 19519 48977 43258 28563 10844 33945 35736 36086 45052 14706 942 4482 14894 7123 21236 7458 12068 25490 33428 17469 35720 22947 47689 5494 16359 40002 42780 268 11104 26542 22417 4198...
output:
0
result:
ok answer is '0'
Test #21:
score: 0
Accepted
time: 220ms
memory: 355188kb
input:
50000 2500 14379 23426 37565 11703 16722 24713 7259 1881 29688 49717 36901 49493 45629 33419 30112 28361 17058 33589 4037 42664 37380 27768 23738 34164 166 35225 18988 32069 46294 37628 23027 25485 36939 21058 40737 49052 1332 18528 22198 36262 19911 45924 4900 10113 45552 46061 28514 17326 37847 27...
output:
0
result:
ok answer is '0'
Test #22:
score: 0
Accepted
time: 220ms
memory: 355212kb
input:
50000 2500 34466 46827 37369 40822 41757 21791 45039 23502 1637 29443 39698 26205 9914 11396 14596 19891 25353 23638 29323 19571 47715 40389 19546 10792 12694 4208 35713 17709 10527 24365 48513 52 18581 25583 20762 39977 15848 30246 29361 20276 14687 12765 33114 11724 33811 5277 12928 13307 48208 99...
output:
0
result:
ok answer is '0'
Test #23:
score: 0
Accepted
time: 216ms
memory: 355196kb
input:
50000 2500 16387 44292 32179 15229 16111 23270 44569 21074 15098 5503 5964 18419 30808 33950 3494 37647 13919 39187 49055 42252 24329 8633 45329 3530 34620 36074 6500 37302 28358 22693 30416 17738 36875 17209 38721 12312 9692 7203 27276 29496 21174 39100 42609 13039 4220 37160 44153 45312 20685 1495...
output:
0
result:
ok answer is '0'
Test #24:
score: 0
Accepted
time: 214ms
memory: 355212kb
input:
50000 2500 4102 45453 34708 16139 46055 4600 38104 41102 12652 15667 9172 48744 37740 31489 23065 9202 42641 34501 7787 23384 6865 33458 40341 24394 26372 14802 15947 36276 17168 46791 6235 9620 13654 40681 27357 48359 11535 30591 48163 34891 11253 5366 41315 46389 7559 16666 44609 9488 32070 35448 ...
output:
0
result:
ok answer is '0'
Test #25:
score: 0
Accepted
time: 215ms
memory: 355328kb
input:
50000 2500 4765 31823 47392 47212 16690 13390 13886 4988 37389 7491 19944 43362 26775 19065 7291 44609 27418 33124 3071 32379 8783 382 36352 4923 20181 40907 4396 14971 28746 38516 42000 24355 27414 5674 29143 10968 19625 19985 39193 29771 41362 4091 45338 29148 4522 3754 39549 3549 36448 10606 9087...
output:
0
result:
ok answer is '0'
Test #26:
score: 0
Accepted
time: 216ms
memory: 769256kb
input:
50000 25000 27694 17334 36689 31386 31737 11455 45580 24774 10760 22622 38242 46894 7840 25322 5521 12613 26716 22694 25855 25477 10262 35030 44364 20263 32754 25231 12031 41823 11990 23525 42714 4944 2925 21358 13598 43641 11876 15959 32684 33139 19155 32483 16772 19190 24550 37493 41102 8647 43025...
output:
0
result:
ok answer is '0'
Test #27:
score: 0
Accepted
time: 209ms
memory: 769368kb
input:
50000 25000 44016 33666 19414 5385 40981 40283 43975 6878 43709 41524 9656 16710 45770 10732 32635 21865 43523 32271 915 7042 444 48013 36294 3585 49996 11643 30723 25747 31775 48336 45512 2743 44769 47429 8014 41070 34860 12612 36010 5066 17522 17607 30514 20218 36722 6078 41362 29534 15875 819 451...
output:
0
result:
ok answer is '0'
Test #28:
score: 0
Accepted
time: 248ms
memory: 769256kb
input:
50000 25000 18548 21204 2642 29126 38448 36786 49101 3264 21477 17128 37004 32378 18735 11103 30077 21174 13272 30737 40939 35714 47156 25395 42641 37784 14160 13158 2915 21970 15003 30459 6600 25416 32357 21787 17111 40376 46084 22861 26349 22931 2237 32732 39127 44963 42881 28344 40191 14685 19692...
output:
0
result:
ok answer is '0'
Test #29:
score: 0
Accepted
time: 206ms
memory: 769392kb
input:
50000 25000 22121 42962 46051 15480 12670 30302 22927 17242 44174 42743 7178 38964 38129 7628 2635 5306 46715 25681 21768 46091 27793 42640 28882 49382 35390 8446 22138 39030 49880 24709 47386 32262 32593 1504 27202 48926 36461 49843 21448 43765 49673 22056 46947 30717 36240 25518 2203 47976 15589 1...
output:
0
result:
ok answer is '0'
Test #30:
score: 0
Accepted
time: 234ms
memory: 769388kb
input:
50000 25000 47178 27280 8198 29160 42916 17772 3807 9479 28530 40842 14551 22877 22211 42763 32510 20330 8487 29401 26704 17104 5333 13770 47756 20854 19189 15916 29033 16839 6232 23354 40868 42924 34479 17258 46011 14427 17459 2554 15183 1180 48545 19727 3564 8595 25540 36694 30257 44394 44697 2319...
output:
0
result:
ok answer is '0'
Test #31:
score: 0
Accepted
time: 235ms
memory: 401196kb
input:
50000 5000 28664 2202 4603 43800 48905 42109 58 42500 21591 47108 11450 6559 35633 35340 13056 11028 4188 19273 12825 40269 22606 23648 5139 42220 25096 3308 9965 20194 34538 48726 46563 906 9760 46427 33404 38054 38836 39368 13694 34190 35151 10770 22820 46972 12138 14786 45427 21867 14653 11867 35...
output:
0
result:
ok answer is '0'
Test #32:
score: 0
Accepted
time: 274ms
memory: 401308kb
input:
50000 5000 29415 37254 9292 31856 41439 34899 22705 31140 30432 23050 37463 35062 44740 24799 26133 39208 28790 29172 5022 16087 34463 33542 35094 16472 42457 43738 12812 34489 47293 45111 43790 45092 9540 23669 1570 43499 16422 33732 43122 2075 15955 15793 35557 43733 40264 1775 20689 49630 11587 2...
output:
0
result:
ok answer is '0'
Test #33:
score: 0
Accepted
time: 232ms
memory: 401240kb
input:
50000 5000 38880 22972 10057 47774 15305 12835 8303 17916 14134 17253 47251 16436 25464 44971 33072 48580 47147 14940 47850 42030 30418 45836 36064 39346 23684 12724 48715 34149 30366 27796 17909 22444 7986 28074 42026 49066 25787 15821 26491 38515 24089 13199 33267 11781 49712 42488 26609 9586 4299...
output:
0
result:
ok answer is '0'
Test #34:
score: 0
Accepted
time: 259ms
memory: 401276kb
input:
50000 5000 22449 29725 11386 16002 34512 41050 24506 9207 36171 41312 39817 49794 3924 41805 3468 30231 5775 22611 46871 37970 26396 13401 21 32708 35911 34805 2148 22066 32607 26830 19557 31091 35170 26601 35364 26093 47433 5860 26267 23293 27191 3335 42192 45844 28406 5534 12885 44842 30431 11492 ...
output:
0
result:
ok answer is '0'
Test #35:
score: 0
Accepted
time: 245ms
memory: 401292kb
input:
50000 5000 40286 46980 1220 4024 40563 14448 44762 14878 46266 29127 42561 36990 24660 15985 30945 46078 24628 32792 37946 33334 3323 11866 35170 21734 9244 35772 47527 19295 47033 16672 21165 2186 3132 17458 9616 22782 13141 5175 35664 12735 40606 10905 47122 2808 14525 47739 4544 30038 46090 3920 ...
output:
0
result:
ok answer is '0'
Test #36:
score: 0
Accepted
time: 240ms
memory: 493284kb
input:
50000 10000 18902 3060 40220 12119 24070 29001 35075 25657 3771 37564 16283 7897 5711 47444 11653 11978 15679 28838 23910 16563 25241 45894 42485 35925 46940 11284 49773 33624 34936 7510 4265 48370 40939 12246 4558 36443 23492 4458 5694 23282 13256 25146 13642 2296 17563 22633 3740 9031 26848 6931 3...
output:
0
result:
ok answer is '0'
Test #37:
score: 0
Accepted
time: 238ms
memory: 493320kb
input:
50000 10000 28890 38404 18861 30686 18213 41445 22538 14435 23423 39590 34671 37639 10966 35644 10983 43436 10579 3531 19846 25162 13473 1753 9074 18852 7641 26945 5243 39948 35012 39397 267 45511 43576 12311 43901 37209 16809 17730 37526 1327 10080 25165 9888 30527 20594 4332 5487 24449 35328 48519...
output:
0
result:
ok answer is '0'
Test #38:
score: 0
Accepted
time: 250ms
memory: 493284kb
input:
50000 10000 13084 29539 36846 10537 27833 8757 12233 43657 33794 33488 5878 28799 12399 265 45667 37867 43778 17157 8899 13668 25893 15436 13081 38071 33659 29373 30493 45114 49640 21641 46498 30252 18369 22877 20302 46346 36391 12491 32210 42482 45559 36208 33206 1612 7203 33361 11448 2000 21227 40...
output:
0
result:
ok answer is '0'
Test #39:
score: 0
Accepted
time: 227ms
memory: 493236kb
input:
50000 10000 41207 16258 11208 14856 25672 14788 31580 13870 13847 25528 3006 31137 19204 3042 32584 44346 10969 29170 24972 41153 32830 13508 8766 32811 7989 38608 31744 13571 2763 29731 3355 42822 32029 15342 27686 39237 42885 16056 11774 39484 21653 31107 17854 24441 34853 34618 13437 24705 42550 ...
output:
0
result:
ok answer is '0'
Test #40:
score: 0
Accepted
time: 243ms
memory: 493224kb
input:
50000 10000 26385 6067 48691 41467 42371 48310 9723 1887 33619 43522 9733 7239 3157 34429 28791 9562 32532 10563 35546 26754 27612 37214 49558 47654 36787 19422 2273 40175 33143 14739 33271 16408 2390 43807 12640 3669 21482 24542 45168 33177 16047 20648 3363 45840 22903 6356 7243 43423 21890 1311 81...
output:
0
result:
ok answer is '0'
Test #41:
score: 0
Accepted
time: 244ms
memory: 585272kb
input:
50000 15000 18616 42430 45574 2832 10273 18377 22894 2330 32230 317 7292 5218 39883 41433 43080 8380 40500 43945 39436 46440 43990 45247 39265 15644 43954 37515 30503 37756 34402 26875 46685 45319 28669 6118 1145 18155 10344 41816 6283 12053 21307 47664 34731 23168 13156 3819 31102 42849 40112 19597...
output:
0
result:
ok answer is '0'
Test #42:
score: 0
Accepted
time: 229ms
memory: 585372kb
input:
50000 15000 39233 33979 47324 37990 46755 19894 12028 9135 17910 31136 40677 37783 6326 38781 3830 37208 11202 19385 6042 18845 46566 15031 12129 36652 21906 16153 41 28698 3225 24 10748 40316 38711 2443 31242 10970 42714 13807 39391 10871 18495 6086 49178 8810 9548 39802 7624 17164 25289 26049 1796...
output:
0
result:
ok answer is '0'
Test #43:
score: 0
Accepted
time: 256ms
memory: 585268kb
input:
50000 15000 29691 18241 24313 6813 14783 13693 24083 49311 18318 1209 4597 23873 38970 37425 34783 27184 5860 12048 6624 31472 32565 39449 7658 48916 26079 23534 36191 33343 43630 37490 34520 5884 44402 21779 35077 40700 6382 47225 36361 34123 43242 2851 7872 27922 14018 4975 24285 28144 26547 45065...
output:
0
result:
ok answer is '0'
Test #44:
score: 0
Accepted
time: 250ms
memory: 585372kb
input:
50000 15000 43746 21449 23891 47079 14142 9005 49753 12227 2450 7047 48990 7208 28305 41658 27197 7152 46504 21391 25538 7285 36439 36239 73 28722 17878 21516 35289 110 31084 8197 18811 34513 14145 43955 10910 43523 39203 39575 43958 4719 9979 22518 997 19325 12112 25875 19197 37502 13447 8929 20402...
output:
0
result:
ok answer is '0'
Test #45:
score: 0
Accepted
time: 230ms
memory: 585212kb
input:
50000 15000 17833 1797 12006 36219 49285 45707 42551 13845 6509 26036 25696 12839 3163 15772 45820 15465 39953 11961 49613 38022 39310 18544 29426 22640 23535 35802 17735 32509 33596 22536 49749 10022 10061 48529 26442 27811 15735 22162 16535 38867 23517 9257 15512 20452 36043 18781 29399 29032 5867...
output:
0
result:
ok answer is '0'
Test #46:
score: 0
Accepted
time: 254ms
memory: 677256kb
input:
50000 20000 15224 2819 49129 9487 2256 16025 31551 33804 41166 27719 17182 48290 46280 47517 15518 38608 31439 6431 39114 25589 1883 37645 45288 4251 23381 596 41968 45478 26424 41424 40344 8889 15815 31339 9481 1295 37151 280 10135 38984 5787 57 628 22490 39329 11893 33401 6899 14580 42632 21102 16...
output:
0
result:
ok answer is '0'
Test #47:
score: 0
Accepted
time: 239ms
memory: 677208kb
input:
50000 20000 26828 44755 40749 16317 23169 19941 43412 40101 13170 13068 28187 24238 28210 5413 47701 16998 35455 37854 6723 42602 16061 47116 45851 36464 25725 31143 43746 11667 23289 29903 15833 42276 35155 8399 42878 25268 23597 37689 20100 46602 24293 17796 49146 19646 1280 4884 13040 35845 3679 ...
output:
0
result:
ok answer is '0'
Test #48:
score: 0
Accepted
time: 243ms
memory: 677288kb
input:
50000 20000 21982 20304 31150 40865 38636 7336 1642 3112 23239 2146 43189 11272 4517 2188 10445 39138 36339 6489 794 27590 9479 38616 19046 10617 24824 40921 10181 32272 39796 36656 47009 8249 9734 29013 6146 33286 9596 31562 47527 22739 5995 33902 43012 22945 33269 5901 733 37671 33470 47825 21478 ...
output:
0
result:
ok answer is '0'
Test #49:
score: 0
Accepted
time: 246ms
memory: 677224kb
input:
50000 20000 29579 42027 24698 12515 47417 6396 1237 19276 34220 5663 28894 37372 40784 468 49353 15846 11101 27149 34110 46285 17027 17525 110 28826 24942 10825 11714 49893 36192 34177 19498 31825 26370 21992 32898 3456 35004 41106 48088 22350 12857 12719 33629 38874 42448 24027 15395 10861 33867 22...
output:
0
result:
ok answer is '0'
Test #50:
score: 0
Accepted
time: 251ms
memory: 677360kb
input:
50000 20000 28375 2708 49873 21890 275 28159 46939 554 4794 46651 1436 7590 22951 8895 17403 42444 38037 9136 16502 16032 29792 42172 16748 4026 36059 23723 40647 23679 30598 33951 20597 44363 49416 18975 10878 48003 3114 9400 33430 48782 48685 45172 25012 36382 18452 22540 5998 36495 34963 27329 21...
output:
0
result:
ok answer is '0'
Test #51:
score: 0
Accepted
time: 244ms
memory: 769368kb
input:
50000 25000 10559 29037 12737 5500 18273 14847 10188 23326 27809 20417 4465 226 37741 11796 9190 43888 15631 5028 22550 40895 9461 30198 49102 20882 6558 27671 24740 42942 22225 15820 12140 15916 44792 38876 43610 26489 22387 25476 13255 13134 27597 8955 36446 36599 2821 25207 18781 11725 48019 5399...
output:
0
result:
ok answer is '0'
Test #52:
score: 0
Accepted
time: 244ms
memory: 769272kb
input:
50000 25000 44490 4769 13744 9565 44868 16046 47976 6217 16677 10643 3822 30201 4020 565 49196 42072 7338 3211 4959 20792 21347 26586 9209 42480 31098 24447 19425 46932 48627 29211 46362 4580 24715 13526 521 9637 20682 28798 4365 45628 20039 43652 48620 28227 7304 42483 23436 25734 2393 43092 37157 ...
output:
0
result:
ok answer is '0'
Test #53:
score: 0
Accepted
time: 224ms
memory: 769232kb
input:
50000 25000 9035 15421 25267 19800 14732 25940 30319 24607 37207 25732 3533 9124 17012 21606 7725 7390 46374 23041 22153 5913 15499 44373 18511 9323 35410 27241 31710 3716 20819 41603 1768 32004 19142 1881 22378 29090 31258 1629 12865 49186 6006 34387 1306 41697 22349 42989 8046 28460 16666 33763 19...
output:
0
result:
ok answer is '0'
Test #54:
score: 0
Accepted
time: 238ms
memory: 769268kb
input:
50000 25000 43250 6550 13201 39505 7411 15621 37042 9936 40887 31878 42498 46828 38229 38419 22719 16320 13854 43118 6166 2376 28446 1298 28080 46941 19305 26410 337 25572 40267 33759 43007 4300 2235 33118 13961 19039 3879 49669 18679 40331 40746 9830 23956 36863 5753 8796 13932 12246 44402 22367 36...
output:
0
result:
ok answer is '0'
Test #55:
score: 0
Accepted
time: 221ms
memory: 769308kb
input:
50000 25000 984 16409 33035 25983 16661 39761 24998 36555 17568 21053 38242 10451 48918 23908 29851 4420 7074 13125 31557 44167 23207 49738 44968 35668 42983 12795 1769 19823 42103 44372 30318 42235 29437 49645 17094 40528 31274 4874 43407 31281 34213 13360 7209 25326 25167 48268 13731 20991 23206 1...
output:
0
result:
ok answer is '0'
Test #56:
score: 0
Accepted
time: 243ms
memory: 861252kb
input:
50000 30000 47517 19506 49298 1923 8661 29830 32738 48237 43609 10374 33128 29114 39361 841 31706 5006 18685 27828 45651 826 19089 30578 29472 45915 22650 34429 40765 43161 28570 22429 17320 4729 12862 38822 45168 24155 47434 23405 18922 26334 32704 27831 17845 26886 13641 48266 36737 22867 5353 430...
output:
0
result:
ok answer is '0'
Test #57:
score: 0
Accepted
time: 253ms
memory: 861192kb
input:
50000 30000 20248 43055 35472 13608 10286 25626 37207 28522 39515 6952 2500 20638 22709 25891 38434 15061 43670 28155 42875 8555 6835 26357 2295 44399 28918 38622 47889 28390 95 27592 7775 7359 6172 29612 37369 40157 5415 36287 40836 43786 24327 30485 8079 35120 7524 14048 29302 16085 44397 9326 276...
output:
0
result:
ok answer is '0'
Test #58:
score: 0
Accepted
time: 219ms
memory: 861180kb
input:
50000 30000 14183 13973 13183 30855 6148 14821 32543 37214 49314 8001 15137 1812 44827 4535 47868 34340 11382 6928 43565 28304 44104 7378 17104 22326 27961 28493 38353 10224 45567 29406 11834 41172 25040 15175 2745 10976 8133 13856 39663 24060 12095 33365 8079 34652 36806 24182 24504 15894 36527 218...
output:
0
result:
ok answer is '0'
Test #59:
score: 0
Accepted
time: 216ms
memory: 861248kb
input:
50000 30000 16734 11717 11910 29386 11095 3372 8410 15210 48644 33300 10624 38486 34225 43551 22208 26958 26419 15142 17298 13025 30904 34370 9312 8120 48664 2192 1874 18589 7358 29438 31062 39925 29124 11795 25300 8420 19193 34231 709 39104 33656 8079 25635 46931 14160 20877 7203 29086 28533 20880 ...
output:
0
result:
ok answer is '0'
Test #60:
score: 0
Accepted
time: 224ms
memory: 861192kb
input:
50000 30000 49034 20465 39769 17471 38116 13035 37145 9227 45139 27165 6831 29670 12208 23010 39380 6634 35031 40545 44001 593 4162 49735 33235 5246 26372 13401 36889 49617 38426 6691 7461 35430 803 28460 2113 24827 4412 43034 37481 16428 17099 14889 14868 4921 39150 488 1071 42630 46840 8065 32751 ...
output:
0
result:
ok answer is '0'
Test #61:
score: 0
Accepted
time: 240ms
memory: 953160kb
input:
50000 35000 15467 7168 36699 21105 47305 46792 1382 39637 41493 46367 46795 17141 48207 17439 4811 43090 2501 11257 15274 7504 20097 17986 36009 46040 19168 25514 10562 9234 47220 35594 17124 20606 49287 25984 27074 657 24570 14562 3017 25336 38152 4087 14838 40305 3026 2032 31411 36863 42859 47985 ...
output:
0
result:
ok answer is '0'
Test #62:
score: 0
Accepted
time: 223ms
memory: 953104kb
input:
50000 35000 19690 14537 2671 47618 5620 16318 22087 42379 6129 20296 8454 39890 34112 40551 7669 22900 20522 37482 41289 2020 9977 46733 33745 49471 6925 36783 34819 13571 20339 37945 5384 31953 24099 40252 14144 37875 43671 20756 467 6164 38981 31095 40 49810 22722 8758 10912 10957 41562 14973 3285...
output:
0
result:
ok answer is '0'
Test #63:
score: 0
Accepted
time: 251ms
memory: 953208kb
input:
50000 35000 12523 43879 6553 12695 231 12621 22423 7160 44061 28450 32674 7981 42258 7898 12795 34377 47966 24626 40288 24756 48494 32740 30197 13863 40204 39945 34537 21882 10340 3024 1331 4890 3152 23155 41892 47957 34442 2967 7641 49257 19300 48818 34883 37647 39716 39676 36642 14984 48578 34198 ...
output:
0
result:
ok answer is '0'
Test #64:
score: 0
Accepted
time: 222ms
memory: 953140kb
input:
50000 35000 30744 38190 2146 14555 4493 26945 45988 11695 36148 37811 24908 44821 19154 46579 12060 37584 24250 31571 39835 28654 15502 31888 1699 15012 28778 39881 33511 14953 18403 24274 29870 29791 7648 12278 23249 8 8720 33705 33016 31774 44222 3052 6779 14568 27235 29229 7053 24720 15399 27279 ...
output:
0
result:
ok answer is '0'
Test #65:
score: 0
Accepted
time: 228ms
memory: 953212kb
input:
50000 35000 34777 7398 9727 317 5553 15041 39979 31719 40652 16410 28743 27308 16322 1468 46014 42463 10240 11195 37802 27679 47760 31135 33009 29483 32132 26938 15398 14628 47013 14307 5467 36865 41273 14649 13428 27003 13064 8921 22032 24370 42846 28720 48197 32873 38881 6737 12139 43909 15366 334...
output:
0
result:
ok answer is '0'
Test #66:
score: 0
Accepted
time: 279ms
memory: 1045432kb
input:
50000 40000 14610 48009 33609 26370 191 33700 26413 35254 2954 22644 22133 49851 24790 37906 11911 31836 45202 20437 12084 9060 31521 11124 28360 5183 37013 11317 11683 38269 7248 37292 108 16326 18971 6631 18638 17161 2358 11170 13179 37655 28805 24658 3380 47289 7249 10108 19788 46290 12926 39841 ...
output:
0
result:
ok answer is '0'
Test #67:
score: 0
Accepted
time: 216ms
memory: 1045364kb
input:
50000 40000 4042 25262 10112 20373 31221 1567 34266 44028 41718 42532 1673 21112 31056 43515 189 457 36223 32896 48605 10937 37584 32447 12317 4483 48380 31248 26836 7856 10409 7117 41880 7051 13997 25727 29743 38249 18281 18295 29844 39492 9101 7239 11276 13154 18188 31803 48736 19614 34581 35031 4...
output:
0
result:
ok answer is '0'
Test #68:
score: 0
Accepted
time: 228ms
memory: 1045500kb
input:
50000 40000 32807 48802 478 2857 35242 5095 6773 30713 42193 34322 4052 39027 33290 33247 23253 8755 25220 23555 4072 18161 38905 28466 8487 37568 46778 931 30563 22673 18733 10538 24007 5980 32899 26509 34878 9397 545 7886 36463 14127 7990 26166 4041 19205 18569 40915 43528 18499 18044 42522 21286 ...
output:
0
result:
ok answer is '0'
Test #69:
score: 0
Accepted
time: 259ms
memory: 1045500kb
input:
50000 40000 19200 33402 19587 34336 38822 19428 24632 1202 8110 38381 24444 20324 741 8716 37107 7403 39229 25087 34446 47132 29084 44569 32579 10074 17322 45608 16147 45214 1329 2288 45533 17363 41475 28749 41431 15629 22042 13355 33499 49645 21746 34576 972 15919 2511 19176 36421 29569 18374 11012...
output:
0
result:
ok answer is '0'
Test #70:
score: 0
Accepted
time: 260ms
memory: 1045360kb
input:
50000 40000 22722 16995 43221 3698 18420 5730 41051 23995 4584 10320 28167 18143 47214 33823 19702 46790 46448 41429 48051 2204 32384 24641 32772 6972 32472 30682 19729 25269 34762 46999 39336 15905 20902 20384 31163 22539 20827 45787 34547 45303 38718 35971 45339 9130 26782 16320 48230 27778 6436 1...
output:
0
result:
ok answer is '0'
Test #71:
score: -100
Memory Limit Exceeded
input:
50000 45000 13372 7743 36023 32973 12795 12256 30968 46703 9823 34569 49180 49027 24371 46827 13491 45685 32978 45480 18999 31502 12310 15508 44953 18419 22491 17047 19374 6638 39882 44641 49434 26667 36389 24324 43594 22454 7238 39458 22048 16058 26923 26260 46345 49251 42813 54 28448 42222 13631 2...
output:
0