zoj 3490】的更多相关文章

点我看题目 题意 : 给你一个字符串,让你按照给定规则进行处理. 如果字符串里有字母或者是数字就忽略非字符数字,如果没有,就让最右边的那个字符+1. 增量都是从最右边的字母或者数字开始的. 增加一个数字的方法是加1到另一个数字('0' -> '1', '1' -> '2' ... '9' -> '0'). 增加一个大写字母的方法是加一位到另一个字母 ('A' -> 'B', 'B' -> 'C' ... 'Z' -> 'A'). 增加一个小写字母的方法是加一位到另一个字…
蛋都疼了,高了半天,Output Limit Exceeded 原来是输入的问题,我靠!!以后还是用输入输出c++好,这尼玛!!郁闷!!!!! #include<stdio.h> #include<string.h> #include<iostream> using namespace std; int main() { int CA; cin>>CA; while(CA--){ ],*start; int t,n,i,j,len,flag,h; start…
一道模拟题,来模拟进位 暴力的从右往左扫描,按规则求后继就好了.除了Sample已给出的,还有一些需要注意的地方: 9的后继是10,而不是00: (z)的后继是(aa),而不是a(a): 输入虽然最长只有100,但输出最长可能有102. 事实上题目中给的字符串后继规则,也是Ruby中String#succ或String#next所用的规则 http://blog.watashi.ws/1944/the-8th-zjpcpc/ 标程也写的非常好 //#pragma comment(linker,…
链接 [https://vjudge.net/contest/294259#problem/D] 题意 就是给你一个字符串,要进行n次操作 让你输出每次的字符串 操作规则: 1.如果有数字或者字母就忽略其他的字符 否则最后面的字符就加一 2.如果存在进位,就往离当前最近的数字或者字母进位 z-a, Z-A, 9-0 如果不存在数字或者字母就在当前位置前面增加进位 分析 就是上面的规则模拟.我真的怕这种模拟. 有点麻烦.关键就是进位的情况判断就好了 然后他有可能一次操作连续进位几次,就递归一直到不…
Time Limit: 2 Seconds Memory Limit: 65536 KB The successor to a string can be calculated by applying the following rules: Ignore the nonalphanumerics unless there are no alphanumerics, in this case, increase the rightmost character in the string. The…
ZOJ 3490 没有题解. 一句话,要么贴代码,要么自己打. #include<cstdio> #include<iostream> #include<vector> #include<set> #include<map> #include<math.h> #include<queue> #include<stdlib.h> #include<cstring> #include<algori…
ZOJ Problem Set - 3490 String Successor Time Limit: 2 Seconds      Memory Limit: 65536 KB The successor to a string can be calculated by applying the following rules: Ignore the nonalphanumerics unless there are no alphanumerics, in this case, increa…
第十三届浙江省大学生程序设计竞赛 I 题, 一道模拟题. ZOJ  3944http://www.icpc.moe/onlinejudge/showProblem.do?problemCode=3944 In a BG (dinner gathering) for ZJU ICPC team, the coaches wanted to count the number of people present at the BG. They did that by having the waitre…
A Simple Tree Problem Time Limit: 3 Seconds      Memory Limit: 65536 KB Given a rooted tree, each node has a boolean (0 or 1) labeled on it. Initially, all the labels are 0. We define this kind of operation: given a subtree, negate all its labels. An…
这道题目还是简单的,但是自己WA了好几次,总结下: 1.对输入的总结,加上上次ZOJ Problem Set - 1334 Basically Speaking ac代码及总结这道题目的总结 题目要求输入的格式: START X Y Z END 这算做一个data set,这样反复,直到遇到ENDINPUT.我们可以先吸纳一个字符串判断其是否为ENDINPUT,若不是进入,获得XYZ后,吸纳END,再进行输出结果 2.注意题目是一个圆周,所以始终用锐角进行计算,即z=360-z; 3.知识点的误…