CodeForces 518A

字符串进位。。

#include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <cctype>
#include <vector>
#include <iterator>
#include <set>
#include <map>
#include <sstream>
using namespace std; #define mem(a,b) memset(a,b,sizeof(a))
#define pf printf
#define sf scanf
#define spf sprintf
#define pb push_back
#define debug printf("!\n")
#define INF 10000
#define MAXN 5010
#define MAX(a,b) a>b?a:b
#define blank pf("\n")
#define LL long long
#define ALL(x) x.begin(),x.end()
#define INS(x) inserter(x,x.begin())
#define pqueue priority_queue char s[],t[]; int main()
{
int i,j;
while(sf("%s%s",s,t)==)
{
int len = strlen(s);
int x = len-;
for(i=;i<len;i++)
{
if(s[x]=='z')
{
s[x]='a';
x--;
}
else
{
s[x]++;
break;
}
}
if(!strcmp(s,t)) pf("No such string\n");
else pf("%s\n",s);
}
}

SZU1的更多相关文章

  1. NodeJS系列~第三个小例子,NodeJs与Redis实现高并发的队列存储

    返回目录 众所周知 redis量个强大的缓存组件,可以部署在win32和linux环境之上,它有五大存储结构,其中有一种为列表list,它可以实现quene和stack的功能,即队列和堆栈的功能. r ...

随机推荐

  1. luoguP3702 [SDOI2017]序列计数

    https://www.luogu.org/problemnew/show/P3702 题目让我们在 $ [1, m] $ 从中选出 $ n $ 个数,当中要有 > $ 0 $ 个质数,和是 $ ...

  2. 【C/C++】10分钟教你用C++写一个贪吃蛇附带AI功能(附源代码详解和下载)

    C++编写贪吃蛇小游戏快速入门 刚学完C++.一时兴起,就花几天时间手动做了个贪吃蛇,后来觉得不过瘾,于是又加入了AI功能.希望大家Enjoy It. 效果图示 AI模式演示 imageimage 整 ...

  3. angular5给懒加载模块添加loading

    在根组件的构造函数中直接执行: this.router.events.subscribe(event=>{ if(event instanceof RouteConfigLoadEnd) { t ...

  4. tomcat下各个文件夹的作用

    1.bin目录:这个文件夹包含的是启动/关闭tomcat的脚本,里面有startup.sh(Linux环境下启动tomcat脚本)和startup.bat(Windows环境下启动tomcat脚本), ...

  5. python 继承与组合

    一.组合 #老师 课程 生日 class Course: def __init__(self,name,period,price): self.name = name self.period = pe ...

  6. mssqlServer大量数据快速插入:SqlBulkCopy

    SqlBulkCopy类,为微软的一个大量数据快速插入.直接上代码 表结构: namespace SqlBulkCopy的演示 { using System.Data.SqlClient; publi ...

  7. mAP(mean Average Precision)应用(转)

    原文章地址来自于知乎:https://www.zhihu.com/question/41540197 1. precision 和 recall 的计算(没什么好说的,图片示例相当棒): 图1 图中上 ...

  8. Java Web基础——Controller+Service +Dao三层的功能划分

    转自:https://www.cnblogs.com/cielosun/articles/5752272.html 1. Controller/Service/DAO简介: Controller是管理 ...

  9. spark第十篇:Spark与Kafka整合

    spark与kafka整合需要引入spark-streaming-kafka.jar,该jar根据kafka版本有2个分支,分别是spark-streaming-kafka-0-8和spark-str ...

  10. python namedtuple命名元组

    from collections import namedtuple Animal=namedtuple('Animal','name age type') perry=Animal(name='pe ...