07 2023 档案

摘要:# A1. Dual (Easy Version) https://codeforces.com/contest/1854/problem/A1 ## 题意 给定一个长度为 n 的序列 a1,a2,,an,你可以做以下操作: - 选定两个下标 $i, j(1 \leq 阅读全文
posted @ 2023-07-30 11:33 CountingGroup 阅读(223) 评论(0) 推荐(1) 编辑
摘要:https://codeforces.com/contest/1852/problems # A. Ntarsis' Set https://codeforces.com/contest/1852/problem/A ![image](https://img2023.cnblogs.com/blog 阅读全文
posted @ 2023-07-24 17:23 CountingGroup 阅读(91) 评论(0) 推荐(0) 编辑
摘要:# 一、LCA ```cpp struct LCAns { struct edge {int to, nxt;} e[N = 0; -- j) {if (d[dp[u][j]] >= d[v]) u = dp[u][j];} if (u == v) return u; for (int j = lg 阅读全文
posted @ 2023-07-22 17:56 CountingGroup 阅读(20) 评论(0) 推荐(0) 编辑
摘要:一、2-SAT 2-SAT 问题是给定 n 个变量 x1,x2,,xn,取值只有 01,然后这些变量要满足一些条件,比如:如果 x1=1 那么 x2=0 之类的。 然后我们要解决的问题就是判定是否存在一组 \(( 阅读全文
posted @ 2023-07-16 15:54 CountingGroup 阅读(14) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-16 11:25 CountingGroup 阅读(18) 评论(0) 推荐(0) 编辑
摘要:# 一、定义 在 **无向连通图** G=(V,E) 中,若存在一个点 u(uV) 使得删掉点 u 及其相连的边,会使原图不连通,就称 u 是原图的一个 **割点 (cut vertex)**;若存在一条边 (u,v)((u,v)E) 满足删掉 $( 阅读全文
posted @ 2023-07-11 21:01 CountingGroup 阅读(32) 评论(0) 推荐(0) 编辑
摘要:# 一、启发式合并 启发式合并多用于合并两个集合,现在有这样一个问题: 现在给定 n 个集合,第 i 个集合初始只有 {i},要支持集合的合并操作。 如果我们暴力合并,时间复杂度会是 O(n2) 的。 参考并查集的按秩合并,考虑将小的集合合并到大的集合上。 考虑计算时间复杂度, 阅读全文
posted @ 2023-07-09 09:28 CountingGroup 阅读(102) 评论(0) 推荐(0) 编辑
摘要:https://atcoder.jp/contests/abc308/tasks_print # A - New Scheme 过水已隐藏。 ```cpp #include #include #include #include using namespace std; using namespace 阅读全文
posted @ 2023-07-07 21:10 CountingGroup 阅读(19) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示