
string
AcToy
有志者 事竟成
展开
-
UVa 401 - Palindromes
很蛋疼的一道题(我认为字符串的题一向如此)。此题是求回文字符串和镜像字符串两种。我们应该知道对于一串长度是len字符串来说。位置 i 所对应的的位置是len - i - 1 。 用pa函数计算是否是palindrome。用ma计算是否是mirrored。 #include #include #include char al[27]={"A 3 HIL JM O 2原创 2013-03-25 22:48:50 · 526 阅读 · 0 评论 -
UVa 10010 - Where's Waldorf?
给一个字符组成的矩阵,在矩阵中找到要寻找的字符串,输出首字母在矩阵中的位置。只要枚举8个方向即可,代码很长,题很简单。 /************************************************************************* > File Name: 10010.cpp > Author: Toy > Mail: ycs原创 2013-05-21 20:17:44 · 478 阅读 · 0 评论 -
UVa 10222-Decode the Mad man
就是美个字母错打了两位,输出该字母在键盘上的前两位。 #include #include #include char *s = "qwertyuiop[]asdfghjkl;'zxcvbnm,."; int main (){ //freopen ( "input.txt", "r", stdin ); //freopen ( "output.txt", "w", std原创 2013-05-28 13:07:11 · 1029 阅读 · 0 评论