HDU 2100 字符串
来源:互联网 发布:电力系统波形分析软件 编辑:程序博客网 时间:2024/06/14 15:28
///http://acm.hdu.edu.cn/showproblem.php?pid=2100///#include<iostream>#include<string>#include<cstring>#include<algorithm>#include<cstdio>#include<cmath>#include<cctype>#include<iomanip>using namespace std;int main() { string a,b; while(cin>>a>>b) { if(a.size()>b.size())swap(a,b); int x=a.size()-1,y=b.size()-1; int f[205]; for(int i=204,c=0; i>=0; --i,--y,--x) { if(x<0) { if(y<0) f[i]=c%26,c/=26; else { int t=b[y]-'A'+c; f[i]=t%26,c=t/26; } } else { int t=b[y]+a[x]-2*'A'+c; f[i]=t%26,c=t/26; } } int q=0; for(int i=0; i<205; ++i) { if(f[i])q=1; if(q)cout<<char(f[i]+'A'); } if(!q)cout<<'A'; cout<<endl; } return 0;}
- HDU 2100 字符串
- HDU 2100-Lovekey(字符串)
- hdu字符串
- 字符串处理,以HDU 2100为例
- hdu 2017 字符串统计
- HDU 1274 展开字符串
- 【字符串暴力】hdu 2847
- HDU-1039 字符串处理
- HDU 1048 字符串
- hdu 1020 简单字符串
- HDU 1274(展开字符串)
- HDU 2017 字符串统计
- HDU 1274 展开字符串
- hdu 1062 字符串处理
- hdu 1088 字符串
- HDU 1238 字符串
- HDU 1200 字符串
- hdu 1036 (字符串)
- HDU 1166 线段树
- spring 3.x + hibernate4.x 实现数据延迟加载
- hdu 1856 并差集求最大秩
- Java学习第五天笔记
- 10285 - Longest Run on a Snowboard
- HDU 2100 字符串
- Toggle Button
- HDU 3367 Pseudoforest (并查集)
- Java学习之路:不走弯路,就是捷径
- sharepoint time job
- 黑马程序员——java中的I/O流
- HDU 1238 字符串
- 高性能JavaScript模板引擎原理解析
- 欧拉函数