题意: 输入数据n,m.n代表工厂的数量,m代表城市的数量. 接下来n+m行为工厂和城市的坐标. 规定如图所示方向刮风,工厂的air会污染风向地区的air. 注意,工厂和城市的坐标表示的是从x到x+1从y到y+1之间小正方形都是工厂区域,规定如果只有一个coner的air被污染那么该地区视为无污染. 要求输出有多少不被污染的城市. 坑: 思考了很多问题.... 1.加入某城市的正下方是工厂怎么办...这个是否算污染. 2.假如有两个角被污染了怎么办...算污染吗. 坑了一整天.没办法找大神的代码…
[Selection II] 1.上.下.左.右键可以移动Selection 1个像素.按住Shift键,可以一次移动10个像素. 2.Add Selection模式的快捷键是Shift,Sub Selection模式的快捷键是Option.同时按住Shift.Option,进行与运算. 3.菜单:elect > Modify > Expand or Contract.可以对已有Selection进行绽放,控制参数是像素. 4.菜单:Select > Modify > Border…
Boring counting Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 98304/98304 K (Java/Others)Total Submission(s): 2808    Accepted Submission(s): 826 Problem Description In this problem we consider a rooted tree with N vertices. The vertices ar…
题目链接: 题目 Escape Time II Time Limit: 20 Sec Memory Limit: 256 MB 问题描述 There is a fire in LTR ' s home again. The fire can destroy all the things in t seconds, so LTR has to escape in t seconds. But there are some jewels in LTR ' s rooms, LTR love jewe…
[BZOJ1645][Usaco2007 Open]City Horizon 城市地平线 Description Farmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildings. The entire ho…
Strange Country II Time Limit: 1 Second      Memory Limit: 32768 KB      Special Judge You want to visit a strange country. There are n cities in the country. Cities are numbered from 1 to n. The unique way to travel in the country is taking planes.…
题意 有n节课可供选择,每节课都有两个值Hi和Ci,如果学生选择了m节课(x1,x2,....,xm),则它的舒适值被定义为: //这里没有公式((lll¬ω¬)),因为那个图片我保存不下来≧ ﹏ ≦,见原题好啦~ 分析 当时被这个公式搞得很懵逼,场上想了几种贪心发现都能找出反例.结束后听学长们说是个背包...一脸懵逼. 我们在来看这个题···我们发现Ci比Hi小很多··这里算是一个暗示o(* ̄▽ ̄*)o 我们再来看那个公式我们可以发现,当 C一定时,H越大这个舒适值越大.而对于每一节课我们都只…
题目: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3356 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=26732#problem/D Football Gambling II Time Limit: 3 Seconds      Memory Limit: 65536 KB The 2010 FIFA World Cup toke place betw…
给这个题目跪了两天了,想吐简直 发现自己离散化没学好 包括前一个离散化的题目,实际上是错了,我看了sha崽的博客后才知道,POJ那题简直数据弱爆了,本来随便一组就能让我WA掉的,原因在于离散化的时候,缩小数据规模的同时,没有考虑到误差,比如 1 4 6 8,离散化之后是1 2 3 4,我如果覆盖了1 2和3 4,表面上好像全部覆盖了,实际数据并没有覆盖..所以我只能说那道题目我其实错了,并没有真正做出离散化出来...现在用这道题来弥补. color the ball,ball的编号可以从1 到2…
Boring counting Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 98304/98304 K (Java/Others) Total Submission(s): 2811    Accepted Submission(s): 827 Problem Description In this problem we consider a rooted tree with N vertices. The vertices a…