题解:P14758 役满之泪
liu12131415 · · 题解
题目大意:
你要加入最少牌数满足“国士无双”这类牌。
“国士无双”: 满足
思路:
简单模拟题。
多简单呢?只用读
AC code:
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
bool a=0;
int b,ans=0;
for(int i=1;i<=13;i++){
cin>>b;
if(b>1){
a=1;//特判>1的数
}
if(b==0){
ans++;//是0的话+1
}
}
if(!a){
ans++;//判断有没有>1的数,没有的话+1
}
cout<<ans;
}