http://codeforces.com/contest/1288/problem/C 题意: 用1—n构造两个长为m的数组a,b 满足a[i]<=b[i],a单调不减,b单调不增 求方案数 令dp[i][j][k] 表示构造了长度为i,a[i]=j,b[i]=k的方案数 dp[i][j][k]= ...
分类:
其他好文 时间:
2020-01-20 22:27:41
阅读次数:
64
two pointers思想 利用两个i, j两个下标,同时对序列进行扫描,以O(n)复杂度解决问题的一种思想, 如果能用这种思想解决问题,那么会大大降低程序的复杂度。 两个利用这个思想的例子: 1. 分析: 代码: 1 while (i < j){ 2 if (a[i] + a[j] == m){ ...
分类:
其他好文 时间:
2020-01-20 19:16:01
阅读次数:
71
The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed ...
分类:
其他好文 时间:
2020-01-20 09:57:49
阅读次数:
93
Can you walk and talk at the same time? If so, you've experienced what it's like to be in two states at the same time. Hopefully, those two states hav ...
分类:
其他好文 时间:
2020-01-20 09:39:21
阅读次数:
70
算法汇总: Floyd 算法 Dijkstra 算法 Bellman-Ford 算法 SPFA算法 Floyd算法 应该是几个算法当中最简单的了,虽然时间复杂度有点高。 f[k][i][j]表示从i经过若干个编号不超过k的节点到j的最短路长度。于是有: f[k][i][j]=min(f[k-1][i ...
分类:
其他好文 时间:
2020-01-20 09:26:05
阅读次数:
63
This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu ...
分类:
其他好文 时间:
2020-01-19 23:53:57
阅读次数:
103
This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu ...
分类:
其他好文 时间:
2020-01-19 22:18:53
阅读次数:
107
本题要求实现一个函数,求N个集合元素A[]的中位数,即序列中第?大的元素。其中集合元素的类型为自定义的ElementType。 函数接口定义: ElementType Median( ElementType A[], int N ); 其中给定集合元素存放在数组A[]中,正整数N是数组元素个数。该函 ...
分类:
其他好文 时间:
2020-01-19 15:17:35
阅读次数:
110
3D点云做detection的一篇milestone paper。经典的two-stage方法(region proposal-based method)。思路来自于经典的faster rcnn。 整个模型如下图 图一. 整体模型 3D Point Cloud Representation 这篇文章 ...
分类:
Web程序 时间:
2020-01-19 12:57:44
阅读次数:
185
学而时习之,不亦悦乎! netty源码 public final class DefaultEventExecutorChooserFactory implements EventExecutorChooserFactory { public static final DefaultEventExe ...
分类:
其他好文 时间:
2020-01-19 12:35:39
阅读次数:
66