摘要: Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of b 阅读全文
posted @ 2020-02-09 00:13 一斜星辰酱 阅读(192) 评论(0) 推荐(0) 编辑
摘要: As the manager of your company, you have to carefully consider, for each project, the time taken to finish it, the deadline, and the profit you can ga 阅读全文
posted @ 2020-02-09 00:10 一斜星辰酱 阅读(280) 评论(0) 推荐(0) 编辑
摘要: Given a list of N integers A​1​​, A​2​​, A​3​​,...A​N​​, there's a famous problem to count the number of inversions in it. An inversion is defined as 阅读全文
posted @ 2020-02-09 00:05 一斜星辰酱 阅读(214) 评论(0) 推荐(0) 编辑
摘要: It is vitally important to have all the cities connected by highways in a war. If a city is conquered by the enemy, all the highways from/toward that 阅读全文
posted @ 2020-02-09 00:02 一斜星辰酱 阅读(163) 评论(0) 推荐(0) 编辑
摘要: After finishing her tour around the Earth, CYLL is now planning a universal travel sites development project. After a careful investigation, she has a 阅读全文
posted @ 2020-02-09 00:01 一斜星辰酱 阅读(926) 评论(0) 推荐(0) 编辑
摘要: Programmers often have a preference among program constructs. For example, some may prefer if(0==a), while others may prefer if(!a). Analyzing such pa 阅读全文
posted @ 2020-02-09 00:00 一斜星辰酱 阅读(211) 评论(0) 推荐(0) 编辑
摘要: There is a kind of binary tree named red-black tree in the data structure. It has the following 5 properties: (1) Every node is either red or black. ( 阅读全文
posted @ 2020-02-08 23:59 一斜星辰酱 阅读(220) 评论(0) 推荐(0) 编辑
摘要: According to Wikipedia: "In mathematics and in particular in combinatorics, the Lehmer code is a particular way to encode each possible permutation of 阅读全文
posted @ 2020-02-08 23:58 一斜星辰酱 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Have you ever played the game "Greedy Snake"? In the game, we control the movements of the snake to eat the fruits scattered in the game field, while 阅读全文
posted @ 2020-02-08 23:56 一斜星辰酱 阅读(340) 评论(0) 推荐(0) 编辑
摘要: A circle of friends is a network of friend relationships. If A is a friend of B, then B is considered a friend of A no matter B admits or not, and the 阅读全文
posted @ 2020-02-08 23:55 一斜星辰酱 阅读(258) 评论(0) 推荐(0) 编辑