上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 41 下一页

hdu 2063 过山车

摘要: Problem DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子或伪酷儿做partner。考虑到经费问题,boss刘决定只让找到partner的人去坐过山车,其他的人,嘿嘿,就站在下面看着吧。聪明的Acmer,你可以帮忙算算最多有多少对组合可以坐上过山车吗 阅读全文
posted @ 2013-04-24 15:24 江财小子 阅读(526) 评论(0) 推荐(0) 编辑

Hdu 4160 Dolls

摘要: Problem DescriptionDo you remember the box of Matryoshka dolls last week? Adam just got another box of dolls from Matryona. This time, the dolls have different shapes and sizes: some are skinny, some are fat, and some look as though they were attened. Specifically, doll i can be represented by three 阅读全文
posted @ 2013-04-24 15:21 江财小子 阅读(202) 评论(0) 推荐(0) 编辑

uestc 1012 饭卡

摘要: 饭卡(card)Time Limit: 1000 ms Memory Limit: 65535 kB Solved: 253 Tried: 2169 SubmitStatusBest SolutionBackDescription 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买 后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。 ... 阅读全文
posted @ 2013-04-22 17:59 江财小子 阅读(503) 评论(0) 推荐(0) 编辑

UVALive 3026 Period KMP 失配函数处理周期的问题

摘要: For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each i (2 ≤ i ≤ N) we want to know the largest K > 1 (if there is one) such that the prefix of S with lengt 阅读全文
posted @ 2013-04-10 21:37 江财小子 阅读(221) 评论(0) 推荐(0) 编辑

UVA 11732 Trie树应用

摘要: strcmp() Anyone? Time Limit:2000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 11732Appoint description:DescriptionJ“strcmp()” Anyone?Input: Standard InputOutput: Standard Outputstrcmp() is a library function in C/C++ which compares two strings. It takes two strings as 阅读全文
posted @ 2013-04-10 12:16 江财小子 阅读(1506) 评论(0) 推荐(0) 编辑

la 3942 Trie数应用

摘要: Remember the Word Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit StatusAppoint description:DescriptionNeal is very curious about combinatorial problems, and now here comes a problem about words. Knowing that Ray has a photographic memory and this may not trouble him, Neal 阅读全文
posted @ 2013-04-10 00:05 江财小子 阅读(443) 评论(0) 推荐(0) 编辑

hdu 1075 What Are You Talking About Trie树

摘要: What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 8824Accepted Submission(s): 2768Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian 阅读全文
posted @ 2013-04-09 17:50 江财小子 阅读(169) 评论(0) 推荐(0) 编辑

hdu 1671 Phone List Trie 基础模板

摘要: Phone ListTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6134Accepted Submission(s): 2085Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone cata 阅读全文
posted @ 2013-04-09 10:41 江财小子 阅读(125) 评论(0) 推荐(0) 编辑

hdu 2586 How far away ? Lca的模板了、、

摘要: How far away ?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2522Accepted Submission(s): 931Problem DescriptionThere are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How f 阅读全文
posted @ 2013-04-09 09:09 江财小子 阅读(213) 评论(0) 推荐(0) 编辑

hdu 1269 迷宫城堡 tarjan 模板

摘要: 迷宫城堡Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4446Accepted Submission(s): 1924Problem Description为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Gardon需要请 阅读全文
posted @ 2013-04-08 22:28 江财小子 阅读(309) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 41 下一页