Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
46707 徐若宸 填涂颜色 C++ 解答错误 0 MS 272 KB 385 2024-05-05 09:35:59

Tests(0/1):


#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; }


测评信息: