专栏文章
题解:UVA13034 Solve Everything :-)
UVA13034题解参与者 1已保存评论 0
文章操作
快速查看文章及其快照的属性,并进行相关操作。
- 当前评论
- 0 条
- 当前快照
- 1 份
- 快照标识符
- @miq8dj4v
- 此快照首次捕获于
- 2025/12/04 00:38 3 个月前
- 此快照最后确认于
- 2025/12/04 00:38 3 个月前
题解:UVA13034 Solve Everything :-)
建议评 。
别被题目所误导,这就是一道判断是否存在数字
0 的题目,如果存在 0 就说明这一题每个团队都做不出来。本题最难的就是输出,注意大小写和空格,建议直接复制格式。
代码
容易实现,浅浅放个代码,仅供参考:
CPP#include <bits/stdc++.h>
using namespace std;
int t,fn;
int main(void){
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
cin.tie(0)->sync_with_stdio(false);
cout.tie(0)->sync_with_stdio(false);
cin>>t; //多组数据
for(int i=1;i<=t;i++){
for(int j=1,x;j<=13;j++){
cin>>x;
if(x==0){
fn=1; //是否存在 0
break;
}
}
if(fn==1){
cout<<"Set #"<<i<<": "<<"No\n"; //输出
}else{
cout<<"Set #"<<i<<": "<<"Yes\n";//输出
}
}
return 0;
}
相关推荐
评论
共 0 条评论,欢迎与作者交流。
正在加载评论...