Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
46707 | 徐若宸 | 填涂颜色 | C++ | Wrong Answer | 0 MS | 272 KB | 385 | 2024-05-05 09:35:59 |
#include <bits/stdc++.h> using namespace std; bool mp[10010][10010]; int main(){ int n,m,x,y,u,cnt=0; cin>>n>>m>>x>>y; for(int i=0;i<x;i++){ cin>>u; for(int j=0;j<=m;j++) mp[u][j]=true; } for(int i=0;i<y;i++){ cin>>u; for(int j=0;j<=n;j++) mp[j][u]=true; } for(int i=0;i<n;i++){ for(int j=0;j<=m;j++) if(!mp[i][j])cnt++; } cout<<cnt; }