Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
46703 sunhuifeng 黑白精灵 C++ 解答错误 0 MS 268 KB 342 2024-05-05 09:26:49

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int co[10001],ro[10001]; 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; }


测评信息: