码迷,mamicode.com
首页 >  
搜索关键字:stars    ( 386个结果
POJ 2482 Stars in Your Window(线段树扫描线)
题意: 背景真是令人感动,我都看得哭了...... 前面的自己看吧。 给出星星的坐标和亮度,给定一个矩形(长/宽),求框住的星星亮度和的最大值,恰好在边上的不算。 分析: 一个月前在上海邀请赛就有这样的题,当时我线段树只会成段更新,所以那道题目也没碰... 我们这样想,每个星星能影响的范围就是给定矩形的面积,为方便起见,不妨设星星的位置为矩形的左下角。 那么在这个范围内的点全部加上它的亮度,最终我们就是求该平面内的最大值。 这样的话就要用到二维线段树...可是有10k颗星星...这要开多大的数组啊........
分类:Windows程序   时间:2014-08-22 19:46:29    阅读次数:422
hdu 1541 Stars 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1541题目意思:有 N 颗星星,每颗星星都有各自的等级。给出每颗星星的坐标(x, y),它的等级由所有比它低层(或者同层)的或者在它左手边的星星数决定。计算出每个等级(0 ~ n-1)的星星各有多少颗。 ...
分类:其他好文   时间:2014-08-20 23:57:43    阅读次数:363
POJ 2482 Stars in Your Window 线段树+离散化+扫描线
题面据说很美~每个星星可以根据在窗口的左下角和右上角两个位置建立两条扫描线,之后就是简单的区间增减和求最大值操作了。注意要处理在边界上的星星是不算的情况,其实只要把左右边界分别增减一个eps即可。#include #include #include #include #include #includ...
分类:Windows程序   时间:2014-08-19 22:12:45    阅读次数:341
HDU 1541 Stars(树状数组)
树状数组入门的基础题目之一!...
分类:其他好文   时间:2014-08-19 19:13:45    阅读次数:214
HDU 1541 Stars (树状数组)
Problem Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars tha...
分类:其他好文   时间:2014-08-18 23:37:23    阅读次数:306
poj 2352 Stars
Stars Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 32548   Accepted: 14221 Description Astronomers often examine star maps where stars are represented b...
分类:其他好文   时间:2014-08-16 13:51:10    阅读次数:263
poj2352 Stars(树状数组)
Stars Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 32473   Accepted: 14184 Description Astronomers often examine star maps where stars are represented by ...
分类:其他好文   时间:2014-08-14 10:52:18    阅读次数:171
POJ 2352 Stars(线段树)
Stars Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 32475   Accepted: 14186 Description Astronomers often examine star maps where stars are represented by ...
分类:其他好文   时间:2014-08-14 10:49:58    阅读次数:243
POJ2352_Stars(线段树/单点更新)
解题报告 题意: 求在坐标系中...
分类:其他好文   时间:2014-08-09 21:35:39    阅读次数:293
POJ 2352 Stars(线段树)
题目地址:POJ 2352 今天的周赛被虐了。。TAT..线段树太渣了。。得好好补补了(虽然是从昨天才开始学的。。不能算补。。。) 这题还是很简单的。。维护信息是每一个横坐标的出现的次数。 代码如下: #include #include #include #include #include #include #include #include #include #incl...
分类:其他好文   时间:2014-08-09 18:44:29    阅读次数:186
386条   上一页 1 ... 35 36 37 38 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!