
c++
fallingskies22
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
算法基础----递归(1)
递归的基本概念 一个函数调用其自身,就是递归。 例1 求n!的递归函数 int Factorial(int n){ if(n==0) return 1; else return n*Factorial(n-1); } 递归的作用 替代多重循环 解决本来就是用递归型式定义的问题 将问题分解为规模更小的子问题进行求解 … 例2 汉诺塔问题 void Hanoi(int n,...原创 2019-09-29 10:46:28 · 222 阅读 · 0 评论 -
PTA 甲级 1005
1005 Spell It Right (20 分) Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specification: Each input file co...原创 2019-10-02 09:45:38 · 176 阅读 · 0 评论 -
PTA 甲级 1006
1006 Sign In and Sign Out (25 分) At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the reco...原创 2019-10-02 11:54:54 · 247 阅读 · 0 评论 -
PTA 甲级 1007
1007 Maximum Subsequence Sum (25 分) Given a sequence of K integers { N1, N2, …, NK }. A continuous subsequence is defined to be { Ni, Ni+1, …, Nj } where 1≤i≤j≤K. The Maximum Subsequ...原创 2019-10-03 13:05:58 · 164 阅读 · 0 评论 -
树和二叉树
明天再写原创 2019-10-04 18:43:33 · 155 阅读 · 0 评论