统计关于jinjin的不开心天数中最不开心的那一天。。。
最近感觉可能是水平上升了。。。做这种题感觉太没意思了。。。
#include <iostream>
using namespace std;
struct pos{int a;int b;
}P[7];
int main(){while(1){int n;cin>>n;int max = 0,temp =0;for(int i=0;i<n;i++){cin>>P[i].a>>P[i].b;int count = P[i].a+P[i].b;if(count>8){if(count>max){max = count;temp = i+1;}}}cout<<temp<<endl;}return 0;
}
本文发布于:2024-01-28 14:31:16,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17064234818089.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |