
STL
文章平均质量分 78
Cworld2017
这个作者很懒,什么都没留下…
展开
-
A - Two Substrings
You are given string s. Your task is to determine if the given strings contains two non-overlapping substrings "AB" and "BA" (the substrings can go in any order).InputThe only line of input原创 2017-08-01 16:13:45 · 452 阅读 · 1 评论 -
B - 单词数
lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。 Input有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。Output每组只输出一个整数,其单独成行,该整数代表一篇文章里不同单词的总数。Sample Inputyo原创 2017-07-25 18:17:40 · 277 阅读 · 0 评论 -
C - USACO ORZ
Like everyyione, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; new geometries are the favorite.I. M. Hei, the lead cow pasture ar原创 2017-08-10 08:51:48 · 436 阅读 · 0 评论 -
B - Rails
DescriptionThere is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was po原创 2017-08-12 19:26:49 · 277 阅读 · 0 评论 -
E - Team Queue
Sample Input23 101 102 1033 201 202 203ENQUEUE 101ENQUEUE 201ENQUEUE 102ENQUEUE 202ENQUEUE 103ENQUEUE 203DEQUEUEDEQUEUEDEQUEUEDEQUEUEDEQUEUEDEQUEUESTOP25 259001 259002 259003 259004原创 2017-08-13 20:39:40 · 322 阅读 · 0 评论 -
F - Ugly Numbers
丑数是指不能被2 3 5以外的其他素数整除的数,把丑数从小到大排列起来,结果如下 1 2 3 4 5 6 8 9 10 12 15 求第1500个丑数;#include #include #include #include #include#include#include#include#includeusing namespace std;typedef long原创 2017-08-13 22:52:14 · 240 阅读 · 0 评论 -
J - Andy's First Dictionary
输入一个文本,找出所有不同的单词(连续的字#include #include #include #include #include #include using namespace std;int main(){ setdict; string str;//freopen("1.txt","r",stdin); while(cin>>str) {原创 2017-08-14 15:37:39 · 309 阅读 · 0 评论 -
K - Ananagrams
输入一些单词,找出所有满足下列条件的单词;该单词不能通过重排变为输入文本的其他单词。判断时字母不分大小写,但在输出时应该保留大小写,并按字典序输出;在进行文本输入时,每输入一个单词将他放到vector,同时开一个map,用输入的单词作key,出现的次数作为value,当然作为key的单词要先经过处理,将它小写化并按字典序排序,然后再放入key中,这样文本输完后,原始文本保存在vecto原创 2017-08-14 16:30:51 · 390 阅读 · 0 评论 -
D - Matrix Chain Multiplication
Sample Input9A 50 10B 10 20C 20 5D 30 35E 35 15F 15 5G 5 10H 10 20I 20 25ABC(AA)(AB)(AC)(A(BC))((AB)C)(((((DE)F)G)H)I)(D(E(F(G(HI)))))((D(EF))((GH)I))Sample Output000error10原创 2017-08-14 20:27:21 · 306 阅读 · 0 评论