论P1085 [NOIP2004 普及组] 不高兴的津津
  • 板块灌水区
  • 楼主zhaocaimaolaile
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/1/24 15:31
  • 上次更新2024/1/24 15:33:29
查看原帖
论P1085 [NOIP2004 普及组] 不高兴的津津
666358
zhaocaimaolaile楼主2024/1/24 15:31

有没有大佬来帮忙看看哪错了qwq 100分但是WA了1个点


#include <bits/stdc++.h>
using namespace std;
struct Node{
	int x,y,time;
}a[10];
bool flag = true;
int sum;
int main(){
    for(int i = 1 ; i <= 7 ; ++ i){
    	cin >> a[i].x >> a[i].y;
		a[i].time = a[i].x + a[i].y; 
		if(flag && a[i].time > 8){
			flag = false;
			sum = i;
		}
	}
	if(flag)
		cout << 0;
	else
		cout << sum;
    return 0;
 }
2024/1/24 15:31
加载中...