
----Splay
文章平均质量分 84
_Occult_
物語が始まった
展开
-
FZU 2100 排队
Description一些人在排队买车票,假设每个人都有不同的买票紧急程度,如果某个人的紧急程度比排在他前一个的人的紧急程度更大,则这个人可以和前一个人调换位置,并且假设每个人都有一个耐心值,若某人的耐心值为x,则他最多可以向前调换x次,当然前提是他之前x个人的紧急程度都比他小,若遇到前面一个人紧急程度比他大的他将停止往前调换。现假设有N个人,按顺序一个个进入队列,并且每进去一个人立即按照原创 2016-03-15 21:53:15 · 365 阅读 · 0 评论 -
HDU 3726 Graph and Queries
DescriptionYou are given an undirected graph with N vertexes and M edges. Every vertex in this graph has an integer value assigned to it at the beginning. You're also given a sequence of operation原创 2016-02-25 00:47:01 · 1110 阅读 · 0 评论 -
FZU 1978 Repair the brackets
DescriptionA regular bracket sequence is defined as follows:1. Empty sequence is a regular bracket sequence.2. If S is a regular bracket sequence, then (S) is also a regular bracket sequence.3原创 2016-02-23 23:48:37 · 549 阅读 · 0 评论 -
HDU 2475 Box
DescriptionThere are N boxes on the ground, which are labeled by numbers from 1 to N. The boxes are magical, the size of each one can be enlarged or reduced arbitrarily. Jack can perform the “MO原创 2016-02-23 12:36:04 · 1091 阅读 · 0 评论 -
POJ 3580 SuperMemo
DescriptionYour friend, Jackson is invited to a TV show called SuperMemo in which the participant is told to play a memorizing game. At first, the host tells the participant a sequence of number原创 2016-02-21 19:52:31 · 662 阅读 · 0 评论 -
HYSBZ 1500 维修数列
DescriptionInput输入的第1 行包含两个数N 和M(M ≤20 000),N 表示初始时数列中数的个数,M表示要进行的操作数目。第2行包含N个数字,描述初始时的数列。以下M行,每行一条命令,格式参见问题描述中的表格。任何时刻数列中最多含有500 000个数,数列中任何一个数字均在[-1 000, 1 000]内。插入的数原创 2016-02-21 17:45:44 · 936 阅读 · 0 评论 -
HYSBZ 1269 文本编辑器editor
Description这些日子,可可不和卡卡一起玩了,原来可可正废寝忘食的想做一个简单而高效的文本编辑器。你能帮助他吗?为了明确任务目标,可可对“文本编辑器”做了一个抽象的定义: 文本:由0个或多个字符构成的序列。这些字符的ASCII码在闭区间[32, 126]内,也就是说,这些字符均为可见字符或空格。光标:在一段文本中用于指示位置的标记,可以位于文本的第一个字符之前,文本的最后原创 2016-02-21 14:23:52 · 467 阅读 · 0 评论 -
HYSBZ 1208 宠物收养所
Description最近,阿Q开了一间宠物收养所。收养所提供两种服务:收养被主人遗弃的宠物和让新的主人领养这些宠物。每个领养者都希望领养到自己满意的宠物,阿Q根据领养者的要求通过他自己发明的一个特殊的公式,得出该领养者希望领养的宠物的特点值a(a是一个正整数,a<2^31),而他也给每个处在收养所的宠物一个特点值。这样他就能够很方便的处理整个领养宠物的过程了,宠物收养所总是会有两种情原创 2016-02-20 18:16:23 · 517 阅读 · 0 评论 -
POJ 2828 Buy Tickets
DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little原创 2016-02-20 15:51:01 · 3189 阅读 · 0 评论 -
POJ 3481 Double Queue
DescriptionThe new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provided by IBM Romania, and using modern inform原创 2016-02-20 14:56:27 · 346 阅读 · 0 评论 -
HDU 3436 Queue-jumpers
DescriptionPonyo and Garfield are waiting outside the box-office for their favorite movie. Because queuing is so boring, that they want to play a game to kill the time. The game is called “Queue-j原创 2016-02-20 14:35:49 · 528 阅读 · 0 评论 -
HYSBZ 1588 营业额统计
Description营业额统计 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况。 Tiger拿出了公司的账本,账本上记录了公司成立以来每天的营业额。分析营业情况是一项相当复杂的工作。由于节假日,大减价或者是其他情况的时候,营业额会出现一定的波动,当然一定的波动是能够接受的,但是在某些时候营业额突变得很高或是很低,这就证明公司原创 2016-02-20 13:20:04 · 518 阅读 · 0 评论 -
HDU 3487 Play with Chain
DescriptionYaoYao is fond of playing his chains. He has a chain containing n diamonds on it. Diamonds are numbered from 1 to n. At first, the diamonds on the chain is a sequence: 1, 2, 3, …, n.原创 2016-02-20 01:56:11 · 521 阅读 · 0 评论 -
HDU 1890 Robotic Sort
DescriptionSomewhere deep in the Czech Technical University buildings, there are laboratories for examining mechanical and electrical properties of various materials. In one of yesterday’s present原创 2016-02-20 00:28:44 · 411 阅读 · 0 评论 -
HDU 1754 I Hate It
Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和原创 2016-02-19 18:38:25 · 430 阅读 · 0 评论 -
POJ 3468 A Simple Problem with Integers
Description给出了一个序列,你需要处理如下两种询问。"C a b c"表示给[a, b]区间中的值全部增加c (-10000 ≤ c ≤ 10000)。"Q a b" 询问[a, b]区间中所有值的和。Input第一行包含两个整数N, Q。1 ≤ N,Q ≤ 100000.第二行包含n个整数,表示初始的序列A (-1000000000 ≤原创 2016-02-19 00:09:22 · 399 阅读 · 0 评论 -
HDU 1556 Color the ball
DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a Input每个测试实例第一行为一个整数N,(N 当N = 0,输入结束。 Output每个测试实例输出一行,包括N个整数,第I个数代表第I个气球总共被涂色的次数。 Sample Input原创 2016-02-18 20:42:08 · 314 阅读 · 0 评论 -
CSU 1811 Tree Intersection
DescriptionBobo has a tree with n vertices numbered by 1,2,…,n and (n-1) edges. The i-th vertex has color ci, and the i-th edge connects vertices ai and bi.Let C(x,y) denotes the set of colors原创 2016-09-04 15:18:28 · 1162 阅读 · 2 评论