水题
文章平均质量分 79
大唐忽悠
高山仰止,景行行止
展开
-
汉诺塔问题及其变种
1.ABC三个柱子,小的不能在大的上面。从A移到C. //分析一下可知,每一次想要将一个大盘子从A移到C,就必须先把上面的小盘子从A移到B,最后再把B的盘子移到C,这样就是一个递归的过程。 #include using namespace std; int num=0; void hanio(int a,int b,int c,int n){ if(n<1) return;原创 2017-05-24 15:27:57 · 1922 阅读 · 2 评论 -
Educational Codeforces Round 21 A. Lucky Year
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Apart from having lots of holidays throughout the year, residents of Berlan原创 2017-05-16 20:27:19 · 198 阅读 · 0 评论 -
Educational Codeforces Round 21 B aevrage sleep time
B. Average Sleep Time time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It's been almost a week since Polycarp couldn't原创 2017-05-17 19:51:28 · 247 阅读 · 0 评论 -
水题--整数解 HDU 2092
HDU 2092 有二个整数,它们加起来等于某个整数,乘起来又等于另一个整数,它们到底是真还是假,也就是这种整数到底存不存在,实在有点吃不准,你能快速回答吗?看来只能通过编程。 例如: x + y = 9,x * y = 15 ? 找不到这样的整数x和y 1+4=5,1*4=4,所以,加起来等于5,乘起来等于4的二个整数为1和4 7+(-8)=-1,7*(-8)=-56,所以,原创 2017-07-19 20:06:07 · 389 阅读 · 0 评论 -
Codeforces Round #432 (Div. 1) A.Five Dimensional Points
A. Five Dimensional Points time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given set of n points in 5-dimensi原创 2017-09-05 21:18:49 · 405 阅读 · 0 评论 -
Codeforces Round #432 B. Arpa and a list of numbers
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Arpa has found a list containing n numbers. He calls a list bad if and onl原创 2017-09-08 14:44:45 · 245 阅读 · 0 评论 -
PAT甲级 2022 and 2018
1018. Public Bike Management (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue There is a public bike service in H原创 2017-11-06 20:39:37 · 253 阅读 · 0 评论 -
两道很有意思的题目POJ 2996,POJ2993
POJ 2996,POJ2993 Help Me with the Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5041 Accepted: 3148 Description Your task is to read a pictur原创 2017-10-30 20:42:48 · 355 阅读 · 0 评论 -
poj1035,用字典树失败
Spell checker Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 26073 Accepted: 9556 Description You, as a member of a development team for a new spell che原创 2017-11-08 20:20:03 · 191 阅读 · 0 评论