摘要:
题目大意 给两个集合 求两个集合 交集size/并集size 思路 用”集合数组“存集合,用find函数看两个有几个相同的元素cnt,两个集合的size加起来减去cnt即为分母 分子为cnt 代码 #include<bits/stdc++.h> using namespace std; set<in 阅读全文
posted @ 2021-04-22 23:01
AlexStraightUp
阅读(49)
评论(0)
推荐(0)
摘要:
题目大意 给一个二叉树的前序遍历 中序遍历 求后序遍历(二叉树的value为char型) 代码 #include<bits/stdc++.h> using namespace std; struct node { int l,r; }tree[35]; int pre[35],in[35]; int 阅读全文
posted @ 2021-04-22 14:15
AlexStraightUp
阅读(80)
评论(0)
推荐(0)

浙公网安备 33010602011771号