結果
| 問題 | No.3709 Unknown Treasure |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-11 21:30:08 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 157 ms / 2,000 ms |
| + 782µs | |
| コード長 | 648 bytes |
| 記録 | |
| コンパイル時間 | 2,314 ms |
| コンパイル使用メモリ | 355,540 KB |
| 実行使用メモリ | 19,072 KB |
| 最終ジャッジ日時 | 2026-09-11 21:30:58 |
| 合計ジャッジ時間 | 7,314 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using pint=pair<int,int>;
#define rep(i,n) for(int i=0;i<(n);++i)
template<typename T>
void chmax(T& a,T b){if(a<b){a=b;};}
template<typename T>
void chmin(T& a,T b){if(a>b){a=b;};}
const int inf=1e9;
int main(){
int h,w,n;cin>>h>>w>>n;
vector sum(h+1,vector<int>(w+1));
rep(i,n){
int r1,c1,r2,c2;cin>>r1>>c1>>r2>>c2;
r1--,c1--;
sum[r1][c1]++;
sum[r1][c2]--;
sum[r2][c1]--;
sum[r2][c2]++;
}
rep(i,h+1)rep(j,w)sum[i][j+1]+=sum[i][j];
rep(i,w+1)rep(j,h)sum[j+1][i]+=sum[j][i];
int ans=0;
rep(i,h)rep(j,w)ans+=sum[i][j]==0;
cout<<ans<<endl;
}