随笔分类 - 其他OJ
摘要:HIGH - Highways no tags no tags In some countries building highways takes a lot of time... Maybe that's because there are many possiblities to constru
阅读全文
摘要:REPEATS - Repeats no tags no tags A string s is called an (k,l)-repeat if s is obtained by concatenating k>=1 times some seed string t with length l>=
阅读全文
摘要:1297. Palindrome Time limit: 1.0 second Memory limit: 64 MB The “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that
阅读全文
摘要:DISUBSTR - Distinct Substrings no tags no tags Given a string, we need to find the total number of its distinct substrings. Input T- number of test ca
阅读全文
摘要:#1403 : 后缀数组一·重复旋律 #1403 : 后缀数组一·重复旋律 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我们知道一个音乐旋律被表示为长度为 N 的数构成的数列。 小Hi在练习过很多曲子以后发现很多作品自身包含一样的
阅读全文
摘要:The Chinese Postman Problem My Tags (Edit) Source : bin3 Time limit : 1 sec Memory limit : 64 M Submitted : 503, Accepted : 172 Source : bin3 Time lim
阅读全文
摘要:4326: NOIP2015 运输计划 Description 公元 2044 年,人类进入了宇宙纪元。L 国有 n 个星球,还有 n−1 条双向航道,每条航道建立在两个星球之间,这 n−1 条航道连通了 L 国的所有星球。小 P 掌管一家物流公司, 该公司有很多个运输计划,每个运输计划形如:有一艘
阅读全文
摘要:2243: [SDOI2011]染色 Description 给定一棵有n个节点的无根树和m个操作,操作有2类: 1、将节点a到节点b路径上所有点都染成颜色c; 2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段),如“112221”由3段组成:“11”、“222”和“1”。 请你
阅读全文
摘要:3224: Tyvj 1728 普通平衡树 Description 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: 1. 插入x数 2. 删除x数(若有多个相同的数,因只删除一个) 3. 查询x数的排名(若有多个相同的数,因输出最小的排名) 4. 查询排名为x的数 5.
阅读全文
摘要:3876: [Ahoi2014]支线剧情 Description 【故事背景】 宅男JYY非常喜欢玩RPG游戏,比如仙剑,轩辕剑等等。不过JYY喜欢的并不是战斗场景,而是类似电视剧一般的充满恩怨情仇的剧情。这些游戏往往 都有很多的支线剧情,现在JYY想花费最少的时间看完所有的支线剧情。 【问题描述】
阅读全文
摘要:丽娃河的狼人传说 Time limit per test: 1.0 seconds Memory limit: 256 megabytes 丽娃河的狼人传说 Time limit per test: 1.0 seconds Memory limit: 256 megabytes Time limit
阅读全文
摘要:Problem C. Numbers This contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problem
阅读全文
摘要:Network of Byteland consists of n servers, connected by m optical cables. Each cable connects two servers and can transmit data in both directions. Tw
阅读全文
摘要:The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest num
阅读全文
摘要:A. 微软手机的信号显示 模拟题,用一个7*7个数组,然后int除法判断信号有几成就可以了 代码: B. 微软大楼设计方案(简单) 模拟题+BFS,我是用一个比较大的数组当地图,然后以80行为地面根据楼的高度一层一层地往上盖楼房,然后$O(m^2)$枚举两两点之间BFS出距离判断一下更新答案 代码:
阅读全文
摘要:问题 I: qwb VS 去污棒 题目描述 qwb表白学姐失败后,郁郁寡欢,整天坐在太阳底下赏月。在外人看来,他每天自言自语,其实他在和自己的影子“去污棒”聊天。 去污棒和qwb互相出题考验对方,去污棒问了qwb这样一个问题: 现已知一个有n个正整数的序列a[1],a[2]...a[n],接下来有m
阅读全文
摘要:3673: 可持久化并查集 by zky Description n个集合 m个操作 操作: 1 a b 合并a,b所在集合 2 k 回到第k次操作之后的状态(查询算作操作) 3 a b 询问a,b是否属于同一集合,是则输出1否则输出0 0<n,m<=2*10^4 n个集合 m个操作 操作: 1 a
阅读全文
摘要:世风日下的哗啦啦族I Time Limit: 4000/2000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) Submit Statistic Next Problem Problem Description "世风日下啊,女
阅读全文
摘要:One day, Peter came across a function which looks like: F(1, X) = X mod A1. F(i, X) = F(i - 1, X) mod Ai, 2 ≤ i ≤ N. Where A is an integer array of le
阅读全文
摘要:Censor frog is now a editor to censor so-called sensitive words (敏感词). She has a long text \(p\). Her job is relatively simple -- just to find the fir
阅读全文