当前位置:网站首页>[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;
}
边栏推荐
- Construction and application of industrial knowledge atlas (2): representation and modeling of commodity knowledge
- 微策生物IPO过会:年营收12.6亿 睿泓投资与耀合医药是股东
- Deep confidence network (DBN) [the classical DBN network structure is a deep neural network composed of several layers of RBM (restricted Boltzmann machine) and one layer of BP]
- 致尚科技IPO过会:年营收6亿 应收账款账面价值2.7亿
- JS callback function (callback)
- The universe has no end. Can utonmos shine the meta universe into reality?
- The salary level of programmers in various countries is a little miserable
- MySQL高可用实战方案——MHA
- 软考 系统架构设计师 简明教程 | 系统设计
- 软考 系统架构设计师 简明教程 | 软件系统建模
猜你喜欢

深度置信网络(DBN)【经典的DBN网络结构是由若干层 RBM(受限波尔兹曼机)和一层 BP 组成的一种深层神经网络】

在灯塔工厂点亮5G,宁德时代抢先探路中国智造

Common distributed theories (cap, base) and consistency protocols (gosssip, raft)

Network packet loss, network delay? This artifact helps you get everything done!

Design of LR1 compiler based on C language

Accuracy improvement method: efficient visual transformer framework of adaptive tokens (open source)

现在还来得及参加9月份的PMP考试吗?

opencv图像的缩放平移及旋转

Fifth, download the PC terminal of personality and solve the problem of being unable to open it

Image features and extraction
随机推荐
Egg swagger doc graphic verification code solution
LeetCode报错及其解决方案
【实习经验】Date工具类中添加自己实现的方法
For.. of can be used to traverse which data
There is no need for semantic segmentation of annotation data! Eth & Leuven University proposed maskdistill, using transformer for unsupervised semantic segmentation, SOTA
Gray histogram
Redis cluster setup - use docker to quickly build a test redis cluster
Is it still time to take the PMP Exam in September?
The finished product of wechat campus laundry applet graduation design (1) development outline
致尚科技IPO过会:年营收6亿 应收账款账面价值2.7亿
UTNet 用于医学图像分割的混合Transformer
SwiftUI 地图大全之 使用 MapKit 进行搜索
[C Advanced] pointer array vs array pointer
Sword finger offer II 041. Average value of sliding window
2022acm summer training weekly report (IV)
Selenium eight elements positioning and relative locator
SNMP (Simple Network Management Protocol)
小程序毕设作品之微信校园洗衣小程序毕业设计成品(6)开题答辩PPT
Construction and application of industrial knowledge atlas (2): representation and modeling of commodity knowledge
小程序毕设作品之微信校园洗衣小程序毕业设计成品(7)中期检查报告