UVa 10361 Automatic Poetry】的更多相关文章

Automatic Poetry Input: standard input Output: standard output Time Limit: 2 seconds Memory Limit: 32 MB “Oh God”, Lara Croft exclaims, “it’s one of these dumb riddles again!” In Tomb Raider XIV, Lara is, as ever, gunning her way through ancient Egyp…
字符串题目就先告一段落了,又是在看balabala不知道在说些什么的英语. 算法也很简单,用了几个库函数就搞定了.本来还担心题里说的replace-by为空的特殊情况需要特殊处理,后来发现按一般情况处理也能A过去. 第一次RE是因为char t[]开小了. 对了,strstr()函数我也是第一次用,对这个函数不太了解的同学,召唤传送门! C语言中字符串操作之 strstr() 题目大意:给几组要查找的和要替换的字符串,和一段text,进行查找替换.说白了就是word里面查找替换功能. 不过需要注…
“Oh God”, Lara Croft exclaims, “it’s one of these dumb riddles again!” In Tomb Raider XIV, Lara is, as ever, gunning her way through ancient Egyptian pyramids, prehistoric caves and medival hallways. Now she is standing in front of some important Ger…
题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics 10300 - Ecological Premium 458 - The Decoder 494 - Kindergarten Counting Game 414 - Machined Surfaces 490 - Rotating Sentences 445 - Marvelous Mazes…
10361 - Automatic Poetry #include <iostream> #include <string> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <algorithm> #include <fstream> using namespace std; int n; ],…
第一题:401 - Palindromes UVA : http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=342 解题思路:此题很水,只要把 mirrored string 类的对应关系搞对,基本就可以了! 但是细节要注意,首先只有一个元素的时候需要单独判断,一个字符是回文串,是不是 mirrored strin…
白书一:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=64609#overview 注意UVA没有PE之类的,如果PE了显示WA. UVA401:Palindromes #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> using namesp…
UVA10361 - Automatic Poetry(自动作诗机) A Schuttelreim seems to be a typical German invention. The funny thing about this strange type of poetry is that if somebody gives you the first line and the beginning of the second one, you can complete the poem yo…
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABGcAAANuCAYAAAC7f2QuAAAgAElEQVR4nOy9XUhjWbo3vu72RRgkF5…
UVA - 10564 Paths through the Hourglass 题意: 要求从第一层走到最下面一层,只能往左下或右下走 问有多少条路径之和刚好等于S? 如果有的话,输出字典序最小的路径. f[i][j][k]从下往上到第i层第j个和为k的方案数 上下转移不一样,分开处理 没必要判断走出沙漏 打印方案倒着找下去行了,尽量往左走   沙茶的忘注释掉文件WA好多次   #include <iostream> #include <cstdio> #include <a…