当前位置:网站首页>[training day3] delete [simulation]
[training day3] delete [simulation]
2022-07-27 13:57:00 【VL——MOESR】

Ideas :
Direct simulation , Delete the impossible column , Then there is the answer
c o d e code code
#include<iostream>
#include<cstdio>
using namespace std;
const int MAXN = 1e5 + 10;
int n, tot;
int a[MAXN], b[MAXN], c[MAXN], d[MAXN], e[MAXN];
bool v[MAXN];
int main() {
scanf("%d", &n);
for(int i = 1; i <= n; i ++) scanf("%d", &a[i]);
for(int i = 1; i <= n; i ++) scanf("%d", &b[i]), d[b[i]] ++;
for(int i = 1; i <= n; i ++) scanf("%d", &c[i]), e[c[i]] ++;
bool flag = 0;
while(!flag) {
flag = 1;
for(int i = 1; i <= n; i ++)
if(!v[i] && (d[a[i]] == 0 || e[a[i]] == 0)) {
v[i] = 1;
d[b[i]] --;
e[c[i]] --;
tot ++;
flag = 0;
}
}
printf("%d", tot);
return 0;
}
边栏推荐
- Software system architecture designer concise tutorial | software system modeling
- Install the wireless network card driver
- Matlab digital image processing experiment 2: single pixel spatial image enhancement
- Network packet loss, network delay? This artifact helps you get everything done!
- Realize the basic operations such as the establishment, insertion, deletion and search of linear tables based on C language
- Database kernel developer, worth a mug!!!
- Thinkphp+ pagoda operation environment realizes scheduled tasks
- Is it still time to take the PMP Exam in September?
- idea Gradle7.0+ :Could not find method compile()
- Leetcode Tencent selected exercises 50 questions -054. spiral matrix
猜你喜欢

不需要标注数据的语义分割!ETH&鲁汶大学提出MaskDistill,用Transformer来进行无监督语义分割,SOTA!...

Wechat campus laundry applet graduation design finished product (4) opening report

MySQL startup options and configuration files

Application layer World Wide Web WWW

We should learn to check the documented instructions of technical details

Oppo self-developed large-scale knowledge map and its application in digital intelligence engineering

Thinkphp+ pagoda operation environment realizes scheduled tasks

《C语言》函数栈帧的创建与销毁--(内功)

Motion attitude control system of DOF pan tilt based on stm32
![[training day4] anticipating [expected DP]](/img/66/35153a9aa77e348cae042990b55b1c.png)
[training day4] anticipating [expected DP]
随机推荐
[internship experience] add your own implementation method to the date tool class
用命令如何返回上级目录
egg-swagger-doc 图形验证码解决方案
English grammar_ Personal pronoun
在灯塔工厂点亮5G,宁德时代抢先探路中国智造
纯c手写线程池
Wechat campus laundry applet graduation design finished product (5) assignment
宇宙没有尽头,UTONMOS能否将元宇宙照进现实?
Gray histogram
Conditions and procedures of futures account opening
13. User web layer services (I)
Figure 8 shows you how to configure SNMP
期货手续费标准和保证金比例
【idea】设置提取serialVersionUID
Futures Commission Standard and margin ratio
在“元宇宙空间”UTONMOS将打开虚实结合的数字世界
Jianzhi offer 07 rebuild binary tree -- construct binary tree from middle order and post order traversal sequence
The salary level of programmers in various countries is a little miserable
ONNXRuntime【推理框架,用户可以非常便利的用其运行一个onnx模型】
Swiftui map encyclopedia use mapkit to search