欢迎访问我的个人网站==》 jiashubing.cn
摘要: Two thievesTime Limit:3 SecMemory Limit:128 MBSubmissions:334Solved:62DescriptionThere are two thieves, both of them have a bag whose capacity is CAP (1<= CAP <= 512). And there are N (N <= 128) diamonds, each of them have a weight w and a value v (1 <= w,v <= 512). The consecutive di 阅读全文
posted @ 2013-04-27 16:19 贾树丙 阅读(312) 评论(0) 推荐(0)
摘要: Reverse NumberTime Limit:1 SecMemory Limit:128 MBSubmissions:357Solved:66DescriptionGiven a non-negative integer sequence A with length N, you can exchange two adjacent numbers each time. After K exchanging operations, what’s the minimum reverse number the sequence can achieve?The reverse number of 阅读全文
posted @ 2013-04-27 16:14 贾树丙 阅读(205) 评论(0) 推荐(0)
摘要: MultipleTime Limit:2 SecMemory Limit:64 MBSubmissions:197Solved:35DescriptionRocket323loves math very much. One day,Rocket323got a number string. He could choose some consecutive digits from the string to form a number.Rocket323loves 64 very much, so he wanted to know how many ways can he choose fro 阅读全文
posted @ 2013-04-27 15:56 贾树丙 阅读(341) 评论(0) 推荐(0)
摘要: Gene recombinationDescriptionAs a gene engineer of a gene engineering project, Enigma encountered a puzzle about gene recombination. It is well known that a gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T.Enigma has gotte 阅读全文
posted @ 2013-04-27 15:41 贾树丙 阅读(205) 评论(0) 推荐(0)
摘要: TransmittersTime Limit:2 Seconds Memory Limit:65536 KBIn a wireless network with multiple transmitters sending on the same frequencies, it is often a requirement that signals don't overlap, or at least that they don't conflict. One way of accomplishing this is to restrict a transmitter's 阅读全文
posted @ 2013-04-22 16:05 贾树丙 阅读(247) 评论(0) 推荐(0)
摘要: StonesTime Limit: 5000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 591Accepted Submission(s): 339Problem DescriptionBecause of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a littl 阅读全文
posted @ 2013-04-18 18:08 贾树丙 阅读(238) 评论(0) 推荐(0)
摘要: String CompareTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1931Accepted Submission(s): 472Problem DescriptionMaybe there are 750,000 words in English and some words are prefix of other words, for example: the word "acm" can be treat as 阅读全文
posted @ 2013-04-18 18:05 贾树丙 阅读(364) 评论(0) 推荐(0)
摘要: Sibonacci NumbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 706Accepted Submission(s): 242Problem DescriptionAs is known to all, the definition of Fibonacci Numbers is:f(1)=1f(2)=1f(n)=f(n-1)+f(n-2) (n>=3)Now Sempr found another Numbers, he 阅读全文
posted @ 2013-04-18 18:02 贾树丙 阅读(394) 评论(0) 推荐(0)
摘要: 魔法阵Description两个正三角形和一个圆组成一个魔法阵,如图,圆心和正三角形内心重合,三角形的重叠部分是一个正六边形。求魔法阵轮廓围成的面积。Input第一行一个整数T表示数据组数(T 2 #include 3 double pi=acos(-1.0); 4 const double k=sqrt(3.0); 5 int main() 6 { 7 int cas; 8 double L,R; 9 scanf("%d",&cas);10 while(cas--)11 {12 scanf("%lf %lf",&L,&R);13 阅读全文
posted @ 2013-04-13 11:05 贾树丙 阅读(599) 评论(0) 推荐(0)
摘要: Exchange CardsTime Limit:2 Seconds Memory Limit:65536 KBAs a basketball fan, Mike is also fond of collecting basketball player cards. But as a student, he can not always get the money to buy new cards, so sometimes he will exchange with his friends for cards he likes. Of course, different cards have 阅读全文
posted @ 2013-04-08 17:32 贾树丙 阅读(272) 评论(0) 推荐(0)
摘要: Counting TrianglesTime Limit:2 Seconds Memory Limit:65536 KBGiven an equilateral triangle with n the length of its side, program to count how many triangles in it.InputThe length n (n 2 int n; 3 int f[501]; 4 void init(){ 5 int i,j; 6 f[0]=0; 7 for(i=1;i<501;i++) 8 f[i]=f[i-1]+i... 阅读全文
posted @ 2013-04-08 17:28 贾树丙 阅读(423) 评论(0) 推荐(0)
摘要: Multiplication PuzzleTime Limit:2 Seconds Memory Limit:65536 KBThe multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of points equal to the product of the number on the card taken 阅读全文
posted @ 2013-04-08 17:08 贾树丙 阅读(271) 评论(0) 推荐(0)
摘要: Largest Rectangle in a HistogramTime Limit:2 Seconds Memory Limit:65536 KBA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the left shows the histogram that consist 阅读全文
posted @ 2013-04-08 17:07 贾树丙 阅读(343) 评论(0) 推荐(0)
摘要: Conquer a New RegionTime Limit:5 Seconds Memory Limit:32768 KBThe wheel of the history rolling forward, our king conquered a new region in a distant continent.There are N towns (numbered from 1 to N) in this region connected by several roads. It's confirmed that there is exact one route between 阅读全文
posted @ 2013-04-08 17:00 贾树丙 阅读(247) 评论(0) 推荐(0)
摘要: Human Gene FunctionsTime Limit:2 Seconds Memory Limit:65536 KBIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been interested in identifying human genes and determining their 阅读全文
posted @ 2013-04-08 16:56 贾树丙 阅读(410) 评论(0) 推荐(0)