日韩性视频-久久久蜜桃-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| 91在线第一页 | 岛国裸体写真hd在线 | 91中文字幕 | 玖玖在线免费视频 | 欧美成人三级在线 | av男人的天堂网 | 新x8x8拨牐拨牐永久免费影库 | 韩国jizz| 精品深夜av无码一区二区老年 | 亚洲黄色精品 | 国产精品99久久久精品无码 | 99999av| 日本少妇一区 | 邻居少妇张开腿让我爽了在线观看 | 看av网址 | 污污网址在线观看 | 人人干干 | 午夜精品视频在线 | 姐姐的秘密韩剧免费观看全集中文 | 亚洲免费视频一区二区三区 | 91成人免费看片 | 欧美老肥妇做.爰bbww视频 | 一区二区av | 91视频导航 | 性感美女被爆操 | 337p粉嫩色噜噜噜大肥臀 | 中文字幕永久在线 | 一区黄色 | 亚一区二区 | 久久3p| 操亚洲| 超薄肉色丝袜一二三 | 欧美日韩在线综合 | 一区二区三区在线观看免费 | 国产在线综合网 | 国产精品资源网 | 欧美私人网站 | 一级片在线免费播放 | 欧美色妞网 | 国产三级观看 | 视频一区二区三区在线观看 | 美女张开双腿让男人捅 | 暖暖日本在线 | 日本zzjj| 久久鲁视频| 成人在线免费网址 | 亚洲高清网 | 精品无码av一区二区三区不卡 | 毛片xxx | 噜噜噜色| 国产美女一区 | www.日韩一区 | 成人毛片在线免费观看 | 国产视频1区2区 | 午夜精品久久久久久久蜜桃 | 精品无码一区二区三区电影桃花 | 欧美三级视频在线观看 | 欧洲成人午夜精品无码区久久 | 99热99精品| 欧美亚洲一区二区在线观看 | 少妇69xx | 波多野结衣午夜 | 久久青草热 | 中文字幕观看在线 | 182tv午夜福利在线观看 | 闷骚老干部cao个爽 av九九九 | 色偷偷亚洲| 91成人黄色 | 午夜怡红院 | 深夜精品福利 | 精品国产二区三区 | 以女性视角写的高h爽文 | 在线免费黄| 一个人免费在线观看视频 | 成人小说亚洲一区二区三区 | 亚洲拍拍视频 | av福利社| 三级性视频 | 午夜色福利| 国产免费av在线 | 日韩中文字幕亚洲 | 日本乱子伦xxxx | 香蕉视频一级片 | 三级理论电影 | 亚洲最大成人在线 | 嫦娥性艳史bd | 一级肉体全黄裸片 | 国产在线视频你懂得 | 日韩性在线 | 中文字幕――色哟哟 | 国内视频一区二区三区 | 麻豆传媒网站入口 | 少妇不卡视频 | a网站在线观看 | 日韩美女久久 | 久久久久18| 国产精品正在播放 |