QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#733157 | #5540. City Hall | Suhy | AC ✓ | 271ms | 32760kb | C++20 | 4.8kb | 2024-11-10 17:28:58 | 2024-11-10 17:28:59 |
Judging History
answer
#include <bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
const int maxn = 100005;
class Line
{
public:
static ll L, R;
#define int ld
int ax, ay, bx, by;
ld eps = 1e-9;
Line (int Ax, int Ay, int Bx, int By)
{
if(Ax > Bx)
{
swap(Ax, Bx);
swap(Ay, By);
}
ax = Ax; ay = Ay; bx = Bx; by = By ;
}
Line (int k, int b)
{ax = L; bx = R; ay = k * L + b; by = k * R + b;}
bool chk(int l, int r)
{return ax <= l && r <= bx;}
ld getval(int x)
{
if(ax == bx) return max(ay, by);
return (ld) ay + (ld) (x - ax) / (bx - ax) * (by - ay);
}
// a.comp(b, x) => a(x) > b(x), a 被优先选中
bool comp(Line b, int x)
{return (getval(x) - b.getval(x) < -eps);}
#undef int
};
#define int long long
class LiCT
{
public:
static int L, R;
vector <Line> lin;
vector <int> lzt, lson, rson;
int cnt = -1;
int CrtP()
{
lzt.push_back(-1);
lson.push_back(0);
rson.push_back(0);
return ++ cnt;
}
LiCT()
{CrtP();}
int Gson(vector <int> &vec, int in)
{
if(vec[in] == 0)
vec[in] = CrtP();
return vec[in];
}
void inst(int in, int l, int r, int x)
{
int mid = (l + r) >> 1;
if(!lin[x].chk(l, r))
{
if(lin[x].ax <= mid)
inst(Gson(lson, in), l, mid, x);
if(lin[x].bx > mid)
inst(Gson(rson, in), mid + 1, r, x);
return;
}
if(lzt[in] == -1)
{
lzt[in] = x;
return;
}
if(lin[x].comp(lin[lzt[in]], mid))
swap(lzt[in], x);
if(l == r) return;
if(lin[x].comp(lin[lzt[in]], l))
inst(Gson(lson, in), l, mid, x);
if(lin[x].comp(lin[lzt[in]], r))
inst(Gson(rson, in), mid + 1, r, x);
}
int ask(int in, int l, int r, int x)
{
if(l == r) return lzt[in];
int mid = (l + r) >> 1;
int ans = -1;
if(x <= mid && lson[in])
ans = ask(lson[in], l, mid, x);
else if(x > mid && rson[in])
ans = ask(rson[in], mid + 1, r, x);
if(lzt[in] != -1 && (ans == -1 || lin[lzt[in]].comp(lin[ans], x)))
ans = lzt[in];
return ans;
}
void ins(Line &a)
{
lin.push_back(a);
inst(0, L, R, lin.size() - 1);
}
//ask 返回 vector lin 中答案的编号
//使用 ins() 进行插入
//根为 0 号节点
};
int read()
{
int x = 0, fl = 0;
char c = 0;
while(c < '0' || '9' < c)
c = getchar(), fl |= (c == '-');
while('0' <= c && c <= '9')
x = x * 10 + c - '0', c = getchar();
return (fl ? -x : x);
}
void dij(vector <pair <int, int>> pic[], int sp[], int n, int s, int inf)
{
#define st first
#define nd second
#define pii pair <int, int>
int vis[n + 3] = {0};
priority_queue <pii, vector <pii>, greater <pii> > que;
for(int i = 1; i <= n; i ++)
sp[i] = inf;
sp[s] = 0;
que.push({0, s});
while(que.size())
{
int in = que.top().nd;
que.pop();
if(vis[in]) continue;
vis[in] = 1;
for(auto i : pic[in])
if(sp[i.st] > sp[in] + i.nd)
que.push({sp[i.st] = sp[in] + i.nd, i.st});
}
}
int inf = 100000000000000000LL;
int n, m, s, t;
int sps[maxn], spt[maxn];
int h[maxn];
vector <pii> pic[maxn];
int LiCT::L = 0;
int Line::L = 0;
int LiCT::R = 100000;
int Line::R = 100000;
int calc(int x, int y)
{
return (h[x] - h[y]) * (h[x] - h[y]);
}
signed main()
{
cin>>n>>m>>s>>t;
for(int i = 1; i <= n; i ++)
h[i] = read();
for(int i = 1; i <= m; i ++)
{
int u = read(), v = read();
pic[u].push_back({v, calc(u, v)});
pic[v].push_back({u, calc(u, v)});
}
dij(pic, sps, n, s, inf);
dij(pic, spt, n, t, inf);
ld ans = inf;
for(auto i : pic[s]) ans = min(ans, (ld) spt[i.st]);
for(auto i : pic[t]) ans = min(ans, (ld) sps[i.st]);
//cout<<ans<<endl;
for(int i = 1; i <= n; i ++)
{
if(i == s || i == t) continue;
LiCT lct;
for(auto j : pic[i])
{
Line lin(-h[j.st], (ld) spt[j.st] + (ld) 0.5 * h[j.st] * h[j.st]);
lct.ins(lin);
}
for(auto j : pic[i])
{
int li = lct.ask(0, 0, 100000, h[j.st]);
//cout<<li<<endl;
ld lans = lct.lin[li].getval(h[j.st]);
ans = min(ans, (ld)sps[j.st] + (ld) 0.5 * h[j.st] * h[j.st] + lans);
}
}
cout<<fixed<<setprecision(10)<<ans<<endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 7852kb
input:
5 6 1 3 5 100 8 2 10 1 2 2 3 2 5 1 4 4 5 3 5
output:
4.5000000000
result:
ok found '4.5000000', expected '4.5000000', error '0.0000000'
Test #2:
score: 0
Accepted
time: 1ms
memory: 5804kb
input:
5 5 1 5 1 2 10 10 4 1 2 2 3 2 4 3 5 4 5
output:
3.0000000000
result:
ok found '3.0000000', expected '3.0000000', error '0.0000000'
Test #3:
score: 0
Accepted
time: 0ms
memory: 6096kb
input:
5 4 1 4 8 8 8 8 100 1 2 2 3 3 4 4 5
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #4:
score: 0
Accepted
time: 1ms
memory: 5928kb
input:
2 1 1 2 0 100000 1 2
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #5:
score: 0
Accepted
time: 271ms
memory: 22696kb
input:
632 199396 167 549 22513 93521 41403 35441 97617 53210 62622 4751 81863 14470 2994 93092 40432 30872 34423 36577 92540 92961 4110 14691 83321 10680 89112 80890 31108 24492 8973 42636 33792 27400 82361 85003 68940 31221 48625 276 52755 6649 34381 54399 6063 22628 17715 54052 58175 86609 82622 29917 9...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #6:
score: 0
Accepted
time: 239ms
memory: 18320kb
input:
600 179700 396 574 83219 94660 9266 1939 32637 7117 33396 76947 42614 41001 87026 60210 25868 36044 35276 6147 36198 25195 50981 68230 32619 62563 28509 46643 43304 36195 99724 30903 77230 57923 36939 81397 17374 90947 48623 38120 48914 96481 98146 31707 9427 58735 82986 31328 94507 69081 51908 4188...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #7:
score: 0
Accepted
time: 199ms
memory: 20976kb
input:
100000 200000 66364 98254 48399 8344 35365 18555 95271 13113 75220 25062 73969 71647 58212 68205 36310 45496 6965 59960 71592 81323 44341 95796 61521 63298 77830 16145 73103 83477 85246 53680 67289 68475 64978 43576 18969 28023 22848 55164 31276 12825 70999 49142 77203 40134 88148 59337 2357 70519 8...
output:
1019365473.0000000000
result:
ok found '1019365473.0000000', expected '1019365473.0000000', error '0.0000000'
Test #8:
score: 0
Accepted
time: 187ms
memory: 21804kb
input:
100000 200000 21412 38673 24050 75090 3692 20770 26840 57646 61096 3013 66291 73437 83126 67768 92979 69169 9389 70447 17151 74737 33407 3128 78504 52736 45853 27090 64395 24808 83577 24168 38576 37445 71022 40066 34908 90579 58370 31436 69812 39811 83370 50254 6518 72740 79316 67247 22759 65630 564...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #9:
score: 0
Accepted
time: 197ms
memory: 30980kb
input:
100000 200000 75283 45047 38593 5224 81049 28255 11324 43744 51172 60916 67783 62336 96782 50029 48743 18780 32756 4774 32484 95733 17336 38046 98145 49655 68352 58308 21594 64540 11719 57827 30130 70076 95133 29886 93864 22677 28498 60413 44567 78935 64952 88954 85786 34019 75159 69192 15108 54645 ...
output:
6010044.5000000000
result:
ok found '6010044.5000000', expected '6010044.5000000', error '0.0000000'
Test #10:
score: 0
Accepted
time: 205ms
memory: 21072kb
input:
100000 200000 50293 63302 78731 76313 68601 46867 82806 57914 88495 43602 96202 44956 6593 96560 38650 61918 69911 48730 38668 8874 44449 25084 68496 18095 74789 52252 36631 68127 37908 63134 61923 68030 83186 81174 68083 78584 33622 74426 34099 32484 80162 10371 55894 65989 6374 76587 87442 50870 3...
output:
1926329544.0000000000
result:
ok found '1926329544.0000000', expected '1926329544.0000000', error '0.0000000'
Test #11:
score: 0
Accepted
time: 212ms
memory: 27932kb
input:
100000 200000 81105 2350 9856 14867 98102 45742 76449 20173 90566 85519 8273 40573 98784 21094 38040 75579 21248 37555 32846 95358 92476 76093 99209 81806 76912 80248 93022 87883 85938 20897 20561 19811 59752 42986 36831 82149 73443 66562 96573 52522 68268 28832 46601 39663 61155 69950 13823 36697 9...
output:
1746699958.0000000000
result:
ok found '1746699958.0000000', expected '1746699958.0000000', error '0.0000000'
Test #12:
score: 0
Accepted
time: 93ms
memory: 14540kb
input:
100000 99999 27499 37224 50619 546 34928 55892 95127 83241 56167 1411 64361 65091 69529 50805 18412 47138 24827 35822 53959 16642 73725 69209 23403 82125 61003 92477 62663 85774 63819 6812 16133 1840 57576 82545 80082 56754 8563 84660 57303 4822 32294 74865 59555 75395 7723 97981 7648 7614 39995 373...
output:
1479019958.0000000000
result:
ok found '1479019958.0000000', expected '1479019958.0000000', error '0.0000000'
Test #13:
score: 0
Accepted
time: 62ms
memory: 17148kb
input:
100000 99999 57731 17782 55279 41436 80902 80600 52243 45703 2077 49134 70618 42937 43184 28403 94643 67960 79090 32887 25781 5974 92239 19915 75711 29995 69433 77210 10715 1476 69243 17422 48392 62130 70202 86152 46473 68342 55024 12135 59955 12466 35433 70410 30778 17201 73299 49206 22581 40598 68...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #14:
score: 0
Accepted
time: 144ms
memory: 26872kb
input:
100000 99999 73910 93392 4580 92394 65741 34067 1188 10312 33818 93538 87742 1111 15249 59319 21489 41536 67159 80368 70337 71510 11825 37146 18247 31165 85234 45308 15731 10225 14274 82315 1863 67625 34018 45831 689 40731 74176 34334 70252 97644 93344 19553 54498 92189 83921 76131 84274 23497 64458...
output:
3378244.0000000000
result:
ok found '3378244.0000000', expected '3378244.0000000', error '0.0000000'
Test #15:
score: 0
Accepted
time: 1ms
memory: 6108kb
input:
100 183 81 44 0 0 0 4 8 4 0 0 0 0 4 4 4 4 0 4 4 0 4 0 4 0 0 6 4 0 0 0 4 4 4 4 4 4 0 0 0 5 0 2 4 0 0 6 4 6 4 4 0 4 4 4 0 4 0 4 0 4 0 0 0 7 0 0 0 0 4 4 4 4 0 0 4 0 0 4 0 4 0 0 0 0 0 0 4 0 4 0 4 4 0 0 3 0 1 1 0 0 7 4 66 97 46 99 7 64 87 90 3 66 25 64 64 68 64 72 67 87 26 66 5 62 52 87 8 64 33 87 73 87 ...
output:
13.5000000000
result:
ok found '13.5000000', expected '13.5000000', error '0.0000000'
Test #16:
score: 0
Accepted
time: 86ms
memory: 14696kb
input:
100000 99999 64074 96505 87418 33380 56655 42173 14145 36884 88525 91703 32550 41412 10624 35541 75270 87482 89617 49204 95521 36870 23040 19122 45883 72176 77268 60938 43360 31393 41224 5541 1555 72954 17703 34387 76958 86889 81999 93835 41791 94592 31395 60191 63924 80563 97171 64312 35003 41389 6...
output:
166359263584683.5000000000
result:
ok found '166359263584683.5000000', expected '166359263584683.5000000', error '0.0000000'
Test #17:
score: 0
Accepted
time: 82ms
memory: 20852kb
input:
100000 99999 88380 67661 73690 45219 23449 94 36824 93501 71010 86368 12960 94218 79374 95892 28750 18934 24272 69473 9900 12603 76711 12755 80707 72244 39071 57774 90780 82096 97084 71883 89596 59808 88278 82572 33044 75860 35253 93116 15659 95455 70702 58215 21854 94912 31241 12700 62422 56855 167...
output:
83071594558471.0000000000
result:
ok found '83071594558471.0000000', expected '83071594558471.0000000', error '0.0000000'
Test #18:
score: 0
Accepted
time: 91ms
memory: 14588kb
input:
100000 100010 64126 38643 55943 69335 62259 29792 75712 5556 66520 71232 17214 8175 83946 21298 2748 4606 52410 11773 88159 62700 71479 43982 12643 86187 61874 74905 58717 90378 49384 37111 50036 93032 15096 88591 28024 68493 4935 18502 20192 38935 75642 11949 42940 67063 10549 86100 77272 3831 2401...
output:
3598368952.5000000000
result:
ok found '3598368952.5000000', expected '3598368952.5000000', error '0.0000000'
Test #19:
score: 0
Accepted
time: 59ms
memory: 17084kb
input:
100000 100010 76009 97186 92478 22197 4787 98363 97387 34621 82159 6166 34590 80362 82719 69113 42086 15870 34844 95143 37657 64828 33035 41403 937 46399 28187 30272 90708 68051 73149 99073 98655 84502 15748 81590 166 11703 86628 27221 94411 44507 66470 58358 66499 12649 91802 70136 68925 58126 2209...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #20:
score: 0
Accepted
time: 128ms
memory: 27200kb
input:
100000 100010 17565 75183 2273 78296 41453 33152 40043 38312 4482 40321 32077 43836 79290 22567 85829 62629 83177 57330 43660 29449 9553 25787 19436 32715 90543 8988 77271 41663 2450 21861 56185 9660 22831 13107 80512 22338 38799 25051 62528 8598 91751 63576 84408 69306 55096 44440 21176 36761 73983...
output:
294534244.0000000000
result:
ok found '294534244.0000000', expected '294534244.0000000', error '0.0000000'
Test #21:
score: 0
Accepted
time: 91ms
memory: 14476kb
input:
100000 100010 79088 29655 10111 23706 69968 13551 93385 18770 63341 62081 61633 65278 1436 30430 71492 70993 30596 14011 78568 51878 12631 2768 13498 69712 39399 48840 49365 98922 25339 11166 20739 42619 9085 12674 37395 95923 47257 37924 2590 4428 99287 82141 93786 73432 76078 52325 37752 66326 886...
output:
58683899623619.5000000000
result:
ok found '58683899623619.5000000', expected '58683899623619.5000000', error '0.0000000'
Test #22:
score: 0
Accepted
time: 104ms
memory: 20848kb
input:
100000 100010 79582 20455 59680 66730 69257 77941 60879 68783 89871 35627 54218 35986 9034 5093 49186 66859 94761 78455 26776 63541 34642 25062 81905 86274 8849 20638 19560 51606 12528 25893 48494 49864 59694 35348 16927 45638 91177 70508 5233 71907 8047 6743 34522 70833 12333 88858 91636 57623 3920...
output:
10053363692537.0000000000
result:
ok found '10053363692537.0000000', expected '10053363692537.0000000', error '0.0000000'
Test #23:
score: 0
Accepted
time: 120ms
memory: 16360kb
input:
83109 122412 13645 76100 9 5 99996 7 8 1 99993 99996 8 2 100000 6 99996 8 99996 99994 7 99996 99990 9 99994 99990 99996 100000 7 7 8 4 99999 99999 99992 7 7 99997 6 7 99997 2 99995 99998 7 99996 9 8 4 99998 99997 10 99998 99997 99996 99993 7 99995 99993 99996 99995 99996 4 7 4 0 99996 99994 4 99995 ...
output:
136.0000000000
result:
ok found '136.0000000', expected '136.0000000', error '0.0000000'
Test #24:
score: 0
Accepted
time: 149ms
memory: 21156kb
input:
89553 196251 12873 48091 9 99997 99994 99999 2 2 99999 0 10 9 10 99996 99997 2 99998 99996 99997 9 99994 99992 5 99998 99990 9 99995 99993 8 99991 5 99992 5 8 99995 99998 99997 2 10 9 1 99991 99994 8 99995 6 99994 99992 99999 99997 99995 99994 99997 10 99990 100000 1 99996 99998 99997 3 99994 99994 ...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #25:
score: 0
Accepted
time: 111ms
memory: 28504kb
input:
78397 122757 17055 17709 99996 99996 99998 8 99990 100000 2 99991 3 99995 99999 6 2 99998 5 99997 99998 99990 99999 99994 9 10 99997 5 99998 3 0 7 99994 1 4 99996 8 99999 5 3 10 4 5 4 3 7 99995 9 2 9 7 6 99994 99995 3 0 7 99993 99999 99995 0 99991 100000 99999 10 99993 1 99996 5 99998 5 99997 99996 ...
output:
1.0000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #26:
score: 0
Accepted
time: 69ms
memory: 14416kb
input:
100000 99999 68334 56498 100000 100000 0 0 0 0 100000 100000 100000 0 100000 100000 100000 100000 0 100000 0 0 0 100000 100000 100000 0 0 0 0 100000 100000 0 0 100000 100000 0 100000 100000 0 100000 0 0 0 100000 100000 0 100000 0 100000 100000 0 100000 0 0 0 100000 100000 0 100000 100000 0 100000 0 ...
output:
999970000000000.0000000000
result:
ok found '999970000000000.0000000', expected '999970000000000.0000000', error '0.0000000'
Test #27:
score: 0
Accepted
time: 144ms
memory: 18988kb
input:
63927 177863 47793 17216 9 2 2 3 10 10 9 2 99995 0 10 99991 99997 99991 99990 99992 0 9 4 3 3 7 2 99999 99996 99990 99991 99997 99999 99995 3 99999 99991 99996 99993 3 0 99999 99994 99992 1 2 99995 10 5 99990 99990 2 10 99990 1 99992 9 10 99999 9 5 99997 99999 6 1 99990 99996 0 0 99997 99990 99990 9...
output:
61.0000000000
result:
ok found '61.0000000', expected '61.0000000', error '0.0000000'
Test #28:
score: 0
Accepted
time: 161ms
memory: 24560kb
input:
94185 169435 45348 73894 100000 3 99992 6 7 99998 9 99997 99993 99995 99996 99999 1 4 7 10 99996 0 5 99996 99992 99993 99993 8 99999 8 99997 100000 6 99996 100000 99990 100000 8 99990 99997 99995 5 5 99995 99998 9 99996 100000 99991 99997 9 100000 3 99995 99991 4 99996 99999 1 8 100000 99995 7 10 99...
output:
4998000288.0000000000
result:
ok found '4998000288.0000000', expected '4998000288.0000000', error '0.0000000'
Test #29:
score: 0
Accepted
time: 61ms
memory: 16932kb
input:
100000 99999 72799 93666 962 754 286 174 88 253 66 995 11 32 242 861 991 617 590 617 685 227 954 917 885 363 522 371 744 519 538 880 610 35 240 775 268 115 110 45 983 251 444 39 772 345 660 735 234 200 583 640 273 262 998 593 712 869 832 638 948 846 902 183 383 565 713 789 284 746 806 879 817 130 81...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #30:
score: 0
Accepted
time: 247ms
memory: 32272kb
input:
100000 200000 16773 2984 321 839 485 567 17 714 314 307 903 509 140 42 173 654 550 279 346 850 612 715 719 247 173 409 622 185 137 366 918 887 434 507 873 457 349 553 878 275 278 271 819 225 273 576 697 874 659 697 396 182 419 199 485 498 631 143 821 137 635 838 852 955 933 209 857 10 534 983 179 70...
output:
7056.0000000000
result:
ok found '7056.0000000', expected '7056.0000000', error '0.0000000'
Test #31:
score: 0
Accepted
time: 61ms
memory: 17560kb
input:
100000 99999 90345 42775 447 495 708 606 668 221 382 886 768 506 678 553 384 348 806 509 876 241 766 151 103 980 245 326 937 425 966 432 671 500 560 12 567 812 122 536 368 650 60 664 434 137 367 987 565 966 601 766 770 892 957 179 174 933 256 690 775 183 947 808 814 681 75 275 36 350 269 983 432 867...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #32:
score: 0
Accepted
time: 260ms
memory: 32580kb
input:
100000 200000 22643 13191 433 626 806 235 33 889 524 14 933 609 477 594 754 608 563 736 115 972 873 143 717 262 751 21 1 311 384 844 280 242 645 283 51 480 500 879 186 792 719 974 820 437 993 867 847 701 660 497 200 234 470 107 359 562 265 121 285 396 524 987 901 83 82 437 151 211 87 419 976 422 555...
output:
121.5000000000
result:
ok found '121.5000000', expected '121.5000000', error '0.0000000'
Test #33:
score: 0
Accepted
time: 67ms
memory: 16940kb
input:
100000 99999 54697 24800 684 207 414 408 750 843 153 69 781 566 754 275 785 915 806 565 29 870 228 560 98 87 824 599 598 906 830 133 364 752 857 532 674 334 292 903 582 137 328 595 385 722 35 278 846 889 512 184 239 665 307 729 831 764 923 196 94 569 627 519 120 411 45 915 431 296 337 38 520 67 545 ...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #34:
score: 0
Accepted
time: 262ms
memory: 32760kb
input:
100000 200000 908 79920 722 99 511 428 260 295 176 886 953 932 880 935 345 745 898 964 486 684 623 53 889 846 664 453 114 504 731 545 207 783 352 533 562 361 438 798 373 950 344 878 912 868 340 716 345 555 100 322 456 803 541 846 211 668 949 167 934 49 257 960 6 765 902 319 992 121 801 645 404 81 40...
output:
14921.5000000000
result:
ok found '14921.5000000', expected '14921.5000000', error '0.0000000'
Test #35:
score: 0
Accepted
time: 59ms
memory: 16916kb
input:
100000 99999 62694 27269 701 288 676 954 583 953 317 521 740 841 51 272 589 728 583 285 44 361 3 112 880 816 688 616 616 492 507 247 905 627 475 728 792 400 200 684 578 831 808 959 404 912 280 397 387 573 483 26 153 154 647 845 600 913 625 612 53 133 400 45 282 798 211 545 144 242 250 516 203 765 61...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #36:
score: 0
Accepted
time: 257ms
memory: 32656kb
input:
100000 200000 29326 14010 613 277 965 580 240 68 630 133 287 867 444 618 444 810 129 950 318 717 768 959 604 715 233 384 191 30 409 363 762 796 517 241 666 446 107 252 977 127 112 65 726 691 391 370 373 535 210 525 592 837 766 33 172 557 734 968 32 897 106 234 585 329 703 215 704 126 453 366 787 463...
output:
2520.5000000000
result:
ok found '2520.5000000', expected '2520.5000000', error '0.0000000'
Test #37:
score: 0
Accepted
time: 206ms
memory: 20940kb
input:
100000 200000 15282 15013 97131 32499 87123 45307 36889 1839 82510 93479 11257 48445 33293 80917 53855 86990 36325 21070 17199 35032 72963 89839 40971 27554 97520 44319 73729 27754 28903 88021 51936 83835 95344 1819 18981 35270 3946 82048 54162 53373 99265 16598 91863 42781 46783 99192 36640 31567 3...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #38:
score: 0
Accepted
time: 62ms
memory: 17036kb
input:
100000 99999 5412 85833 37 720 604 373 780 126 895 521 8 642 80 678 65 578 118 890 493 26 700 959 773 30 265 877 647 954 331 635 36 622 191 879 958 372 462 539 249 16 900 706 325 987 607 353 206 582 582 560 271 292 857 988 538 341 361 879 560 393 846 303 366 782 735 261 926 27 299 50 436 192 712 366...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #39:
score: 0
Accepted
time: 256ms
memory: 32028kb
input:
100000 200000 14339 67116 455 133 727 839 39 666 682 349 256 350 584 98 602 330 837 352 553 125 419 475 577 422 738 10 917 724 193 726 716 280 581 741 470 101 129 60 932 751 12 619 379 148 896 972 17 730 426 295 287 465 77 667 192 837 60 316 632 578 368 775 458 734 293 457 150 350 710 627 716 756 56...
output:
16978.0000000000
result:
ok found '16978.0000000', expected '16978.0000000', error '0.0000000'
Test #40:
score: 0
Accepted
time: 66ms
memory: 16924kb
input:
100000 99999 42271 57899 491 734 209 125 792 107 267 80 985 489 149 768 371 510 47 361 38 811 997 683 88 549 588 760 110 906 252 48 978 999 820 109 842 791 561 453 74 582 691 472 256 458 564 388 153 233 318 354 67 968 469 610 491 379 291 257 925 545 760 846 715 626 143 122 592 213 89 988 417 569 475...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #41:
score: 0
Accepted
time: 262ms
memory: 31248kb
input:
100000 200000 85537 89574 119 876 189 290 834 929 137 957 79 773 357 588 895 20 670 156 687 542 189 503 145 194 30 112 734 48 10 533 551 455 899 320 760 400 193 684 558 112 874 427 343 919 961 885 668 392 406 859 452 750 86 243 40 620 937 12 631 60 521 479 905 443 577 450 949 517 927 717 488 330 504...
output:
7320.5000000000
result:
ok found '7320.5000000', expected '7320.5000000', error '0.0000000'
Test #42:
score: 0
Accepted
time: 135ms
memory: 20560kb
input:
100000 200000 83294 30329 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 1...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #43:
score: 0
Accepted
time: 122ms
memory: 29972kb
input:
100000 200000 53612 5203 29718 39445 13717 46676 37546 2427 39065 16485 3432 17200 2566 16359 4702 13839 36828 49968 33795 44035 30150 14582 38518 17681 13855 28231 16415 15218 15225 43031 23036 2709 22378 21308 46258 21584 43436 21303 9635 16036 5851 24184 25827 8114 44904 36679 46585 2702 11202 29...
output:
257640146.0000000000
result:
ok found '257640146.0000000', expected '257640146.0000000', error '0.0000000'
Test #44:
score: 0
Accepted
time: 196ms
memory: 30808kb
input:
100000 200000 6131 14949 44603 69405 45992 3722 76719 588 89017 35099 65865 86571 84657 25136 76026 54708 34272 48314 72808 35904 40641 39547 83098 50093 22511 86573 57770 9224 26815 6506 1908 45628 86969 85983 9154 36017 8620 7060 98894 85135 40183 80892 90378 62233 24784 34178 32198 6255 17979 650...
output:
17787307.0000000000
result:
ok found '17787307.0000000', expected '17787307.0000000', error '0.0000000'
Test #45:
score: 0
Accepted
time: 86ms
memory: 31256kb
input:
100000 200000 77448 52716 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 1...
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #46:
score: 0
Accepted
time: 94ms
memory: 28888kb
input:
100000 200000 31143 67168 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 1...
output:
10000000000.0000000000
result:
ok found '10000000000.0000000', expected '10000000000.0000000', error '0.0000000'