2022 ICPC 杭州站

icpc,杭州 · 浏览次数 : 0

小编点评

The context provides a detailed description of an algorithm called "Gym's solution" for solving a specific problem. The solution involves reading and analyzing the problem statement to come up with an appropriate algorithm. Here's a summary of the key points: **Problem:** - There are several groups of strings, each with a specific number of strings. - Each string can contain the substring "bie" but cannot be in group 0. - The algorithm should identify and output the groups that contain the substring "bie". **Solution:** - The algorithm works by reading the problem statement and analyzing the problem itself. - It uses a systematic approach to identify and eliminate groups that do not contain the substring "bie". - It also considers the length of each group and the presence of multiple strings within the group. - The algorithm outputs the groups that contain the substring "bie" while considering the specific conditions mentioned in the problem statement. **Key Points:** - The algorithm focuses on identifying and eliminating groups that do not contain the substring "bie". - It uses a systematic approach to eliminate irrelevant groups. - It considers the length of each group and the presence of multiple strings within the group. - The algorithm outputs the groups that contain the substring "bie" while considering the specific conditions.

正文

gym

知乎


尝试先读题而不是写缺省源感觉不太好
E 一头雾水。F 是签到就先上去写了,结果读错题交了个样例都没过的代码,小改了一下就过了。G 不太会做。zsy 把 M 丢给我想了一下
然后 gjk 把 D 过了。看榜发现 K 过了很多人,需要快速判断比较两个字符串等价于比较哪两个字符,反应了一下才意识到是 trie,上去写了,但没判一个是另一个前缀 WA 了一发
gjk 给了个 C 分治背包的做法,不知道 \(3000\) 的平方对数能不能过,我想了下感觉不好优化就让他写了,后来才看到物品体积 \(\le10\)
期间 zsy 在做 A。我跟榜看 G,没什么想法,gjk 猜 \(m>n\) 时一定无解我证出来了,现场学习了一下树同构(其实做法和我国赛场上编的树哈希差不多,我当时还是有点实力的),抢了 zsy 的机子。corner case 判不完全 WA 了一发。然后 zsy 艰难地过掉了 A
剩下 2h+ 的时候就一筹莫展了。在 I 和 M 之间徘徊,I 猜了个做法当然不对。M 不会加一个数再求 \(\gcd\),我把跟树有关的东西都想了一遍,感觉肯定是有性质被忽略了,zsy 提到了做差但我没反应过来。最后 zsy 会了但没写完

体验极差,罚时吃太多了,甚至没有金。以后还是得把所有题都读了,卡题的时候初步思考后我就没什么贡献了


G. Subgraph Isomorphism

  • \(m=n-1\)

YES

  • \(m=n\)

如果环上外挂的子树都同构那么 YES
如果环长为偶数且外挂的第奇/偶数个子树分别同构那么 'YES'
否则 NO

  • \(m>n\)

至少有两个环。只考虑这两个环和连接部分,一条链 和 有三度点 无法同构

F. Da Mi Lao Shi Ai Kan De

题意:有 \(n\) 个 group。对于第 \(i\) 个 group,有 \(m_{i}\) 个字符串,依次考虑每个字符串:如果含有子串 bie 且不在 group \(0\) 中就输出并加入 group \(0\)。如果当前 group 没有字符串被加入 group \(0\),输出 Time to play Genshin Impact, Teacher Rice!

group \(0\) 不清空,所以不是多测

与2022 ICPC 杭州站相似的内容:

2022 ICPC 杭州站

gym 知乎 尝试先读题而不是写缺省源感觉不太好 E 一头雾水。F 是签到就先上去写了,结果读错题交了个样例都没过的代码,小改了一下就过了。G 不太会做。zsy 把 M 丢给我想了一下 然后 gjk 把 D 过了。看榜发现 K 过了很多人,需要快速判断比较两个字符串等价于比较哪两个字符,反应了一下才

2022,烟火如常,布衣剩饭,啥也没干,年终总结,蹈海难酬

开篇明义,2022年,我啥也没干,或者说的更准确一些,啥也没干成,没有什么值得拿出来凡尔赛一下的事情,或者可以满足一下虚荣心的成就,300多个日夜里,就是日复一日的起床、上班、讲课、下班、吃饭、睡觉。有什么可总结的呢? 偶然间得一针鸡血或者是一碗鸡汤,便打开博客奋笔疾书写一些狗屁不通的文章,或者是操

[转帖]Redis 7 参数 修改 说明

2022-06-16 14:491800原创Redis 本文链接:https://www.cndba.cn/dave/article/108066 在之前的博客我们介绍了Redis 7 的安装和配置,如下: Linux 7.8 平台 Redis 7 安装并配置开机自启动 操作手册https://ww

[转帖]Redis 7.0 三节点哨兵(Sentinel)高可用 环境搭建手册

2022-06-17 16:253480原创Redis 本文链接:https://www.cndba.cn/dave/article/108088 1 哨兵高可用架构说明 Redis 最早的高可用方案是主从复制,但这种方案存在一个问题,就是当主库宕机后,从库不会自动切成主库,需要人工干预。 所有在主

[转帖]Redis 备份与恢复(RDB/AOF) 说明

2022-06-16 20:364580原创Redis 本文链接:https://www.cndba.cn/dave/article/108068 1 RDB 方式 1.1 RDB 备份恢复说明 Redis 的备份恢复有两种方法:RDB和AOF。 其中RDB 文件是一个经过压缩的二进制文件,有两个R

[转帖]Linux 磁盘I/O 调度算法 说明

2022-08-23 13:031361转载Linux 1 Linux 4.0 IO协议栈框架图 I/O 调度算法在各个进程竞争磁盘I/O的时候担当了裁判的角色。他要求请求的次序和时机做最优化的处理,以求得尽可能最好的整体I/O性能。 Linux 4.0 IO协议栈框架图 I/O调度程序的总结 当向

[转帖]DM 达梦数据库 记录超长 错误解决方法

2022-08-24 09:423551原创DM 达梦 本文链接:https://www.cndba.cn/dave/article/108596 1 问题说明与分析 在达梦数据库中进行数据库Insert时可能会遇到如下错误: java.sql.SQLException: Record length

[转帖]openEuler 操作系统 介绍

2022-10-14 12:411210原创Linux 本文链接:https://www.cndba.cn/dave/article/108700 openEuler社区前身是华为服务器操作系统EulerOS,于2019年开源后命名为 openEuler,采用木兰协议。openEuler与SuSE、

[转帖]从生命周期的角度来谈谈Oracle 软件的版本(12c/18c/19c/20c/21c)问题

2022-04-21 20:3720050原创Oracle 19c 本文链接:https://www.cndba.cn/dave/article/107944 在2017年之前,Oracle 的版本路线是非常清晰的,我接触过的几个版本有:9i、10g、11g、12c。 但是到了2018年之后,Ora

[转帖]分布式数据库中间件:MyCat 和 ShardingSphere 对比说明

2022-05-29 16:537540转载MySQL 原文链接:https://blog.csdn.net/horses/article/details/106086208 本文转载自 https://blog.csdn.net/horses/article/details/106086208 今