1. 1008. Elevator (20)

    The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to move down one floor. The elevator will stay for 5 seconds at each stop.

    2017/10/14 PAT

  2. 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 Subsequence is the continuous subsequence which has the largest sum of its elements. For example, given sequence { -2, 11, -4, 13, -5, -2 }, its maximum subsequence is { 11, -4, 13 } with the largest sum being 20.

    2017/10/14 PAT

  3. 数据结构基础知识

    稀疏矩阵存储

    2017/10/13 Algorithms

  4. 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 records of signing in’s and out’s, you are supposed to find the ones who have unlocked and locked the door on that day.

    2017/10/13 PAT

  5. 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.

    2017/10/13 PAT

  6. 1004. Counting Leaves (30)

    A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input

    2017/10/13 PAT

  7. 1003. Emergency (25)

    Emergency (25)

    2017/10/13 PAT

  8. C和C++输入输出

    getchar() & putchar() 函数 int getchar(void) 函数从屏幕读取下一个可用的字符,并把它返回为一个整数。这个函数在同一个时间内只会读取一个单一的字符。您可以在循环内使用这个方法,以便从屏幕上读取多个字符。

    2017/10/10 C

  9. Java基础

    Java基础

    2017/07/01 Java

  10. 数学

    乘法原理 list 里枚举右端点

    2017/05/01 Algorithms