摘要: Problem G Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 14 Accepted Submission(s) : 4Font: Times New Roman | Verdana | Georgia Font Size: ← →Problem Description有二个整数,它们加起来等于某个整数,乘起来又等于另一个整数,它们到底是真还是假,也就是这种整数到底存不存在,实在有点吃不准,你能快速回答吗?看来只能通过编程。例如:... 阅读全文
posted @ 2012-08-01 18:14 myth_HG 阅读(629) 评论(0) 推荐(0) 编辑
摘要: Problem C Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 21 Accepted Submission(s) : 6Font: Times New Roman | Verdana | Georgia Font Size: ← →Problem Description There must be many A + B problems in our HDOJ , now a new one is coming.Give you ... 阅读全文
posted @ 2012-08-01 18:08 myth_HG 阅读(2991) 评论(0) 推荐(0) 编辑
摘要: Problem C Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 8 Accepted Submission(s) : 6Font: Times New Roman | Verdana | Georgia Font Size: ← →Problem Description一个 n 阶方阵的元素是1,2,...,n^2,它的每行,每列和2条对角线上元素的和相等,这样的方阵叫魔方。n为奇数时我们有1种构造方法,叫做“右上方” ,例如下面给... 阅读全文
posted @ 2012-08-01 18:04 myth_HG 阅读(277) 评论(1) 推荐(0) 编辑
摘要: #include<iostream>#include<algorithm>using namespace std;int comp(const void *a,const void *b){ return ((int *)a)[0]<((int *)b)[0];}int main(){int a[5][5] = {{5,2,3,4,5}, {4,3,2,5,6}, {9,2,4,5,7}, {3,2,4,5,7}, {2,2,4,8,7}};qsort(a[0],5,sizeof(int),comp);//a[0]被排序qsort(a,5... 阅读全文
posted @ 2012-08-01 17:58 myth_HG 阅读(444) 评论(1) 推荐(0) 编辑
摘要: Problem F Time Limit : 5000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 4 Accepted Submission(s) : 4Font: Times New Roman | Verdana | Georgia Font Size: ← →Problem Description四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里... 阅读全文
posted @ 2012-08-01 17:55 myth_HG 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 母牛的故事Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24700 Accepted Submission(s): 11997Problem Description有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛? Input输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0<n<55),n的含义如题目中描述。n=0表示输入数据的结束 阅读全文
posted @ 2012-08-01 17:08 myth_HG 阅读(216) 评论(0) 推荐(0) 编辑