02 2019 档案

摘要:编程题#1:输出200 来源: 北京大学在线程序评测系统POJ (Coursera声明:在POJ上完成的习题将不会计入Coursera的最后成绩。) 总时间限制: 1000ms 内存限制: 1024kB 描述使以下代码输出结果为200. 输入不需要输入。 输出输出结果为200。 Code: 编程题# 阅读全文 »
posted @ 2019-02-28 21:10 Veritas_des_Liberty 阅读(1030) 评论(0) 推荐(0) 编辑
摘要:In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文 »
posted @ 2019-02-28 09:55 Veritas_des_Liberty 阅读(331) 评论(0) 推荐(0) 编辑
摘要:A sequence of numbers is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the 阅读全文 »
posted @ 2019-02-28 08:59 Veritas_des_Liberty 阅读(283) 评论(0) 推荐(0) 编辑
摘要:1091 N-自守数 (15 分) 如果某个数 K 的平方乘以 N 以后,结果的末尾几位数等于 K,那么就称这个数为“N-自守数”。例如 3,而 2 的末尾两位正好是 9,所以 9 是一个 3-自守数。 本题就请你编写程序判断一个给定的数字是否关于某个 N 是 N-自守数。 输入格式: 输入在第一行 阅读全文 »
posted @ 2019-02-27 12:18 Veritas_des_Liberty 阅读(519) 评论(0) 推荐(0) 编辑
摘要:距离上次我一个人参加PAT考试已经过去快一个学期了,想想上次自己也是搞笑,自己一个人被这个书包就去了ZZ,人生地不熟的,乘坐公交车还坐反了。考完试因为不知道要等到考试结束就可以领取成绩证书,自己连那张不及格的证书都没有领,就急着赶火车回到了学校。因为这个周末就参加考试了,所以考试前做几道题熟悉一下试 阅读全文 »
posted @ 2019-02-26 18:33 Veritas_des_Liberty 阅读(1043) 评论(0) 推荐(0) 编辑
摘要:记得之前电脑上的那个Ubuntu是去年寒假的时候安装的,算下来自己用Linux也快一年了。虽然在去年暑假的时候我也曾经想过要把Ubuntu升级到18.04可是当时安装了几次都没有成功,自己也就放弃了。于是就用Ubuntu17.10用了将近一年,从刚开始的的小白对linux一窍不通,到现在的大白。在使 阅读全文 »
posted @ 2019-02-25 21:55 Veritas_des_Liberty 阅读(3883) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文 »
posted @ 2019-02-19 23:22 Veritas_des_Liberty 阅读(248) 评论(0) 推荐(0) 编辑
摘要:A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the 阅读全文 »
posted @ 2019-02-19 22:56 Veritas_des_Liberty 阅读(193) 评论(0) 推荐(0) 编辑
摘要:A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but i 阅读全文 »
posted @ 2019-02-19 22:10 Veritas_des_Liberty 阅读(187) 评论(0) 推荐(0) 编辑
摘要:Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. 阅读全文 »
posted @ 2019-02-18 00:21 Veritas_des_Liberty 阅读(197) 评论(0) 推荐(0) 编辑
摘要:We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron 阅读全文 »
posted @ 2019-02-17 23:25 Veritas_des_Liberty 阅读(175) 评论(0) 推荐(0) 编辑
摘要:Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or 阅读全文 »
posted @ 2019-02-16 22:59 Veritas_des_Liberty 阅读(181) 评论(0) 推荐(0) 编辑
摘要:Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文 »
posted @ 2019-02-16 22:24 Veritas_des_Liberty 阅读(184) 评论(0) 推荐(0) 编辑
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文 »
posted @ 2019-02-16 21:47 Veritas_des_Liberty 阅读(178) 评论(0) 推荐(0) 编辑
摘要:You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文 »
posted @ 2019-02-16 20:51 Veritas_des_Liberty 阅读(295) 评论(0) 推荐(0) 编辑
摘要:Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2 阅读全文 »
posted @ 2019-02-15 22:32 Veritas_des_Liberty 阅读(168) 评论(0) 推荐(0) 编辑
摘要:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: Approach #1: My code. [C++] Appro 阅读全文 »
posted @ 2019-02-15 21:59 Veritas_des_Liberty 阅读(249) 评论(0) 推荐(0) 编辑
摘要:Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example: Approach #1: DP. [C++] Ana 阅读全文 »
posted @ 2019-02-15 21:49 Veritas_des_Liberty 阅读(214) 评论(0) 推荐(0) 编辑
摘要:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are ar 阅读全文 »
posted @ 2019-02-15 20:23 Veritas_des_Liberty 阅读(225) 评论(0) 推荐(0) 编辑
摘要:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文 »
posted @ 2019-02-15 20:05 Veritas_des_Liberty 阅读(206) 评论(0) 推荐(0) 编辑
摘要:Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: E 阅读全文 »
posted @ 2019-02-14 23:34 Veritas_des_Liberty 阅读(187) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequ 阅读全文 »
posted @ 2019-02-12 23:31 Veritas_des_Liberty 阅读(237) 评论(0) 推荐(0) 编辑
摘要:Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning 阅读全文 »
posted @ 2019-02-12 22:48 Veritas_des_Liberty 阅读(252) 评论(0) 推荐(0) 编辑
摘要:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文 »
posted @ 2019-02-12 22:16 Veritas_des_Liberty 阅读(201) 评论(0) 推荐(0) 编辑
摘要:Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string is a new string which is for 阅读全文 »
posted @ 2019-02-11 22:40 Veritas_des_Liberty 阅读(166) 评论(0) 推荐(0) 编辑
摘要:Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Example 1: Example 2: Approach #1: DP. [C++] Analysis: status: match[s1L 阅读全文 »
posted @ 2019-02-11 22:13 Veritas_des_Liberty 阅读(227) 评论(0) 推荐(0) 编辑
摘要:Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: Approach #1: DP. [C++] Analysis: status: nums[n] 阅读全文 »
posted @ 2019-02-11 21:26 Veritas_des_Liberty 阅读(213) 评论(0) 推荐(0) 编辑
摘要:Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the f 阅读全文 »
posted @ 2019-02-09 00:29 Veritas_des_Liberty 阅读(194) 评论(0) 推荐(0) 编辑
摘要:On a 2-dimensional grid, there are 4 types of squares: 1 represents the starting square. There is exactly one starting square. 2 represents the ending 阅读全文 »
posted @ 2019-02-08 23:23 Veritas_des_Liberty 阅读(353) 评论(0) 推荐(0) 编辑
摘要:Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible stri 阅读全文 »
posted @ 2019-02-08 21:43 Veritas_des_Liberty 阅读(231) 评论(0) 推荐(0) 编辑
摘要:We are given N different types of stickers. Each sticker has a lowercase English word on it. You would like to spell out the given target string by cu 阅读全文 »
posted @ 2019-02-06 23:49 Veritas_des_Liberty 阅读(384) 评论(0) 推荐(0) 编辑
摘要:Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t 阅读全文 »
posted @ 2019-02-06 23:04 Veritas_des_Liberty 阅读(235) 评论(0) 推荐(0) 编辑
摘要:A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents 阅读全文 »
posted @ 2019-02-06 00:38 Veritas_des_Liberty 阅读(198) 评论(0) 推荐(0) 编辑
摘要:Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Input: 2 Output: 91 Explanation: The answer shoul 阅读全文 »
posted @ 2019-02-05 23:32 Veritas_des_Liberty 阅读(250) 评论(0) 推荐(0) 编辑
摘要:Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Example: I 阅读全文 »
posted @ 2019-02-05 23:02 Veritas_des_Liberty 阅读(179) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is 阅读全文 »
posted @ 2019-02-05 00:31 Veritas_des_Liberty 阅读(215) 评论(0) 推荐(0) 编辑
摘要:Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such th 阅读全文 »
posted @ 2019-02-04 23:58 Veritas_des_Liberty 阅读(256) 评论(0) 推荐(0) 编辑
摘要:Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adja 阅读全文 »
posted @ 2019-02-03 00:08 Veritas_des_Liberty 阅读(344) 评论(0) 推荐(0) 编辑
摘要:Bholu the Pandit on this New Year wanted to divide his Cuboidal Packaging block into cubes. But he loves uniformity so he asks you to divide it such a 阅读全文 »
posted @ 2019-02-02 22:37 Veritas_des_Liberty 阅读(278) 评论(0) 推荐(0) 编辑
摘要:Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be 阅读全文 »
posted @ 2019-02-01 22:50 Veritas_des_Liberty 阅读(145) 评论(0) 推荐(0) 编辑
摘要:Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) can search a literal word or a r 阅读全文 »
posted @ 2019-02-01 00:06 Veritas_des_Liberty 阅读(237) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示