24h購物| | PChome| 登入
2014-04-18 22:56:27
2012-10-13 11:29:56

[UVA][數學] 10680 - LCM

Problem HLCM Input: standard inputOutput: standard outputTime Limit: 2 seconds All of you know about LCM (Least Common Multiple). For example LCM of 4 and 6 is 12. LCM can also be defined ...

2012-10-13 08:59:13

[ZJ][插頭DP] a228. 就少一個插座用很不方便


內容 : 小P家裡養了很多隻蛇,他每天都會陪牠們玩。怎麼玩呢? 他把家裡劃分成N*M的方格,接著把這些蛇擺上地板。每個方格只能被一隻蛇的身體容納,所以每隻蛇的位置都可以用一串連續方格表示。...

2012-10-12 20:34:59

[UVA][建表] 974 - Kaprekar Numbers


Problem C - Kaprekar Numbers Shri Dattathreya Ramachandra Kaprekar was an Indian mathematician, whose name is associated with a number of concepts in number theory. He was born in Dahanu, n...

2012-10-12 20:17:46

[UVA][spfa] 10278 - Fire Station

Problem A: Fire Station A city is served by a number of fire stations. Some residents have complained that the distance from their houses to the nearest station is too far, so a new station is to ...

2012-10-12 13:16:24

[思考] 中二病時所思考的事情


難得上了一門哲學課,順便把自己曾經胡思亂想的事情記錄下,從以前到現在,很多事情真的曾經想過,但內心總是充滿了掙扎。但不一定為真。如果我沒有記錄下來,我想不久之後我就會忘記這一切我曾經思考過的問題,記憶...

2012-10-12 13:00:47

[ZJ][sieve] a505. B. T-primes

內容 : We know that prime numbers are positive integers that have exactly two distinct positive divisors. Similarly, we'll call a positive integertТ-prime, ifthas exactly thre...

2012-10-11 09:17:14

[UVA][另類MST] 11747 - Heavy Cycle Edges


Problem F: Heavy Cycle Edges Given an undirected graph with edge weights, a minimum spanning tree is a subset of edges of minimum total weight such that any two nodes are connected by some path ...

2012-10-09 20:15:23

[ZJ] a473. 外援計畫


內容 : 外援計畫 Background小光上了大學之後,隔了一年考了轉學考,想說到新的學校會不會有比 ACM-ICPC 的隊友存在,但沒想到另一面臨的問題使得小光更加地沮喪。而這個問題,小光無法好好的敘...

2012-10-07 12:07:22

[UVA][dfs] 10624 - Super Number


Problem BSuper Number Input: Standard Input Output: Standard Output Time Limit: 3 Seconds Don't you think 162456723 very special? Look at the picture below if you are unable to find i...

2012-10-07 11:20:00

[UVA][bfs] 11198 - Dancing Digits

Problem D Dancing Digits Digits like to dance. One day, 1, 2, 3, 4, 5, 6, 7 and 8 stand in a line to have a wonderful party. Each time, a male digit can ask a female digit to dance with him,...

2012-10-07 10:27:23

[UVA][brute] 11218 - KTV


Problem K KTV One song is extremely popular recently, so you and your friends decided to sing it in KTV. The song has 3 characters, so exactly 3 people should sing together each time (yes, the...

2012-10-06 19:53:03

[UVA][Greedy] 10527 - Persistent Numbers

Problem B: Persistent Numbers 123456789 11 2 3 4 5 6 7 8 9 2 2 4 6 8 1012141618 3 3 6 9 121518212427 4 4 8 12162024283236 5 5 1015202530354045 6 6 1218243036424854 7 7 142128...

2012-10-06 19:27:56

[UVA][樹走訪] 10562 - Undraw the Trees

Problem DUndraw the Trees Input: Standard Input Output: Standard Output Time Limit: 2 Seconds Professor Homer has been reported missing. We suspect that his recent research works ...

2012-10-06 13:43:07

旅行業務員問題 TSP - DP狀態壓縮做法

int g[20][20], dp[1<<20][20], t2[1<<20];void tsp(int state, int last) { if(dp[state][last] != oo) return; int i, j, tmp; dp[state][last]--; /*取代 used[state][last]*/ for(i = state; i; i -...

2012-10-06 13:32:19

[UVA][TSP] 10944 - Nuts for nuts..


Problem B: Nuts for nuts.. So as Ryan and Larry decided that they don't really taste so good, they realized that there are some nuts located in certain places of the island.. and they love t...

第一頁      ‹上一頁       71 .  72 .  73 .  74 .  75 .  76 .  77 .  78 .  79 .  80 .      下一頁›      最末頁
«上十頁      第 73 / 142 頁 , 共 2116 筆       下十頁»      
TOP