萌新刚来洛谷,求教教这个题为什么是 WA100。
查看原帖
萌新刚来洛谷,求教教这个题为什么是 WA100。
1123328
He8_楼主2023/10/1 11:21

如题,为什么还可以有“WA 100” 这种评测,是洛谷出 Bug 了吗?算通过还是没通过?

Code:

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int s1[8],s2[8];//schedule1表示学校上课时间0~7,schedule2表示妈妈安排时间0~7
	int max=0,yy=0;//max为最不开心的某天上课时间,yy是最抑郁的那天 
	 for(int i=1;i<=7;++i)
	 {
	 	cin>>s1[i]>>s2[i];
	 }
	 for(int j=1;j<=7;++j)
	 {
	 	if(s1[j]+s2[j]>=8)
	 		if(s1[j]+s2[j]>max)
	 		{max=s1[j]+s2[j];
	 		yy=j;}
	 }
	 cout<<yy;
	 return 0;
}
2023/10/1 11:21
加载中...