version 1
从右到左排序,每次都尽可能的选打击范围内最右边的点安装雷达(由于浮点,所以不要一棒子打死的判断是大是小,给出一个精度范围,一开始范围给打了就WA),拿这个雷达去覆盖其他点,最后雷达总数一定是最少的
/*
poj 1328
264K 16MS
*/
#include
#include
#include
#include
#define MAXN 10...
分类:
其他好文 时间:
2014-05-23 02:23:38
阅读次数:
239
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
public class TraditionalTimerTest {
static int count;
public static void main(String[] args) {
class MyTimerTask exte...
分类:
其他好文 时间:
2014-05-23 01:45:11
阅读次数:
226
快速排序如同其名,是排序中性能比较好的一个排序算法,当数组是顺序的话,他的最差的时间复杂度是O(N^2),一般的时间复杂度是O(n*lgn).
快速排序的思想就是分治,每一趟排序过程都把一个数放到最终的位置上面去。然后这个位置把数组分为前半部分和后半部分。针对前半部分和后半部分再递推进行快速排序。
快排的java实现:
public class Sort {
public stat...
分类:
其他好文 时间:
2014-05-23 01:44:26
阅读次数:
218
结构是使用 struct 关键字定义的,与类相似,都表示可以包含数据成员和函数成员的数据结构。 一般情况下,我们很少使用结构,而且很多人也并不建议使用结构,但作为.NET Framework 一般型別系统中的一个基本架构,还是有必要了解一下的。
结构的特征: 结构是一种值类型,并且不需要堆分配。 结构的实例化可以不使用 new 运算符。
在结构声明中,除非字段被声明为 const 或 stat...
分类:
其他好文 时间:
2014-05-23 01:05:52
阅读次数:
298
介绍一个list滑动时通过一个text提示Array首字母位置的应用
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file exce...
分类:
其他好文 时间:
2014-05-23 00:58:42
阅读次数:
326
介绍在在title bar上显示indeterminate progress
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file ...
分类:
其他好文 时间:
2014-05-23 00:31:27
阅读次数:
352
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo...
分类:
其他好文 时间:
2014-05-23 00:30:50
阅读次数:
415
1.先在线安装sqlite3,试用一下命令安装
ubuntu@ubuntu-virtual-machine:~$ sudo apt-get install sqlite3
2.安装成功后测试会出现
ubuntu@ubuntu-virtual-machine:~$ sqlite3
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help"...
分类:
数据库 时间:
2014-05-22 17:13:35
阅读次数:
348
原文:深度解析javascript中的浅复制和深复制
在谈javascript的浅复制和深复制之前,我们有必要在来讨论下js的数据类型。我们都知道有Number,Boolean,String,Null,Undefined,Object五种类型。而Object又包含Function,Array和Obj...
分类:
编程语言 时间:
2014-05-22 15:13:54
阅读次数:
334
建议10:必须知道如何实现类比较器所谓的比较器就只是一个接口,也只需要实现一个方法(public int CompareTo(object
obj)).实现了比较器有什么用呢?除了顾名思义的可以比较两个实例的大小.还可以用来排序(比如是List集合,就直接调用.Sort()方法就可以
了.方便至极....
分类:
其他好文 时间:
2014-05-22 14:29:37
阅读次数:
186