- 博客(19)
- 资源 (4)
- 收藏
- 关注
原创 solution Of 1095. Cars on Campus (30)
1095. Cars on Campus (30)Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the info
2016-06-24 14:11:09 537
原创 solution Of 1014. Waiting in Line (30)
1014. Waiting in Line (30)Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wai
2016-06-22 12:31:37 730
原创 solution Of 1055. The World's Richest (25)
1055. The World’s Richest (25)Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job, but
2016-06-22 02:04:08 429
原创 solution Of 1066. Root of AVL Tree (25)
1066. Root of AVL Tree (25)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by mor
2016-06-21 15:16:34 399
原创 solution Of 1022. Digital Library (30)
1022. Digital Library (30)A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned a
2016-06-20 22:49:42 485
原创 solution Of 1051. Pop Sequence (25)
1051. Pop Sequence (25)Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possib
2016-06-19 23:10:10 285
原创 solution Of 1019. General Palindromic Number (20)
1019. General Palindromic Number (20)A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single d
2016-06-19 20:32:54 342
转载 C/C++中extern关键字详解
1 基本解释:extern可以置于变量或者函数前,以标示变量或者函数的定义在别的文件中,提示编译器遇到此变量和函数时在其他模块中寻找其定义。此外extern也可用来进行链接指定。 也就是说extern有两个作用,第一个,当它与”C”一起连用时,如: extern “C” void fun(int a, int b);则告诉编译器在编译fun这个函数名时按着C的规则去翻译相应的函数名而不是C
2016-06-19 10:36:29 304
原创 solution Of 1091. Acute Stroke (30)
1091. Acute Stroke (30)One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI s
2016-06-17 22:54:39 324
原创 solution Of 1096. Consecutive Factors (20)
1096. Consecutive Factors (20)Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the three co
2016-06-17 16:28:02 390
原创 solution Of 1103. Integer Factorization (30)
1103. Integer Factorization (30)The K-P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K-P fact
2016-06-16 23:04:25 422
原创 solution Of 1101. Quick Sort (25)
1101. Quick Sort (25)There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot
2016-06-16 00:01:36 473
原创 solution Of 1107. Social Clusters (30)
1107. Social Clusters (30)When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A “social cluster” is a set of p
2016-06-15 17:07:15 457
原创 堆排序(C++实现)
堆排序堆排序运行时间(n lgn)。它是一种原地(in place)排序算法:在任何时候,数组中只有常数个元素存储在数组外。堆的数据结构不至少在堆排序中有用,还可以构成一个有效的优先队列。数据结构二叉堆数据结构是一种数组对象,它可以被看做是一棵完全二叉树。树中的每个节点与数组中存放该节点值的那个元素对应。除了最后一层,树的每一层都是填满。 假设有数组A。 树的根为A[0]现在给定某个节点的下标i
2016-06-14 16:43:28 879
原创 solution Of 1102. Invert a Binary Tree (25)
1102. Invert a Binary Tree (25)The following is from Max Howell @twitter:Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fuck o
2016-06-14 01:26:54 331
原创 solution Of 1106. Lowest Price in Supply Chain (25)
1106. Lowest Price in Supply Chain (25)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)– everyone involved in moving a product from supplier to customer.Starting fro
2016-06-12 17:54:47 338
原创 solution Of 1104. Sum of Number Segments (20)
1104. Sum of Number Segments (20)Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence {0.1, 0.2, 0.3, 0.4}, we have 10 segments: (
2016-06-12 16:13:53 366
原创 solution Of 1069. The Black Hole of Numbers (20)
1069. The Black Hole of Numbers (20)For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a
2016-06-12 15:48:40 337
转载 Python语法基础——关于全局变量与局部变量
1、函数内部的变量名如果第一次出现,且出现在=前面,即被视为定义一个局部变量,不管全局域中有没有用到该变量名,函数中使用的将是局部变量,例如:num = 100def func(): num = 123 print(num)func()输出:123说明函数中定义的num是一个局部变量,会将全局变量覆盖。再例如:num = 100def func(): num += 100
2016-06-01 11:26:20 340
精通Scrapy网络爬虫
2019-03-14
21个项目玩转深度学习_基于TensorFlow的实践详解
2019-03-12
Python深度学习
2019-03-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人