QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#847378 | #171. Longest Shortest Path | Idtwtei | AC ✓ | 36ms | 4088kb | C++14 | 1.4kb | 2025-01-07 21:43:28 | 2025-01-07 21:43:28 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using db=double;
const int N=200+10,M=2e3+10,INF=1e9;
inline int chkmin(int &x,int y){ return y<x?x=y,1:0; }
#define gc getchar()
#define rd read()
inline int read(){
int x=0,f=0; char c=gc;
for(;c<'0'||c>'9';c=gc) f|=(c=='-');
for(;c>='0'&&c<='9';c=gc) x=(x<<1)+(x<<3)+(c^48);
return f?-x:x;
}
int n,m,s,t,P,maxflow=0,mincost=0; db ans=INF;
int head[N],ne[M*2],v[M*2],fl[M*2],w[M*2],tot=1;
void add(int x,int y,int f,int z){
ne[++tot]=head[x],head[x]=tot,v[tot]=y,fl[tot]=f,w[tot]=z;
ne[++tot]=head[y],head[y]=tot,v[tot]=x,fl[tot]=0,w[tot]=-z;
}
int dis[N],vis[N],pre[N],idx[N]; queue<int> q;
int spfa(){
for(int i=1;i<=n;++i) dis[i]=INF,vis[i]=0; q.push(s),dis[s]=0,vis[s]=1;
while(!q.empty()){
int u=q.front(); q.pop(),vis[u]=0;
for(int i=head[u];i;i=ne[i])
if(fl[i]&&chkmin(dis[v[i]],dis[u]+w[i]))
pre[v[i]]=u,idx[v[i]]=i,q.push(v[i]),vis[v[i]]=1;
}
return dis[t]!=INF;
}
int main(){
n=rd,m=rd,P=rd,s=rd,t=rd;
for(int i=1,x,y,z,f;i<=m;++i) x=rd,y=rd,z=rd,f=rd,add(x,y,f,z);
while(spfa()){
int dflow=INF; for(int i=t;i!=s;i=pre[i]) dflow=min(dflow,fl[idx[i]]);
maxflow+=dflow,mincost+=dis[t]*dflow;
for(int i=t;i!=s;i=pre[i]) fl[idx[i]]-=dflow,fl[idx[i]^1]+=dflow;
ans=min(ans,(db)(P+mincost)/maxflow);
}
printf("%.6lf\n", ans);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 4084kb
input:
3 2 3 1 3 1 2 2 1 2 3 1 2
output:
6.000000
result:
ok found '6.0000000', expected '6.0000000', error '0.0000000'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3972kb
input:
3 3 2 1 3 1 2 1 1 2 3 1 1 1 3 1 1
output:
2.500000
result:
ok found '2.5000000', expected '2.5000000', error '0.0000000'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3948kb
input:
3 4 5 1 3 1 2 1 2 2 3 1 1 1 3 3 2 1 3 4 1
output:
4.250000
result:
ok found '4.2500000', expected '4.2500000', error '0.0000000'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
4 5 1 1 4 1 2 2 2 1 3 4 4 2 3 1 1 2 4 4 4 3 4 2 2
output:
6.000000
result:
ok found '6.0000000', expected '6.0000000', error '0.0000000'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
4 5 2 1 4 1 2 2 2 1 3 4 4 2 3 1 1 2 4 4 4 3 4 2 2
output:
6.333333
result:
ok found '6.3333330', expected '6.3333333', error '0.0000001'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
4 5 5 1 4 1 2 2 2 1 3 4 4 2 3 1 1 2 4 4 4 3 4 2 2
output:
7.250000
result:
ok found '7.2500000', expected '7.2500000', error '0.0000000'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3912kb
input:
2 10 453 1 2 1 2 4 7 1 2 9 8 1 2 6 4 1 2 1 4 1 2 4 5 1 2 9 2 1 2 10 4 1 2 5 6 1 2 5 1 1 2 8 3
output:
16.318182
result:
ok found '16.3181820', expected '16.3181818', error '0.0000000'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
2 10 140 2 1 2 1 4 10 2 1 7 3 2 1 1 3 2 1 5 1 2 1 1 7 2 1 1 1 2 1 5 8 2 1 5 7 2 1 10 4 2 1 9 4
output:
7.300000
result:
ok found '7.3000000', expected '7.3000000', error '0.0000000'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
2 10 221 1 2 1 2 10 2 1 2 10 4 1 2 6 3 1 2 8 5 1 2 1 1 1 2 9 3 1 2 5 4 1 2 4 7 1 2 3 4 1 2 2 5
output:
11.500000
result:
ok found '11.5000000', expected '11.5000000', error '0.0000000'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3992kb
input:
2 10 68 2 1 2 1 10 4 2 1 1 2 2 1 4 7 2 1 2 3 2 1 3 2 2 1 5 8 2 1 7 4 2 1 7 8 2 1 9 8 2 1 8 5
output:
6.818182
result:
ok found '6.8181820', expected '6.8181818', error '0.0000000'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
2 10 356 1 2 1 2 4 10 1 2 6 8 1 2 8 5 1 2 6 6 1 2 1 8 1 2 9 1 1 2 2 10 1 2 5 7 1 2 5 8 1 2 9 6
output:
9.942029
result:
ok found '9.9420290', expected '9.9420290', error '0.0000000'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
10 90 3561 2 1 2 1 10 2 2 1 2 7 2 1 6 4 2 1 8 3 2 1 3 9 2 4 6 3 4 1 4 6 2 4 5 4 4 1 3 9 2 4 10 7 4 1 1 7 2 4 7 1 4 1 8 3 2 4 7 5 4 1 7 9 2 3 9 8 3 1 2 1 2 3 2 3 3 1 10 8 2 3 8 7 3 1 8 7 2 3 3 5 3 1 9 5 2 3 7 5 3 1 3 7 2 10 5 6 10 1 10 4 2 10 8 3 10 1 5 2 2 10 6 1 10 1 3 2 2 10 3 8 10 1 10 7 2 10 6 9...
output:
23.967871
result:
ok found '23.9678710', expected '23.9678715', error '0.0000000'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
10 90 973 4 6 4 6 10 9 4 6 6 2 4 6 3 1 4 6 10 9 4 6 9 10 4 2 7 6 2 6 5 1 4 2 7 8 2 6 4 9 4 2 9 3 2 6 3 6 4 2 7 6 2 6 8 8 4 2 6 9 2 6 10 3 4 5 10 6 5 6 5 10 4 5 6 9 5 6 4 10 4 5 6 10 5 6 10 4 4 5 9 3 5 6 7 6 4 5 3 7 5 6 3 10 4 7 8 9 7 6 2 7 4 7 4 5 7 6 4 3 4 7 8 10 7 6 3 3 4 7 6 7 7 6 6 4 4 7 1 1 7 6...
output:
12.804124
result:
ok found '12.8041240', expected '12.8041237', error '0.0000000'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
10 90 3646 1 5 1 5 1 2 1 5 8 2 1 5 4 2 1 5 3 7 1 5 9 2 1 3 9 8 3 5 3 10 1 3 5 6 3 5 10 3 1 3 8 5 3 5 5 4 1 3 10 6 3 5 7 6 1 3 1 4 3 5 5 6 1 7 8 2 7 5 2 2 1 7 5 1 7 5 2 5 1 7 3 8 7 5 3 1 1 7 3 3 7 5 3 4 1 7 4 10 7 5 9 9 1 6 1 5 6 5 5 10 1 6 3 3 6 5 9 5 1 6 8 10 6 5 1 7 1 6 5 5 6 5 1 5 1 6 9 6 6 5 2 6...
output:
24.833333
result:
ok found '24.8333330', expected '24.8333333', error '0.0000000'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3972kb
input:
10 90 620 5 6 5 6 4 7 5 6 3 5 5 6 10 5 5 6 1 8 5 6 6 9 5 8 1 3 8 6 5 5 5 8 7 8 8 6 2 9 5 8 1 5 8 6 7 2 5 8 5 1 8 6 1 3 5 8 1 7 8 6 4 7 5 1 7 4 1 6 10 3 5 1 8 3 1 6 4 7 5 1 2 3 1 6 10 9 5 1 3 6 1 6 1 10 5 1 2 9 1 6 3 7 5 4 3 6 4 6 4 9 5 4 3 5 4 6 6 1 5 4 8 10 4 6 1 1 5 4 10 6 4 6 3 8 5 4 8 5 4 6 1 1 ...
output:
8.723881
result:
ok found '8.7238810', expected '8.7238806', error '0.0000000'
Test #16:
score: 0
Accepted
time: 1ms
memory: 3716kb
input:
10 90 35 4 10 4 10 7 2 4 10 4 10 4 10 9 4 4 10 7 7 4 10 1 4 4 9 3 10 9 10 2 10 4 9 4 5 9 10 9 3 4 9 8 3 9 10 10 4 4 9 4 9 9 10 3 9 4 9 3 3 9 10 1 5 4 3 6 2 3 10 7 3 4 3 7 7 3 10 1 5 4 3 2 1 3 10 1 7 4 3 8 8 3 10 8 1 4 3 3 7 3 10 9 4 4 8 5 7 8 10 9 9 4 8 5 3 8 10 1 4 4 8 2 7 8 10 5 3 4 8 10 6 8 10 8 ...
output:
3.275862
result:
ok found '3.2758620', expected '3.2758621', error '0.0000000'
Test #17:
score: 0
Accepted
time: 19ms
memory: 3956kb
input:
199 1980 60477 15 119 15 131 5 5 15 131 5 8 15 147 7 5 15 23 3 8 15 115 4 3 15 118 2 8 118 10 8 10 15 118 9 4 118 75 10 4 15 118 2 1 118 7 7 4 15 118 1 8 118 10 9 8 15 118 8 9 118 131 2 4 15 133 10 3 133 131 6 6 15 133 5 4 133 131 5 10 15 133 9 5 133 147 9 9 15 133 10 7 133 49 5 2 15 133 10 4 133 18...
output:
217.774648
result:
ok found '217.7746480', expected '217.7746479', error '0.0000000'
Test #18:
score: 0
Accepted
time: 20ms
memory: 3720kb
input:
199 1980 16622 179 78 179 44 5 3 179 105 4 4 179 132 1 4 179 99 3 10 179 187 4 1 179 123 7 5 123 99 5 4 179 123 3 7 123 35 6 3 179 123 3 8 123 136 7 4 179 123 4 9 123 44 4 7 179 123 5 9 123 35 4 10 179 36 10 9 36 105 6 5 179 36 3 6 36 132 2 9 179 36 3 2 36 99 7 1 179 36 2 9 36 187 2 8 179 36 10 10 3...
output:
94.475921
result:
ok found '94.4759210', expected '94.4759207', error '0.0000000'
Test #19:
score: 0
Accepted
time: 16ms
memory: 3764kb
input:
199 1980 85940 177 59 177 136 10 7 177 79 9 10 177 159 7 8 177 79 2 10 177 163 10 1 177 83 7 3 83 1 7 4 177 83 9 1 83 138 4 5 177 83 4 1 83 185 5 10 177 83 4 10 83 1 10 7 177 83 8 10 83 164 4 3 177 156 10 2 156 111 4 5 177 156 10 5 156 185 9 1 177 156 8 5 156 111 7 6 177 156 2 1 156 95 8 3 177 156 7...
output:
314.046440
result:
ok found '314.0464400', expected '314.0464396', error '0.0000000'
Test #20:
score: 0
Accepted
time: 13ms
memory: 3780kb
input:
199 1980 60371 96 183 96 128 6 9 96 175 6 7 96 113 4 6 96 6 1 6 96 180 6 7 96 48 4 5 48 180 8 3 96 48 8 9 48 113 6 1 96 48 6 6 48 180 6 4 96 48 9 9 48 29 6 10 96 48 5 5 48 68 9 2 96 41 4 6 41 29 8 2 96 41 8 1 41 128 4 9 96 41 8 3 41 181 4 4 96 41 5 3 41 68 4 4 96 41 1 9 41 191 6 5 96 26 4 6 26 68 4 ...
output:
232.316923
result:
ok found '232.3169230', expected '232.3169231', error '0.0000000'
Test #21:
score: 0
Accepted
time: 18ms
memory: 3768kb
input:
199 1980 14534 84 135 84 121 1 9 84 183 7 2 84 121 3 5 84 87 2 9 84 43 9 7 84 75 10 9 75 100 6 1 84 75 8 4 75 123 7 1 84 75 4 7 75 122 8 2 84 75 1 8 75 122 2 2 84 75 6 2 75 100 9 2 84 27 9 2 27 43 3 8 84 27 2 6 27 197 10 5 84 27 4 3 27 158 1 7 84 27 8 4 27 158 6 7 84 27 8 7 27 58 6 2 84 63 6 1 63 12...
output:
88.143713
result:
ok found '88.1437130', expected '88.1437126', error '0.0000000'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
2 10 446 1 2 1 2 6 6 1 2 5 10 1 2 5 9 1 2 6 1 1 2 10 10 1 2 3 5 1 2 9 2 1 2 1 6 1 2 8 5 1 2 3 2
output:
13.714286
result:
ok found '13.7142860', expected '13.7142857', error '0.0000000'
Test #23:
score: 0
Accepted
time: 0ms
memory: 4084kb
input:
2 10 322 1 2 1 2 1 5 1 2 10 7 1 2 7 6 1 2 1 2 1 2 6 10 1 2 6 2 1 2 10 1 1 2 1 5 1 2 5 9 1 2 10 7
output:
11.907407
result:
ok found '11.9074070', expected '11.9074074', error '0.0000000'
Test #24:
score: 0
Accepted
time: 0ms
memory: 4088kb
input:
2 10 78 1 2 1 2 8 3 1 2 3 8 1 2 2 4 1 2 1 2 1 2 1 3 1 2 1 1 1 2 1 7 1 2 10 7 1 2 4 7 1 2 9 6
output:
4.718750
result:
ok found '4.7187500', expected '4.7187500', error '0.0000000'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3964kb
input:
2 10 95 2 1 2 1 3 8 2 1 1 2 2 1 6 3 2 1 5 7 2 1 7 10 2 1 3 10 2 1 4 6 2 1 9 6 2 1 9 2 2 1 2 3
output:
6.000000
result:
ok found '6.0000000', expected '6.0000000', error '0.0000000'
Test #26:
score: 0
Accepted
time: 0ms
memory: 3912kb
input:
2 10 416 2 1 2 1 1 8 2 1 2 7 2 1 9 2 2 1 10 10 2 1 9 5 2 1 8 4 2 1 10 8 2 1 4 4 2 1 2 7 2 1 7 1
output:
13.392857
result:
ok found '13.3928570', expected '13.3928571', error '0.0000000'
Test #27:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
2 10 103 2 1 2 1 10 8 2 1 5 7 2 1 8 2 2 1 1 1 2 1 3 10 2 1 4 5 2 1 8 3 2 1 4 1 2 1 9 10 2 1 9 2
output:
8.034483
result:
ok found '8.0344830', expected '8.0344828', error '0.0000000'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
2 10 109 2 1 2 1 7 3 2 1 6 1 2 1 2 7 2 1 7 1 2 1 10 8 2 1 3 2 2 1 8 8 2 1 3 6 2 1 4 1 2 1 3 6
output:
7.518519
result:
ok found '7.5185190', expected '7.5185185', error '0.0000001'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3992kb
input:
2 10 347 2 1 2 1 2 5 2 1 5 9 2 1 7 6 2 1 9 4 2 1 9 2 2 1 4 4 2 1 3 8 2 1 8 9 2 1 3 7 2 1 9 1
output:
11.636364
result:
ok found '11.6363640', expected '11.6363636', error '0.0000000'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
2 10 405 2 1 2 1 1 10 2 1 1 9 2 1 4 8 2 1 8 10 2 1 1 9 2 1 10 5 2 1 9 3 2 1 5 3 2 1 6 5 2 1 8 3
output:
10.630769
result:
ok found '10.6307690', expected '10.6307692', error '0.0000000'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3984kb
input:
2 10 8 1 2 1 2 2 3 1 2 10 10 1 2 5 3 1 2 9 5 1 2 4 10 1 2 1 8 1 2 1 9 1 2 7 1 1 2 7 2 1 2 9 6
output:
1.470588
result:
ok found '1.4705880', expected '1.4705882', error '0.0000002'
Test #32:
score: 0
Accepted
time: 32ms
memory: 3972kb
input:
199 1980 53462 95 20 95 30 10 4 95 49 6 6 95 179 1 7 95 90 4 4 95 31 1 9 95 160 5 2 160 29 1 4 95 160 8 9 160 157 8 7 95 160 7 5 160 57 7 5 95 160 5 6 160 143 10 1 95 160 2 6 160 176 4 1 95 114 7 4 114 195 4 1 95 114 10 10 114 90 3 6 95 114 5 10 114 29 5 3 95 114 5 5 114 80 10 7 95 114 5 3 114 97 5 ...
output:
54.455432
result:
ok found '54.4554320', expected '54.4554318', error '0.0000000'
Test #33:
score: 0
Accepted
time: 36ms
memory: 3720kb
input:
199 1980 38765 115 117 115 76 2 2 115 180 2 4 115 74 4 3 115 181 10 10 115 30 7 4 115 101 5 2 101 42 8 7 115 101 6 10 101 75 4 5 115 101 2 9 101 74 3 6 115 101 9 4 101 144 3 3 115 101 6 1 101 118 3 10 115 4 7 1 4 46 10 5 115 4 10 9 4 34 6 10 115 4 6 9 4 168 1 5 115 4 2 10 4 143 10 8 115 4 3 3 4 163 ...
output:
43.938102
result:
ok found '43.9381020', expected '43.9381018', error '0.0000000'
Test #34:
score: 0
Accepted
time: 33ms
memory: 3756kb
input:
199 1980 42881 68 189 68 98 1 9 68 183 5 2 68 194 7 6 68 91 6 1 68 61 2 3 68 74 2 7 74 6 5 10 68 74 5 10 74 41 10 10 68 74 1 9 74 32 7 2 68 74 7 10 74 113 4 5 68 74 7 8 74 169 6 7 68 81 10 1 81 100 2 9 68 81 5 10 81 60 10 10 68 81 1 10 81 136 1 9 68 81 8 1 81 33 2 7 68 81 7 6 81 187 6 5 68 73 6 6 73...
output:
45.850806
result:
ok found '45.8508060', expected '45.8508065', error '0.0000000'
Test #35:
score: 0
Accepted
time: 34ms
memory: 3972kb
input:
199 1980 6865 15 92 15 33 8 6 15 130 7 10 15 21 3 4 15 62 2 2 15 168 4 3 15 104 4 4 104 123 5 3 15 104 10 1 104 53 10 5 15 104 2 5 104 96 9 2 15 104 7 10 104 11 9 6 15 104 4 10 104 135 1 5 15 177 1 8 177 181 8 5 15 177 6 6 177 118 1 4 15 177 6 9 177 16 10 2 15 177 9 10 177 16 9 5 15 177 4 5 177 30 1...
output:
20.088235
result:
ok found '20.0882350', expected '20.0882353', error '0.0000000'
Test #36:
score: 0
Accepted
time: 36ms
memory: 3908kb
input:
199 1980 96274 80 55 80 68 6 7 80 175 2 1 80 76 7 4 80 92 5 8 80 171 9 5 80 140 5 9 140 58 8 3 80 140 7 9 140 196 9 2 80 140 7 9 140 69 9 9 80 140 3 7 140 123 6 10 80 140 6 2 140 171 7 6 80 147 4 6 147 44 4 5 80 147 1 1 147 162 9 2 80 147 2 6 147 92 6 7 80 147 4 8 147 182 3 8 80 147 4 9 147 75 5 3 8...
output:
81.992681
result:
ok found '81.9926810', expected '81.9926813', error '0.0000000'
Test #37:
score: 0
Accepted
time: 11ms
memory: 3972kb
input:
199 1980 3945 106 46 106 11 8 4 106 78 5 5 106 78 2 4 106 81 8 1 106 13 7 3 106 71 4 3 71 47 5 1 106 71 8 4 71 47 9 2 106 71 10 2 71 187 5 1 106 71 5 5 71 146 10 4 106 71 9 5 71 45 5 2 106 31 4 1 31 62 1 3 106 31 4 4 31 81 5 4 106 31 5 3 31 141 9 5 106 31 6 5 31 11 3 3 106 31 8 1 31 45 5 5 106 34 10...
output:
64.833333
result:
ok found '64.8333330', expected '64.8333333', error '0.0000000'
Test #38:
score: 0
Accepted
time: 7ms
memory: 3908kb
input:
199 1980 7802 175 3 175 102 6 5 175 183 10 2 175 87 4 1 175 169 7 4 175 87 5 5 175 119 10 5 119 74 10 1 175 119 10 3 119 151 2 5 175 119 2 5 119 28 6 4 175 119 7 3 119 74 9 3 175 119 4 2 119 40 5 1 175 88 7 4 88 151 4 2 175 88 2 1 88 195 4 3 175 88 10 1 88 40 9 2 175 88 10 5 88 157 4 1 175 88 7 1 88...
output:
88.994872
result:
ok found '88.9948720', expected '88.9948718', error '0.0000000'
Test #39:
score: 0
Accepted
time: 12ms
memory: 4016kb
input:
199 1980 15828 112 38 112 56 6 2 112 19 4 5 112 26 2 1 112 165 10 2 112 191 5 5 112 143 4 2 143 158 4 4 112 143 5 5 143 180 1 2 112 143 1 1 143 104 2 5 112 143 4 3 143 104 4 5 112 143 4 3 143 191 6 4 112 33 1 4 33 159 4 1 112 33 10 2 33 133 10 2 112 33 10 2 33 158 9 5 112 33 10 5 33 165 9 5 112 33 7...
output:
131.592391
result:
ok found '131.5923910', expected '131.5923913', error '0.0000000'
Test #40:
score: 0
Accepted
time: 11ms
memory: 3716kb
input:
199 1980 16078 189 39 189 124 9 1 189 179 2 5 189 124 6 4 189 135 8 1 189 53 3 2 189 192 8 5 192 184 6 2 189 192 6 1 192 105 5 4 189 192 7 4 192 179 5 1 189 192 1 4 192 53 2 4 189 192 5 5 192 43 10 1 189 160 9 3 160 105 10 1 189 160 3 3 160 184 9 4 189 160 6 5 160 43 9 2 189 160 4 2 160 105 1 2 189 ...
output:
131.438776
result:
ok found '131.4387760', expected '131.4387755', error '0.0000000'
Test #41:
score: 0
Accepted
time: 10ms
memory: 4032kb
input:
199 1980 11693 37 58 37 177 8 3 37 27 9 5 37 115 10 1 37 20 8 3 37 20 7 1 37 100 3 4 100 119 2 4 37 100 10 1 100 27 7 1 37 100 9 2 100 103 10 1 37 100 10 4 100 27 1 3 37 100 10 1 100 126 10 3 37 114 10 1 114 103 1 4 37 114 1 1 114 119 8 1 37 114 1 4 114 53 4 1 37 114 8 5 114 119 4 4 37 114 5 5 114 1...
output:
110.351648
result:
ok found '110.3516480', expected '110.3516484', error '0.0000000'
Test #42:
score: 0
Accepted
time: 21ms
memory: 3780kb
input:
199 1980 43616 89 144 89 172 5 1 89 186 4 8 89 140 3 8 89 190 1 1 89 29 1 7 89 35 3 8 35 190 1 10 89 35 4 6 35 121 1 2 89 35 2 4 35 131 3 3 89 35 1 9 35 111 4 9 89 35 2 9 35 69 2 7 89 86 2 8 86 16 2 3 89 86 1 10 86 194 2 5 89 86 3 10 86 23 3 7 89 86 4 6 86 80 4 1 89 86 5 1 86 154 3 2 89 27 3 5 27 11...
output:
39.303217
result:
ok found '39.3032170', expected '39.3032170', error '0.0000000'
Test #43:
score: 0
Accepted
time: 22ms
memory: 3900kb
input:
199 1980 8520 88 105 88 20 4 8 88 71 1 7 88 20 2 4 88 108 1 5 88 34 2 8 88 124 1 3 124 19 4 6 88 124 5 10 124 34 3 10 88 124 2 9 124 112 1 5 88 124 3 7 124 34 4 6 88 124 1 2 124 59 4 5 88 143 2 7 143 37 5 3 88 143 5 7 143 25 5 1 88 143 1 2 143 144 5 6 88 143 4 5 143 147 2 9 88 143 2 9 143 45 1 3 88 ...
output:
15.632387
result:
ok found '15.6323870', expected '15.6323868', error '0.0000000'
Test #44:
score: 0
Accepted
time: 26ms
memory: 4012kb
input:
199 1980 24301 150 190 150 26 4 8 150 20 3 5 150 26 3 7 150 174 2 10 150 17 3 3 150 152 3 1 152 60 3 7 150 152 4 6 152 26 2 8 150 152 2 10 152 166 1 9 150 152 2 5 152 26 5 4 150 152 2 2 152 114 4 5 150 130 1 10 130 102 5 6 150 130 4 9 130 20 2 2 150 130 4 6 130 125 1 6 150 130 1 9 130 40 1 10 150 13...
output:
25.645711
result:
ok found '25.6457110', expected '25.6457105', error '0.0000000'
Test #45:
score: 0
Accepted
time: 26ms
memory: 3752kb
input:
199 1980 26615 180 134 180 81 1 6 180 22 5 1 180 58 1 2 180 169 5 2 180 81 2 2 180 190 5 2 190 151 3 3 180 190 3 2 190 21 3 3 180 190 4 8 190 184 4 8 180 190 1 2 190 109 2 5 180 190 5 3 190 81 3 3 180 101 1 10 101 127 5 4 180 101 5 4 101 11 4 7 180 101 1 2 101 53 5 1 180 101 3 5 101 11 1 6 180 101 2...
output:
27.844780
result:
ok found '27.8447800', expected '27.8447802', error '0.0000000'
Test #46:
score: 0
Accepted
time: 27ms
memory: 4012kb
input:
199 1980 45845 96 171 96 148 4 4 96 55 1 8 96 33 2 6 96 27 2 9 96 36 4 8 96 30 1 3 30 56 3 1 96 30 5 8 30 66 5 3 96 30 4 3 30 167 4 8 96 30 1 1 30 149 5 10 96 30 5 4 30 163 5 9 96 3 5 8 3 137 3 5 96 3 3 7 3 94 5 5 96 3 5 9 3 74 1 9 96 3 5 9 3 178 3 10 96 3 1 2 3 166 5 4 96 95 5 10 95 48 3 3 96 95 3 ...
output:
42.415954
result:
ok found '42.4159540', expected '42.4159544', error '0.0000000'
Test #47:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
15 30 365 1 14 1 14 4 1 1 14 5 10 1 14 8 3 1 14 4 5 1 14 1 8 1 14 4 6 1 14 4 9 1 14 3 6 1 14 1 2 1 14 7 10 8 4 3 5 5 2 2 2 4 3 9 7 8 12 8 10 12 2 10 8 5 6 7 10 2 15 10 4 10 12 9 2 13 6 3 5 9 13 1 9 3 5 2 1 11 6 9 3 9 4 4 3 5 9 2 1 15 3 4 5 9 13 2 4 10 9 6 2 2 7 5 10 2 12 4 7 5 11 1 8
output:
10.350000
result:
ok found '10.3500000', expected '10.3500000', error '0.0000000'
Test #48:
score: 0
Accepted
time: 0ms
memory: 3964kb
input:
15 30 417 7 11 7 11 8 9 7 11 2 8 7 11 9 7 7 11 8 8 7 11 8 7 7 11 3 7 7 11 7 5 7 11 5 3 7 11 7 9 7 11 8 1 2 1 4 4 2 4 9 5 13 1 8 9 6 9 6 9 10 15 9 4 8 14 6 2 4 5 6 2 4 9 3 4 9 15 9 6 12 6 4 7 5 14 5 1 3 1 4 1 14 9 9 1 5 10 9 6 13 8 1 6 5 3 2 8 5 13 3 8 1 15 8 6 5 2 1 9 10 2 5 2
output:
12.968750
result:
ok found '12.9687500', expected '12.9687500', error '0.0000000'
Test #49:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
15 30 297 12 6 12 6 4 10 12 6 5 9 12 6 2 2 12 6 3 3 12 6 5 10 12 6 3 2 12 6 9 10 12 6 9 1 12 6 9 10 12 6 4 6 11 3 4 2 1 3 1 4 13 11 9 6 13 2 10 4 4 13 6 2 8 7 1 2 11 10 3 4 13 5 2 9 7 10 5 10 2 15 9 7 13 10 8 8 1 7 8 6 9 14 8 3 5 1 2 6 9 14 7 10 4 13 7 7 3 15 5 5 15 13 5 1 4 13 5 7 7 15 1 10
output:
10.539683
result:
ok found '10.5396830', expected '10.5396825', error '0.0000000'
Test #50:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
15 30 353 8 2 8 2 1 7 8 2 1 10 8 2 5 9 8 2 3 8 8 2 10 5 8 2 2 6 8 2 1 7 8 2 8 7 8 2 3 9 8 2 1 10 12 3 7 9 3 4 8 9 7 11 10 4 6 5 4 6 10 7 2 4 4 10 9 9 14 13 5 8 3 9 7 4 15 9 2 3 4 3 4 9 12 13 1 4 6 13 8 9 13 5 4 4 5 15 6 7 4 3 2 6 12 5 9 5 6 3 3 6 7 1 7 7 11 15 3 1 5 3 7 10
output:
7.500000
result:
ok found '7.5000000', expected '7.5000000', error '0.0000000'
Test #51:
score: 0
Accepted
time: 0ms
memory: 4084kb
input:
15 30 472 9 11 9 11 2 7 9 11 10 2 9 11 7 2 9 11 8 5 9 11 8 3 9 11 1 3 9 11 2 7 9 11 6 3 9 11 8 10 9 11 4 6 4 13 4 4 12 6 1 2 2 10 10 1 14 4 4 8 2 6 5 9 3 15 4 6 1 3 10 10 8 13 7 3 12 2 6 7 4 6 1 2 7 5 9 4 5 14 3 2 13 8 1 9 1 7 1 4 4 15 8 9 4 8 7 4 5 12 5 2 3 1 2 1 13 7 9 5 13 10 4 1
output:
15.062500
result:
ok found '15.0625000', expected '15.0625000', error '0.0000000'
Test #52:
score: 0
Accepted
time: 19ms
memory: 4064kb
input:
200 2000 19681 116 43 116 29 5 2 116 101 8 8 116 29 8 2 116 195 7 3 116 92 1 4 116 131 10 7 131 90 1 10 116 131 2 3 131 186 1 7 116 131 10 8 131 101 1 1 116 131 6 1 131 102 6 7 116 131 4 3 131 93 2 7 116 149 6 2 149 92 3 2 116 149 4 6 149 92 5 5 116 149 3 4 149 102 1 4 116 149 1 1 149 184 2 5 116 14...
output:
97.369501
result:
ok found '97.3695010', expected '97.3695015', error '0.0000000'
Test #53:
score: 0
Accepted
time: 17ms
memory: 3972kb
input:
200 2000 1991 99 118 99 1 5 1 99 1 1 10 99 180 9 9 99 130 8 5 99 129 3 2 99 149 1 4 149 68 5 3 99 149 9 8 149 130 2 9 99 149 4 3 149 130 5 5 99 149 8 6 149 68 8 3 99 149 9 7 149 49 5 4 99 159 9 1 159 180 8 3 99 159 5 10 159 68 2 9 99 159 3 4 159 161 2 4 99 159 8 6 159 68 10 7 99 159 5 5 159 49 1 10 ...
output:
38.433962
result:
ok found '38.4339620', expected '38.4339623', error '0.0000000'
Test #54:
score: 0
Accepted
time: 16ms
memory: 3780kb
input:
200 2000 70823 142 71 142 105 1 7 142 105 10 1 142 145 6 1 142 198 9 2 142 160 7 5 142 97 7 5 97 181 4 8 142 97 10 4 97 23 2 5 142 97 10 2 97 23 2 5 142 97 5 10 97 131 6 9 142 97 5 8 97 125 6 2 142 81 7 5 81 23 4 8 142 81 3 1 81 125 5 6 142 81 2 2 81 140 6 10 142 81 4 2 81 15 8 7 142 81 9 1 81 15 5 ...
output:
265.165584
result:
ok found '265.1655840', expected '265.1655844', error '0.0000000'
Test #55:
score: 0
Accepted
time: 17ms
memory: 4016kb
input:
200 2000 10402 174 181 174 126 1 6 174 5 8 9 174 82 3 8 174 94 10 2 174 50 8 7 174 183 2 6 183 199 10 7 174 183 1 3 183 134 9 2 174 183 6 1 183 50 8 5 174 183 7 6 183 50 3 1 174 183 10 1 183 5 2 2 174 64 5 3 64 78 4 6 174 64 2 9 64 94 8 3 174 64 5 10 64 80 8 3 174 64 7 9 64 200 4 2 174 64 10 8 64 80...
output:
69.624242
result:
ok found '69.6242420', expected '69.6242424', error '0.0000000'
Test #56:
score: 0
Accepted
time: 15ms
memory: 4064kb
input:
200 2000 11600 122 162 122 18 2 7 122 45 7 9 122 93 6 3 122 155 6 9 122 45 6 3 122 9 1 8 9 157 4 2 122 9 10 9 9 155 10 6 122 9 7 6 9 157 2 7 122 9 7 8 9 18 4 9 122 9 9 7 9 155 5 10 122 27 3 5 27 42 1 3 122 27 7 2 27 138 4 3 122 27 8 2 27 18 5 9 122 27 2 10 27 157 1 7 122 27 1 5 27 42 7 8 122 96 7 6 ...
output:
71.103542
result:
ok found '71.1035420', expected '71.1035422', error '0.0000000'