![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
每周任务
大鳄梨12138
这个作者很懒,什么都没留下…
展开
-
cf1138B枚举
Polycarp is a head of a circus troupe. There are n — an even number — artists in the troupe. It is known whether the i-th artist can perform as a clown (if yes, then ci=1, otherwise ci=0), and whether they can perform as an acrobat (if yes, then ai=1, othe原创 2020-09-01 16:37:20 · 122 阅读 · 0 评论 -
codeforces 1202D思维构造
The subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements.You are given an integer n.You have to find a sequence s consisting of digits {1,3,7} such that it has原创 2020-08-21 16:12:32 · 132 阅读 · 0 评论 -
codeforces371D 并查集
There is a system of n vessels arranged one above the other as shown in the figure below. Assume that the vessels are numbered from 1 to n, in the order from the highest to the lowest, the volume of the i-th vessel is a i liters.Initially, all the vessel原创 2020-08-18 22:35:03 · 150 阅读 · 0 评论 -
codeforces 811C dp
Vladik often travels by trains. He remembered some of his trips especially well and I would like to tell you about one of these trips:Vladik is at initial train station, and now n people (including Vladik) want to get on the train. They are already lined原创 2020-08-18 22:14:38 · 225 阅读 · 0 评论 -
codeforces87B模拟
Programmer Vasya is studying a new programming language &K*. The &K* language resembles the languages of the C family in its syntax. However, it is more powerful, which is why the rules of the actual C-like languages are unapplicable to it. To full原创 2020-08-17 20:37:48 · 172 阅读 · 0 评论 -
cf1250B贪心
Employees of JebTrains are on their way to celebrate the 256-th day of the year! There are n employees and k teams in JebTrains. Each employee is a member of some (exactly one) team. All teams are numbered from 1 to k. You are given an array of numbers t1,原创 2020-07-26 15:56:43 · 160 阅读 · 0 评论 -
cf1038D水题
There are n slimes in a row. Each slime has an integer value (possibly negative or zero) associated with it.Any slime can eat its adjacent slime (the closest slime to its left or to its right, assuming that this slime exists).When a slime with a value x原创 2020-07-26 15:45:09 · 245 阅读 · 0 评论 -
cf 208C最短路
The Berland road network consists of n cities and of m bidirectional roads. The cities are numbered from 1 to n, where the main capital city has number n, and the culture capital — number 1. The road network is set up so that it is possible to reach any ci原创 2020-07-23 22:21:53 · 241 阅读 · 0 评论 -
11.20B
题目链接HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0<N<=1000000),第...原创 2019-12-15 20:37:40 · 81 阅读 · 0 评论 -
小猪存钱罐 完全背包
题目链接Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is s...原创 2019-12-15 20:03:18 · 185 阅读 · 0 评论 -
9.22
ac自动机题目链接:https://vjudge.net/problem/16404/origin当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一。小t如此生气,他决定...原创 2019-09-28 20:10:30 · 73 阅读 · 0 评论 -
9.22
manacher题目链接:https://vjudge.net/problem/22336/originNow, you are given a string S. We want to know how many distinct substring of S which is palindrome.InputThe first line of the input contains a ...原创 2019-09-28 20:08:22 · 94 阅读 · 0 评论 -
9.9 A
题目链接https://vjudge.net/problem/10934/originFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix ...原创 2019-09-12 18:22:30 · 133 阅读 · 0 评论 -
9.9B
题目链接https://vjudge.net/problem/27861/originIlya plays a card game by the following rules.A player has several cards. Each card contains two non-negative integers inscribed, one at the top of the car...原创 2019-09-12 18:28:19 · 88 阅读 · 0 评论 -
9.10A
题目链接https://vjudge.net/problem/2638259/originString matching is a common type of problem in computer science. One string matching problem is as following:Given a string [Math Processing Error]s[0…le...原创 2019-09-12 18:43:59 · 154 阅读 · 0 评论 -
9.10B
题目链接https://vjudge.net/problem/26048/originLittle Petya very much likes gifts. Recently he has received a new laptop as a New Year gift from his mother. He immediately decided to give it to somebody ...原创 2019-09-12 18:46:25 · 105 阅读 · 0 评论 -
9.7A
题目链接https://vjudge.net/problem/16282/originGive you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strings:St...原创 2019-09-12 18:55:48 · 116 阅读 · 0 评论 -
9.16
字典树模板题题目链接:https://vjudge.net/problem/16379/originIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单...原创 2019-09-28 19:40:26 · 164 阅读 · 0 评论 -
9.18A
01字典树模板题题目链接:https://vjudge.net/problem/67301/originZeus 和 Prometheus 做了一个游戏,Prometheus 给 Zeus 一个集合,集合中包含了N个正整数,随后 Prometheus 将向 Zeus 发起M次询问,每次询问中包含一个正整数 S ,之后 Zeus 需要在集合当中找出一个正整数 K ,使得 K 与 S 的异或结果最...原创 2019-09-28 19:50:14 · 119 阅读 · 0 评论 -
9.20
ac自动机模板题题目链接:https://vjudge.net/problem/16403/originIn the modern time, Search engine came into the life of everybody like Google, Baidu, etc.Wiskey also wants to bring this feature to his image re...原创 2019-09-28 20:02:09 · 92 阅读 · 0 评论 -
十六周任务 简易最短路
寒假的时候,ACBOY要去拜访很多朋友,恰巧他所有朋友的家都处在坐标平面的X轴上。ACBOY可以任意选择一个朋友的家开始访问,但是每次访问后他都必须回到出发点,然后才能去访问下一个朋友。比如有4个朋友,对应的X轴坐标分别为1, 2, 3, 4。当ACBOY选择坐标为2的点做为出发点时,则他最终需要的时间为 |1-2|+|2-2|+|3-2|+|4-2| = 4。现在给出N个朋友的坐标,那么AC...原创 2018-12-12 20:32:52 · 125 阅读 · 0 评论