求救,WA
  • 板块P8550 冬之花
  • 楼主XPKAAA
  • 当前回复0
  • 已保存回复0
  • 发布时间2022/9/26 21:51
  • 上次更新2023/10/27 09:51:14
查看原帖
求救,WA
474307
XPKAAA楼主2022/9/26 21:51
#include<bits/stdc++.h>
using namespace std;
int t;
int main()
{
	cin>>t;
	while(t--)
	{
		int n=0,x=0,a[6]={0,0,0,0,0,0},x1=0;
		bool v=false;
		cin>>n>>x;
		for(int i=1; i<=n; i++)
		{
			cin>>a[i];
			x1=x;
			x1+=a[i];
			if(x1<x&&x%a[i]!=0)
			{
				v=true;
				break;
			}
			else if(x1>x)
			{
				v=true;
				break;
			}
		}
		if(v)
		{
			cout<<"Yes"<<endl;
		}
		else
		{
			cout<<"No"<<endl;
		}
	}
	return 0;
} 
2022/9/26 21:51
加载中...