惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

M
MIT News - Artificial intelligence
D
Darknet – Hacking Tools, Hacker News & Cyber Security
SecWiki News
SecWiki News
Latest news
Latest news
A
Arctic Wolf
Know Your Adversary
Know Your Adversary
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
T
Tor Project blog
T
Threatpost
S
Schneier on Security
P
Palo Alto Networks Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
C
CERT Recently Published Vulnerability Notes
博客园_首页
P
Privacy & Cybersecurity Law Blog
I
Intezer
PCI Perspectives
PCI Perspectives
Spread Privacy
Spread Privacy
G
Google Developers Blog
H
Help Net Security
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
U
Unit 42
Application and Cybersecurity Blog
Application and Cybersecurity Blog
W
WeLiveSecurity
D
DataBreaches.Net
N
News and Events Feed by Topic
AI
AI
The Register - Security
The Register - Security
云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
Help Net Security
Help Net Security
K
Kaspersky official blog
Recent Announcements
Recent Announcements
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Security @ Cisco Blogs
H
Hacker News: Front Page
Jina AI
Jina AI
S
Secure Thoughts
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
爱范儿
爱范儿

某岛

AtCoder Beginner Contest 409 Luogu P5325. 【模板】Min_25 筛 UOJ #188. 【UR #13】Sanrd AtCoder Beginner Contest 371 AtCoder Beginner Contest 369 RPGMaker 2k3 百科 OneShot 的考古 2024“开创拓芯”游戏创享节的相关记录 CJ 回来后的戒断反应 Luogu P10221. [省选联考 2024] 重塑时光 Luogu P5308 [COCI2018-2019#4] Akvizna wqs 二分 歌唱王国 Lean 相关 BZOJ 3153. Sone1 The 2023 ICPC World Finals Luxor 新巴别塔 Sora 的想象与思考 Facebook Hacker Cup 2023 Round 1 AtCoder Beginner Contest 322 LLaMA 2 相关 HuggingFace AI Game Jam ACL 2023 Trans 相关… Luogu P2053. [SCOI2007] 修车 Luogu P1973. [NOI2011] NOI 嘉年华 Luogu P1933. [NOI2010] 旅行路线 Luogu P1954. [NOI2010] 航空管制 Luogu P2048. [NOI2010] 超级钢琴 Luogu P2046. [NOI2010] 海拔 Luogu P3227. [HNOI2013] 切糕 Luogu P8500. [NOI2022] 冒泡排序 Luogu P3629. [APIO2010] 巡逻 USACO 2018 February Contest, Gold Problem 2. Directory Traversal Luogu P3647. [APIO2014] 连珠线 IZhO 2017. Problem F. Hard route SPOJ TWOPATHS. Two Paths 换根 dp 洪恩电脑 —— 开天辟地 Facebook Hacker Cup 2022 Round 2 Codeforces Round #875 Luogu P5828 边双连通图计数 EC Final 拉格朗日反演定理 Luogu P5827. 点双连通图计数 无标号连通图 AtCoder Beginner Contest 284 Luogu P4708. 画画 Luogu P6295. 有标号 DAG 计数 BZOJ #2863. 愤怒的元首 HDU 3303. Harmony Forever 聊聊《明日方舟 Side Story 孤星》与《崩坏:星穹铁道》 SGU 208. Toral Tickets 后日谈,SHLUG 月度分享(上) 钢琴练习 EasyRPG x ChatGPT ControlNet 相关 The 1st Universal Cup, Stage 4, Ukraine EasyRPG —— Sliding Puzzle The 1st Universal Cup, Stage 3, Poland DP 优化练习 NOI 2009 TypeDB Forces 2023 Nas 买来做什么… Global Game Jam 2023 参赛纪录 The 1st Universal Cup, Stage 2, Hongkong The 1st Universal Cup, Stage 0, Nanjing Codeforces Round #850 舟游同人游戏 RM2k3 机能增强 —— EasyRPG Player 魔改版 《海之歌》设定与剧本 dfs 序求 lca Codeforces Round #844 P3768 简单的数学题 AtCoder Beginner Contest 281 ChatGPT 相关 AtCoder Grand Contest 059 AtCoder Beginner Contest 280 Codeforces Global Round 24 事实核查,以乌鲁木齐火灾为例 SPOJ MUSKET. Musketeers Pinely Round 1 Note about FTX Permutation ICPC World Final 2021 CodeTON Round 3 Codeforces Round #831 Educational Codeforces Round 138 NovelAI 法术指南 卡农 Educational Codeforces Round 135 Codeforces Round #819 瓦喵之夏 NOI 2022 Luogu P3765 总统选举 Luogu P3369 【模板】普通平衡树 网络国家 旋转卡壳 OFAC Sanctions && Tornado Cash BZOJ 1185. [HNOI2007]最小矩形覆盖
Good Bye 2021: 2022 is NEAR
2021-12-30 · via 某岛

传送门

https://codeforces.com/contest/1616

去年一样 。。。今年的 GoodBye Round 的 Pretest 也很强。。。
大家新年快乐啦。。。

Problem D. Keep the Average High

数列选数,要求如果原序列中多于1个连续的全被挑中,则满足平均值大于给定的 x,问最多可以选多少
dp,只要考虑长度为 2、3 的段满足条件即可,其它长度自动满足。

Problem E. Lexicographically Small Enough

给定两个字符串 s, t ,每次可以交换两个相邻字符,问至少几次交换可以使得 s 字典序小于 t。

考察 t[0],方案一:找小于 t[0] 的字符交换到 s[0] 位置。方案二:找等于 t[0] 的字符交换到 s[0] 位置,之后迭代到下个位置。
每次都贪心的找最靠前的,可以开 26 个 deque 去记录这些位置,同时用树状数组维护删除事件。

Problem F. Tricolor Triangles

给定一个无向图 (n <= 64,m <= 256) 要求对边进行三染色,使得对于任意三元组,如果存在三条边的话,要么颜色全相等,要么全部不相等。

貌似可以随机化乱搞或者高斯消元,后者非常直接,我们的必要条件就是 xi + xj + xk = 0,我们建立模 3 非齐次线性方程组吗,对其增广矩阵进行高斯消元即可,未知数规模是 m,方程组数为 $n^3$ = $m\sqrt(m) $。。最后单组 Case 的复杂度应该是 $O(m^3\sqrt(m))$,复杂度爆炸。。。但是因为这个矩阵非常稀疏,大家都这么爆过去了。。。。。

(直播里 Neal Wu 说一眼就看出要 Gauss 但是估计了一下复杂度认为不可做就跳去做 H 了囧)。
(赛后去爬了一下 Neal Wu 的吐槽,果然被他成功 cha 掉了 AC 的程序,看来 300iq 的数据还是有点弱的。。。)

Problem G. Just Add an Edge

给定一个 dag,问有多少种加一条边的方案,使得加完后图中存在 Hamiltonian path。

dp?

Problem H. Keep XOR Low

给一个数集,问有多少种 subset 方案,使得 subset 种任意两个数的 xor < 给定的数 x。

2-sat?二进制 tire?

看了一下 这个 python 代码,果然容易丽洁。。

简单来说。。先考虑 x = 000111.. 这样的情况。那么显然我们只要进行分组即可,组与组之间相互独立,每个组里可以随便选。考虑一般情况,相当于在一个 binary tire 树上 dp,实际中,我们不需要把这个 tire 构建出来。。。只要用 std::sort() + std::partition_point() 递归处理下去即可。。。

这里有两种定义递归函数的方式:
– f(a,b,i) 表示 a 集合和 b 集合至少都选了一种数,当前考察到 x 的第 i 位的方案数。
– g(a,b,i) 表示允许不选 a 集合或 b 集合的方案数。

显然我们有 g = f + 2^|a| + 2^|b| – 1。

然后我们对第 i 位进行讨论,我们发现一种情况下用 f 表示更方便,另一种情况下用 g 表示更方便。。然后 f 和 g 可以用上面简单的式子进行互相换算,所以我们现在都只看比较短的那一种转移即可,也就是:

  • f(a,b,i) = f(a0, b0,i-1) + f(a1, b1,i-1) | x 的第 i 位为 0。
  • g(a,b,i) = g(a0, b1,i-1) * g(a1, b0,i-1) | x 的第 i 位为 1。

Posted by xiaodao
Category: 日常