QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#602419 | #7645. Shoes | ucup-team3519 | AC ✓ | 1504ms | 101520kb | C++17 | 3.6kb | 2024-10-01 00:46:16 | 2024-10-01 00:46:17 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define V vector
#define all0(x) (x).begin(),(x).end()
#define all1(x) (x).begin()+1,(x).end()
#define pb push_back
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define cin std::cin
#define cout std::cout
typedef long long LL;
typedef pair<int, int> pi;
typedef pair<LL, LL> pl;
//const int MN = 2e5 + 20;
const int INF = 2e9 + 1000;
const LL INFLL = 8e18 + 1000;
mt19937 mrand(chrono::steady_clock().now().time_since_epoch().count());
//模板区域~~~~~~~
//模板结束~~~~~~~
int rnd(int l, int r) {
return mrand() % (r - l + 1) + l;
}
void solve() {
int n; cin >> n;
LL k, T; cin >> k >> T;
// int n = 10;
// LL k = mrand() % 10 + 1, T = mrand() % 100 + 10;
// cout << "n, k, T : " << n << " " << k << " " << T << endl;
V<LL> pos(1), neg(1);
for(int i = 1; i <= n; i++) {
LL t; cin >> t;
// LL t = rnd(-(T - k) / 2, (T - k) / 2);
// cout << t << " ";
if(t >= 0) pos.pb(t);
else neg.pb(-t);
}
// cout << endl;
n = pos.size() - 1;
int m = neg.size() - 1;
sort(all1(pos));
sort(all1(neg));
V<V<int>> dp(n + 1, V<int>(m + 1, INF / 2));
auto show = [&]() -> void {
for(int l = 0; l <= n; l++) {
for(int r = 0; r <= m; r++) {
cout << dp[l][r] << " ";
}
cout << endl;
}
};
dp[0][0] = 0;
auto amt = [&](int l, int r) -> LL {
return (T - pos[l] * 2 - neg[r] * 2) / k;
};
for(int l = 0; l <= n; l++) {
for(int r = 0; r <= m; r++) {
if(l + r <= amt(l, r) && (l || r)) {
dp[l][r] = 1;
}
}
}
auto upd_dp_by_side = [&](int l, int r) -> void {
dp[l][r] = min(dp[l][r], dp[max(0LL, l - amt(l, 0))][r] + 1);
dp[l][r] = min(dp[l][r], dp[l][max(0LL, r - amt(0, r))] + 1);
};
// show();
deque<int> dque;
auto add = [&](int x) -> void {
while(dque.size() && dque.back() > x) dque.pop_back();
dque.push_back(x);
};
auto del = [&](int x) -> void {
if(dque.front() == x) dque.pop_front();
};
for(int in_len = 1; in_len <= n + m - 2; in_len++) {
dque.clear();
int r = 0;
int rr = min(in_len, n) + 1, ll = min(in_len, n);
for(int l = n; l >= 0; l--) {
if(l + r - amt(l, r) > in_len) continue;
while(r + 1 <= m && l + r + 1 - amt(l, r + 1) <= in_len) r++;
if(amt(l, r) >= 2 && l + r - amt(l, r) == in_len && l && r) {
// cout << "l, r, in_len" << l << " " << r << " " << in_len << endl;
while(rr - 1 >= max(in_len + 1 - r, 0)) {
rr--;
add(dp[rr][in_len - rr]);
}
while(ll > min(in_len, l - 1)) {
del(dp[ll][in_len - ll]);
ll--;
}
assert(min(in_len, l - 1) >= max(in_len + 1 - r, 0));
// cout << "ll, rr" << ll << " " << rr << endl;
dp[l][r] = min(dp[l][r], dque.front() + 1);
upd_dp_by_side(l, r);
}
}
}
// show();
for(int l = 0; l <= n; l++) {
for(int r = 0; r <= m; r++) {
if(dp[l][r] == INF / 2) upd_dp_by_side(l, r);
}
}
cout << dp[n][m] << endl;
}
int32_t main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int t = 1;
// cin >> t;
while (t--)
solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3660kb
input:
5 100 400 -2 -1 -150 99 98
output:
3
result:
ok answer is '3'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
1 1 1 0
output:
1
result:
ok answer is '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
8 5 25 -2 -2 3 0 0 0 0 0
output:
2
result:
ok answer is '2'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
7 50 254 -33 44 1 1 1 -1 -1
output:
2
result:
ok answer is '2'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
7 50 254 -39 44 1 1 1 -1 -1
output:
3
result:
ok answer is '3'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
12 222 1240 166 165 164 163 140 -138 139 -64 -64 -62 -61 -60
output:
3
result:
ok answer is '3'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
17 222 1240 166 165 164 163 140 -138 139 -64 -64 -62 -61 -60 -30 -30 34 34 31
output:
4
result:
ok answer is '4'
Test #8:
score: 0
Accepted
time: 12ms
memory: 4320kb
input:
1000 13 7000 -62 336 -2593 1828 1962 -2910 -742 2331 -36 1845 -1442 1347 966 400 1108 681 2686 236 -28 -2054 664 1892 1218 143 -952 2732 56 -563 -1521 2052 -624 -1574 2722 204 2228 224 563 -2940 -806 1749 913 -126 -76 -2715 40 2540 -312 2688 1068 -2398 260 -1110 -2448 -899 -1144 -1538 -2553 -1702 91...
output:
7
result:
ok answer is '7'
Test #9:
score: 0
Accepted
time: 6ms
memory: 4508kb
input:
1100 1300 7500 -62 336 -2593 1828 1962 -2910 -742 2331 -36 1845 -1442 1347 966 400 1108 681 2686 236 -28 -2054 664 1892 1218 143 -952 2732 56 -563 -1521 2052 -624 -1574 2722 204 2228 224 563 -2940 -806 1749 913 -126 -76 -2715 40 2540 -312 2688 1068 -2398 260 -1110 -2448 -899 -1144 -1538 -2553 -1702 ...
output:
501
result:
ok answer is '501'
Test #10:
score: 0
Accepted
time: 705ms
memory: 101272kb
input:
10000 1300 7500 -2178 2108 -2585 28 2524 -336 -2180 2309 -2140 47 -1772 115 2664 2412 1650 137 338 1224 -2962 -2622 1164 2362 834 1455 -848 2108 2792 -1713 -2405 412 -2224 -822 1200 1428 778 842 765 -2872 -492 1195 2011 -2386 -2540 -649 2128 1384 -2390 2978 22 -1870 1932 -790 -2062 -1499 -106 -1346 ...
output:
4506
result:
ok answer is '4506'
Test #11:
score: 0
Accepted
time: 789ms
memory: 101064kb
input:
10000 1300 7500 -78 8 -185 28 124 -36 -80 209 -40 47 -272 115 264 12 150 137 38 24 -262 -222 264 262 234 255 -248 8 92 -213 -5 112 -124 -222 0 228 178 242 165 -172 -192 295 211 -286 -140 -49 28 184 -290 278 22 -70 132 -190 -262 -299 -106 -146 -99 0 121 -18 -28 123 -76 -122 -212 -226 114 -108 35 161 ...
output:
2000
result:
ok answer is '2000'
Test #12:
score: 0
Accepted
time: 8ms
memory: 4228kb
input:
1000 130 750 -18 8 -5 28 4 -6 -20 29 -10 17 -2 25 24 12 0 17 8 24 -22 -12 24 22 24 15 -8 8 2 -3 -5 22 -4 -12 0 18 28 2 15 -22 -12 25 1 -16 -20 -19 28 4 -20 8 22 -10 12 -10 -22 -29 -16 -26 -9 0 1 -18 -28 3 -16 -2 -2 -16 24 -18 5 11 -20 -24 22 21 25 2 24 8 -8 -24 8 -18 -9 -24 -9 12 -4 -2 -28 14 18 -12...
output:
200
result:
ok answer is '200'
Test #13:
score: 0
Accepted
time: 9ms
memory: 4192kb
input:
1000 130 750 -8 8 -5 8 4 -6 0 9 0 7 -2 5 4 2 0 7 8 4 -2 -2 4 2 4 5 -8 8 2 -3 -5 2 -4 -2 0 8 8 2 5 -2 -2 5 1 -6 0 -9 8 4 0 8 2 0 2 0 -2 -9 -6 -6 -9 0 1 -8 -8 3 -6 -2 -2 -6 4 -8 5 1 0 -4 2 1 5 2 4 8 -8 -4 8 -8 -9 -4 -9 2 -4 -2 -8 4 8 -2 -2 0 0 -2 -5 3 -4 -3 2 -1 2 -8 -8 -2 -6 7 -6 8 5 -6 1 2 -7 -4 6 -...
output:
200
result:
ok answer is '200'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
11 130 720 1 -2 3 4 5 -6 7 -8 -9 10 11
output:
3
result:
ok answer is '3'
Test #15:
score: 0
Accepted
time: 8ms
memory: 4208kb
input:
1000 13000 75000 -7062 3336 -3593 7828 3962 -5910 -742 5331 -6036 1845 -6442 7347 966 3400 108 681 6686 7236 -7028 -3054 6664 7892 9218 4143 -4952 1732 9056 -5563 -5521 2052 -1624 -574 6722 7204 1228 224 8563 -7940 -5806 2749 7913 -8126 -3076 -8715 8040 1540 -1312 1688 7068 -2398 260 -3110 -9448 -88...
output:
225
result:
ok answer is '225'
Test #16:
score: 0
Accepted
time: 865ms
memory: 101208kb
input:
10000 13000 240000 -7062 3336 -3593 7828 3962 -5910 -742 5331 -6036 1845 -6442 7347 966 3400 108 681 6686 7236 -7028 -3054 6664 7892 9218 4143 -4952 1732 9056 -5563 -5521 2052 -1624 -574 6722 7204 1228 224 8563 -7940 -5806 2749 7913 -8126 -3076 -8715 8040 1540 -1312 1688 7068 -2398 260 -3110 -9448 -...
output:
581
result:
ok answer is '581'
Test #17:
score: 0
Accepted
time: 957ms
memory: 101140kb
input:
10000 13000 2400000 -27062 13336 -3593 7828 3962 -45910 -30742 45331 -16036 11845 -36442 47347 20966 43400 10108 20681 36686 47236 -37028 -23054 46664 7892 49218 44143 -24952 11732 9056 -15563 -15521 2052 -41624 -574 6722 27204 31228 30224 28563 -47940 -5806 42749 7913 -18126 -43076 -48715 18040 154...
output:
56
result:
ok answer is '56'
Test #18:
score: 0
Accepted
time: 861ms
memory: 98136kb
input:
9936 400 40043 -8 8 -5 8 4 -6 0 9 0 7 -2 5 4 2 0 7 8 4 -2 -2 4 2 4 5 -8 8 2 -3 -5 2 -4 -2 0 8 8 2 5 -2 -2 5 1 -6 0 -9 8 4 0 8 2 0 2 0 -2 -9 -6 -6 -9 0 1 -8 -8 3 -6 -2 -2 -6 4 -8 5 1 0 -4 2 1 5 2 4 8 -8 -4 8 -8 -9 -4 -9 2 -4 -2 -8 4 8 -2 -2 0 0 -2 -5 3 -4 -3 2 -1 2 -8 -8 -2 -6 7 -6 8 5 -6 1 2 -7 -4 6...
output:
100
result:
ok answer is '100'
Test #19:
score: 0
Accepted
time: 887ms
memory: 98412kb
input:
9952 400 40043 -8 8 -5 8 4 -6 0 9 0 7 -2 5 4 2 0 7 8 4 -2 -2 4 2 4 5 -8 8 2 -3 -5 2 -4 -2 0 8 8 2 5 -2 -2 5 1 -6 0 -9 8 4 0 8 2 0 2 0 -2 -9 -6 -6 -9 0 1 -8 -8 3 -6 -2 -2 -6 4 -8 5 1 0 -4 2 1 5 2 4 8 -8 -4 8 -8 -9 -4 -9 2 -4 -2 -8 4 8 -2 -2 0 0 -2 -5 3 -4 -3 2 -1 2 -8 -8 -2 -6 7 -6 8 5 -6 1 2 -7 -4 6...
output:
100
result:
ok answer is '100'
Test #20:
score: 0
Accepted
time: 789ms
memory: 76060kb
input:
9052 40 40007 0 2 -2 1 1 0 -2 2 -1 2 -2 1 0 0 0 2 2 0 -1 0 0 1 0 0 -2 2 2 0 -2 1 -1 0 0 0 1 2 0 -1 0 1 1 -1 -2 -1 1 1 -2 2 1 -1 0 -1 -1 -2 -1 -2 0 0 1 0 -1 0 -1 -2 -2 -1 0 0 2 2 -2 0 1 0 1 2 0 2 -2 0 2 0 0 0 0 0 -1 -2 -1 2 0 0 -2 0 0 0 0 2 0 0 1 -2 0 -1 -1 -1 -1 1 -1 0 0 0 0 1 -2 0 1 -2 -1 2 0 0 -2 ...
output:
10
result:
ok answer is '10'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
13 40 40007 2 2 -2 2 -1 1 1 0 -2 9888 -10035 -10035 -10035
output:
2
result:
ok answer is '2'
Test #22:
score: 0
Accepted
time: 784ms
memory: 74904kb
input:
9048 40 40007 -1 0 0 -2 -2 2 0 -2 0 1 1 1 -1 -2 0 -2 0 1 0 0 2 0 0 0 0 -1 -2 -2 -1 2 -2 -2 -1 0 2 -1 2 1 -1 -1 -2 -1 -2 0 2 0 -1 -2 0 0 0 -1 0 0 -1 0 0 0 2 2 -1 1 -1 -2 -2 1 2 1 -2 -1 2 -1 0 0 0 -1 2 2 -1 2 -2 -1 1 1 -1 1 0 -2 -2 1 0 0 -1 0 1 -1 2 0 -1 -2 0 -1 2 2 1 0 2 -2 0 -2 0 0 0 1 -1 2 -1 1 0 2...
output:
10
result:
ok answer is '10'
Test #23:
score: 0
Accepted
time: 817ms
memory: 89980kb
input:
9948 400 40007 -1 -1 1 0 2 -2 2 0 1 2 0 0 0 0 0 0 0 -2 -1 0 2 -2 0 -2 1 0 -2 2 -1 2 1 2 -1 0 1 -2 0 1 0 -1 -2 2 -2 -1 1 0 -1 0 2 2 -1 2 1 2 -2 2 -1 0 1 0 -2 0 -2 1 0 -1 -2 0 -2 -2 0 2 0 -1 2 -2 2 0 0 2 -1 2 2 -1 -2 1 1 -1 0 -2 2 0 -1 2 1 0 1 1 0 -1 0 1 0 -1 1 -2 1 -2 -2 2 2 -2 1 0 0 -1 0 -1 0 0 -1 -...
output:
100
result:
ok answer is '100'
Test #24:
score: 0
Accepted
time: 819ms
memory: 89512kb
input:
9950 400 40007 0 -2 0 1 1 -1 -2 0 2 1 0 -1 -1 -2 -1 0 2 0 0 -1 2 0 2 2 2 1 0 0 -2 -2 -1 1 1 -1 -2 -2 1 -2 0 1 1 0 2 1 0 0 0 1 -1 1 0 -2 2 0 0 0 -1 2 0 0 1 0 0 0 0 -1 -1 1 0 -1 -1 1 1 2 2 0 0 -1 2 -2 0 2 0 -1 0 1 0 -1 -1 0 1 1 1 2 -2 2 2 -1 1 2 1 0 1 -1 0 0 2 1 0 1 -2 0 1 0 1 0 -2 1 2 0 2 -2 -2 0 -2 ...
output:
100
result:
ok answer is '100'
Test #25:
score: 0
Accepted
time: 970ms
memory: 90024kb
input:
9950 400 400007 2 0 1 1 2 0 1 0 -1 -1 -1 -2 2 1 2 0 0 0 0 1 0 1 2 0 1 0 0 -2 0 -2 -1 0 0 0 1 -1 -2 1 0 1 1 -1 0 0 0 -2 2 -2 0 0 2 2 0 2 0 2 -2 -1 1 2 0 -1 -1 1 2 -1 -1 -1 2 -2 0 0 0 2 0 0 0 -2 -2 -2 -2 0 -2 -2 -1 0 1 0 1 1 -2 0 -1 2 0 1 0 2 -1 1 0 0 0 2 0 -2 -1 0 1 -1 0 -1 -1 0 2 0 -1 -2 0 0 1 1 0 -...
output:
11
result:
ok answer is '11'
Test #26:
score: 0
Accepted
time: 823ms
memory: 89768kb
input:
9950 433 40007 2 1 1 -1 -2 1 1 0 0 0 0 0 0 0 2 1 0 0 0 1 -2 0 -1 -1 2 -2 0 1 0 1 2 -2 0 -2 1 -2 0 2 2 0 2 1 2 0 2 0 1 2 1 0 -2 0 0 2 2 0 0 0 1 1 0 1 -1 0 0 1 -2 0 1 0 1 1 1 -1 0 2 -2 -2 -1 0 1 1 2 -1 2 0 -1 -1 0 2 0 2 2 0 2 1 1 -2 -2 0 2 0 0 2 1 -1 1 -1 0 -1 -2 -2 -2 -1 -1 -1 1 0 -2 2 2 0 1 0 -1 -1 ...
output:
109
result:
ok answer is '109'
Test #27:
score: 0
Accepted
time: 788ms
memory: 98304kb
input:
9903 555 3333 5 3 -3 2 8 -6 -3 4 -7 7 -7 -5 -6 -3 -2 1 -5 1 3 -5 6 0 1 -6 -7 5 1 -3 2 -9 -7 -9 -9 -3 7 -6 -5 3 -2 0 3 -3 4 -8 0 -3 -3 7 4 -9 7 8 -8 8 -2 -6 -5 9 2 0 0 0 6 -2 3 -6 -7 -5 4 7 7 -2 4 -3 0 4 0 7 -8 -5 5 6 -7 8 8 1 -7 6 -2 1 5 4 5 -8 5 -6 1 6 -5 8 -1 6 3 -5 6 6 2 9 -1 7 5 6 2 0 1 9 8 6 -3...
output:
1918
result:
ok answer is '1918'
Test #28:
score: 0
Accepted
time: 963ms
memory: 101040kb
input:
10000 1 1000000000000000000 307207210817540723 -51828971826426360 -155471930464895254 470060211550206025 -57887157012127528 403463075241999530 -36866923483833823 131084413553865338 -389803010131001518 164230248073750222 -430770566255098895 -223867268447943264 111213250143745507 362061622723265689 -3...
output:
2
result:
ok answer is '2'
Test #29:
score: 0
Accepted
time: 533ms
memory: 101136kb
input:
10000 1 1000000000000000000 579038342 715 6829375903001513 -9490672588432324 3 51879112 -3657886645959950 13 -4924112 2145 -7552 -34622785488 -203276337577492 249618072 87138 5827773746 60774 421671120452 76207 10530575078992 104522316578 153719878 -2090 16 -1 308659977 -133775447628565074 564376306...
output:
2
result:
ok answer is '2'
Test #30:
score: 0
Accepted
time: 543ms
memory: 101088kb
input:
10000 1 1000000000000000000 998213 -446 -2012341748039513 2570953 -51822841195312322 -15905938 -3212436783514 124286152399 32463782346 -7 313 159328816443588 -225131020692169804 -647396158 3532511616813 -2231361570761 -132725401240250260 -2805 1489289 -969 22465116475 -3 -1458888 -30234901945 -11014...
output:
2
result:
ok answer is '2'
Test #31:
score: 0
Accepted
time: 562ms
memory: 101148kb
input:
10000 1 1000000000000000000 -145 3942812 -16 26177967742 935136163532 -119013423928 -16526514850789 -19760512342 26467 -9781 -37035672741450 -2363868335147 -42899113 -2 -49873723152 -24446621668957 -408 5084610 -186881904329015070 10237908687603 -291 23531044546 -47554 -20844 -3648633785 -451 -35525...
output:
2
result:
ok answer is '2'
Test #32:
score: 0
Accepted
time: 556ms
memory: 101332kb
input:
10000 1 1000000000000000000 -1574978579 48439113288739 -3439883756 -24587433 16209897717833318 2327 706400567 3135702030356294 -59273456451 -2159262123108134 -271076 -376512399171 -143049022289146514 -1567427713 499338208970928564 400005311333 -54846420569 3667986656914725 -1034125546543116 65321273...
output:
2
result:
ok answer is '2'
Test #33:
score: 0
Accepted
time: 562ms
memory: 101132kb
input:
10000 1 1000000000000000000 159319 -391967 -108619312875385815 -189963 117273150 -428043299812 208943367570580665 271106282834408021 459528 67770982948595759 -338492105771252 -63 146887002 -450542908564 -53831366 489 405 230 -289119983369206183 -448473 422982225174967992 -478 442 29548 2927573156169...
output:
2
result:
ok answer is '2'
Test #34:
score: 0
Accepted
time: 707ms
memory: 98708kb
input:
9869 1 1000000000000000000 379257594370510138 390586229900169839 -28382193623373511 191273674363738130 59378408684696024 172431650959622540 -252704407331055425 163996254067005869 154169853591448510 312558419817244331 -186532421539280472 -267403429074143399 72364986877896241 -225478700883162003 13140...
output:
2
result:
ok answer is '2'
Test #35:
score: 0
Accepted
time: 723ms
memory: 99236kb
input:
9900 1 1000000000000000000 5318103527188822 89997324239190010 -9115424816624183 -39504630775384936 303186470194184324 176876894166070304 -158219991170323387 83991863481491267 132488327512514039 252422044202237076 -259306684737416839 41422662778646280 49622449646815561 -241049731859422188 -1851556026...
output:
2
result:
ok answer is '2'
Test #36:
score: 0
Accepted
time: 704ms
memory: 98956kb
input:
9882 1 1000000000000000000 204145248046827865 -197030150462051887 318194948664833994 -17866718817308100 -35284674916339581 -43730864217965037 153162766261048350 -21475449716485491 49320749249958204 -28691973772478242 -112781737179390795 21783699582116414 278928513294272319 -45267468742755972 4355946...
output:
2
result:
ok answer is '2'
Test #37:
score: 0
Accepted
time: 600ms
memory: 83660kb
input:
9128 1 1000000000000000000 -17829984991544631 -14390334268445820 63116482828035415 -748274657049904 -18115119326124028 -166327159797051039 95543164718997418 -83376375802632703 -99563761924367 30170821805706895 207893569738556747 -145977643560580273 169180623600153436 -134114641188413836 -12480336565...
output:
2
result:
ok answer is '2'
Test #38:
score: 0
Accepted
time: 971ms
memory: 101080kb
input:
10000 10 1000000000000000000 -188429222130056366 452160237731225440 296947646948256977 484008183949314836 334868423103662296 491296158892944201 119435474962393372 302653795810241599 357629666458896982 -225042028945786366 -346241187182033659 95551553523405308 304317987655304101 167228779156145105 207...
output:
2
result:
ok answer is '2'
Test #39:
score: 0
Accepted
time: 545ms
memory: 101116kb
input:
10000 10 1000000000000000000 -2016285939104 -1 58703523013892 220413118448679 -1327641627 40 -1 1277670428641100 2 14 -377529817430108327 270 182139132 -19 -2368474 5 -8687159312 43875386789943 46948662173 77685298287786464 -31737015 25484391151 237135798109881256 6336783637400280 25050 3 6501344068...
output:
2
result:
ok answer is '2'
Test #40:
score: 0
Accepted
time: 546ms
memory: 101056kb
input:
10000 10 1000000000000000000 56323851383 33761780 -13887107921709 -3 -13434 65515 -177518757696 -256673 -10532250311621709 627728268205525 -35372146096983584 0 -93 21496 -395374454 -12431318241193051 -59524615997280882 2260 24156361694420857 1344864285788989 -850336 21460 29 101879481899110 -7100741...
output:
2
result:
ok answer is '2'
Test #41:
score: 0
Accepted
time: 548ms
memory: 101308kb
input:
10000 10 1000000000000000000 326602779420267638 -14900463556785 -3443422541557387 456 169948135933641 17847988 294357784227427516 73467166 -7468923683392867 -3628557 -24504052343674 48 4126 -275257033169221 647520580 4652 -11 306722040918 -3170760858410030 -121725524984 34359548673586 -23154978418 3...
output:
2
result:
ok answer is '2'
Test #42:
score: 0
Accepted
time: 553ms
memory: 101368kb
input:
10000 10 1000000000000000000 3639785477 -18 31030893 12542497781691 -299 -47635172 -40705859 -16332 -65478636097 -1783652328 36332134 15614619 -260394957519838929 -43 51239 21 31448170 22913822085184 287590 192573 898705546 452159965216605879 26188938981125 107530 30893745740793 -45741313298548 4727...
output:
2
result:
ok answer is '2'
Test #43:
score: 0
Accepted
time: 562ms
memory: 101204kb
input:
10000 10 1000000000000000000 -59127250683358 -443194661 201 -39024 378199242 164574012053829705 231353985956945882 320072 69948729877568461 467176901856281 -375257081700750852 -321 107646 -184666381 -227568 -464160178 -215262978 371 -338658620701066 -170797338158401944 54744533 -146383935912978 4709...
output:
2
result:
ok answer is '2'
Test #44:
score: 0
Accepted
time: 754ms
memory: 98176kb
input:
9869 10 1000000000000000000 127450222624905131 -342191541832523670 -227795350107531229 -49819736615491400 15733743914505454 -290452291125718361 142049826870657926 9003537929190458 -112144509664285076 203844318523904442 -160801586648484023 -338684926706821231 32240504605031944 -91919366912941432 4340...
output:
2
result:
ok answer is '2'
Test #45:
score: 0
Accepted
time: 706ms
memory: 98932kb
input:
9900 10 1000000000000000000 336749700342531929 205804655037052316 373948437399241536 69756474965747559 13851999859093359 -13777259475625364 -130114895379711518 326338195632089176 -8152347852238426 -86822816795201527 9643002257300782 104979952130299482 55542668478808697 -57915721276757460 11291656090...
output:
2
result:
ok answer is '2'
Test #46:
score: 0
Accepted
time: 665ms
memory: 98444kb
input:
9882 10 1000000000000000000 216492360927348032 79127204941370446 291492684790014616 -275130645625874047 -262437782933732000 221918035493815420 241800056609432930 -77807418435186602 32987662696876244 31460037873942898 120540789861006240 -91587396036587691 -257842906094392641 228805557740678978 301518...
output:
2
result:
ok answer is '2'
Test #47:
score: 0
Accepted
time: 560ms
memory: 83924kb
input:
9128 10 1000000000000000000 -70709547110785348 215122318167890381 -44705149424117644 -12246758552715582 -3239653051159311 283278561273484501 148229749659781689 -80222850228103072 -107680815556667410 -96736102140158571 163530963667175524 323378893411035370 202014670907454212 18775129027446965 4561619...
output:
2
result:
ok answer is '2'
Test #48:
score: 0
Accepted
time: 950ms
memory: 101084kb
input:
10000 100 1000000000000000000 465454983900121810 421282267688121046 -206675507286263746 -98905983145766611 72545421379690968 -37620934800706567 149325438602652331 362050504882667605 2716111897795390 480671570405012962 68653440204984183 340140825111761180 485912059491710481 21981415309185217 45221566...
output:
2
result:
ok answer is '2'
Test #49:
score: 0
Accepted
time: 542ms
memory: 101080kb
input:
10000 100 1000000000000000000 37520 18 3582970057690 25705 8983943492753 13384520798 -79375932 -833436137491104 -15597904 -2026 -56841596837 -29 -69114623 18 -195727665362568 226903465781 -150 3 -222705 5990407222 -155124648675 426116236430136064 59095108024505391 35152 -710625 -11892302 -13533 -15 ...
output:
2
result:
ok answer is '2'
Test #50:
score: 0
Accepted
time: 538ms
memory: 101116kb
input:
10000 100 1000000000000000000 -373881681994 -5778159330866676 -8 -5554796422589 132992651 -31098451 -1745 59118 -3625356 388931651474 668418713 -395860 -1 56872665 417463681 -488204866408 6144 -22530940779119 597927787778 -8322 -3017582372127678 -231 352510106086857 -2357493824 -165642242324114195 5...
output:
2
result:
ok answer is '2'
Test #51:
score: 0
Accepted
time: 552ms
memory: 101252kb
input:
10000 100 1000000000000000000 -107885771441 -46836 -1398067377 11065236136554 -1327050465847 8124298 -41892449782521 109275439552 -15135279 -338657208397 212313 -483 42947071204036 -2 67716706128 4674 19 452962665791012273 366069124383369265 4184426 -3 39400339724 289059242425272804 47937870829606 4...
output:
2
result:
ok answer is '2'
Test #52:
score: 0
Accepted
time: 555ms
memory: 101088kb
input:
10000 100 1000000000000000000 -2398067104133173 11558831570975 33 207406521881786680 283767235015 -425372562989559329 -875668339 1655697985 3889859286 -672586232 -3842 165579865158 10169099064505 13826701 268440984497761091 464093 -407954 -22582647 -2675806416302647 -392255581028 -39968086108559 -12...
output:
2
result:
ok answer is '2'
Test #53:
score: 0
Accepted
time: 581ms
memory: 101216kb
input:
10000 100 1000000000000000000 -330995867492 -285492189588 202 -272790178612 201 173713 204162345532 250910 119457305 425962761 -341224051291417313 -223945 -260203392187300042 -194159 -405368595801841026 324933189810023497 -239571624484759 -269396205332676 195477804 -46582410 -476073901221 3562499670...
output:
2
result:
ok answer is '2'
Test #54:
score: 0
Accepted
time: 743ms
memory: 98164kb
input:
9869 100 1000000000000000000 -174601232117746995 -50838100389648586 -233827590036102667 313112666344389297 -424894673100379103 11015858642049584 -31916076202255428 207106270932448264 324483180370488161 155670763768878977 289026539227258840 355535715720307115 -220136872395284219 -145918456498558697 -...
output:
2
result:
ok answer is '2'
Test #55:
score: 0
Accepted
time: 695ms
memory: 98956kb
input:
9900 100 1000000000000000000 191087052087096503 31394493233427252 270530717776770644 349196740990517565 285500335709234413 52545029203865724 -121129932504788753 318904092162859665 -74291274258272280 -249171866592127210 168314649980024720 400585653481344582 -115802048949908244 -123841328709811476 560...
output:
2
result:
ok answer is '2'
Test #56:
score: 0
Accepted
time: 674ms
memory: 98728kb
input:
9882 100 1000000000000000000 -236923974382242402 -83328459983944825 35244765316510201 -88444857094856853 169640379691795556 198578810641376604 -295439909863936488 82797330683588597 -129464216296516862 175182552261299364 141785637324398231 79948904519331035 142441547560609405 53710801225933916 107859...
output:
2
result:
ok answer is '2'
Test #57:
score: 0
Accepted
time: 551ms
memory: 84700kb
input:
9128 100 1000000000000000000 -29027264455003039 -108100048953075590 49743972477806428 6702809306039248 -89911657558243001 -312909703268374067 -262215585290461370 -164236091099633168 -144153400346433046 -228868659962066145 -82597490479672412 -196162331767735176 418288348569059489 -223222336548908245 ...
output:
2
result:
ok answer is '2'
Test #58:
score: 0
Accepted
time: 960ms
memory: 101116kb
input:
10000 10000 1000000000000000000 -284805809145135482 370078690866786371 224358302312814818 31526595246066099 -145166551808155014 371943459845652508 -396336433213684993 -245430373088501375 95785401669252942 -243276459989656055 409289496909926729 -285160369835187034 145831843487739821 -3790959948671813...
output:
2
result:
ok answer is '2'
Test #59:
score: 0
Accepted
time: 564ms
memory: 101080kb
input:
10000 10000 1000000000000000000 181734302156543 750521045 -34 -6 70969 7485 -704126 250953881 13068834662 -702708093578207 -21219399840 -57 3134470852 326651075595564 -93045418839025766 67648032108152 291711 196599 10305817924385344 1680734941 -1731 -20314140751792836 28159632 935841843030 -3998838 ...
output:
2
result:
ok answer is '2'
Test #60:
score: 0
Accepted
time: 539ms
memory: 101116kb
input:
10000 10000 1000000000000000000 357813 -1359765737391 -79 3 76551199257 17685535813246 986059 10264 -28901013337236 -3154655503267937 -1935757816 -435199729446495 -1 -1851497854206513 -22 226 63 3 -27176985215305026 -2833833173 -47706072256383 8963086 -639677358791 474 4866370119 -32610151189205276 ...
output:
2
result:
ok answer is '2'
Test #61:
score: 0
Accepted
time: 551ms
memory: 101084kb
input:
10000 10000 1000000000000000000 -421845 48764306 4393 407666225103 -4077933 3827 -3588 -25740878 3254900851 -3669031211953176 147829813865 -35234494 4798751 211779067061306221 28637957536 302098324087901160 370681078034086745 -649186337104 -240159 -3613 176999 -4934845 459012447 462069840407546259 -...
output:
2
result:
ok answer is '2'
Test #62:
score: 0
Accepted
time: 558ms
memory: 101052kb
input:
10000 10000 1000000000000000000 1296791524 20616571124302 -311249315 387406260297 3717 14681155765657293 2570 39247325885884 34534005738306 1916 -24279154 -29 284974 -460946015504267811 141280599116 4580260413220593 1279895093 1609879289726 -62926 294 294401 -192922330873839087 1220499218 4077852123...
output:
2
result:
ok answer is '2'
Test #63:
score: 0
Accepted
time: 570ms
memory: 101084kb
input:
10000 10000 1000000000000000000 -154206832267 -305993295 164494555797580 333724776 223855309414424575 -243 28082913473621255 -435757226068946563 -425438165514 85957390 489202994769077977 -236862369863726101 -92024540135 -294670 -174773763723237918 -254062381 312009787 311720782278306 -338 159326701 ...
output:
2
result:
ok answer is '2'
Test #64:
score: 0
Accepted
time: 674ms
memory: 98608kb
input:
9869 10000 1000000000000000000 71835319352452198 209808483803929445 -69721761241298699 -197174184580975238 -4606073688754224 -26625720979752349 -31635093290106371 149131902303261582 61925925355690801 336628480566368007 -339476070192171113 -72308340115805729 -1500058509375228 -219559969300052690 -399...
output:
2
result:
ok answer is '2'
Test #65:
score: 0
Accepted
time: 732ms
memory: 99204kb
input:
9900 10000 1000000000000000000 21318991834470284 68840957556576744 62810691154012674 344737656290828978 235519883084522913 360134343626606979 -135773103195890912 360462586188042041 119601103889991734 112330688816263267 197697154673956564 -247098766008716058 299600067213113603 378877167258432582 -103...
output:
2
result:
ok answer is '2'
Test #66:
score: 0
Accepted
time: 656ms
memory: 97352kb
input:
9882 10000 1000000000000000000 -404912009742321579 308032230091867976 84106525105677081 -20333958406072530 -302557150481137974 -119210281559871652 304855949769990711 108357390340851994 -187371232403543381 -177387691459848789 173572630376526404 -60231851267592920 484592483877773434 -17580269283886925...
output:
2
result:
ok answer is '2'
Test #67:
score: 0
Accepted
time: 681ms
memory: 75448kb
input:
9128 10000 1000000000000000000 -9640235846762702 182612215369624021 57954763433860503 17138580572241541 288713767895625779 455025760899216562 136509083350017735 57514290691640954 3372356714192440 -108550446323886336 -348032114381641599 410640608191223426 -38231200898732083 -47425233189503477 4354979...
output:
2
result:
ok answer is '2'
Test #68:
score: 0
Accepted
time: 964ms
memory: 101364kb
input:
10000 1000000 1000000000000000000 -112637353398201204 -198887503823721612 354790876416080582 -186185377936379433 41025805986778511 -397090448823110265 -227189348038249721 71010949247225530 -404790591867169426 320731637873490036 -216011698036590836 374759418462209852 -255245558094271839 -462765215827...
output:
2
result:
ok answer is '2'
Test #69:
score: 0
Accepted
time: 541ms
memory: 101252kb
input:
10000 1000000 1000000000000000000 135678925838 3625081437324 27 -21 -50318670273241 -48 -1024 -15124562169190 8 -651170358 -62261859849067273 2215 -113565654388935 211954520363209 -5975113164618 -5204104278175 43135 -130334165437 -7035559 81321 176766552 -1912291772 -237 4723846 -102574718 433723473...
output:
2
result:
ok answer is '2'
Test #70:
score: 0
Accepted
time: 541ms
memory: 101084kb
input:
10000 1000000 1000000000000000000 -7568418 -44386941287213157 7039 330951424 126003465 -237471388544549 -817537185335 -70214786758769 -448828690489 -144893793061 12190848125658 9 -599073628 46154 1079 4854865 395966931 -446963 -13923676240815 2466411660097722 117 -373999250251679905 -207 334648 -189...
output:
2
result:
ok answer is '2'
Test #71:
score: 0
Accepted
time: 540ms
memory: 101348kb
input:
10000 1000000 1000000000000000000 57525 4812524 -158404078002123 447626562623252 -354839 -3726589008 -13538271 149365218 -33421691556 25498 -18262 4629497 4 77 21756902 -3373919060202 23657 -356 3083843554 18196611097267459 -2483 -19403400702151096 -41695 28 4230102204737987 80 85988649 -33326729096...
output:
2
result:
ok answer is '2'
Test #72:
score: 0
Accepted
time: 546ms
memory: 101384kb
input:
10000 1000000 1000000000000000000 -106025010851003 3790527917 -4119 50104176650140958 3 -16 -17 1495 -701023153726136 -1425 45259035436367 -464732900769 116008324801748679 215174869343 297281066432478684 72568591151653 -473861007917 314830 -2600608253 -4183638462232 3711956651085722 3528172416079503...
output:
2
result:
ok answer is '2'
Test #73:
score: 0
Accepted
time: 541ms
memory: 101080kb
input:
10000 1000000 1000000000000000000 98123132380102 135 96 168990 83593891985 -368970768539608 303920941341 95679428994855 -483612826856815296 -115025290086 -338798474355382415 -315543449000 367 369002213 -278089510951434524 390394 -17 -213 -424 -81543 -428463 -218761285283 396399178786092 473790113959...
output:
2
result:
ok answer is '2'
Test #74:
score: 0
Accepted
time: 701ms
memory: 98424kb
input:
9869 1000000 1000000000000000000 354402958799199817 -206599670057885530 21060459815103523 -123188622098700724 -736939617150601 -294744774584377014 103868593838220494 92965626984274878 19404239509946131 -141402587249723500 64383780836629089 -102996637924053534 -324651875200236652 -91520807854099639 -...
output:
2
result:
ok answer is '2'
Test #75:
score: 0
Accepted
time: 728ms
memory: 99028kb
input:
9900 1000000 1000000000000000000 -133195676617621589 2109464771941141 -159116398387078451 25414702566927838 372163313756802288 -102866184644219293 -386984250701953970 -72301417460235401 135109437409350180 268269177532977447 -258070017840591989 172634845856300277 -214851833287834296 15422489124351455...
output:
2
result:
ok answer is '2'
Test #76:
score: 0
Accepted
time: 688ms
memory: 98740kb
input:
9882 1000000 1000000000000000000 -33701828470742571 -326929783674370424 -41406821421772726 -330345727129588281 -37238790057222475 -257097613661666137 170213905832984712 -46963698790198492 -9388851259294984 77892860690129205 -109989358060247500 -490160138010121176 209809801650719596 23753235617221181...
output:
2
result:
ok answer is '2'
Test #77:
score: 0
Accepted
time: 643ms
memory: 77292kb
input:
9128 1000000 1000000000000000000 -374512274349689253 -45267327330323909 415819872390020866 286441550799969653 -403874169101398961 169115244849376568 253411036836489041 37056032124694113 157013483694865731 -13010388825350840 180118148346542919 -16404972172524077 85450328331578779 75543026885983714 26...
output:
2
result:
ok answer is '2'
Test #78:
score: 0
Accepted
time: 968ms
memory: 101324kb
input:
10000 100000000 1000000000000000000 95024415092550015 -68454929382370848 -86293133483125750 6984194606388 495363934916856539 -4571322051846898 89251974541512184 -429565043547191838 -64154535115741430 -304569560626979824 443908094698828347 -26317986775724104 429064796372243233 -70704833965716009 2954...
output:
2
result:
ok answer is '2'
Test #79:
score: 0
Accepted
time: 553ms
memory: 101088kb
input:
10000 100000000 1000000000000000000 265685488172 5974150526664053 28877098259233 31924 -12541335014722223 -9610 -721 -61933056 -31641563865175 66817753715105 -2545154608171 -10574632535791544 363108870711 -55 -211321865654955985 1166 24 230664005 1683 13421985515554 -1803125486 -2176379824228828 543...
output:
2
result:
ok answer is '2'
Test #80:
score: 0
Accepted
time: 557ms
memory: 101044kb
input:
10000 100000000 1000000000000000000 -5112062176894 -892336 -81291822461 -10263928639 27344498082 -508 75077581458042 0 -693 503508 712797193339 108 -8 -196 6867961353 454673 -28058078680 -165975005388968 2452396847 130755403 -16209 1087558728138 27381686309 788028900666 1818335646 9486574853 6011509...
output:
2
result:
ok answer is '2'
Test #81:
score: 0
Accepted
time: 560ms
memory: 101136kb
input:
10000 100000000 1000000000000000000 475858492 4282834560164225 623 -3589200 238432541467633761 -30237 22806 -45205 44433973 -29 0 -45857742596 -4637956669307722 2795317 4746115 -235763500777209193 -127026 -2 45084580560736165 -1 -1887406268551 -4514880260193026 18910738 6959778830 -4201906455864959 ...
output:
2
result:
ok answer is '2'
Test #82:
score: 0
Accepted
time: 553ms
memory: 101516kb
input:
10000 100000000 1000000000000000000 27 41118456454580 -204626569681 -27676461 43563 2251261039 -246775 -142551912178771 421306 -218695 34705551 -33359787 250918689051 -1033333331635088 -1649741665066366 4508018636954920 1902 2533524715 -4330699447 -22 -411708584210 45210570772698 9936256893355 25995...
output:
2
result:
ok answer is '2'
Test #83:
score: 0
Accepted
time: 558ms
memory: 101044kb
input:
10000 100000000 1000000000000000000 359694518563869775 127079 194763265 380026 484131466061 -370 -258261622232534 -124 -361781 -499869382311205306 326 -125738947607180 -443 126 348587068470 247924908736308 -244911046485664499 461004564 -487547756036 368649880030182 -434496451926541626 -3012683031347...
output:
2
result:
ok answer is '2'
Test #84:
score: 0
Accepted
time: 683ms
memory: 98876kb
input:
9869 100000000 1000000000000000000 -234226534998779493 255137332596548254 -482822220353616154 -159302514662493968 90948058891254023 -277302027275867512 66812702887693346 -27634817289470707 -153939551677431924 152405874958116197 159370339143568104 -242982218437623550 -314552625061808583 2681917529072...
output:
2
result:
ok answer is '2'
Test #85:
score: 0
Accepted
time: 707ms
memory: 99252kb
input:
9900 100000000 1000000000000000000 -24749998057009637 -54120098475586516 290733082309338238 -95493436674391964 -245152351750233044 -281529571150161978 57321993433342858 -149343532850446906 40029447272041352 402503913966978698 209679507955844761 -85618118336006306 94840306781771538 220962333074586974...
output:
2
result:
ok answer is '2'
Test #86:
score: 0
Accepted
time: 708ms
memory: 98132kb
input:
9882 100000000 1000000000000000000 27796492615692633 293478936327909839 296667341842430227 135229631230930201 36608368694220618 -178706867443560052 -19804666932414101 247910854928987646 443136808683716381 134388563968628449 379263280330571054 126225441655607468 -16227969425357178 -67052256180119485 ...
output:
2
result:
ok answer is '2'
Test #87:
score: 0
Accepted
time: 568ms
memory: 84960kb
input:
9128 100000000 1000000000000000000 44983391904281598 -103587074366134659 247727145511388819 -322935465904417424 146583609205463153 340724581193778867 -196696560346681569 -209136157596085341 -14765910843605875 198539800749664474 134513941674028780 -68671116960154610 190672222380382810 -47281253782547...
output:
2
result:
ok answer is '2'
Test #88:
score: 0
Accepted
time: 1086ms
memory: 101208kb
input:
10000 10000000000 1000000000000000000 448829100994176578 -286166827920301380 323271320308135871 454345157328184415 -335488965659123190 311870054829415007 -411323959953437888 -88928942592263842 -466083608257968195 355350311913972062 42830699372427095 -342007598004709033 53145657352728537 464127593180...
output:
2
result:
ok answer is '2'
Test #89:
score: 0
Accepted
time: 549ms
memory: 101040kb
input:
10000 10000000000 1000000000000000000 -9126062575833 -639 -705605341 -799031911 -70484639807 803 0 -18220991074 137513334147160 -6612399 27891226565534 -3302901491 328302 -24094543161451431 8894 -1518536 -3 30606 -55 -1173345523289660 74791901135 -22 437783492 -656 -326981198580 1902131312731116 117...
output:
2
result:
ok answer is '2'
Test #90:
score: 0
Accepted
time: 542ms
memory: 101212kb
input:
10000 10000000000 1000000000000000000 -64 -129 -56695 2655558002 623579881928434 -424993 33253435879 -9 -18139 2283240858253 -18 -24099467955 491984089273670 267 -1754619 0 15097342979012261 46339727 -202185388421931585 2617415085986030 -3 39 -33050 3622 6905775905391 -1516266147 1 291604685 3184602...
output:
2
result:
ok answer is '2'
Test #91:
score: 0
Accepted
time: 542ms
memory: 101352kb
input:
10000 10000000000 1000000000000000000 -40213326218 -49396 176201334 2590083700528 -44356 103853244 3981452146356 19950877229102 -290546339004 -7878317227641680 -1 -489476 84580540917 -425603680796420 -43289145031054553 -22247296944773599 168760657612932 -1941855 44332495 -13663602401 22453899 -46480...
output:
2
result:
ok answer is '2'
Test #92:
score: 0
Accepted
time: 559ms
memory: 101476kb
input:
10000 10000000000 1000000000000000000 -16222200231069 -31 -4549244643080095 -484783 29 -231973672 -24022543 -41919033376002 204037134365 -42156532087409 -10558844 5015452085681 2738821261 -7145403 497311673768 -3940549916135221 46 330293 -27070474780570 31 704415884 157047 328510 3539198250 -3381 -4...
output:
2
result:
ok answer is '2'
Test #93:
score: 0
Accepted
time: 582ms
memory: 101096kb
input:
10000 10000000000 1000000000000000000 -28400868336114545 -199243384 -406009452931321 -215979411346076 -193497957145923013 66190010785410 7863373251186144 -242405524195 -401 -453065285151 388599466634498 163449742 132394240 -167845396004285393 344244242 144892669811148354 -15025338706624 243 -4265895...
output:
2
result:
ok answer is '2'
Test #94:
score: 0
Accepted
time: 775ms
memory: 96628kb
input:
9869 10000000000 1000000000000000000 -164330509971071382 -243779666919281479 181069780000902592 -327548719207820199 -226546924115002065 -417474272179994572 8100005789836656 36806398384731625 -192038913414528807 60566123282812612 359693974724126786 180300991584277055 -175305819400786728 2293433722501...
output:
2
result:
ok answer is '2'
Test #95:
score: 0
Accepted
time: 761ms
memory: 98940kb
input:
9900 10000000000 1000000000000000000 -363851509208524421 -118301969337728345 -102923812105216870 108452046424456540 76201089363405849 -190411018117682363 -305572333427170602 -806487572535409 -79871026683531999 -21221452343602973 -440624508505050110 -42165438114485642 472480979582330881 -120942452543...
output:
2
result:
ok answer is '2'
Test #96:
score: 0
Accepted
time: 762ms
memory: 98952kb
input:
9882 10000000000 1000000000000000000 192259160138276505 -358283639720917307 -87302799541117028 79343226835429929 -326520670190857765 20326824684786020 -226957305689648908 -125021018954951445 -5829089267426670 27676458422082962 -108086338120709513 133049991693069756 15035855118824259 2379609011699999...
output:
2
result:
ok answer is '2'
Test #97:
score: 0
Accepted
time: 595ms
memory: 84912kb
input:
9128 10000000000 1000000000000000000 -39761615724076588 -116246039807551056 318061361553493284 214035368372329167 -365919887535642113 -76234424002009684 137428971829664871 -71581352579877497 30536130363378721 -65659718088531918 276847290887831948 146353311945606238 -222713744437832108 88536824884153...
output:
2
result:
ok answer is '2'
Test #98:
score: 0
Accepted
time: 1337ms
memory: 101044kb
input:
10000 1000000000000 1000000000000000000 7747515951470247 -99972040833815559 -445761147658029198 -153128265643019515 -19045154032893990 -188697498005469657 -70685458248509892 285772321755700890 -29535441821792108 -45718674672494598 -49479420056814739 282080673025776272 -412019479346154439 13625332505...
output:
4
result:
ok answer is '4'
Test #99:
score: 0
Accepted
time: 896ms
memory: 101316kb
input:
10000 1000000000000 1000000000000000000 -14883525328481 1789767376 24510366766169 85058791446 490102 179686 -846 -19838 1451695279 -694502 -166271 -18702851318 -1563963584002 25202846290986256 -9720388672292536 59886990383 8428435 -725603 148937259482156548 -40719998272566 -313424 -7 -18 -172886969 ...
output:
3
result:
ok answer is '3'
Test #100:
score: 0
Accepted
time: 709ms
memory: 101072kb
input:
10000 1000000000000 1000000000000000000 -8475138 755 7610912437518 -3898264 57999 -988 -130 223 -129029522167908 -25009421238 -1494 -43114357421 5 93602 9416249930023 8624388969 41233 -20 -271085121896 772 8299 -1130528869539 -46912892 7476612433126 493451548902551351 535988353 -13300344697564654 45...
output:
2
result:
ok answer is '2'
Test #101:
score: 0
Accepted
time: 802ms
memory: 101084kb
input:
10000 1000000000000 1000000000000000000 -4979273245 2 -2522831499699968 478302805237806 -2 396 -24171599524948 295447931477099095 -235474114329174 -1011434098511 7196 2123255765041713 2914901762773 -27139174086750 8208 2444126086979 19168848 -4831694054487643 98 -25365674537 -2242391857 2653182838 1...
output:
2
result:
ok answer is '2'
Test #102:
score: 0
Accepted
time: 993ms
memory: 101280kb
input:
10000 1000000000000 1000000000000000000 -22725187 -276727257200 -41656242 -336479 -436418 3324 10979314 18187709792792 -1237045140555778 -1751926340512 -1725871167481628 189578380347238780 360719951303 427539943683 -39789778 297543687578294121 -36593772184636 40 34904981767727 -43737249 -41 9828249 ...
output:
3
result:
ok answer is '3'
Test #103:
score: 0
Accepted
time: 1004ms
memory: 101040kb
input:
10000 1000000000000 1000000000000000000 280182642 62511 186522 133334 333193001968063994 279 -93819949223049688 264908 68 388 -178799445358 66 -75520569818730659 -89770305417213695 -405947 414 191671412925464039 428 258940152226 169 87126559782048 47 -483746277931560 48155412 263620265547439 2860947...
output:
4
result:
ok answer is '4'
Test #104:
score: 0
Accepted
time: 1146ms
memory: 98692kb
input:
9869 1000000000000 1000000000000000000 167835617881752527 -8537224287517663 -429560527630995513 361520415878089856 -286610426421863284 -150915254952023000 -255902956619442310 -85167329469526648 225944287762917900 -251961282843418011 11691609893474405 -236876789906713158 -300601662905899402 -18374392...
output:
2
result:
ok answer is '2'
Test #105:
score: 0
Accepted
time: 1145ms
memory: 99220kb
input:
9900 1000000000000 1000000000000000000 -124168544142581034 387055252373976735 92356440022733358 27873630526826975 191100811620779001 63093016011299153 -71956209107377005 -60557090623773321 136632277407112448 -39125656439049234 -466315299700674337 435734118099217606 -99339140103114631 672848296431365...
output:
2
result:
ok answer is '2'
Test #106:
score: 0
Accepted
time: 1166ms
memory: 98212kb
input:
9882 1000000000000 1000000000000000000 221199224475622403 60476874914164804 -54903492062089064 46425404350550592 112189989658565679 -8821745723813633 -54278067058852389 152464613297289709 96627782431499301 -164746247085744234 -241091171827984849 59656390758027974 -169147546511944617 4125250890729636...
output:
3
result:
ok answer is '3'
Test #107:
score: 0
Accepted
time: 977ms
memory: 84412kb
input:
9128 1000000000000 1000000000000000000 110067666648623394 -201179503596720045 196081259726012477 -318815728904429537 -272085936755020230 -451634037990960978 -180010244030985617 -163219781473617553 -401531490316729942 -257125131802295080 192478607187355103 280312830566190918 101958256452731281 444717...
output:
3
result:
ok answer is '3'
Test #108:
score: 0
Accepted
time: 1334ms
memory: 101280kb
input:
10000 100000000000000 1000000000000000000 417959414892731867 355013587349762468 -52893521334265831 164155556688242390 480826352427188644 152480062994425635 304060846804487545 -53860389953347224 -430563343408258768 -360866820251479527 351471844823927471 -182644408673106703 260550257530583790 -3283311...
output:
16
result:
ok answer is '16'
Test #109:
score: 0
Accepted
time: 1098ms
memory: 101136kb
input:
10000 100000000000000 1000000000000000000 107895513 26285541528 181413471710917708 -3530826912 -13032416869815223 -53036356 29004275702339488 -9 13825966 14577212700212 -2884003995886 415502306322547 6675 -25653594016 5343 -21385219536410 -6856 23690730812 6068 -809484530291 10213314147440 656047829...
output:
4
result:
ok answer is '4'
Test #110:
score: 0
Accepted
time: 1093ms
memory: 101040kb
input:
10000 100000000000000 1000000000000000000 1654530506 -7903350904061 -2545771346 2438727 -64228964 271336683513474495 3490216629 44465454641609 141546616686169 -4632 529 -690525716796 5513008494482 88 -47568506 -122997845 12231938 44471 6250 -1685 -3380228 919 -52430 -27720056 -31024079097 -215164643...
output:
4
result:
ok answer is '4'
Test #111:
score: 0
Accepted
time: 1091ms
memory: 101132kb
input:
10000 100000000000000 1000000000000000000 -196107182 -14915 -3537612302677 2492 46846067591643893 -2632 -22540 32324063916402615 407989843349176642 44864039 -431 -329603018987147561 -4896238930778 -237669921 -2025044 -18201878522868361 19830230 -295024764186538187 4 -28338094 -2333596932556 -4842149...
output:
5
result:
ok answer is '5'
Test #112:
score: 0
Accepted
time: 1098ms
memory: 101288kb
input:
10000 100000000000000 1000000000000000000 56599466019 -227077 5672263 -36769062 -16482809 482945747368826930 184461 -17648915 2033385652 31145333 10226887 47441593 -4189380881 26033279896950 -486764 -280094 -378468 2397 37943185 -4063054830759696 30357 38 -87647 -4344 514222848972267 382656138814601...
output:
7
result:
ok answer is '7'
Test #113:
score: 0
Accepted
time: 1116ms
memory: 101096kb
input:
10000 100000000000000 1000000000000000000 282035524 296513640 285663926785104066 223 -171 -435 83953003947777820 57196 270846904706 295686998835161 170420910 43845879293170905 312337 -481185 241456392260488 289012580 355 245904017 -482700516 -60524088712088968 49648520311239 247964749732062909 44486...
output:
7
result:
ok answer is '7'
Test #114:
score: 0
Accepted
time: 1479ms
memory: 98760kb
input:
9869 100000000000000 1000000000000000000 -39515326456454720 70104637696530381 -115472287210520409 98060741514614438 229727048947507752 243644420301471702 350500517342591801 388341490711866181 -257386880475903443 -488308480729620954 22268581462258984 -147803424544683514 -147888707459853600 1320281266...
output:
7
result:
ok answer is '7'
Test #115:
score: 0
Accepted
time: 1470ms
memory: 98936kb
input:
9900 100000000000000 1000000000000000000 -115295337185431076 5750718023320046 -14727571404631746 7398723080950864 -89477941709505655 37179714422530817 -192052891889223032 -244718920194393262 -75647942437643810 6740467260529870 -172484262677197811 -447458784691629509 23234766983193545 101538259244525...
output:
7
result:
ok answer is '7'
Test #116:
score: 0
Accepted
time: 1504ms
memory: 98764kb
input:
9882 100000000000000 1000000000000000000 316260932271805057 290241021926521833 -22426886880329227 35610672998915982 73109937111755616 60954711565249395 -265294914185812495 228552764645678450 38934392056966395 54028848459386808 18208621763470711 -1673793992732775 -18192120256075069 -22491227599136086...
output:
7
result:
ok answer is '7'
Test #117:
score: 0
Accepted
time: 1193ms
memory: 76272kb
input:
9128 100000000000000 1000000000000000000 223103390444564679 -79269063500145537 51335119147141316 193392755701585406 -49075254706495525 123491472812245052 2961876199214004 53425136263879378 312940249340027310 323276388167187825 246732745882839103 300845804132682525 334993899554011747 -256774596235204...
output:
5
result:
ok answer is '5'
Test #118:
score: 0
Accepted
time: 843ms
memory: 101252kb
input:
10000 10000000000000000 1000000000000000000 -326724489483498609 -471489327476217261 308197800996996074 454357526293549224 -153987590867883361 -428371131952576929 -11069364904560570 -410387795834781180 -457930952132467898 44291948924229979 194426304274787590 -435972167501401179 -169730762115166627 -4...
output:
520
result:
ok answer is '520'
Test #119:
score: 0
Accepted
time: 938ms
memory: 101120kb
input:
10000 10000000000000000 1000000000000000000 501870642945 8383910089542279 43265784454971678 -114193171 -1 2391 5992936030 0 -12725784664004004 107 4586642959370 -384 3635351243541 38375323 1560329483 6131701 235786773 -16 427286402719 -171472 5546 -1196576 -260660096036155 109476689663 -410756968 -2...
output:
113
result:
ok answer is '113'
Test #120:
score: 0
Accepted
time: 908ms
memory: 101096kb
input:
10000 10000000000000000 1000000000000000000 -938595296631 165128587499395 43416647 50769 1 -574 -1072066962458 183959 -4558 327 21218911 -50510308 1207492997 -408302407624 -216399348914499 -140418654928048 16261134414 690987160752713 40174245 -1002707 -20538350446991 -60058039847746029 489 -56704432...
output:
114
result:
ok answer is '114'
Test #121:
score: 0
Accepted
time: 915ms
memory: 101056kb
input:
10000 10000000000000000 1000000000000000000 -42398973 8267867162765 25806462 -201382297331 4748490158 -332510770286 39398680 1228 4130425399 394794 -309150666198 287214406489706251 -82754531629941868 11489391002259 4 2363258919543 4070278063790969 7887907 -29733873017857 -40 -64080226 -3550547793835...
output:
127
result:
ok answer is '127'
Test #122:
score: 0
Accepted
time: 929ms
memory: 101136kb
input:
10000 10000000000000000 1000000000000000000 -25630513 -58388488958117153 34840467 -130812 4579246924458702 2593159450394692 -3045750581 -39 35783746 4142557528 -235123792086 -987874262 -32807142166188 27586656 935148568025755 -1 -1311642893564817 -291997191985811581 1 865947649 425127 -26657818 31 -...
output:
150
result:
ok answer is '150'
Test #123:
score: 0
Accepted
time: 917ms
memory: 101476kb
input:
10000 10000000000000000 1000000000000000000 457319036859808186 -36086353145809265 -99 -23 -483952766 -170 95259186428 -380423 10800608 0 -351889865371025690 398221579157880648 108539163889 -442378371383297 471316671855977255 159775842 84452 -258 -124 321058034672721968 378833211644585064 -395 -297 3...
output:
165
result:
ok answer is '165'
Test #124:
score: 0
Accepted
time: 939ms
memory: 98632kb
input:
9869 10000000000000000 1000000000000000000 258722811787782573 -224948192178789438 110378821557736008 180470680240645248 50675095965582567 19826422109491473 -414203839426791017 -397110951704094381 -428325850213611399 63932483790117871 51758847955067360 203299706791050770 35171645264830480 -1021934873...
output:
209
result:
ok answer is '209'
Test #125:
score: 0
Accepted
time: 953ms
memory: 99404kb
input:
9900 10000000000000000 1000000000000000000 -128824905472499533 -118563014307814592 44812548477512055 128964962935994747 -413399251809061283 295920350364474888 -111755988740439463 -15067292322912097 -125693682993911350 -213924165551316842 26747154988530574 162087933395596466 -137170245368362663 -3188...
output:
202
result:
ok answer is '202'
Test #126:
score: 0
Accepted
time: 946ms
memory: 98968kb
input:
9882 10000000000000000 1000000000000000000 205304537921561170 -79916595250096264 37682717234606648 -420155913478806076 -143339039342248201 -106123766685101691 -143093865868895540 -341037909740513866 290564485636628506 328237160543723382 134121257835358677 -30567908212893474 -52883922735119160 -10325...
output:
211
result:
ok answer is '211'
Test #127:
score: 0
Accepted
time: 812ms
memory: 84736kb
input:
9128 10000000000000000 1000000000000000000 -279995491550703810 -80700235344503144 173166331368925497 214202174020010541 -197291946050637677 -185279449371349820 154962659705658541 -116654195995157980 146405012498662903 27270956833808755 320281610462646719 -270786830978056855 -100672813637492669 -7466...
output:
146
result:
ok answer is '146'
Test #128:
score: 0
Accepted
time: 732ms
memory: 101068kb
input:
10000 100000000000000000 1000000000000000000 -254291817188567458 307610428064054594 97727180070061270 108776352559865077 64117146643675216 158423987625526617 -8817818362242850 348836291046833586 -207843384965345581 -282195142699180410 -2334641568169497 -315827681908983372 -88971484179109125 -3872567...
output:
3068
result:
ok answer is '3068'
Test #129:
score: 0
Accepted
time: 790ms
memory: 101300kb
input:
10000 100000000000000000 1000000000000000000 -2291 21474 13955082580276720 -172285055410240030 1607137247414631 -51756335631694 -36230604276234 85564887 -43426029635 -9090422543510545 314080488295448 2829147995439279 -190979361486 -10 2972189 -15383696 45650658 1109 2194711 -1872784 13 27822773968 -...
output:
1149
result:
ok answer is '1149'
Test #130:
score: 0
Accepted
time: 841ms
memory: 101100kb
input:
10000 100000000000000000 1000000000000000000 637119516288809 -1828280066893784 396461871236317990 3092 49645229381662630 -326160 1174360328110934 -16749 -3203541312 1065 -49644821645882230 -47172944655190353 -28489101984335721 -32477539875367475 614 -25646961 7253554046182144 408543 -909679154 -8495...
output:
1169
result:
ok answer is '1169'
Test #131:
score: 0
Accepted
time: 834ms
memory: 101520kb
input:
10000 100000000000000000 1000000000000000000 38010327452084 -4274867 -418818019545 -43 39638043 313629036 3 211718745720 338153783746754959 -233653683 14 -411936171253813 444111325 27302 -203679000 53659408059819 -131 -388985 -1175228 -41288149258591 3589014 -361 39 -19049651 3 -328883 3666440478690...
output:
1236
result:
ok answer is '1236'
Test #132:
score: 0
Accepted
time: 800ms
memory: 101396kb
input:
10000 100000000000000000 1000000000000000000 -14 -2117 -33906267635756 -3903867330628842 -277012 -3066853164812251 2610 -2252043128 2536 78 -38499576 -3647 -440570559225702098 89952339089667488 875004272480584 -961233731243297 -192492260 -151 -243451 -149730060177 -33613368182915 -330089697452 -45 4...
output:
1341
result:
ok answer is '1341'
Test #133:
score: 0
Accepted
time: 795ms
memory: 101300kb
input:
10000 100000000000000000 1000000000000000000 61601455 -343708 228926 3 165142999868623238 -374463128 -73791532666314444 30 181442026462513 84463088 -309354462744 -414659850633164663 144676852 -268254094257533445 -357717730 11069532783256 207180980802 -32 -181164 -191983 30925937156510944 -3531193949...
output:
1442
result:
ok answer is '1442'
Test #134:
score: 0
Accepted
time: 786ms
memory: 98840kb
input:
9869 100000000000000000 1000000000000000000 180135447507299878 396529093194677 41287974832399376 272110768895818055 -133072739476518861 -24014243475483266 -82544026552237440 -31502413939737783 65239439176410346 -153622635170861938 34935750463175240 9394274717463113 356347971237576644 590112800776571...
output:
1857
result:
ok answer is '1857'
Test #135:
score: 0
Accepted
time: 781ms
memory: 98424kb
input:
9900 100000000000000000 1000000000000000000 352034211747652757 298072026521098399 -134588886016614324 138482679125382408 -170881727010902555 -283146383901168278 -282046240390795348 40295294519807469 145276267225510228 424414312517411612 3351215550191345 -276591220343031957 422929506816478383 3914663...
output:
1916
result:
ok answer is '1916'
Test #136:
score: 0
Accepted
time: 783ms
memory: 98668kb
input:
9882 100000000000000000 1000000000000000000 -208614567456358389 -240484901650897482 -7877450568639496 -222703942433450189 131278680303134298 -25015052369171355 56511035559295145 -54163305360747666 183219483803517234 118020535304381200 47233075448203380 118538099909767794 -20034889726705039 -70687428...
output:
1882
result:
ok answer is '1882'
Test #137:
score: 0
Accepted
time: 664ms
memory: 82588kb
input:
9128 100000000000000000 1000000000000000000 53928557793188321 -258730070927132147 88383388146715569 -265886894155029324 300874409107370366 -304580436252894512 338369810142192404 -101698419026464865 55239097557197055 -148163219393557352 80804694843433925 -190256795992895225 255114644609480225 1129791...
output:
1947
result:
ok answer is '1947'
Test #138:
score: 0
Accepted
time: 432ms
memory: 3980kb
input:
10000 1000000000000000000 1000000000000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
10000
result:
ok answer is '10000'
Extra Test:
score: 0
Extra Test Passed