Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
35608 | WZH | 面积 | C++ | Wrong Answer | 1 MS | 1232 KB | 361 | 2024-01-02 21:50:56 |
#include<iostream> using namespace std; int a[501][501],n; int main() { cin>>n; while(n--){ int x1,x2,y1,y2; cin>>x1>>y1>>x2>>y2; for(int j=x1;j<x2;j++){ for(int i=y1;i<=y2;i++){ a[i][j]=1; } } } int cnt=0; for(int i=1;i<=500;i++){ for(int j=1;j<=500;j++){ if(a[i][j]==1){ cnt++; } } } cout<<cnt; }