求助为什么CE
  • 板块灌水区
  • 楼主yinbe2
  • 当前回复4
  • 已保存回复4
  • 发布时间2024/9/14 21:43
  • 上次更新2024/9/14 21:49:58
查看原帖
求助为什么CE
1285691
yinbe2楼主2024/9/14 21:43

肝了2周的文化课,结果回来连通过编译都做不到了......

#include<iostream>
#include<vector>
using namespace std;
int n,m;
struct path
{
	int v;
	long double w;
};
vector<path>r[3005];
vector<path>r_now[3005];
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int x,y;
		long double z;
		scanf("%d%d%Lf",&x,&y,&z);
		r[x].push_back({y,z});
	}
	long double l=0,r=10000000000;
	for(int i=1;i<=100;i++)
	{
		long double mid=(l+r)/2.0L;
		for(int j=1;j<=n;j++)r_now[j].clear();
		for(int j=1;j<=n;j++)
		{
			for(path p:r[j])
			{
				r_now[j].push_back({p.v,p.w-mid});
			}
		}
	}
	return 0;
}
2024/9/14 21:43
加载中...