当前位置:网站首页>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;
}
边栏推荐
- Have you entered the workplace since the first 00???
- [latex] production of complex tables: excel2latex and detail adjustment
- Don't disagree, this is the most powerful "language" of the Internet
- PID of sunflower classic
- Key knowledge of embedded driver
- false sharing
- Network byte order
- POSTECH | option compatible reward reverse reinforcement learning
- static hostname; transient hostname; pretty hostname
- Enhanced for loop
猜你喜欢

Explain AI accelerator in detail: why is this the golden age of AI accelerator?

PHP database connection succeeded, but data cannot be inserted

Leetcode51.n queen

A brief talk on professional modeler: the prospect and professional development of 3D game modeling industry in China

Libcblas appears when installing opencv import CV2 so. 3:cannot open shared object file:NO such file or directory

What is cloud primordial?

Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex

Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website

Code Execution Vulnerability - no alphanumeric rce create_ function()

Consul of distributed service registration discovery and unified configuration management
随机推荐
The difference between MCU serial communication and parallel communication and the understanding of UART
Examination question bank of constructor decoration direction post skills (constructor) and examination data of constructor decoration direction post skills (constructor) in 2022
Solve the problems encountered by the laravel framework using mongodb
Don't disagree, this is the most powerful "language" of the Internet
Backpropagation formula derivation [Li Hongyi deep learning version]
Global and Chinese market of box seals 2022-2028: Research Report on technology, participants, trends, market size and share
Constantly changing harmonyos custom JS components during the Spring Festival - Smart Koi
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
Explain AI accelerator in detail: why is this the golden age of AI accelerator?
ZABBIX API batch delete a template of the host
WP collection plug-in free WordPress collection hang up plug-in
Lichuang EDA learning notes 14: PCB board canvas settings
Consul of distributed service registration discovery and unified configuration management
Have you entered the workplace since the first 00???
Global and Chinese markets for electroencephalogram (EEG) devices 2022-2028: Research Report on technology, participants, trends, market size and share
I stepped on a foundation pit today
Tsinghua University product: penalty gradient norm improves generalization of deep learning model
MySQL query
PID of sunflower classic