上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: 题目:DescriptionYouhavejustmovedfromWaterlootoabigcity.Thepeopleherespeakanincomprehensibledialectofaforeignlanguage.Fortunately,youhaveadictionarytohelpyouunderstandthem.InputInputconsistsofupto100,000dictionaryentries,followedbyablankline,followedbyamessageofupto100,000words.Eachdictionaryentryisali 阅读全文
posted @ 2013-10-17 20:14 Jolin123 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 题目:ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe only printer in the computer science students' union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs in the printer queue and you may have to wait for hours to get a single page of output. Because 阅读全文
posted @ 2013-10-15 11:12 Jolin123 阅读(371) 评论(0) 推荐(0) 编辑
摘要: ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA series of brackets is complete if we can pair off each left bracket '[' with a right bracket ']' that occurs later in the series. Every bracket must participate in exactly one such pair.Given a String text add the minimal 阅读全文
posted @ 2013-10-11 23:38 Jolin123 阅读(235) 评论(0) 推荐(0) 编辑
摘要: Description把M个同样的鸡蛋放在N个同样的篮子里,允许有的篮子空着不放,问共有多少种不同的放法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测试数据的数目t(0 n时,拆解为2种情况,第一种是全部篮子都有鸡蛋(假设每个篮子都有1个),再把剩下的m-n个分到n个篮子中,第二种情况是没有把全部篮子用上 1 #include 2 using namespace std; 3 4 int find_num_of_ways(int num_of_eggs,int num_of_baskets); //传进鸡蛋的数量与篮子的数量返回放置鸡蛋方法的种数 5 6 int .. 阅读全文
posted @ 2013-10-06 00:23 Jolin123 阅读(1297) 评论(4) 推荐(0) 编辑
摘要: 题目:Description给定两个字符串S1和S2,要求判定S2是否能够被S1做循环移位得到的字符串包含。说明:字符串S1和S2中不包含空格,每个字符串至少包含一个字符。例如:给定S1=AABCD,S2=CDAA,则返回True;给定S1=ABCD,S2=ACBD,则返回False。Input第一行为整数N(0 2 using namespace std; 3 4 int main(){ 5 int n; 6 cin>>n; 7 while(n--){ 8 string s1,s2; 9 string::size_type posit... 阅读全文
posted @ 2013-10-01 01:30 Jolin123 阅读(485) 评论(1) 推荐(0) 编辑
摘要: 题目:ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionWell, how do you feel about mobile phone? Your answer would probably be something like that “It’s so convenient and benefits people a lot”. However, if you ask Merlin this question on the New Year’s Eve, he will definitely answer “What 阅读全文
posted @ 2013-09-25 23:11 Jolin123 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 题目:ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionMirko has found N chains in his attic. Each chain consists of some number of links, where each link has at most two adjacent links. Each link can be opened or closed, so it is possible to separate chains or connect them into a longer c 阅读全文
posted @ 2013-09-23 12:56 Jolin123 阅读(335) 评论(0) 推荐(1) 编辑
摘要: 题目:ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionAfter realizing that there is much money to be made in software development, Farmer John has launched a small side business writing short programs for clients in the local farming industry. Farmer John's first programming task seem 阅读全文
posted @ 2013-09-22 19:48 Jolin123 阅读(455) 评论(0) 推荐(1) 编辑
摘要: 题目:ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionEven in times of an economic crisis, people in Byteland still like to participate in lotteries. With a bit of luck, they might get rid of all their sorrows and become rich.The most popular lottery in Byteland consists of m rounds. In e 阅读全文
posted @ 2013-09-21 23:15 Jolin123 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 题目:ConstraintsTime Limit: 1 secs, Memory Limit: 256 MB , Framework JudgeDescriptiontemplate class Queue {public: Queue();// construct an empty queue ~Queue()// destructor Queue(const Queue &rhs); const Queue & operator(const Queue &rhs) bool empty()const; bool full()const; int size()cons 阅读全文
posted @ 2013-09-19 20:41 Jolin123 阅读(406) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页