POJ2482

P1502 窗口的星星

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.
by doby @ 2017-07-17 09:06:49


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.
by doby @ 2017-07-17 09:09:21


流年不模糊我对你的记忆。我真的有4年没见你了吗?4年前,在美丽的珠海校园里,我依然清晰地记得,从看到你微笑的那一刻起,当你走出教室,把头往后一转,柔和的晚霞照在你玫瑰色的脸颊上时,我知道,我知道我已经沉醉在你身上了。经过几个月的观察和窥探,你的优雅和智慧,你对生活的态度和对未来的渴望都深深地印在我的记忆里。你是那个迷人而阳光灿烂的女孩,我一直梦想着和她一起度过我的一生。唉,实际上你远远超出了我最疯狂的梦想,我不知道如何弥合你我之间的鸿沟。我一直在等待,等待一个合适的机会。直到毕业的时候,我才意识到自己是一个白痴,一个人应该创造机会,抓住机会,而不是等待。 这几天,我和朋友、室友、同学们一道接一个地分手,我仍然不敢相信,握手之后,这些熟悉的面孔很快就会从我们的生活中消失,只会变成一段回忆。明天我将从学校搬出去。你正计划飞得很远,去追求你的未来,实现你的梦想。如果没有缘分和缘分,也许我们就再也见不到面了。所以今晚,我在你们宿舍附近徘徊,希望能在那里见到你们。但矛盾的是,你的出现使我的心跳和我笨拙的舌头可能不能冒出一句话。我不记得有多少次我在珠海和广州通过了你的宿舍楼,每次都想看到你出现在阳台上或者你的身影投射在窗户上。我记不清有多少次这个想法出现在我的脑海里:叫她出去吃饭或者至少聊一聊。但每次想到你的优秀和我的共性,胆怯战胜勇气,我都默默地离开了。 毕业,意味着大学生活的结束,这些辉煌的浪漫岁月的结束。你那可爱的微笑,是我努力工作的原动力,这一份无报答的爱,将永远封存在我的内心深处和我的脑海里。毕业,也意味着新生活的开始,踏上光明前景的足迹。我真的希望你在国外每天都快乐,一切顺利。同时,我会努力从幼稚变得成熟。在这里追求我自己的爱和幸福,在现实中是我的理想,我从不放弃。 再见,我的公主! 如果有一天,某个地方,我们有机会相聚,甚至头发花白的男人和女人,在那个时候,我希望我们能成为好朋友分享这记忆自豪地点燃青春和快乐的情绪。如果这个机会永远不会到来,我希望我是天上的星星,在你的窗前闪烁,愿远方的朋友为你祝福,陪你夜夜,分享甜蜜的梦,一起做噩梦。 问题来了:假设天空是平面。所有的星星都有一个位置(x,y)。对于每一颗星,有一个等级从1到100,代表它的亮度,其中100是最亮的,1是最弱的。窗口是一个矩形,其边缘与x轴或y轴平行。你的任务是告诉我应该把窗户放在哪里,以便最大限度地提高窗户内星星的亮度总和。注意,在窗口边上的星星是不计数的。可以移动窗口,但不允许旋转。
by doby @ 2017-07-20 08:28:52


666666666666
by wh_ZH @ 2017-08-06 16:11:14


666666.......
by Harry_Potter @ 2017-10-20 19:46:04


这个不是P3353的题目描述嘛
by beretty @ 2018-02-22 15:06:23


POJ这题需要用 long long 才能过,洛谷int就够了。
by OMG_wc @ 2020-08-08 00:43:35


这个突如其来的“问题来了”真的吓了我一跳。。。。
by 冘木 @ 2020-08-13 09:19:29


|