Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
46378 jiabokai 面积 C++ 运行出错 1 MS 492 KB 391 2024-05-03 11:58:58

Tests(0/1):


#include<bits/stdc++.h> using namespace std; bool k[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;i<=x2;j++){ k[i][j]=true; } } } for(int i=1;i<=505;i++){ for(int j=1;j<=505;j++){ if(k[i][j]==true){ ans++; } } } cout<<ans; return 0; }


测评信息: