首页 > 其他分享 >2023-11-17 杂题乱写

2023-11-17 杂题乱写

时间:2023-11-17 15:57:20浏览次数:45  
标签:11 do string 乱写 character process length 杂题 appear

倍增的英语怎么说。

Tasks below are finished yesterday in Yuhui Che's room(When he was watching ugly girls.). I'll write the solution in this blog because the coding work was accomplished just now.

CF461E

No Binary Search.

If letters in \(\{A,B,C,D\}\) do not appear in the given string \(t\),they can't appear in the target string \(s\).

To minimize the operation number,one could just find the longest prefix of \(s\) appeared in \(t\) and delete it in \(s\). Repeat such process until \(s\) is empty.

If we want this extending process to stop, DFS on a trie is all you need. Set \(dp_{s,f}\) be the least length of a string that does not appear in \(t\) and begins with character \(s\) and ends with character \(t\). Pay attention that string \([s\dots f]\) doesn't appear in \(t\). We want the character \(f\) to force the substring extention process to stop.

By using 倍增 with something similar to matrix mutiplication,we can easily obtain \(\rm DP_{i,s,f}\) which means the least length of a row of \(2^i\) strings.Greedily append the strings.

It's obvious that by choosing proper characters,we can force the length of the longest prefix mentioned above is always smaller than \(\log_4{|t|}+1\). So do not let the substrings of \(t\) with a length longer than the upperbound appears in your trie.

Encounter and Farewell

link

How do you confirm that there is a Spanning tree in the graph? For me that is all you can reach any vertex in the graph from any starting point..

标签:11,do,string,乱写,character,process,length,杂题,appear
From: https://www.cnblogs.com/yspm/p/Diary20231117.html

相关文章

  • 2023.11.17——每日总结
    学习所花时间(包括上课):9h代码量(行):0行博客量(篇):1篇今天,上午学习,下午学习;我了解到的知识点:1.mybatis2.flash明日计划:学习......
  • 每日总结2023年11月17日
    AccesstoXMLHttpRequestat'http://localhost:8090/user/list'fromorigin'http://localhost:8080'hasbeenblockedbyCORSpolicy:No'Access-Control-Allow-Origin'headerispresentontherequestedresource.这是今天做SpringBoot+......
  • P5482 [JLOI2011] 不等式组
    P5482[JLOI2011]不等式组这道题比板子还是难不少,因为有大量的分类讨论。看到题就可以考虑平衡树了。\(ax+b>c\iffax>c-b\),根据不等式乘除法的变号规则分类。\(a>0\),不等号方向不变,\(x>\dfrac{c-b}{a}\)。\(a<0\),不等号方向改变,\(x<\dfrac{c-b}{a}\)。\(a=0\),\(0>c-b\iff......
  • 2023年11月中国数据库排行榜:OPO组合持续两月,亚信、中兴闯进前十
    长夜之中蓄力待,势如破晓初光披。 2023年11月的 墨天轮中国数据库流行度排行 火热出炉,本月共有283个数据库参与排名。本月排行榜前十名变动较大,TiDB上升一位居第4,达梦奋勇向前重归第6,亚信AntDB、中兴GoldenDB势如破竹进军10强。 墨天轮十巨头之争白热化,中国数据库行业将迎......
  • 【2023-11-09】家庭效益
    20:00如果有人倾听你,不对你评头论足,不替你担惊受怕,也不想改变你,这多美好啊……每当我得到人们的倾听和理解,我就可以用新的眼光看世界,并继续前进……这真神奇啊!一旦有人倾听,看起来无法解决的问题就有了解决办法,千头万绪的思路也会变得清晰起来。          ......
  • UVA 11178 Morley's Theorem 题解
    计算几何LinkUVA11178Morley'sTheoremQuestionMorley定理是这样的,作三角形ABC每个内角的三等分线,相交成三角形DEF,则DEF是等边三角形给出\(A,B,C\)坐标,求\(D,E,F\)坐标Solution其实是一道计算几何板子题只需要计算\(\angleABC\)的值\(a\),然后把\(BC\)逆......
  • 2023-2024-1 20211327 信息安全系统设计与实现 学习笔记10
    学习笔记块与I/O缓冲区I/O缓冲区管理算法比较实践过程块与I/O缓冲区块设备1.定义:块设备是一种数据存储设备,其数据以块为单位进行读写。块通常是一个固定大小的数据块,比如512字节或4KB。2.示例:硬盘驱动器、固态硬盘、光盘等都是块设备的例子。3.特点:数据以块为单位传......
  • 2023.11.16 总结
    T1Problem-E-Codeforces根据题目我们可以看出这些圆与该直线都不想交,划分为了两部分。而且,因为圆心在原线段的中垂线上,所以每个圆与我们所求的圆相交时我们所求的圆的圆心的\(x\)坐标是一段连续的区间。那我们可以用二分出每个区间后就可以了。T2Problem-D-Codefo......
  • 11.17打卡
    1.分割链表(86)给你一个链表的头节点 head 和一个特定值 x ,请你对链表进行分隔,使得所有 小于 x 的节点都出现在 大于或等于 x 的节点之前。你应当 保留 两个分区中每个节点的初始相对位置思想:双链表存储/***Definitionforsingly-linkedlist.*publicclas......
  • 2023/11/18软件工程日报
    使用hbaseshell时报了这种错误查阅资料后发现要打开hbase安装目录下的conf/hbase-env.sh,将其中的ZK改为true后重启hbase就解决了 ......