HDU
……
逃夭丶
你是我荒唐青春里唯一的认真
展开
-
(C语言)HDU 2054 A == B ?
Give you two numbers A and B, if A is equal to B, you should print “YES”, or print “NO”. Input each test case contains two numbers A and B. Output for each case, if A is equal to B, you should print ...原创 2019-01-21 17:31:01 · 212 阅读 · 0 评论 -
poj 放苹果(C语言 递归)
原题链接 Description 把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。 Input 第一行是测试数据的数目t(0 <= t <= 20)。以下每行均包含二个整数M和N,以空格分开。1<=M,N<=10。 Output 对输入的每组数据M和N,用一行输出相应的K。 Sample ...原创 2019-01-23 15:44:48 · 930 阅读 · 0 评论 -
分割问题
(1) n条直线最多分平面问题 题目大致如:n条直线,最多可以把平面分为多少个区域。 析:可能你以前就见过这题目,这充其量是一道初中的思考题。但一个类型的题目还是从简单的入手,才容易发现规律。当有n-1条直线时,平面最多被分成了f(n-1)个区域。则第n条直线要是切成的区域数最多,就必须与每条直线相交且不能有同一交点。这样就会得到n-1个交点。这些交点将第n条直线分为2条射线和n-2条线断。而每条...转载 2019-03-05 18:39:05 · 93 阅读 · 0 评论 -
HDU-1757-A Simple Math Problem
Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10); And ai(0<=i<=9) can only be 0 or 1...原创 2019-05-14 22:31:17 · 76 阅读 · 0 评论 -
J - Tempter of the Bone
The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone ...原创 2019-05-17 21:31:07 · 129 阅读 · 0 评论