/ Randle /

记录详情

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);
                     ^
# 状态 耗时 内存占用
#1 Wrong Answer 3ms 312.0 KiB
#2 Wrong Answer 4ms 308.0 KiB
#3 Wrong Answer 4ms 324.0 KiB
#4 Wrong Answer 11ms 312.0 KiB
#5 Wrong Answer 2ms 312.0 KiB
#6 Wrong Answer 2ms 312.0 KiB
#7 Wrong Answer 6ms 312.0 KiB
#8 Wrong Answer 4ms 316.0 KiB
#9 Wrong Answer 6ms 316.0 KiB
#10 Wrong Answer 16ms 308.0 KiB

代码

#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;
}

信息

递交者
类型
递交
题目
图上价值(原创)
题目数据
下载
语言
C++
递交时间
2017-10-04 16:02:51
评测时间
2017-10-04 16:04:21
评测机
分数
0
总耗时
63ms
峰值内存
324.0 KiB