2013年7月10日

hdu 1299 Diophantus of Alexandria

摘要: Diophantus of AlexandriaDiophantus of Alexandria was an egypt mathematician living in Alexandria. He was one of the first mathematicians to study equations where variables were restricted to integral values. In honor of him, these equations are commonly called diophantine equations. One of the most 阅读全文

posted @ 2013-07-10 20:33 _洋洋 阅读(202) 评论(0) 推荐(0) 编辑

poj 2356 简单的抽屉问题

摘要: Find a multipleTime Limit:1000MSMemory Limit:65536KTotal Submissions:4790Accepted:2078Special JudgeDescriptionThe input contains N natural (i.e. positive integer) numbers ( N 如果存在sum[i]==0,那么就是说明1~i的和恰好为n的倍数。2>否则,一定存在两个值i, j(i#includeusing namespace std;int main(){ int a[10005],n,i,j,k,t; __in... 阅读全文

posted @ 2013-07-10 15:27 _洋洋 阅读(160) 评论(0) 推荐(0) 编辑

hdu 3790 最短路径问题

摘要: 最短路径问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7953Accepted Submission(s): 2384 Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一 阅读全文

posted @ 2013-07-10 11:13 _洋洋 阅读(121) 评论(0) 推荐(0) 编辑

导航