2011年7月21日

soj 2749 The Fewest Coins

摘要: DescriptionFarmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a way that the smallest number of coins changes hands, i.e., the number of coins he uses to pay plus the number of coins he receives in change is minimized. Help him to 阅读全文

posted @ 2011-07-21 12:09 sleeper_qp 阅读(435) 评论(0) 推荐(1) 编辑

poj 1837 很不错的题

摘要: BalanceTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 5258Accepted: 3120DescriptionGigel has a strange"balance" and he wants to poise it. Actually, the device isdifferent from any other ordinary balance.It orders two arms of negligible weight and each arm's length is15. Some 阅读全文

posted @ 2011-07-21 12:08 sleeper_qp 阅读(236) 评论(0) 推荐(0) 编辑

poj 2184 Cow Exhibition

摘要: Cow ExhibitionTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5834Accepted: 1945Description"Fat and docile, bigand dumb, they look so stupid, they aren't muchfun..."- Cows with Guns by Dana LyonsThe cows want to prove to the public that they are both smart andfun. In order to 阅读全文

posted @ 2011-07-21 12:07 sleeper_qp 阅读(457) 评论(0) 推荐(0) 编辑

poj 2955 Brackets

摘要: BracketsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1734Accepted: 869DescriptionWe give the followinginductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,if s is a regular brackets sequence, then (s) and[s] are regular brackets sequence 阅读全文

posted @ 2011-07-21 12:06 sleeper_qp 阅读(359) 评论(0) 推荐(0) 编辑

Ecust 406 sleeping at work

摘要: #include <stdio.h>#include <memory.h>int f[510][100],v[510][60];int a[510];int max(int a,int b){return a>b?a:b;}int add(int s,int b);int main(){ int n,k,m,j,i,T,g,maxx,temp; scanf("%d",&T); while(T--) { scanf("%d%d%d",&n,&m,&k); for(i=1;i<=n;i++) 阅读全文

posted @ 2011-07-21 12:04 sleeper_qp 阅读(213) 评论(0) 推荐(0) 编辑

导航