IDEA
西行妖下的亡灵
这个作者很懒,什么都没留下…
展开
-
T-Net(贪心)
题目描述T-net which is a new telecommunications company, plans to install its base stations in the city. The places where base stations must be installed have been already specified. T-net has two types...原创 2019-04-12 00:00:05 · 817 阅读 · 0 评论 -
SCU4440-Rectangle(数学)
Rectanglefrog has a piece of paper divided intonrows andmcolumns. Today, she would like to draw a rectangle whose perimeter is not greater thank.弗雷格有一张被分成n行m列的纸,如今,她想在这画一个周长不大于k的矩形。There ...原创 2019-04-21 23:59:49 · 174 阅读 · 0 评论 -
HDU-6468 zyb的面试(模拟十叉树+dfs)
Problem Description今天zyb参加一场面试,面试官听说zyb是ACMer之后立马抛出了一道算法题给zyb:有一个序列,是1到n的一种排列,排列的顺序是字典序小的在前,那么第k个数字是什么?例如n=15,k=7, 排列顺序为1, 10, 11, 12, 13, 14, 15, 2, 3, 4, 5, 6, 7, 8, 9;那么第7个数字就是15.那么,如果你处在zyb的场...原创 2019-04-28 23:31:52 · 161 阅读 · 0 评论 -
HZNU 2019 校赛-Little Sub and Triples(小撒布与三数数对)(初见难收的非算法题类型之一)
DescriptionLittle Sub has learned a new word ’Triple’, which usually means a group with three elements in it. Now he comes up with an interesting problem for you.小撒布学了一个新单词:“Triple”,这个词经常用来表示一个三个元...原创 2019-05-10 12:32:45 · 200 阅读 · 0 评论 -
“美登杯”上海市高校大学生程序设计邀请赛-小花梨的字符串(找规律+前缀与后缀的定义)(远看炮塔吓死人,近看五对负重轮)
Problem A、小花梨的字符串时间限制:1000ms 空间限制:512MBDescription小花梨有一个长度为?且只包含小写字母的字符串。现在对其进行?次询问。 每次询问字符串的一段区间[?, ?],从[?, ?]区间内的所有子串中最多可以选出多少个字符串, 使得选出来的这些字符串存在一种排列方式满足相邻的两个字符串?, ?的最长公共后缀长度 大于等于???(??????(?)...原创 2019-05-19 19:43:24 · 169 阅读 · 0 评论 -
CF1187B-Letters Shop(字母商店)(字符串相关)
The letters shop showcase is a stringss, consisting ofnlowercase Latin letters. As the name tells, letters are sold in the shop.字母商店的陈列是一个字符串s,包含n个小写拉丁字母,正如它的名字所说,这个店铺卖字母。Letters are sold one b...原创 2019-07-28 23:35:00 · 187 阅读 · 0 评论 -
CF1187C Vasya and array(Vasya和数组)(模拟)
Vasya has an array a1,a2,…,an.Vasya有一个数组,a1,a2,...,anYou don't know this array, but he told you m facts about this array. The i-th fact is a triple of numbers ti, li and ri (0≤ti≤1,1≤li<ri≤n) a...原创 2019-07-28 23:35:07 · 214 阅读 · 0 评论 -
CF1189A-Keanu Reeves(基努·里维斯)(idea+字符串)
After playing Neo in the legendary "Matrix" trilogy, Keanu Reeves started doubting himself: maybe we really live in virtual reality? To find if this is true, he needs to solve the following problem....原创 2019-07-28 23:35:15 · 227 阅读 · 0 评论 -
CF1189B Number Circle(数字圈)
You are givennnnumbersa1,a2,…,ana1,a2,…,an. Is it possible to arrange them in a circle in such a way that every number isstrictlyless than the sum of its neighbors?给定了n个数,a1...an。是否存在一种排列方式使得每个...原创 2019-07-28 23:35:20 · 224 阅读 · 0 评论 -
HDU 6575 Budget(预算)(字符串与BigDecimal)
BudgetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 95Accepted Submission(s): 35Problem DescriptionAvin’s company has many ongo...原创 2019-07-28 23:35:59 · 178 阅读 · 0 评论 -
HDU6573 Traffic(交通)(纯IDEA)
Problem DescriptionAvin is observing the cars at a crossroads. He finds that there are n cars running in the east-west direction with the i-th car passing the intersection at time ai . There are ano...原创 2019-07-22 00:37:31 · 209 阅读 · 0 评论 -
HDU 6570 Wave(波浪)(基本状态转移)
Problem DescriptionAvin is studying series. A series is called "wave" if the following conditions are satisfied:1) It contains at least two elements;2) All elements at odd positions are the same;...原创 2019-07-28 23:36:05 · 310 阅读 · 1 评论 -
Partition problem
Given 2N people, you need to assign each of them into either red team or white team such that each team consists of exactly N people and the total competitive value is maximized.给定2N个人,你需要去把他们分配到红队或...原创 2019-07-28 23:36:16 · 137 阅读 · 0 评论 -
Just skip this problem
Y_UME has just found a numberxin his right pocket. The number is a non-negative integer ranging from0to2n−1inclusively. You want to know the exact value of this number. Y_UME has super power, an...原创 2019-07-28 23:36:22 · 171 阅读 · 0 评论 -
Crazy Binary String
本题的核心在于如何表达出所谓“子字符串”中有相同数目的0或1。在这里可以采用前缀和数组来表示这样的情况,即某个区间的区间和是它长度的一半时,这个区间就是所需的区间之一,此时更新答案即可。当然,也可以使用另一种方案:1和0分别用一组相反数代替,比如1和-1,2和-2,都是可以的。这样就可以表现出当1多的时候,整体区间和为正数,0多的时候,整体区间和为负数。所以当某一区间的区间和再次在某个区间内出...原创 2019-07-28 23:36:42 · 103 阅读 · 0 评论 -
/\/\/\/(摆动数组的应用&结构体数组标记法)
A sequence a1,a2,…,an is said to be /\/\/\/ when the following conditions are satisfied:译:一个序列a1,a2,....an如果是/\/\/\/数列,那么会满足下列条件For each i=1,2,…,n−2, ai=ai+2.Exactly two different numbers appear ...原创 2019-03-23 23:14:16 · 453 阅读 · 0 评论