离谱但AC
2023-07-20 18:25:15
发布于:河北
153阅读
0回复
0点赞
我也没想到改成这样能AC=)
#include <iostream>
#define kun int
#define ikun string
#define basketball if
#define caixukun else
#define Rap for
using namespace std;
kun ji, ni, tai;
ikun s;
kun main(){
cin >> s;
kun len = s.size();
Rap (kun sing = 0; sing < len; sing++){
basketball (s[sing] == 'c'){
ji++;
}
caixukun basketball (s[sing] == 'p'){
ni++;
}
caixukun basketball (s[sing] == 'd'){
tai++;
}
}
kun mei = 10000;
basketball (ji < mei) mei = ji;
basketball (ni < mei) mei = ni;
basketball (tai/2 < mei) mei = tai/2;
cout << mei;
return 0;
}
这里空空如也
有帮助,赞一个