Wrong Answer
/in/foo.cc: In function 'int main()': /in/foo.cc:14:21: warning: use of 'll' length modifier with 'f' type character has either no effect or undefined behavior [-Wformat=] printf("%.2llf",ans); ^
代码
#include<bits/stdc++.h>
int main()
{
int n,m;
double ans=0,f[1001];
std::cin>>n>>m;
for(int i=1;i<=n;i++)std::cin>>f[i];
for(int i=1;i<=m;i++)
{
int u,v;double w;
std::cin>>u>>v>>w;
ans=std::max(ans,(f[u]+f[v])/w);
}
printf("%.2llf",ans);
return 0;
}