当前位置:网站首页>[training day3] delete
[training day3] delete
2022-07-26 17:50:00 【SSL_ GYX】
delete

Their thinking
If a number does not appear in the second or third line , Then the other column containing this number must be deleted , Violent enumeration operation is enough .
code
#include<iostream>
#include<cstdio>
using namespace std;
int n;
int a[100010];
int b[100010];
int c[100010];
int v[100010];
int s1[100010];
int s2[100010];
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
for(int i=1;i<=n;i++)
scanf("%d",&b[i]),s1[b[i]]++;
for(int i=1;i<=n;i++)
scanf("%d",&c[i]),s2[c[i]]++;
int flg=1,ans=0;
while(flg)
{
flg=0;
for(int i=1;i<=n;i++)
if(!v[i]&&(!s1[a[i]]||!s2[a[i]]||!s2[b[i]]||!s1[c[i]]))
v[i]=1,s1[b[i]]--,s2[c[i]]--,flg=1,ans++;
}
cout<<ans<<endl;
}
边栏推荐
- 2.1.2 synchronization always fails
- 如何通过学会提问,成为更加优秀的数据科学家
- [template] segment tree 1
- VS Code 格式化后 自动让函数名后有空格
- 【云原生】 iVX 低代码开发 引入腾讯地图并在线预览
- How to become a better data scientist by learning to ask questions
- Common super easy to use regular expressions!
- SQL injection (mind map)
- 浅析接口测试
- (24) the top menu of blender source code analysis shows code analysis
猜你喜欢
![[machine learning] principle and code of mean shift](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[machine learning] principle and code of mean shift

Definition of graph traversal and depth first search and breadth first search (I)

Heavy! The 2022 China open source development blue book was officially released

Spark data format unsafe row

【云原生】 iVX 低代码开发 引入腾讯地图并在线预览

AI zhetianchuan DL regression and classification

【模板】线段树 1

JS 闭包 模拟私有变量 面试题 立即执行函数IIFE

COSCon'22城市/学校/机构出品人征集令

图解用户登录验证流程,写得太好了!
随机推荐
Use dired to move files quickly
简述CUDA镜像构建
天翼云Web应用防火墙(边缘云版)支持检测和拦截Apache Spark shell命令注入漏洞
浅谈数据技术人员的成长之路
Is it safe to open an account online now? Who do you want to open a stock account?
2019 popularization group summary
重磅公布!ICML2022奖项:15篇杰出论文,复旦、厦大、上交大研究入选
二层管理型交换机如何设置IP
ACL experiment demonstration (Huawei router device configuration)
如何使用 align-regexp 对齐 userscript 元信息
(25) top level menu of blender source code analysis blender menu
一文详解吞吐量、QPS、TPS、并发数等高并发指标
[cloud native kubernetes actual combat] kubeopertor installation tutorial
Definition of graph traversal and depth first search and breadth first search (I)
Tensor operation in pytoch
Ascend target detection and recognition - customize your own AI application
Tupu 3D visual national style design | collision between technology and culture "cool" spark“
Comparison between agile development and Devops
The diagram of user login verification process is well written!
Performance tuning bugs emerge in endlessly? These three documents can easily handle JVM tuning