摘要: F. Asya And Kittens F. Asya And Kittens Asya loves animals very much. Recently, she purchased nn kittens, enumerated them from 11 and nn and then put 阅读全文
posted @ 2019-02-25 11:15 WAKBGAN 阅读(648) 评论(0) 推荐(0) 编辑
摘要: Problem Description Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had.Marge: Yeah, what is it?Homer: Take 阅读全文
posted @ 2019-02-24 00:59 WAKBGAN 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Problem Description For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to 阅读全文
posted @ 2019-02-23 16:52 WAKBGAN 阅读(114) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/dyx404514/article/details/41831947 这篇博客讲的很清楚 求next数组: 求extend数组 阅读全文
posted @ 2019-02-23 00:28 WAKBGAN 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/371/B来源:牛客网 小睿睿的n个妹纸排成一排,每个妹纸有一个颜值val[i]。有m个询问,对于每一个询问,小睿睿想知道区间[L,R]颜值最高而编号最小的妹纸是哪一个 对于妹纸们的颜值val[i],其生成函数为: voi 阅读全文
posted @ 2019-02-23 00:10 WAKBGAN 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Problem Description CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there a 阅读全文
posted @ 2019-02-22 17:45 WAKBGAN 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Mitya has a rooted tree with nn vertices indexed from 11 to nn, where the root has index 11. Each vertex vv initially had an integer number av≥0av≥0 w 阅读全文
posted @ 2019-02-21 17:38 WAKBGAN 阅读(308) 评论(0) 推荐(0) 编辑
摘要: Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Ouli 阅读全文
posted @ 2019-02-18 22:48 WAKBGAN 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 每一个数据结构老师必讲的算法,这里我就不再重复累赘的叙述了。 KMP主要分为两步,求next数组和求f数组,对于next数组 我们主要需要知道以下引理: 若j0是next[i]的一个候选项,即j0<i且A[i-j0+1~i]=A[1~j0],则小于j0的最大的next[i]的候选项是next[j0] 阅读全文
posted @ 2019-02-18 22:40 WAKBGAN 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Problem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 阅读全文
posted @ 2019-02-18 16:35 WAKBGAN 阅读(157) 评论(0) 推荐(0) 编辑