| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 46379 | C++|刘一阳 | 面积 | C++ | Accepted | 1 MS | 496 KB | 377 | 2024-05-03 11:59:02 |
#include<bits/stdc++.h> using namespace std; bool xy[505][505]; int ans; int main() { int n; cin>>n; int x1,y1,x2,y2; while(n--){ cin>>x1>>y1>>x2>>y2; for(int i=y1+1;i<=y2;i++){ for(int j=x1+1;j<=x2;j++){ xy[i][j]=1; } } } for(int i=1;i<=500;i++){ for(int j=1;j<=500;j++){ if(xy[i][j]) ans++; } } cout<<ans; return 0; }