codeforces 12b(string的操作)
来源:互联网 发布:端口初始化失败怎么办 编辑:程序博客网 时间:2024/06/03 23:40
这道题涉及string类的排序,依靠sort(s.begin(),s.end());
#include<iostream>#include<algorithm>using namespace std;int main(){string n,m;int i;cin>>n>>m;sort(n.begin(),n.end());for(i=0;i<n.size()&&n[i]=='0';i++);if(n[i]!='\0')swap(n[0],n[i]);if(n==m)cout<<"OK"<<endl;else cout<<"WRONG_ANSWER"<<endl;return 0;
阅读全文
0 0
- codeforces 12b(string的操作)
- codeforces 8a(string的操作)
- Codeforces 358B--string--(简单的字符匹配)
- Educational Codeforces Round 1 B. Queries on a String(字符串简单操作)
- Codeforces 110B-Lucky String(技巧)
- CodeForces 128 B.String(优先队列)
- codeforces 128B. String
- codeforces 128B - String
- 1017. A除以B (20)----string的额外操作
- codeforces 494B Obsessive String
- codeforces B. Pasha and String
- codeforces 545B Equidistant String
- CodeForces 545B Equidistant String
- codeforces 494B B. Obsessive String(dp)
- B - Making a String-----CodeForces 624B
- codeforces 494B B. Obsessive String(dp)
- CodeForces 624 B. Making a String(贪心)
- Codeforces Round #303 (Div.2)-B. Equidistant String(模拟)
- vue的属性绑定(在引号中绑定)
- SHELL'S SORT
- yean体系架构介绍
- spring mvc 接收页面表单List
- 左旋转二进制位-LintCode
- codeforces 12b(string的操作)
- 反射机制在代理中的应用(一) 静态代理
- LVM 简明教程
- jeesite- shiro权限配置问题
- http://cloudpure.iteye.com/blog/2400899
- 织梦动态无法更新bu
- 米度教育零基础三个月学会机器学习视频总结
- 【Scikit-Learn 中文文档】多类和多标签算法
- Android开发:计算缓存大小并且清空缓存