社区讨论
为啥我也样例全过也是全部WA
P8466 [Aya Round 1 A] 幻想乡扑克游戏参与者 2已保存回复 6
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 6 条
- 当前快照
- 1 份
- 快照标识符
- @lo8cgwk0
- 此快照首次捕获于
- 2023/10/27 16:21 2 年前
- 此快照最后确认于
- 2023/10/27 16:21 2 年前
CPP
#include <bits/stdc++.h>
using namespace std;
int main(){
string a;
int s=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0,c10=0,c11=0,c12=0,c13=0;
long long T;
cin>>T;
int n[T][17];
for (int i=0;i<T;++i){
cin>>a;
for (int j=0;j<17;++j){
n[i][j]=a[j];
}
}
for (int i=0;i<T;++i){
for (int j=0;j<17;++j){
if (n[i][j]=='D' or n[i][j]=='X'){
s+=1;
}
else if (n[i][j]=='1'){
c1+=1;
}
else if (n[i][j]=='2'){
c2+=1;
}
else if (n[i][j]=='3'){
c3+=1;
}
else if (n[i][j]=='4'){
c4+=1;
}
else if (n[i][j]=='5'){
c5+=1;
}
else if (n[i][j]=='6'){
c6+=1;
}
else if (n[i][j]=='7'){
c7+=1;
}
else if (n[i][j]=='8'){
c8+=1;
}
else if (n[i][j]=='9'){
c9+=1;
}
else if (n[i][j]=='T'){
c10+=1;
}
else if (n[i][j]=='J'){
c11+=1;
}
else if (n[i][j]=='Q'){
c12+=1;
}
else if (n[i][j]=='K'){
c13+=1;
}
}
if (s==2 or c1==4 or c2==4 or c3==4 or c4==4 or c5==4 or c6==4 or c7==4 or c8==4 or c9==4 or c10==4 or c11==4 or c12==4 or c13==4){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
s=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0,c10=0,c11=0,c12=0,c13=0;
}
return 0;
}
回复
共 6 条回复,欢迎继续交流。
正在加载回复...