Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
35604 | Jeremy | 面积 | C++ | Compile Error | 0 MS | 0 KB | 377 | 2024-01-02 21:43:31 |
#include<iostream> using namespace std; int a[501][501]; int n; int main() { cin>>n; while(n--){ int x1,x2,y1,y2; cin>>x1>>y1>>x2>>y2; for(int i=x1;i<x2;i++){ for(int j=y1;j<y2;j++){ 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; return 0; }