Problem B: Excuses, Excuses!】的更多相关文章

Description Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to goofy excuses, Judge Ito has asked that you write a progr…
哈哈,虽然是一道字符串水题,可是拿到一个1A还是很开心的! 题意就是给一些keywords(子串)和Excuse(母串),然后输出包含keywords最多的Excuse,如果相等的话,按任意顺序全部输出即可. 解题时有几点需要注意: 1.一个keyword可能在Excuse里重复多次. 2.每个keyword的左右两端必须是行首或行尾或不是字母的字符. 3.Excuse里貌似是不区分大小写的,所以读入所有的Excuse后需要再memcpy一份,把那份用来全部转化为大写或小写,原来的那份作输出用.…
简单字符串. #include <cstdio> #include <cstring> #define MAXLEN 105 #define MAXN 25 char keys[MAXN][MAXN]; char lines[MAXN][MAXLEN]; int nums[MAXN]; int main() { ; int n, m, max; int i, j, k, v; char tmp[MAXLEN]; while (scanf("%d %d",&…
解题报告 题意: 找包括单词最多的串.有多个按顺序输出 思路: 字典树爆. #include <cstdio> #include <cstring> #include <iostream> using namespace std; int k,e,num[100],cnt; struct node { int v; node *next[26]; }; node *newnode() { node *p=new node; p->v=0; int i; for(i…
题目 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…
第一题: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…
acm之pku题目分类 对ACM有兴趣的同学们可以看看 DP:  1011   NTA                 简单题  1013   Great Equipment     简单题  1024   Calendar Game       简单题  1027   Human Gene Functions   简单题  1037   Gridland            简单题  1052   Algernon s Noxious Emissions 简单题  1409   Commun…
各种杂题,水题,模拟,包括简单数论. 1001 A+B 1002 A+B+C 1009 Fat Cat 1010 The Angle 1011 Unix ls 1012 Decoding Task 1019 Grandpa's Other Estate 1034 Simple Arithmetics 1036 Complete the sequence! 1043 Maya Calendar 1054 Game Prediction 1057 Mileage Bank 1067 Rails 10…
以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight Moves1101 Gamblers1204 Additive equations 1221 Risk1230 Legendary Pokemon1249 Pushing Boxes 1364 Machine Schedule1368 BOAT1406 Jungle Roads1411 Annive…
白书一: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…