Codeforces Round #623 (Div. 2, based on VK Cup 2019-2020 - Elimination Round, Engine) A Dead Pixel

讨论坏点的左右上下的矩形大小。
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
long long a, b, x, y;
cin >> a >> b >> x >> y;
// cout<<a<<" "<<b<<" "<<x<<" "<<y<<endl;
long long ans = 0;
ans = max(ans, x * b);
ans = max(ans, a * y);
ans = max(ans, a * ( b-y-1));
// cout<<x * ( b-y)<<endl;
ans = max(ans, (a-x-1) *b);
cout<<ans<<endl;
}
}
Codeforces Round #623 (Div. 2, based on VK Cup 2019-2020 - Elimination Round, Engine) A Dead Pixel的更多相关文章
- Codeforces Round 623(Div. 2,based on VK Cup 2019-2020 - Elimination Round,Engine)D. Recommendations
VK news recommendation system daily selects interesting publications of one of n disjoint categories ...
- Codeforces Round #623 (Div. 1, based on VK Cup 2019-2020 - Elimination Round, Engine)A(模拟,并查集)
#define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; pair<]; bool cmp( ...
- Codeforces Round #623 (Div. 2, based on VK Cup 2019-2020 - Elimination Round, Engine)
A. Dead Pixel(思路) 思路 题意:给我们一个m*n的表格,又给了我们表格中的一个点a,其坐标为(x, y),问在这个表格中选择一个不包括改点a的最大面积的矩形,输出这个最大面积 分析:很 ...
- Codeforces Round #623 (Div. 2, based on VK Cup 2019-2020 - Elimination Round, Engine) C. Restoring
C. Restoring Permutation time limit per test1 second memory limit per test256 megabytes inputstandar ...
- Codeforces Round #623 (Div. 2, based on VK Cup 2019-2020 - Elimination Round, Engine) B. Homecoming
After a long party Petya decided to return home, but he turned out to be at the opposite end of the ...
- Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final)【ABCDF】
比赛链接:https://codeforces.com/contest/1443 A. Kids Seating 题意 构造一个大小为 \(n\) 的数组使得任意两个数既不互质也不相互整除,要求所有数 ...
- Codeforces Round #681 (Div. 1, based on VK Cup 2019-2020 - Final) B. Identify the Operations (模拟,双向链表)
题意:给你一组不重复的序列\(a\),每次可以选择一个数删除它左边或右边的一个数,并将选择的数append到数组\(b\)中,现在给你数组\(b\),问有多少种方案数得到\(b\). 题解:我们可以记 ...
- Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final) D. Extreme Subtraction (贪心)
题意:有一个长度为\(n\)的序列,可以任意取\(k(1\le k\le n)\),对序列前\(k\)项或者后\(k\)减\(1\),可以进行任意次操作,问是否可以使所有元素都变成\(0\). 题解: ...
- Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final) C. The Delivery Dilemma (贪心,结构体排序)
题意:你要买\(n\)份午饭,你可以选择自己去买,或者叫外卖,每份午饭\(i\)自己去买需要消耗时间\(b_i\),叫外卖需要\(a_i\),外卖可以同时送,自己只能买完一份后回家再去买下一份,问最少 ...
随机推荐
- http之抽丝剥茧,深度剖析http的那些事儿
最近,小编一心扎跟学技术,毫不顾及头发的掉落速度,都快成地中海了,不过也无大碍,谁让咱是一个爱钻技术的男人呢.最近两周老是看到http,那么这个http,有哪些猫腻呢,很多同学都有这种理解,就是对于h ...
- 家庭版记账本app之常用控件的使用方法
现在先介绍在android开发的时候会用的相关的控件,做一个基本的了解方便我们之后对其进行相关具体的操作.下面是相应额详细情况: TextView android:layout_width 和 and ...
- Gradle系列之初识Gradle
原文首发于微信公众号:躬行之(jzman-blog) 学习 Android 有一段时间了,开发中经常使用到 Gradle ,但是不知道 Gradle 构建项目的原理,计划花一点时间学习一下 Gradl ...
- python调用js
安装 pip install PyExecJS 方法 eval() 输入参数:source(JS语句).cwd(路径) 返回值:result(语句执行结果) compile() 输入参数:source ...
- 14-jmeter分布式环境
1.分布式概念: jmeter做性能时,会消耗本地机器资源 本机无法没有限制的创建运行线程(一般500线程就差不多会报错) 一般这时候会用到分布式的环境 2.环境: 前提条件:环境一致(有时候可以直接 ...
- xargs与exec区别
平时使用find命令查找出文件的时候有时候后面有时候用-exec有时候用管道加xargs,这2个到底有什么不同?下面就这2个的不同做简单介绍. 零.实验环境 [root@osker /]# find ...
- Personal Photo Experience Proposal
Background: Our smart phones are the most widely-used cameras now, more and more photo ...
- 解决SpringMVC的乱码问题:CharacterEncodingFilter
在使用 SpringMVC 框架的过程中,如果前台有包含中文的请求,或者后台有包含中文的响应,有可能会出现乱码的情况.在以前的 Servlet 中,我们使用 request.setCharacterE ...
- Linux学习笔记(七)关机、重启及常用的网络命令
关机.重启命令 sync shutdown reboot init sync 英文原意:flush file system buffers 功能:刷新文件系统缓冲区,将内存中的数据保存到硬盘中 语法: ...
- 2. node xlsx的使用
1. 使用xlsx模块 const xlsx = require('xlsx'); //excel async exportexcel() { let arrayData = [ ['姓名', '电话 ...