日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Dead Pixel CodeForces - 1315A(思维)

發布時間:2023/12/15 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Dead Pixel CodeForces - 1315A(思维) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Screen resolution of Polycarp’s monitor is a×b pixels. Unfortunately, there is one dead pixel at his screen. It has coordinates (x,y) (0≤x<a,0≤y<b). You can consider columns of pixels to be numbered from 0 to a?1, and rows — from 0 to b?1.

Polycarp wants to open a rectangular window of maximal size, which doesn’t contain the dead pixel. The boundaries of the window should be parallel to the sides of the screen.

Print the maximal area (in pixels) of a window that doesn’t contain the dead pixel inside itself.

Input
In the first line you are given an integer t (1≤t≤104) — the number of test cases in the test. In the next lines you are given descriptions of t test cases.

Each test case contains a single line which consists of 4 integers a,b,x and y (1≤a,b≤104; 0≤x<a; 0≤y<b) — the resolution of the screen and the coordinates of a dead pixel. It is guaranteed that a+b>2 (e.g. a=b=1 is impossible).

Output
Print t integers — the answers for each test case. Each answer should contain an integer equal to the maximal possible area (in pixels) of a rectangular window, that doesn’t contain the dead pixel.

Example
Input
6
8 8 0 0
1 10 0 3
17 31 10 4
2 1 0 0
5 10 3 9
10 10 4 8
Output
56
6
442
1
45
80
Note
In the first test case, the screen resolution is 8×8, and the upper left pixel is a dead pixel. Here you can see one of two possible layouts of the maximal window.

思路:這一個小球把這一張圖分成了最多四個部分,求出最大值就可以了。
代碼如下:

#include<bits/stdc++.h> #define ll long long using namespace std;int a,b,x,y;int main() {int t;scanf("%d",&t);while(t--){scanf("%d%d%d%d",&a,&b,&x,&y);int s1=a*y;int s2=b*x;int s3=a*(b-y-1);int s4=b*(a-x-1);cout<<max(max(s1,s2),max(s3,s4))<<endl;}return 0; }

努力加油a啊,(o)/~

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的Dead Pixel CodeForces - 1315A(思维)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 奇米影视一区二区三区 | 日韩人妻精品一区二区三区视频 | 日韩在线你懂的 | 色97| 成人久久久精品乱码一区二区三区 | 九九九九九精品 | 久久精品999 | 美脚の诱脚舐め脚视频播放 | 精品国产乱码久久 | 欧美日韩一区二区视频在线观看 | 人妻精品无码一区二区三区 | 成人免费av | 国产乱人乱偷精品视频a人人澡 | www.99色| 国产男男gay体育生网站 | 狂野少女电影在线观看国语版免费 | 国产伊人av| 免费20分钟超爽视频 | 欧美在线日韩在线 | 中文字幕在线播放视频 | 黄色片怎么看 | 久久久久久国产精品免费免费 | 亚洲无码精品在线播放 | 精品国产免费人成在线观看 | 免看一级a毛片一片成人不卡 | 黑人一级大毛片 | 18视频在线观看娇喘 | 国产一级二级三级精品 | 影音先锋啪啪资源 | 韩国电影大尺度在线观看 | 丁香美女社区 | 天天透天天操 | 欧美一级淫片免费视频魅影视频 | 欧美猛交xxx | 不卡中文字幕在线观看 | 狠狠干网站 | 亚洲综人 | 精品国产一区二区三区无码 | 久久久久免费精品 | 99久久久无码国产精品免费 | 激情五月综合色婷婷一区二区 | 激情四射av| 99久久婷婷| 成年人拍拍视频 | 亚洲一区中文字幕在线观看 | 欧美日韩亚洲另类 | 国产欧美日韩二区 | 精品人妻伦一二三区免费 | 亚洲黄色在线播放 | 99精品一级欧美片免费播放 | 性一交一乱一伧老太 | 激情小说激情视频 | 免费一级大片 | 久久色中文字幕 | 日韩精品在线不卡 | 欧美裸体网站 | 日本zzjj| 亚洲黄色大全 | 美女福利视频 | 日本高清视频免费看 | 久久爱综合网 | 欧美不卡三区 | 欧美日p视频 | 国产一级美女 | 国产精品人人做人人爽人人添 | av55 | 免费高清av在线看 | 久久精品免费播放 | 国产美女裸体无遮挡免费视频 | 天天操夜夜操夜夜操 | 精品国产专区 | 91精品国产一区二区三区香蕉 | 午夜精品久久久久 | 天堂av中文在线观看 | 日本亚洲欧洲色 | 污污视频网站在线免费观看 | 四虎影院黄色 | 亚洲精品久久久久 | 91av在线免费观看 | www.在线| 久操视频免费看 | 成人做爰视频www | 国产成人不卡 | 一本色道无码道dvd在线观看 | 在线观看91视频 | 影音先锋丝袜美腿 | 中文字幕在线天堂 | 无码人妻aⅴ一区二区三区玉蒲团 | 一区二区三区 中文字幕 | 国产免费无遮挡吸奶头视频 | 日韩电影一区 | 一区二区三区黄色 | 成人免费看黄 | 91av导航| 亚洲网站免费观看 | 国产精品交换 | 亚洲精品视频播放 | 日本啊啊视频 | 高潮网| 欧美色图一区二区三区 |