码迷,mamicode.com
首页 >  
搜索关键字:hotel.    ( 191个结果
Google interview question: k-nearest neighbor (k-d tree)
Question:You are given information about hotels in a country/city. X and Y coordinates of each hotel are known. You need to suggest the list of neares...
分类:其他好文   时间:2015-07-01 06:14:04    阅读次数:233
常用地址英语
常用地址英语:室/房Room,村(乡)Village,号No.,宿舍Dormitory,楼/层F,住宅区/小区ResidentialQuarter,甲/乙/丙/丁A/B/C/D,巷/弄Lane,单元Unit,号楼/幢Building,厂Factory,酒楼/酒店Hotel,路Road,花园Garde...
分类:其他好文   时间:2015-06-14 19:58:52    阅读次数:132
线段树 区间合并 poj 3667 Hotel
题意:初始时n个空房间,有m次操作,分为两种:1.找出最靠左的连续d个空房间的左端点值,并把该区间的房间占用  2.使指定区间的房间不被占用。输出每次操作1的左端点值,如果找不到,输出0。 很明显的一个思路是把每个节点所在区间的最长的连续空房间和该区间是否被覆盖作为节点信息 对于操作1,如果当前节点的值小于d,那当前区间肯定不行。如果不小于d,先看左子节点的值是否大于等于d(因为要找出...
分类:其他好文   时间:2015-06-04 12:04:30    阅读次数:173
POJ - 3667 - Hotel (线段树 - 区间合并)
题目传送:Hotel 思路:线段树,区间合并,区间替换,查询最左断点,看胡浩版本的线段树好几天了,今天看这个看了好久,慢慢来吧,具体都写在注释里了 AC代码: #include #include #include #include #include #include #include #include #include #include #include ...
分类:其他好文   时间:2015-05-15 21:32:17    阅读次数:159
Poj 3667——hotel——————【线段树区间合并】
HotelTime Limit:3000MSMemory Limit:65536KTotal Submissions:13124Accepted:5664DescriptionThe cows are journeying north to Thunder Bay in Canada to gain...
分类:其他好文   时间:2015-05-01 11:56:08    阅读次数:103
【POJ】3667-Hotel(线段树的区间合并)
标记线段树的时候利用 lsum rsum msum 记录最左边 zui右边 以及整个区间的最大连续空位的值 维护的时候注意合并#include #include #include using namespace std; #define lson (pos<<1) #define rson (pos<<1|1) const int maxn = 55555; int n,m; struct No...
分类:其他好文   时间:2015-04-27 16:54:37    阅读次数:97
BZOJ1593 [Usaco2008 Feb]Hotel 旅馆
裸上线段树,就是记的东西有点多。。。每个点记区间左端最长0,右端最长0,中间最长0,和tag表示是否全为0/1直接更新就好,查询的时候先查左儿子,然后查中间,最后查右儿子。。。 1 /*********************************************************....
分类:其他好文   时间:2015-04-27 00:04:13    阅读次数:249
Poj 3667 Hotel 【线段树最左空区间】
HotelTime Limit: 3000MS Memory Limit: 65536K Total Submissions: 13034 Accepted: 5606 DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacati...
分类:其他好文   时间:2015-04-18 14:35:37    阅读次数:157
Ado.net中简单的DBHelper类(增删改查)
private static string connString = "server=.;database=hotel;uid=aa;pwd=123";//最好从配置文件中取出 public static SqlConnection conn = new SqlConnection(...
分类:数据库   时间:2015-04-15 16:49:07    阅读次数:217
poj3667,线段树,区间合并,维护左,右,中区间
题目大意:Hotel有N(1 ≤ N ≤ 50,000)间rooms,并且所有的rooms都是连续排列在同一边,groups需要check in 房间,要求房间的编号为连续的r..r+Di-1并且r是最小的;visitors同样可能check out,并且他们每次check out都是编号为Xi ..Xi +Di-1 (1 ≤ Xi ≤ N-Di+1)的房间,题目的输入有两种样式:...
分类:其他好文   时间:2015-04-14 19:47:50    阅读次数:136
191条   上一页 1 ... 13 14 15 16 17 ... 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!