题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=1706&mosmsg=Submission+received+with+ID+13561937
题意:给定n个点 常量m
下面给出无向边(输入-1 -1表示终止加边)
得到...
分类:
其他好文 时间:
2014-07-22 23:04:54
阅读次数:
392
[ 问题: ]
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were
inserted in order. You may assume no duplicates in th...
分类:
其他好文 时间:
2014-07-22 23:01:15
阅读次数:
270
1Git基础说明1.1Git与subversion的区别Git只关注文件数据的整体内容是否发生改变,而不关心文件内容的具体差异Git是分布式的版本控制系统,因此大多数的操作不需要网络环境所有保存在Git数据库中的东西都是通过对内容的SHA-1计算的hash值作为索引而不是靠文件名当把本地工作推送..
分类:
其他好文 时间:
2014-05-03 01:32:11
阅读次数:
424
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=502&page=show_problem&problem=3720
唯一值得一说的就是shift,变成循环就行
这道题主要是测试下我做的算法模板
先贴模板
/**********************************...
分类:
其他好文 时间:
2014-05-02 21:29:31
阅读次数:
345
一 设置, 查看, 删除断点信息b xxx.cpp : num(or function)在
xxx.cpp 的第 num 行设置断点, 假如项目中只有一个 .cpp 文件, 不需要指定 xxx.cpp, 直接 b num 即可info break
查看断点信息, 断点信息中有断点的 index, 通...
分类:
数据库 时间:
2014-05-01 21:09:59
阅读次数:
433
一、安装 JDK 下载JDK最新版本,下载地址如下:
http://www.oracle.com/technetwork/java/javase/downloads/index.html 二、下载并安装
Eclipse http://www.eclipse.org/downloads/
分类:
移动开发 时间:
2014-05-01 21:03:30
阅读次数:
560
#include #include
//using namespace std;
DWORD WINAPI Fun1Proc(
LPVOID lpParameter // thread data
);
DWORD WINAPI Fun2Proc(
LPVOID lpParameter // thread data
);
int index=0;
int tickets=100;...
分类:
编程语言 时间:
2014-05-01 18:25:42
阅读次数:
323
我们考虑每一种x坐标,显然只有 sqrt{N}次,我们称这些为大的,其他为小的。
我们先考虑大的x和其他x之间的答案,先O(sqrt{N})枚举一个大的坐标,然后for其他的每个点,这样可以根据x坐标的差算出正方形的边长,hash检查一下就能知道这个正方形是否存在。
之后考虑小的x和小的x之间的答案,注意到我们可以对每个横坐标直接平方for,这样只有(sqrt{N})^2 + (sqrt{N})^2 + ... + (sqrt{N})^2 = N^1.5的枚举量,之后也可...
分类:
其他好文 时间:
2014-04-30 22:34:38
阅读次数:
326
public function index(){
header('Content-Type:text/html;charset=utf-8 ');
$M = M("Constant");
$count = $M->where($where)->count();
import("ORG.Util.Page"); // 导入分页类
...
分类:
Web程序 时间:
2014-04-30 22:27:39
阅读次数:
343
链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=36
叼伱个扑街,对呢道题真系无语,,提交5次都过唔到,唔相信既话,伱地可以试下啦。。。
偶噶代码:
#include
#include
#include
#include
...
分类:
其他好文 时间:
2014-04-30 22:16:39
阅读次数:
319