字符串处理
文章平均质量分 55
popcjz
这个作者很懒,什么都没留下…
展开
-
xynuoj1190 行车路程
#include<stdio.h>#include<string.h>#include<iostream>using namespace std;int main(){ char a[20]; double v,ans=0; int oldtime=0,newtime; while(gets(a)) { int len=st...原创 2018-03-20 21:45:35 · 1584 阅读 · 0 评论 -
hdu1237 xynuoj1650 简单计算器 字符串
模拟四则运算过程,对于整个输入的串,遇到数字则提取出来进数字栈,遇到加减运算则进运算符栈,遇到乘除运算则从数字栈中拿出栈顶元素与运算符之后提取出的整数进行运算并将结果进数字栈,这样当枚举完整个串的元素后,我们就得到了一个只有加减运算的表达式,但因为这个表达式在栈中的顺序是反的,所以要再开两个栈来将这个表达式反序,之后就每次从数字栈栈顶取出两元素,从运算符栈中取出一个运算符,将运算结果压进数字栈中,...转载 2018-03-21 21:49:58 · 1569 阅读 · 0 评论 -
hdu1238 Substrings
SubstringsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11563 Accepted Submission(s): 5560Problem DescriptionYou are given a number of case...原创 2018-04-14 08:05:21 · 1175 阅读 · 0 评论 -
CodeForces 877A Alex and broken contest KMP入门
A. Alex and broken contesttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Alex was creating a contest about his friends, but accidentally ...原创 2018-05-01 21:14:36 · 255 阅读 · 0 评论