马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
角逐地点 :
牛客角逐_ACM/NOI/CSP/CCPC/ICPC算法编程高难度训练赛_牛客角逐OJ
A
输出'o'的个数;
- #include<bits/stdc++.h>
- #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
- #define endl '\n'
- using namespace std;
- typedef long long LL;
- inline void solve(){
- string s ; cin >> s ;
- int t = 0 ;
- for(char c : s) t += (c=='o') ;
- cout << t << endl ;
- }
-
- signed main(){
- IOS
- int _ = 1;
- while(_ --) solve();
- return 0;
- }
复制代码 B
模仿 , 由于至少买x , 要把x+1,x+2的环境也思量上 ;
- #include<bits/stdc++.h>
- #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
- using namespace std;
- typedef long long LL;
- inline void solve(){
- LL a , b , x ; cin >> a >> b >> x ;
- LL ans = 0 ;
- LL g = a * 3 ;
- if(g<=b) ans =
复制代码 免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!qidao123.com:ToB企服之家,中国第一个企服评测及软件市场,开放入驻,技术点评得现金 |