| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 46697 | yuzhengxun | 填涂颜色 | C++ | Accepted | 0 MS | 256 KB | 327 | 2024-05-05 09:20:49 |
#include<bits/stdc++.h> using namespace std; int co[10002],ro[10002]; int main() { int n,m,x,y; cin>>n>>m>>x>>y; int c=0,r=0; for(int i=1,a;i<=x;i++){ cin>>a; co[a]++; if(co[a]==1) c++; } for(int i=1,a;i<=y;i++){ cin>>a; ro[a]++; if(ro[a]==1) r++; } cout<<n*m-(c*m+r*n-c*r); return 0; }