当前位置:网站首页>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;
}
边栏推荐
- Formulaire day05
- Global and Chinese market of handheld melanoma scanners 2022-2028: Research Report on technology, participants, trends, market size and share
- Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
- (column 23) typical C language problem: find the minimum common multiple and maximum common divisor of two numbers. (two solutions)
- Recent learning fragmentation (14)
- Backpropagation formula derivation [Li Hongyi deep learning version]
- Contest3145 - the 37th game of 2021 freshman individual training match_ D: Ranking
- What is the difference between enterprise wechat applet and wechat applet
- Day05 錶格
- Crawler practice website image batch download
猜你喜欢
Consul of distributed service registration discovery and unified configuration management
Add IDM to Google browser
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
Node solves cross domain problems
Gee import SHP data - crop image
SQL injection (1) -- determine whether there are SQL injection vulnerabilities
150 ppt! The most complete "fair perception machine learning and data mining" tutorial, Dr. AIST Toshihiro kamishima, Japan
I stepped on a foundation pit today
Constantly changing harmonyos custom JS components during the Spring Festival - Smart Koi
Kiss number + close contact problem
随机推荐
Enhanced for loop
96% of the collected traffic is prevented by bubble mart of cloud hosting
[untitled] the relationship between the metauniverse and digital collections
Have you entered the workplace since the first 00???
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Global and Chinese market of contour projectors 2022-2028: Research Report on technology, participants, trends, market size and share
WordPress collection WordPress hang up collection plug-in
1day vulnerability pushback skills practice (3)
Add token validation in swagger
Network communication basic kit -- IPv4 socket structure
Leetcode51.n queen
Leetcode 110 balanced binary tree
Tsinghua University product: penalty gradient norm improves generalization of deep learning model
Network byte order
MySQL query
Contest3145 - the 37th game of 2021 freshman individual training match_ E: Eat watermelon
Baijia forum the founding of the Eastern Han Dynasty
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
PMP 考試常見工具與技術點總結
Safety tips - seat belt suddenly fails to pull? High speed police remind you how to use safety belts in a standardized way