stl
Dejavu1z
做题,总结,不断的学习
展开
-
POJ 2493 (map)
题意描述 给定有n个词的字典和m个句子,每个词语除首位和末位的字母可以任意移动,求能够构成m个句子的总共不同情况有多少 思路 由于每个词语的中间位置可以任意改变,所以我们对每个词语中间的位置进行排序,并用map来记录排序后的词语出现的次数。对于m个句子,由于有空格的存在,所以我们可以使用getline来读取一行并用istringstream来对空格进行分割。 AC代码 #include<iostream> #include<cstdio> #include<sstream>原创 2020-07-27 19:33:41 · 111 阅读 · 0 评论 -
Gunner II
题意描述 Long long ago, there was a gunner whose name is Jack. He likes to go hunting very much. One day he go to the grove. There are n birds and n trees. The i-th bird stands on the top of the i-th tree. The trees stand in straight line from left to the righ原创 2020-07-06 19:51:47 · 165 阅读 · 0 评论 -
Shaolin(map)
题意描述 Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. The master of Shaolin evaluates a young man mainly by his talent on understanding the Buddism scripture, but fighting ski原创 2020-07-06 19:40:53 · 230 阅读 · 0 评论