当前位置:网站首页>CSP drawing
CSP drawing
2022-07-04 03:18:00 【< WRM>】
#include<bits/stdc++.h>
using namespace std;
const int N = 1000;
int a[N][N];
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i <= 110; i++) {
for (int j = 0; j <= 110; j++) {
a[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
int x1, y1, x2, y2;
scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
int minx=min(x1,x2);
int maxx=max(x1,x2);
int miny=min(y1,y2);
int maxy=max(y1,y2);
for (int j = minx+1; j <= maxx; j++) {
for (int k = miny+1; k <= maxy; k++) {
a[j][k] = 1;
}
}
}
int sum=0;
for(int i=0;i<=110;i++) {
for(int j=0;j<=110;j++) {
if(a[i][j]) sum++;
//printf("%d ",a[i][j]);
}
//printf("\n");
}
printf("%d\n",sum);
return 0;
}
边栏推荐
- POSTECH | option compatible reward reverse reinforcement learning
- Setting methods, usage methods and common usage scenarios of environment variables in postman
- How to use websocket to realize simple chat function in C #
- ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
- Development of digital collection trading platform development of digital collection platform
- [Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love
- MySQL query
- Cache general management class + cache httpcontext Current. Cache and httpruntime Differences between caches
- MySQL workbench use
- AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
猜你喜欢
Node solves cross domain problems
Gee import SHP data - crop image
96% of the collected traffic is prevented by bubble mart of cloud hosting
Problems and solutions of several concurrent scenarios of redis
@Scheduled scheduled tasks
Constantly changing harmonyos custom JS components during the Spring Festival - Smart Koi
MySQL query
The difference between MCU serial communication and parallel communication and the understanding of UART
Unity controls the selection of the previous and next characters
Development of digital collection trading platform development of digital collection platform
随机推荐
Setting methods, usage methods and common usage scenarios of environment variables in postman
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Formulaire day05
[development team follows] API specification
Network byte order
Practical multifunctional toolbox wechat applet source code / support traffic master
Latex tips slash \backslash
Backpropagation formula derivation [Li Hongyi deep learning version]
Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
WordPress collection WordPress hang up collection plug-in
Unity writes a character controller. The mouse controls the screen to shake and the mouse controls the shooting
@Scheduled scheduled tasks
Keepalived set the master not to recapture the VIP after fault recovery (it is invalid to solve nopreempt)
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
what does ctrl + d do?
Jenkins continuous integration environment construction V (Jenkins common construction triggers)
Global and Chinese markets of advanced X-ray inspection system (Axi) in PCB 2022-2028: Research Report on technology, participants, trends, market size and share
PHP database connection succeeded, but data cannot be inserted
static hostname; transient hostname; pretty hostname
Explain AI accelerator in detail: why is this the golden age of AI accelerator?