题目:https://www.luogu.org/problemnew/show/P1079

大水题。

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=,M=;
int n,m;
char a[N],b[N];
int get_int(char ch)
{
if(ch>='A'&&ch<='Z') return ch-'A'+;
return ch-'a'+;
}
int main()
{
scanf("%s",a+); n=strlen(a+);
scanf("%s",b+); m=strlen(b+);
int j=;
for(int i=,d;i<=m;i++)
{
j++; if(j>n) j=;
d=get_int(b[i])+-get_int(a[j]);
if(d<=)d+=;
d+=(b[i]>='A'&&b[i]<='Z'?'A'-:'a'-);
printf("%c",d);
}
return ;
}

最新文章

  1. ASP.NET Core的配置(2):配置模型详解
  2. Elong App 性能测试分享
  3. [洛谷OJ] P1114 “非常男女”计划
  4. PHP系列之一traits的应用
  5. 做bbs论坛项目的收获(1)
  6. item2,实现singleton模式
  7. Telerik_2012_Q3 (已破解)全套下载链接
  8. hibernate联合主键注解配置
  9. UIImageView图片视图的基本概念和使用方法
  10. 如何在一个jpg图片上面叠加文字
  11. MyReport报表引擎2.1.0.0新功能
  12. WCF小实例以及三种宿主
  13. DPDK support for vhost-user
  14. 如何优雅地实现Python通用多线程/进程并行模块
  15. python基础——继承实现的原理
  16. linux上部署JMeter
  17. postgresql数据库安装及简单操作
  18. 小tip: transition与visibility
  19. 使用babel将ES6编译成ES5
  20. 编写前程贷投标loadrunner脚本及总结

热门文章

  1. 修改 百度地图 infowindow 默认样式
  2. PHP ORM操作MySQL数据库
  3. libpcre.so.0 被删除怎么办?
  4. DB 【ACID】
  5. .Net 平台WebService的创建、部署和使用介绍
  6. socketserver模块的使用
  7. Struts MVC工作原理(转载)
  8. 网络协议分析之wireshark---抓包使用
  9. Python 007- python的各种函数
  10. IOS8 通知中心(Notification Center)新特性