亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

Counting Squares[HDU1264]

系統 1830 0

Counting Squares

Time Limit: 2000/1000 MS (Java/Others)????Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1072????Accepted Submission(s): 529

?

Problem Description
Your input is a series of rectangles, one per line. Each rectangle is specified as two points(X,Y) that specify the opposite corners of a rectangle. All coordinates will be integers in the range 0 to 100. For example, the line
5 8 7 10
specifies the rectangle who's corners are(5,8),(7,8),(7,10),(5,10).
If drawn on graph paper, that rectangle would cover four squares. Your job is to count the number of unit(i.e.,1*1) squares that are covered by any one of the rectangles given as input. Any square covered by more than one rectangle should only be counted once.

?

?

?

Input
The input format is a series of lines, each containing 4 integers. Four -1's are used to separate problems, and four -2's are used to end the last problem. Otherwise, the numbers are the x-ycoordinates of two points that are opposite corners of a rectangle.

?

?

?

Output
Your output should be the number of squares covered by each set of rectangles. Each number should be printed on a separate line.

?

?

?

Sample Input
5 8 7 10
6 9 7 8
6 8 8 11
-1 -1 -1 -1
0 0 100 100
50 75 12 90
39 42 57 73
-2 -2 -2 -2
?

?

Sample Output
8
10000
?

?

Source
浙江工業大學第四屆大學生程序設計競賽
?

?

Recommend
JGShining

漂浮法的簡單應用

?

Counting Squares[HDU1264]


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦?。。?/p>

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 琪琪色在线视频 | 91好色视频 | 91精品国产一区二区三区左线 | 性生活一级毛片 | 久久国产在线观看 | 亚洲伊人精品综合在合线 | 精品欧美高清一区二区免费 | www.777奇米| 美女操操| 亚洲欧美精品一中文字幕 | 老司机观看精品一区二区 | 99久久精品久久久 | 色婷婷亚洲十月十月色天 | 奇米在线影视 | 婷婷色在线观看 | 91亚洲精品一区二区福利 | 亚洲五月综合缴情婷婷 | 日本a∨在线观看 | 免费一级毛片在线播放视频 | 欧美性猛交xxx嘿人猛交 | 在线免费观看一级毛片 | 在线日产一区二区 | 牛牛影视成人午夜影视 | 动漫精品欧美一区二区三区 | 麻豆国产原创最新在线视频 | 久久狠狠第一麻豆婷婷天天 | 视频一区二区欧美日韩在线 | 毛片网站免费在线观看 | 激情小视频在线播放免费 | 熊出没之重启未来免费观看 | 久久美女性网 | 深夜免费福利视频 | 国产91成人精品亚洲精品 | 四虎国产精品永久地址99新强 | 国产99网站 | 男女羞羞视频免费观看 | 欧美日韩制服 | 99热这里只有成人精品国产 | 特级毛片在线观看 | 国产精品久久久久久久久 | 色视频网站人成免费 |