
STL
王猛旗
在读研究僧
展开
-
Skewed Sorting
DescriptionFarmer John has 2^N (1 <= N <= 10) cows, each conveniently labeledwith paint on her flank with a number in the range 1..2^N. They arestanding in a line in some random order. The fir原创 2016-04-03 14:07:28 · 380 阅读 · 0 评论 -
JUST SORT
We define B is a Divisor of one number A if A is divisible by B. So, the divisors of 12 are 1, 2, 3, 4, 6, 12. So, 12 has 6 divisors in total.Now you have to order all the integers from 1原创 2016-04-03 14:03:10 · 457 阅读 · 0 评论 -
STL入门
Description有一家旅馆,共有M个房间,编号为1到M。某天,来了N个客人(编号为1到N)住宿,每个人当然是住在这M个房间中的一个。问题:求出每个房间中的客人的编号?Input多组数据。每组数据的第一行输入N M (1 <= N <= 1000000, 1 <= M <= 10000)第二行有N个数,其中第i个数表示第i个客人所住的房间的编号原创 2016-04-03 12:47:30 · 528 阅读 · 0 评论 -
STL入门2
1:给出n个字符串,输出每个字符串是第几个出现的字符串?多组数据2:对每组数据,第一行输入n表示接下来有n个字符串 1 接下来的n行,每行输入一个非空的且长度最多为10的仅由大写字母组成的字符串3:输出共n行,对每一行的字符串,输出其是第几个出现的字符串。解题思路:直接map//mp.clear();#include#include#include#includeu原创 2016-04-20 10:06:47 · 380 阅读 · 0 评论