码迷,mamicode.com
首页 >  
搜索关键字:uvalive    ( 873个结果
uvalive 4851
题意:有n个餐馆,其中两个餐馆a,b还是宾馆(纵坐标相等),在m*m的矩阵上建餐厅p,如果位置好,对于已存在的餐厅q(包括a和b),就会有dist(p,a) 题解:直接暴力肯定超时,可以考虑一列一列的考虑,让A横坐标更小,从A的横坐标开始,到B的横坐标内所有位置有可能是好位置,然后计算出每列上已有餐厅到A的纵坐标最小距离存到d[i],然后从左到右更新一遍(每向右移动一次,最小距离就和前一列...
分类:其他好文   时间:2015-03-28 21:51:17    阅读次数:146
uvalive 2963
题意:n个星球上都有一个广播,广播范围是r(和它范围不超过r都可听到广播),广播种类有A和B,如果一个星球可以听到的广播和自身广播不一样的有a个星球,一样的有b个星球,a > b说明这个星球是不稳定的,问给出一个r使不稳定星球尽量多,然后让r尽量少。 题解:先把所有星球之间距离计算出来,然后根据距离排序,把所有距离相同的边放到一起计算不稳定星球的数量,找到最大数量星球,然后再更新r。 ...
分类:其他好文   时间:2015-03-28 08:56:02    阅读次数:124
UVALive 6531 Go up the ultras 单调栈+RMQ
题目链接:点击打开链接题意:给定n座山以下n个数字表示n座山的高度若这座山u合法,则要满足:1、若u的左边存在比u高的山,设v是u左边距离u近期的且严格比u高的山,在[v,u]之间至少有一座山x,使得x和u的高度差>=150002、右边也同理。同一时候满足1、2的情况则算合法。问:输出全部合法的山。...
分类:其他好文   时间:2015-03-21 19:51:54    阅读次数:115
uvalive 6303 Smartphone Manufacturing
思路:类似背包,直接搞#include#include#include#include#include#include#include#include#include#include#include#include#define LL long long#define u64 unsigned lo...
分类:其他好文   时间:2015-03-21 01:04:46    阅读次数:198
uvalive 6300 Signed Binary Representation of Integers
6300 Signed Binary Representation of IntegersComputing ax mod n for large integers x and n is the most time-consuming process in most public-keycrypto...
分类:其他好文   时间:2015-03-21 01:04:35    阅读次数:268
Uvalive 6302 Star Travel
思路:把所有最短路找出来,然后跑一次就好了。把所有最短路找出来大概就是,把边反向,然后从e跑最短路。然后正向从s跑最短路。然后从s开始,每次跟着最短路(字典序最小)走。判断一条边是不是最短路,也就是dis[u]+d[v]+hehe=D#include#include#include#include#...
分类:其他好文   时间:2015-03-21 01:00:20    阅读次数:281
UVALIVE 6301 The Shortcut Eight-Puzzle
思路:使用A*算法的搜索#include#include#include#include#include#include#include#include#include#include#include#include#define LL long long#define u64 unsigned l...
分类:其他好文   时间:2015-03-21 00:59:06    阅读次数:236
UVALIVE 4329 Ping pong
大白上的题目#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include ...
分类:其他好文   时间:2015-03-20 20:14:41    阅读次数:117
UVALive 5905 Pool Construction 最小割,s-t割性质 难度:3
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3916这道题要求一种填充+挖坑+建屏障的方法,使得这块土地上的所有坑和草地之间都有屏障,挖坑...
分类:其他好文   时间:2015-03-18 23:16:16    阅读次数:251
UVALIVE 5096 Volume
This time your job is to calculate the volume of a special object. The object consists of two orthogonal cylinders. The two cylinders intersect each o...
分类:其他好文   时间:2015-03-15 16:26:07    阅读次数:213
873条   上一页 1 ... 64 65 66 67 68 ... 88 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!