上一页 1 2 3 4 5 6 7 ··· 14 下一页
摘要: 题目大意 意思就是这里有n个小朋友要选一个班长。 每一个小朋友都有一票,小朋友因为害羞不会投自己,只会投给他们最好的同学。现在1号小朋友想要当班长,而且是当唯一的班长,这就意味着他的票数必须要大于其他人的所有票。他可以通过买糖果给其他小朋友让他们把票投给他自己。 现在求1号当上班长需要花费的最小糖果 阅读全文
posted @ 2017-04-29 23:31 aiterator 阅读(237) 评论(0) 推荐(0) 编辑
摘要: A string is called bad if it has 3 vowels in a row, or 5 consonants in a row, or both. A string is called good if it is not bad. You are given a strin 阅读全文
posted @ 2017-04-29 18:39 aiterator 阅读(346) 评论(0) 推荐(0) 编辑
摘要: Your friend Jim has challenged you to a game. He has a bag containing red and blue marbles. There will be an odd number of marbles in the bag, and you 阅读全文
posted @ 2017-04-21 16:23 aiterator 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Nowadays the one way traffic is introduced all over the world in order to improve driving safety and reduce traffic jams. The government of Dhaka Divi 阅读全文
posted @ 2017-04-19 15:55 aiterator 阅读(364) 评论(0) 推荐(0) 编辑
摘要: This winter we are going on a trip to Bandorban. The main target is to climb up to the top of Keokradong. So, we will use a trail. The trail is a cont 阅读全文
posted @ 2017-04-18 22:23 aiterator 阅读(271) 评论(0) 推荐(0) 编辑
摘要: A rider is a fantasy chess piece that can jump like a knight several times in a single move. A rider that can perform a maximum of K jumps during a si 阅读全文
posted @ 2017-04-18 21:06 aiterator 阅读(194) 评论(0) 推荐(0) 编辑
摘要: A palindrome partition is the partitioning of a string such that each separate substring is a palindrome. For example, the string "ABACABA" could be p 阅读全文
posted @ 2017-04-17 20:33 aiterator 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array nums = , Your function should return 阅读全文
posted @ 2017-04-17 11:40 aiterator 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2017-04-16 23:06 aiterator 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = 阅读全文
posted @ 2017-04-14 21:07 aiterator 阅读(89) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 14 下一页