看数据,很容易想到设计状态f[i][0/1]表示该位是否反转的最大值,第一次看题的时候看成每个字符都要单调递增,其实是每次字符串的字典序要单调递增。 #include<iostream> #include<cstring> #include<cstdio> #include<map> #includ ...
分类:
其他好文 时间:
2020-03-30 23:07:13
阅读次数:
87
Problem : Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element ...
分类:
其他好文 时间:
2020-03-30 16:41:09
阅读次数:
69
看的第一遍,找不到sass,查看node-sass文件,里面没有文件 解决办法 下载sass之前,要先修改源 先把node-modules删除掉 执行以下命令 npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sa ...
分类:
其他好文 时间:
2020-03-30 16:05:28
阅读次数:
100
https://vjudge.net/problem/POJ-3017 题目 给一个长度为$N$的序列,你需要把它切成几段,每一段的和不能超过$M$,求一种切法,使每一段的最大值的和最小。 $N\leqslant100000$,$M$不会爆long long,序列中的数在$[0,1000000]$ ...
分类:
其他好文 时间:
2020-03-30 11:21:08
阅读次数:
60
给定数组,求数组中两个数之和的索引 给定一个整数数组 nums?和一个目标值 target,请你在该数组中找出和为目标值的那?两个?整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。 示例 给定 nums = [2, 7, 11, 15], ...
分类:
其他好文 时间:
2020-03-30 10:00:19
阅读次数:
93
圆桌问题 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 7955 Accepted Submission(s): 2851 Problem De ...
分类:
其他好文 时间:
2020-03-30 09:52:34
阅读次数:
86
Problem Statement Problem Dr. Patel has N stacks of plates. Each stack contains K plates. Each plate has a positive beauty value, describing how beaut ...
分类:
其他好文 时间:
2020-03-30 09:49:38
阅读次数:
81
Problem : Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any posit ...
分类:
移动开发 时间:
2020-03-29 22:38:14
阅读次数:
107
题意:http://codeforces.com/problemset/problem/295/D 思路: 可以把图形看成上下两个金字塔(极端情况下长方形),dp出以i的长为底,以j为高的三角形数(长方形),再预处理前缀(以i的长为底,以<=j为高),然后就枚举中心行,上下金字塔数相乘,注意两个图形 ...
分类:
其他好文 时间:
2020-03-29 19:30:37
阅读次数:
76
1005. 三角形最大面积 中文English 平面上有一系列点。返回由其中三个点可以形成的三角形最大面积。 样例 样例: 输入: points = [[0,0],[0,1],[1,0],[0,2],[2,0]] 输出: 2 解释: 这五个点如图所示,红色三角形面积最大。 注意事项 3 <= poi ...
分类:
其他好文 时间:
2020-03-29 18:05:14
阅读次数:
62