原地址:http://poj.org/problem?id=2482

神题,被誉为最浪漫的题目,一位acmer以自己独特的方式写下的殷殷情语,感觉写的太好了,于是翻译了一下,翻译完感觉整个英语水平都提高了

你窗前的星星

纵时光飞逝如梭,也我对你的回忆也永不黯然。从第一次见面以来,也许已经有四年之久了。但是,我记得,我清晰地记得,四年前的那一天,那一幕,那一抹阳光,那一弯微笑,它们如同刻刀一般,在我心中留下了如此清晰的印记。

四年前,在美丽的珠海校园,在无意间,我瞥见了你的含笑的背影。命运牵引着我的视线向你而去。你轻轻地跨过班级的大门,当你纤细的手抚过门框的那一刻,你回过了头。一束柔软的阳光毫无拘束地流淌在你玫瑰色的脸颊上。我怔住了,我知道,我清楚地知道,我已经为美丽的你而陶醉。几个月,我不断地观察着,打听着,刺探着,我发现了更多的你。优雅慈悲的你,智慧聪颖的你;积极乐观的你,心怀梦想的你,都在我的内心深处安了家。你希望着,能与你这样的魅力阳光女孩白头偕老。唉,实际上,你离我疯狂的梦想很远,而我也不知如何在隔开你我的海湾上架桥。我什么都没有做,只是等待,等待机遇之神的福祉,直到现在。毕业的钟声已然敲响,我这才从梦境中幡然悔悟,我居然是这样一个蠢货!明明能创造机会并抓住它,我却选择了徒劳的等待!

剩下的日子,掰着手指头都能数的清了。老朋友,舍友,同班同学,一个接着一个与我惜别。放下挥动的手,茫然的我却接受不了残酷的真相。这些每天都能见到的熟悉面庞,就这样从我的人生之中消失,然后除了记忆之外,便什么也不剩了。几天后,我也得离开熟悉的校园。我看见,你正计划着飞过重洋,捕捉未来履行梦想。我突然明白,如果没有机缘,我可能再也见不到你的脸了!那一夜,我在你的宿舍外彷徨着,想借机再见你一面。我很矛盾,如果你一出现,我的心跳变得飞快,我笨拙的舌头一个字也吐不出来怎么办?我匆匆地避过别人的目光,经过你的宿舍楼下,用余光撇着你的窗台,到了路口,又忍不住折回来,不记得这个过程重复了多少次。每一次经过,我都强烈盼望着,能看见你突然出现在阳台上,抑或是看见你的轮廓映在窗前!我也不记得,多少次徒生了这样的想法:大声喊出她的名字,请她一起来共享晚餐,或者至少是说个话?想到你的完美与我的平凡,我的勇气最终败给了胆怯。又一次到了路口,我默默离开了,再也没有回过头。

毕业,意味着大学时光之结束,这充满荣誉与浪漫时代的终结。我清晰地记得,你可爱的微笑是我拼搏的最初动力,这种充满遗憾的爱意,永远地被封存在我的记忆之匣里。毕业,也意味着一段新的征程,人生之途上,清晰的脚印指向着明亮的未来。我无比衷心希望,你在国外的时光能充满幸福与美满!当然了,我也会试着摆脱那些幼稚的想法,变得更加成熟。但是,这种追求真爱,追求真正幸福的希冀,我永远都不会让它随岁月干枯!

再见了!我亲爱的公主!

如果有那么一天,在某个地方,我们有缘再见面。也许我们已经成了两鬓斑白的老妪和老翁。我希望我们在那个时候,能成为好朋友,高高兴兴地分享这段美丽的记忆,那时候,青春的火焰又会被重新点燃,每一个人再次被浸入那愉悦的气氛里。假如我得不到这样的机会,我情愿做一颗明亮星星,在你的窗前闪烁,在遥远的地方祝福着你。我会以一个好朋友的身份,和你共度每一个夜晚,与你分享甜蜜的美梦,陪你穿过无尽的恶魇。

那么问题来了,假定天空是一个平面,每个星星都有一个坐标(x,y),每颗星星都有一个等级从1到100不等,代表它的亮度,其中100是最亮的,1是最弱的。窗户是长方形的,有固定的长和宽,边平行于x轴和y轴。你的任务是告诉我如何摆放窗户,才能获得在窗口内所有星星的亮度总和最大值。注意,边框的星星不算。窗口可以被平移,但不允许旋转。

输入
在输入中有几个测试用例。每一行的第一行包含3个整数:n,w,h,表示星形的数目,矩形窗口的水平长度和垂直高度。然后N行如下,有3个整数分别为:X,Y,C,表示星星位置(x,y)和每个恒星的亮度。没有两颗星星在同一点上。
天空中至少有1颗,最多有10000颗星星。1 = W,h = 1000000,0 x x,y < 2^31。

输出
对于每个测试用例,在一行中输出最大亮度。

样例输入
3 5 4
1 2 3
2 3 2
6 3 1
3 5 4
1 2 3
2 3 2
5 3 1

样例输出
5

6

来源
poj大赛,作者:kinfkong @ZSU,翻译:nitrate

未经允许不可转载

先码一下,还没A掉这题,总之是线段树+扫描线。但这题的重点根本不是线段树好么?!!!

附英文原题

Description

Fleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still remember, vividly, on the beautiful Zhuhai Campus, 4 years ago, from the moment I saw you smile, as you were walking out of the classroom and turned your head back, with the soft sunset glow shining on your rosy cheek, I knew, I knew that I was already drunk on you. Then, after several months’ observation and prying, your grace and your wisdom, your attitude to life and your aspiration for future were all strongly impressed on my memory. You were the glamorous and sunny girl whom I always dream of to share the rest of my life with. Alas, actually you were far beyond my wildest dreams and I had no idea about how to bridge that gulf between you and me. So I schemed nothing but to wait, to wait for an appropriate opportunity. Till now — the arrival of graduation, I realize I am such an idiot that one should create the opportunity and seize it instead of just waiting.

These days, having parted with friends, roommates and classmates one after another, I still cannot believe the fact that after waving hands, these familiar faces will soon vanish from our life and become no more than a memory. I will move out from school tomorrow. And you are planning to fly far far away, to pursue your future and fulfill your dreams. Perhaps we will not meet each other any more if without fate and luck. So tonight, I was wandering around your dormitory building hoping to meet you there by chance. But contradictorily, your appearance must quicken my heartbeat and my clumsy tongue might be not able to belch out a word. I cannot remember how many times I have passed your dormitory building both in Zhuhai and Guangzhou, and each time aspired to see you appear in the balcony or your silhouette that cast on the window. I cannot remember how many times this idea comes to my mind: call her out to have dinner or at least a conversation. But each time, thinking of your excellence and my commonness, the predominance of timidity over courage drove me leave silently.

Graduation, means the end of life in university, the end of these glorious, romantic years. Your lovely smile which is my original incentive to work hard and this unrequited love will be both sealed as a memory in the deep of my heart and my mind. Graduation, also means a start of new life, a footprint on the way to bright prospect. I truly hope you will be happy everyday abroad and everything goes well. Meanwhile, I will try to get out from puerility and become more sophisticated. To pursue my own love and happiness here in reality will be my ideal I never desert.

Farewell, my princess!

If someday, somewhere, we have a chance to gather, even as gray-haired man and woman, at that time, I hope we can be good friends to share this memory proudly to relight the youthful and joyful emotions. If this chance never comes, I wish I were the stars in the sky and twinkling in your window, to bless you far away, as friends, to accompany you every night, sharing the sweet dreams or going through the nightmares together. 

Here comes the problem: Assume the sky is a flat plane. All the stars lie on it with a location (x, y). for each star, there is a grade ranging from 1 to 100, representing its brightness, where 100 is the brightest and 1 is the weakest. The window is a rectangle whose edges are parallel to the x-axis or y-axis. Your task is to tell where I should put the window in order to maximize the sum of the brightness of the stars within the window. Note, the stars which are right on the edge of the window does not count. The window can be translated but rotation is not allowed.

Input

There are several test cases in the input. The first line of each case contains 3 integers: n, W, H, indicating the number of stars, the horizontal length and the vertical height of the rectangle-shaped window. Then n lines follow, with 3 integers each: x, y, c, telling the location (x, y) and the brightness of each star. No two stars are on the same point.

There are at least 1 and at most 10000 stars in the sky. 1<=W,H<=1000000, 0<=x,y<2^31.

Output

For each test case, output the maximum brightness in a single line.

Sample Input

3 5 4
1 2 3
2 3 2
6 3 1
3 5 4
1 2 3
2 3 2
5 3 1

Sample Output

5
6

Source

POJ Contest,Author:kinfkong@ZSU

转载于:https://www.cnblogs.com/hypercurve/p/6535644.html

【杂】poj2482 Stars in Your Windows 题面的翻译相关推荐

  1. 大一计算机考试题库window,2016年计算机考试Windows题库及答案

    2016年计算机考试Windows题库及答案 101 通过Windows Xp中"开始"菜单中的"运行"项_____. A.可以运行DOS的全部命令B.仅可以运 ...

  2. windows下面的txt在linux下面显示为乱码

    windows下面的txt正确保存操作后, 传递到linux,发现是乱码. 解决方案: linux下面,整个txt文件拖入chrome浏览器,然后把浏览器里面的内容重新保存即可

  3. 2018年美国大学生数学建模竞赛原题、翻译及思路整理

    参加了2018年的美赛,整理了一些参考资料,需要的话就拿去吧. 具体内容是:2018年美国大学生数学建模竞赛原题.翻译及思路整理,有兴趣的小伙伴可以看看 链接:https://pan.baidu.co ...

  4. 涨姿势了!为什么Windows上面的软件都想把自己安装在C盘?

    周末,我在家里面看电视,女朋友正在旁边鼓捣她的电脑,但是好像并不是很顺利,于是就有了以下对话. 计算机存储 我们使用的计算机中,保存信息的介质有两类: 一类是内部存储器,一断电就会把记住的东西丢失. ...

  5. 漫话:如何给女朋友解释为什么Windows上面的软件都想把自己安装在C盘

    周末,我在家里面看电视,女朋友正在旁边鼓捣她的电脑,但是好像并不是很顺利,于是就有了以下对话. 计算机存储 我们使用的计算机中,保存信息的介质有两类: 一类是内部存储器,一断电就会把记住的东西丢失. ...

  6. 如何删除windows上面的jdk文件

    将要面临就业的我重新拾起了大二期间学过的java,但是发现原来安装在系统里面的java运行环境不知道为什么不能用了,我是这样发现的:打开cmd,然后输入java,结果提示这样: 看提示应该是里面的某个 ...

  7. Windows 下面的 redis GUI操作工具

    1. 下载地址 redisdesktop https://redisdesktop.com/download 2. 下载windows版本并且进行安装 处理redis 的参数 根据上面的一篇博客 采取 ...

  8. uc浏览器为什么安装在c盘_你肯定不知道为什么Windows上面的软件都想把自己安装在C盘...

    来源:公众号漫话编程 , 作者 漫话编程 周末,我在家里面看电视,女朋友正在旁边鼓捣她的电脑,但是好像并不是很顺利,于是就有了以下对话. 计算机存储 我们使用的计算机中,保存信息的介质有两类: 一类是 ...

  9. 环境在c盘_如何给女朋友解释为什么 Windows 上面的软件都把自己安装在 C 盘

    本文经授权转载自漫画编程(ID:mhcoding) 周末,我在家里面看电视,女朋友正在旁边鼓捣她的电脑,但是好像并不是很顺利,于是就有了以下对话. 计算机存储 我们使用的计算机中,保存信息的介质有两类 ...

最新文章

  1. php where 优先,php – 使用WHERE选择所有内容
  2. 为什么说混合云是新基建的流行架构?文末彩蛋!
  3. 海康大华RTSP格式
  4. java两个日期之间的日期_获取两个日期之间的日期形成一个集合
  5. Python 工匠:编写条件分支代码的技巧
  6. spring 登录提示 Bad credentials
  7. 程序员面试金典 - 面试题 16.04. 井字游戏(计数)
  8. delphi listview 添加数据 慢_Delphi 二十四岁, Delphi 10.3.1 发布
  9. 开发者必看!你想知道的迁移之道都在这里了
  10. 阿里云智能语音交互服务导览
  11. PHP的类中的常量,静态变量的问题。
  12. linux安装mysql8.0.18_详解mysql8.018在linux上安装与配置过程
  13. Android(java)学习笔记51:ScrollView用法
  14. 软件体系结构 复习题
  15. iphone如何显示实时网速和内存空间
  16. 使用onenote记HTML笔记,以记录网页上的内容为例,教你如何利用OneNote 2010轻松记录笔记...
  17. Practicing Mindfulness
  18. 替换WIN键和Ctrl键
  19. 4000亿“猪茅”能飞多久?
  20. 淘宝网店装修代码使用方法大全

热门文章

  1. Java 多线程详解(一)------概念的引入
  2. python可以处理哪些文件_Python(文件处理)
  3. 机器学习_一条会说666的咸鱼
  4. arp协议属于哪一层_ARP的攻击与防御
  5. 冯永昌:云计算与大数据时代的量化投资
  6. 机器学习决策树_机器学习-决策树 Decision Tree
  7. oracle数据库操作文档,oracle数据库操作
  8. 学习tab栏切换必备,快速上手排它算法
  9. 改变函数this指向
  10. 如何使用ant_从 0 开始,成为 Ant-Design Contributor