今天没有新动态
@kidultff

PAT-A 真题- 1005. Spell It Right

原题干: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 contains one test case. Each case occupies one line ...
  • 0
  • 0
@kidultff

PAT-A 真题- 1052. Linked List Sorting

原题干:A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now given a linked ...
  • 0
  • 0
@kidultff

PAT-A 真题- 1004. Counting Leaves

原题干:A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains one test case. Each case starts with a line containing 0 < N < 10 ...
  • 0
  • 0
@kidultff

JS控制导航栏滚动到底部后固定

实现起来很简单,我们可以通过JS原生的方式或者使用jQuery等等,获取元素的高度,然后在 window.onscroll 事件中,比较滚动位置与元素高度的位置即可。JS代码:function NavFixed(id){ var obj = document.getElementById(i ...
  • 0
  • 0
@kidultff

动态规划的递推写法--状态转移方程

我们先看一个图片:这是一个经典问题,图片上的东东是"数塔"。第一层有一个数字,第二层有两个数字。。。以此类推。问题是,如果从第一层走到第n层(当然,不能走回头路),路径上的数字相加的最大和是多少呢?如果从上到下考虑,可能并不是特别好 ...
  • 0
  • 2