记录编号 |
488130 |
评测结果 |
AAAAAAAAAA |
题目名称 |
打扑克 |
最终得分 |
100 |
用户昵称 |
梦那边的美好ET |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
0.030 s |
提交时间 |
2018-02-17 21:23:14 |
内存使用 |
0.25 MiB |
显示代码纯文本
- #include<cstdio>
- #include<iostream>
- using namespace std;
- int a[14]={0};
- int m,n,b,c=0,d=0;
- int main(){
- freopen("poker1.in","r",stdin);
- freopen("poker1.out","w",stdout);
- cin>>m;
- for(int i=1;i<=m;i++){
- cin>>n;
- for(int j=1;j<=n;j++){
- cin>>b;
- a[b]+=1;}
- for(int j=1;j<=13;j++){
- if(a[j]>4){
- cout<<"cheat";
- c=1;
- break;}
- if(a[j]<4){
- d+=1;}}
- if(d==13){
- cout<<"no bomb";}
- if(d!=13&&c!=1){
- for(int j=3;j<=13;j++){
- if(a[j]==4){
- cout<<j;
- c=1;
- break;}}
- if(c==0){
- if(a[2]==4){
- cout<<"2";}
- else{
- cout<<"1";}}}
- c=0;
- d=0;
- cout<<endl;
- for(int j=1;j<=13;j++){
- a[j]=0;}}
- return 0;}
-
-