07 2019 档案
摘要:题解 1001 Azshara's deep sea Unsolved. 1002 Blow up the city. 题解:倒着建图,然后将原图出度为零的点用一个新节点连接起来,支配树板题。 参考代码: #include<bits/stdc++.h> using namespace std; #d
阅读全文
摘要:处理回文串,Manacher算法也是很不错,但在有些问题的处理上比较麻烦,比如求本质不同的子串的数量还需要结合后缀数组才能解决。今天的们介绍一种能够方便的解决关于回文串的问题的算法--PAM. 一些功能: 假设我们有一个串S,S下标从0开始: 1.求串S前缀0~i内本质不同回文串的个数(两个串长度不
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/884/I来源:牛客网 题目描述 We call a,ba,ba,b non-equivalent if and only if a≠ba \neq ba=b and a≠rev(b)a \neq rev(b)a=
阅读全文
摘要:比赛总结 @辣鸡lfw,一开始算三角形那题没想到正解使用莫队乱搞,然后要选出50个最大的时候还用莫队。。。主席树区间第k大什么的完全忘记了 题解 1001 Another Chess Problem unsolved 1002 Beauty Of Unimodal Sequence unsolved
阅读全文
摘要:Mr. Frog has an integer sequence of length n, which can be denoted as a1,a2,⋯,ana1,a2,⋯,anThere are m queries. In the i-th query, you are given two in
阅读全文
摘要:A Gragh Games Unsolved. B Crazy Binary String 题解:水题,子序列只要统计0和1数量,取最小值然后乘2就是答案; 对于子串:先记录0和1 前缀和的差值,然后找差值相等的距离最远的两个位置即可; 参考代码: #include<bits/stdc++.h> #
阅读全文
摘要:比赛总结: 看错F题意@byf 要勇于打表找规律 题解(不定更新) A EddyWalker B EddyWalker2 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define rep(i,a,n) for (int i=a;i<n;i+
阅读全文
摘要:总结: 数据范围问题(int / long long ) 题意问题 try a try. 1e4dinic冲冲冲 不要看到过的人暂时比较少就不敢写,@byf 比赛不要划水聊天 题解: A Blank 题意:题目意思是让你去找一个有n个数的数组,这个数组里面的数只有{0,1,2,3}。然后给你m个条件
阅读全文
摘要:部分题解后面更行 A Equivalent Prefixes 题解:https://blog.csdn.net/liufengwei1/article/details/96515809 参考代码: #include<bits/stdc++.h> #define maxl 100010 using n
阅读全文
摘要:Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he ca
阅读全文
摘要:A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It i
阅读全文
摘要:Given a string, we need to find the total number of its distinct substrings. Input T- number of test cases. T<=20;Each test case consists of one strin
阅读全文