当前位置:网站首页>[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;
}
边栏推荐
- 小程序毕设作品之微信校园洗衣小程序毕业设计成品(2)小程序功能
- egg-swagger-doc 图形验证码解决方案
- 小程序毕设作品之微信校园洗衣小程序毕业设计成品(5)任务书
- Image features and extraction
- ONNXRuntime【推理框架,用户可以非常便利的用其运行一个onnx模型】
- Crop the large size image of target detection into a fixed size image
- 小程序毕设作品之微信校园洗衣小程序毕业设计成品(1)开发概要
- Thinkphp+ pagoda operation environment realizes scheduled tasks
- Chapter3 data analysis of the U.S. general election gold offering project
- Conditions and procedures of futures account opening
猜你喜欢

基于C语言实现线性表的建立、插入、删除、查找等基本操作

A Keypoint-based Global Association Network for Lane Detection

Fiddler bag capturing Tool + night God simulator

Echart line chart displays the last point and vertical dotted line by default
![[training day3] reconstruction of roads [SPFA]](/img/eb/4729954bf5c6c0dc85daed9ca127f7.png)
[training day3] reconstruction of roads [SPFA]
idea Gradle7.0+ :Could not find method compile()

NoSQL -- three theoretical cornerstones of NoSQL -- cap -- Base -- final consistency

redis集群搭建-使用docker快速搭建一个测试redis集群

Charles tutorial

MySQL startup options and configuration files
随机推荐
Browser kernel module composition
Software testing system architecture designer concise tutorial | software testing
西测测试深交所上市:年营收2.4亿募资9亿 市值47亿
期货开户的条件和流程
微策生物IPO过会:年营收12.6亿 睿泓投资与耀合医药是股东
Common distributed theories (cap, base) and consistency protocols (gosssip, raft)
小程序毕设作品之微信校园洗衣小程序毕业设计成品(2)小程序功能
致尚科技IPO过会:年营收6亿 应收账款账面价值2.7亿
小程序毕设作品之微信校园洗衣小程序毕业设计成品(8)毕业设计论文模板
认知篇----硬件工程师的成才之路之经典
特征工程中的缩放和编码的方法总结
Fifth, download the PC terminal of personality and solve the problem of being unable to open it
将目标检测大尺寸图片裁剪成固定尺寸图片
Construction and application of industrial knowledge atlas (3): commodity knowledge fusion
Huiliang technology app is a good place to go to sea: after more than ten years of popularity, why should the United States still choose to go to sea for gold
Redis implements the browsing history module
基于STM32的自由度云台运动姿态控制系统
A Keypoint-based Global Association Network for Lane Detection
Wechat campus laundry applet graduation design finished product of applet completion work (3) background function
redis集群搭建-使用docker快速搭建一个测试redis集群