上一页 1 2 3 4 5 6 ··· 15 下一页
  2017年8月31日
摘要: 有一个长为n的数组A,求满足0≤a≤b<n的A[b]-A[a]的最大值。 给定数组A及它的大小n,请返回最大差值。 测试样例: [10,5],2 返回:0 1 class LongestDistance { 2 public: 3 int getDis(vector<int> A, int n) { 阅读全文
posted @ 2017-08-31 09:48 无惧风云 阅读(137) 评论(0) 推荐(0)
  2017年8月29日
摘要: 给你六种面额1、5、10、20、50、100元的纸币,假设每种币值的数量都足够多,编写程序求组成N员(N为0-10000的非负整数)的不同组合的个数。 输入描述: 输出描述: 示例1 输入 5 输出 2 1 #include<iostream> 2 #include<vector> 3 using 阅读全文
posted @ 2017-08-29 10:46 无惧风云 阅读(478) 评论(0) 推荐(0)
  2017年8月28日
摘要: 参考:http://www.cnblogs.com/zhangbaochong/p/5492877.html https ://zhidao.baidu.com/question/1176347680995216059.html http ://blog.csdn.net/langmanqishiz 阅读全文
posted @ 2017-08-28 16:14 无惧风云 阅读(209) 评论(0) 推荐(0)
  2017年8月17日
摘要: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except  阅读全文
posted @ 2017-08-17 10:24 无惧风云 阅读(195) 评论(0) 推荐(0)
  2017年8月16日
摘要: In English, we have a concept called root, which can be followed by some other words to form another longer word - let's call this word successor. For 阅读全文
posted @ 2017-08-16 22:04 无惧风云 阅读(214) 评论(0) 推荐(0)
摘要: Given a non-empty array of integers, return the k most frequent elements. For example,Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note: You may assum 阅读全文
posted @ 2017-08-16 17:12 无惧风云 阅读(133) 评论(0) 推荐(0)
  2017年8月14日
摘要: 请实现一个函数,把字符串中的每个空格替换成“%20”,例如:we are family——》we%20are%20family. 阅读全文
posted @ 2017-08-14 16:07 无惧风云 阅读(135) 评论(0) 推荐(0)
  2017年8月12日
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 int main() 10 { 11 int n; 12 cin >> n; 13 vector vet(n); 14 for (int i =... 阅读全文
posted @ 2017-08-12 10:38 无惧风云 阅读(195) 评论(0) 推荐(0)
  2017年8月11日
摘要: 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 @ 2017-08-11 10:21 无惧风云 阅读(121) 评论(0) 推荐(0)
  2017年8月2日
摘要: Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Note: 阅读全文
posted @ 2017-08-02 10:04 无惧风云 阅读(139) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 15 下一页