1.背景假设有两条轨迹,一条是预定轨迹,一条是实际轨迹,分别为L1、L2。L1由点(A1、A2、A3、...、AN)组成,L2由(B1、B2、B3、…、BM)组成。现在给出了一个容差范围,即L2上的点能与L1这条预定路线的垂直容差范围Range,求L2上满足要求的实际点。这个需求我们实际可以分为两种...
分类:
其他好文 时间:
2014-11-16 11:57:35
阅读次数:
921
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For e...
分类:
其他好文 时间:
2014-11-12 19:42:37
阅读次数:
186
介绍哈夫曼编码之前先介绍一下哈弗曼树:哈夫曼树:哈夫曼树又称最优二叉树,是一种带权路径长度最短的二叉树。所谓树的带权路径长度,就是树中所有的叶结点的权值乘上其到根结点的路径长度(若根结点为0层,叶结点到根结点的路径长度为叶结点的层数)。树的带权路径长度记为WPL=(W1*L1+W2*L2+W3*L3...
分类:
其他好文 时间:
2014-11-11 07:00:57
阅读次数:
260
题意: n个物体从高H处以相同角度抛下,有各自的初速度,下面[L1,R1]是敌方坦克的范围,[L2,R2]是友方坦克,问从某个角度抛出,在没有一个炮弹碰到友方坦克的情况下,最多的碰到敌方坦克的炮弹数。解法: 枚举角度,将pi/2分成1000份,然后枚举,通过方程 v*sin(theta)*t - 1...
分类:
其他好文 时间:
2014-11-10 17:37:18
阅读次数:
210
public class TestConvert2{public static void main(String []args){int i=1;int j=2;float f1=0.1f;float f2=123;long l1=12345678,l2=8888888888L;//编译器看到整数时...
分类:
其他好文 时间:
2014-11-08 00:39:56
阅读次数:
478
FactoryOne industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the d...
分类:
其他好文 时间:
2014-11-06 14:19:09
阅读次数:
298
A. FactoryOne industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of th...
分类:
其他好文 时间:
2014-11-06 08:10:46
阅读次数:
278
Given a singlylinked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For examp...
分类:
其他好文 时间:
2014-11-04 14:34:54
阅读次数:
155
高精度:一位一位存
#include
#include
main()
{
int n,l1,l2,i,j,k,m,p;
char a[1000],b[1000],c[1000],d[1000],s[1001];
while(scanf("%d ",&n)!=EOF)
{
for(p=1; p<=n; p++)
{
...
分类:
其他好文 时间:
2014-11-01 19:13:54
阅读次数:
135
题意:对于[l1, r1], [l2, r2]...[lm, rm]线段组成的一个集合S,我们定义f(S)为最大的不相交(没有任何公共点)线段数,现在给定n及k,n表示线段范围,即任何[li, ri]有1i)的状态有: 在【i+1, k】区间内一定选了至少一条以k为右端点的线段,选法2k-i...
分类:
其他好文 时间:
2014-10-31 21:58:06
阅读次数:
128