当前位置:网站首页>[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;
}
边栏推荐
- 硬件开发与市场产业
- Just this time! Talk about the technical solutions of distributed system in detail
- The diagram of user login verification process is well written!
- Centos安装docker以及mysql和redis环境
- JS function scope variables declare that the variables that promote the scope chain without VaR are global variables
- The chess robot broke the finger of a 7-year-old boy because "the chess player violated safety rules"?
- 重磅公布!ICML2022奖项:15篇杰出论文,复旦、厦大、上交大研究入选
- 【云原生之kubernetes实战】安装kubeopertor教程
- 常用超好用正则表达式!
- Basic select statement
猜你喜欢

# MySQL 七种连接方式图解

AI sky covering DL multilayer perceptron

天翼云Web应用防火墙(边缘云版)支持检测和拦截Apache Spark shell命令注入漏洞

来吧开发者!不只为了 20 万奖金,试试用最好的“积木”来一场头脑风暴吧!...

ASEMI整流桥KBPC3510,KBPC3510封装,KBPC3510应用

Week 17 free intrusion pointer exercise - output maximum

带你熟悉云网络的“电话簿”:DNS

重磅!《2022中国开源发展蓝皮书》正式发布

来吧开发者!不只为了 20 万奖金,试试用最好的“积木”来一场头脑风暴吧!

2019 popularization group summary
随机推荐
即刻报名|飞桨黑客马拉松第三期盛夏登场,等你挑战
图的遍历的定义以及深度优先搜索和广度优先搜索(一)
Heavy! The 2022 China open source development blue book was officially released
【集训Day3】section
pip安装模块,报错
基本的SELECT语句
第16周OJ实践1 计算该日在本年中是第几天
Heavy announcement! Icml2022 Awards: 15 outstanding papers, selected by Fudan University, Xiamen University and Shanghai Jiaotong University
AI zhetianchuan DL regression and classification
Just this time! Talk about the technical solutions of distributed system in detail
How to write plug-ins quickly with elisp
Tensor operation in pytoch
浅析接口测试
图扑 3D 可视化国风设计 | 科技与文化碰撞炫酷”火花“
The diagram of user login verification process is well written!
Cross Site Request Forgery (CSRF)
CCS TM4C123新建工程
Is it really safe and reliable to exempt five in case of opening an account in a stock company
Hardware development and market industry
SQL injection (mind map)