POjACM
inlcude_cx
这个作者很懒,什么都没留下…
展开
-
POJ 2247 Humble Numbers
做了好多遍,竟然做到一半不会了,郁闷!#include#includeint min(int a,int b){return a>b?b:a;}int main(){int num[6000],s,i,j,k,l,n;num[1]=1;i=j=k=l=1;for(s=2;s{num[s]=min(num[i]*2,min(num[j]*3,min(num[k]*5,n原创 2012-12-05 17:09:22 · 322 阅读 · 0 评论 -
POJ水题
太好了!原文地址:POJ水题作者:Bruce1000 纯属适应题1003 做的时候花了很久,现在看好像也不难1004 适应题,求下平均就行1005 要读懂题就行1007 逆序数,discuss方法1046 全部暴搜一遍。。1118 照抄2606没看题。。WA。。RE全占了1207 貌似我的方法超级麻烦 1247 读懂题目比较麻烦1248转载 2012-12-05 17:08:34 · 291 阅读 · 0 评论 -
POj 3292 Semi-prime H-numbers
Semi-prime H-numbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5400Accepted: 2209DescriptionThis problem is based on an exercise of David Hilbert, whopedagogically s原创 2012-12-05 17:09:26 · 321 阅读 · 0 评论 -
POJ 2182 Lost Cows
LostCowsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6380Accepted: 4044DescriptionN (2 <= N<= 8,000) cows have unique brands in the range 1..N.In a spectacular display原创 2012-12-05 17:09:55 · 395 阅读 · 0 评论 -
POJ 1703 Find them, Catch them
Find them, Catch themTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 17373Accepted: 5105DescriptionThe police office inTadu City decides to say ends to the chaos, as launch原创 2012-12-05 17:09:58 · 348 阅读 · 0 评论 -
POJ 1664 放苹果
放苹果Time Limit: 1000MSMemory Limit: 10000KTotal Submissions:18079Accepted: 11424Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1是同一种分法。Input第一行是测试数据的数目t(0<原创 2012-12-05 17:10:23 · 304 阅读 · 0 评论 -
POJ 1047 Round and Round We Go
Round and Round We GoTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 9153Accepted: 4144DescriptionA cyclic number is an integer n digits in lengthwhich, when multiplied by原创 2012-12-05 17:10:53 · 340 阅读 · 0 评论 -
POJ 1050 To the Max
To the MaxTime Limit: 1000MS Memory Limit:10000KTotal Submissions: 27628 Accepted:14304DescriptionGiven a two-dimensional array of positive and negativeintegers, a sub-rectangle is any contigu原创 2012-12-05 17:10:56 · 411 阅读 · 0 评论 -
POJ 1002 487-3279
唉,出师不利啊,本来挺简单的一道题错了好多遍,看来以后在POJ上要小心啦把字符串转化为数字,这样比较省时间啊,还有要记得没有重复的时候输出的No duplicates.,附带几个测试数据哈:2---3333--3-3-3---3333333输出:333-3333 240000000001000100000000010001输出:000-0000 2001-00原创 2012-12-05 17:09:20 · 475 阅读 · 0 评论 -
ZZULI_SummerPractice(3) POJ 3984…
C - 迷宫问题 pTime Limit: 1000MSMemory Limit: 65536K64bit IO Format: %I64d & %I64u[Submit] [Go Back] [Status]Description定义一个二维数组:int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1原创 2012-12-05 17:10:29 · 344 阅读 · 0 评论 -
POJ 1018 Communication System
Poj_1018_Communication System关键词:dp 贪心 枚举题目描述:Communication SystemTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8824 Accepted: 3095Description原创 2012-12-05 17:10:38 · 438 阅读 · 0 评论 -
POJ 3660 Cow Contest(关系闭包…
CowContestTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4818Accepted: 2570DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered1..N, are participating in a programmin原创 2012-12-05 17:15:00 · 402 阅读 · 0 评论 -
POJ 1019 Number Sequence
NumberSequenceTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 24188Accepted: 6468DescriptionA single positive integer i is given.Write a program to find the digit located原创 2012-12-05 17:09:44 · 589 阅读 · 0 评论 -
POJ 1182 食物链
由于前几天一直没搞懂并查集,现在搞懂了才做出来,所以交得有点晚了通过率:28% 难度:较难食物链Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 17611 Accepted: 4934Description动物王国中有三类动物A,B,原创 2012-12-05 17:09:29 · 314 阅读 · 0 评论 -
POJ 1753 Flip Game
Flip GameTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 14504Accepted: 6218DescriptionFlip game is played on a rectangular 4x4 fieldwith two-sided pieces placed on each o原创 2012-12-05 17:09:24 · 211479 阅读 · 1 评论 -
POJ 3185 The Water Bowls
The Water BowlsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2671Accepted: 991DescriptionThe cows have a lineof 20 water bowls from which they drink. The bowls can be eit原创 2012-12-05 17:09:46 · 472 阅读 · 0 评论 -
POj 2379 ACM Rank Table
ACM Rank TableTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3023Accepted: 773DescriptionACM contests, like the one you are participatingin, are hosted by the special soft原创 2012-12-05 17:09:48 · 1395 阅读 · 0 评论 -
POJ 2039 To and Fro
To and FroTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 6974Accepted: 4577DescriptionMo and Larry havedevised a way of encrypting messages. They first decide secretly on原创 2012-12-05 17:09:51 · 417 阅读 · 0 评论 -
POJ 2236 Wireless Network
Wireless NetworkTime Limit: 10000MSMemory Limit: 65536KTotal Submissions: 10451Accepted: 4431DescriptionAn earthquake takesplace in Southeast Asia. The ACM (Asia Cooperated Medical原创 2012-12-05 17:10:01 · 350 阅读 · 0 评论 -
POJ 1256 Anagram(全排列问题)
AnagramTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 13959Accepted: 5693DescriptionYou are to write aprogram that has to generate all possible words from a given set ofl原创 2012-12-05 17:10:21 · 560 阅读 · 0 评论 -
POJ 3278 Catch That Cow
Catch That CowTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 24664Accepted: 7604DescriptionFarmer John has been informed of the location of a fugitive cowand wants to ca原创 2012-12-05 17:10:47 · 437 阅读 · 0 评论 -
POj 1159 Palindrome (dp)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1159这个题有两种基本解法,第1种方法:设a[i][j]表示从第i个字符到第j个字符需要增加多少字母使得回文,初始化后,状态转移方程:if(s[i]==s[j]) a[i][j]=a[i+1][j-1];else a[i][j]=min(a[i+1][j],a[i][j-1])+1;原创 2012-12-05 17:11:22 · 334 阅读 · 0 评论 -
POJ 2594 Treasure Exploration(…
Treasure ExplorationTime Limit: 6000MSMemory Limit: 65536KTotal Submissions: 5083Accepted: 1966DescriptionHave you ever readany book about treasure exploration? Have you ever see an原创 2012-12-05 17:14:58 · 459 阅读 · 0 评论 -
POJ:1928 花生问题 The Peanuts
#include#include#includestruct pean{ int x,y,num;}sum[3000];int cmp(const void *a,const void *b){ struct pean *c,*d; c=(struct pean *)a; d=(struct pean *)b; returnd->num-c->num;}int main原创 2012-12-05 17:08:15 · 517 阅读 · 0 评论 -
POJ 2413 How many Fibs?
How manyFibs?Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8617Accepted: 3173DescriptionRecall thedefinition of the Fibonacci numbers:f1 := 1 f2 := 2 fn :=原创 2012-12-05 17:14:00 · 329 阅读 · 0 评论