QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#742612#9623. 合成大西瓜miyou379#Compile Error//C++17604b2024-11-13 16:54:342024-11-13 16:54:39

Judging History

你现在查看的是最新测评结果

  • [2024-11-13 16:54:39]
  • 评测
  • [2024-11-13 16:54:34]
  • 提交

answer

#include<bitsdc++.h>
using namespace std;
int ans,n,m,a[100005],in[100005],x[100005],y[100005];
struct edge{int to,next;
}e[100005];
priority_queue<int>q;
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;++i)scanf("%d",&a[i]);
	for(int i=1;i<=m;++i)
	{
		scanf("%d%d",&x[i],&y[i]);
		in[x[i]]++;in[y[i]]++;
	}
	for(int i=1;i<=n;++i)if(in[i]!=1)ans=max(ans,a[i]);
	for(int i=1;i<=n;++i)
	{
		if(in[i]==1)q.push(a[i]);
	}
	if(!q.empty())
	{
		int res=1061109567;
		res=min(res,q.top());q.pop();
		res=min(res,q.top());q.pop();
		ans=max(ans,res);
	}
	printf("%d\n",ans);
}

詳細信息

answer.code:1:9: fatal error: bitsdc++.h: No such file or directory
    1 | #include<bitsdc++.h>
      |         ^~~~~~~~~~~~
compilation terminated.