Contest
文章平均质量分 80
--Simone-
这个作者很懒,什么都没留下…
展开
-
分配数字(区间统计)
Font Size: ← →Problem Description Mandy和GG玩游戏。。。 一开始,n个桶放在一条直线上,下标分别为 1,2,3….n,然后Mandy执行m个操作,每次选择一个区别[L,R],向下标在这个范围内的桶放入一个石头。同时,Mandy还有n个数。 Mandy让GG把这n个数分别和这些桶对应(一个数对应一个桶,一个桶对应一个数),将这些数分配后,每个数的分数为 ((桶内的石头数)乘于 (和该桶对应的数)),Mandy让GG求出分数的最大值,如果GG的值是原创 2013-07-28 13:35:39 · 269 阅读 · 0 评论 -
Contest Print Server(模拟)
,so you can print your source code any time. Here you need to write a contest print server to handle all the requests. InputIn the first line there is an integer T(T<=10),which indicates the number of test cases.In each case,the first line c原创 2014-04-26 01:20:31 · 57 阅读 · 0 评论 -
Rescue The Princess(数学)
iption Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a prince who wanted to marry the princess set out immediately. Yet, the beast set a maze. Only if the prince find out the maze’原创 2014-04-26 00:27:07 · 83 阅读 · 0 评论 -
方格取数(DP)
,只能向下和向右,一共走两次(即从左上角走到右下角走两趟),把所有经过的格子的数加起来,求最大值SUM,且两次如果经过同一个格子,则最后总和SUM中该格子的计数只加一次。 Input第一行N(1 <= N <= 100)然后N行,每行N个数。依次表示N * N每个格子的数值。(0 <= value <= 1000) ; Output输出最大值SUM。 Sample Input3 1 2 3原创 2014-04-23 09:21:01 · 60 阅读 · 0 评论 -
Rist-Number(筛选)
st-Numbers, then we have1. 1 2 S2. 3 × S 2 S3. 7 × S 2 S4. 15 × S 2 S5. 31 × S 2 SObviously, S is an infinite set. Given n, judge whether n 2 S is true.Input FormatThe input contains multiple test cases.The first line of input contains an原创 2014-04-13 00:16:58 · 99 阅读 · 0 评论 -
Washing Clothes(01背包)
othes to wash. Luckily, he has a beautiful and hard-working girlfriend to help him. The clothes are in varieties of colors but each piece of them can be seen as of only one color. In order to prevent the clothes from getting dyed in mixed colors, Dearboy a原创 2013-10-15 13:56:30 · 122 阅读 · 0 评论 -
Count the Colors(线段树 + 延迟标记)
ask is counting the segments of different colors you can see at last.InputThe first line of each data set contains exactly one integer n, 1 <= n <= 8000, equal to the number of colored segments.Each of the following n lines consists of ex原创 2013-09-10 17:57:23 · 55 阅读 · 0 评论 -
Shaking Your Cellphone(并查集 + STL)
DescriptionDo you know a software called "WeiXin", a kind of chatting tool? There is an application called "Shaking for a while". Once you shake your cellphone, you can find those who shake their cellphone at same time.One day when原创 2013-08-24 22:36:22 · 81 阅读 · 0 评论 -
Back to Underworld(带权并查集)
scriptionThe Vampires and Lykans are fighting each other to death. The war has become so fierce that, none knows who will win. The humans want to know who will survive finally. But humans are afraid of going to the battlefield.So, they made a plan. T原创 2013-08-24 13:34:01 · 74 阅读 · 0 评论 -
Wireless Network(并查集)
ia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the network were all broken. The computers are repaired one by one, and the network gradually began to work again. Be原创 2013-08-21 10:57:03 · 57 阅读 · 0 评论 -
Agri-Net(kruskal)
Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John ordered a high speed connection for his farm and is going to share his c原创 2013-08-20 02:07:08 · 72 阅读 · 0 评论 -
An Easy Number Game(生成序列)
are 8 non-negative intergers (no greater than 9) and a number x, can you make a eight-digit number(without leading zeros) with these intergers with the additional condition that the eight-digit number should be divided by the number x.InputThe原创 2013-08-20 00:54:29 · 63 阅读 · 0 评论 -
Reward(拓扑排序)
a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. Now he has a trouble about how to distribute the rewards.The workers will compare their rewards ,and some one may have demands of the distributing of re原创 2013-08-14 16:06:21 · 151 阅读 · 0 评论 -
13.7.31 Wed F(技巧)
ionLearn, learn and learn again — Valera has to do this every day. He is studying at mathematical school, where math is the main discipline. The mathematics teacher loves her discipline very much and tries to cultivate this love in children. That's why原创 2013-08-02 17:18:59 · 63 阅读 · 0 评论 -
13.7.31 Wed C(模拟)
t colors you can see at last.InputThe first line of each data set contains exactly one integer n, 1 <= n <= 8000, equal to the number of colored segments.Each of the following n lines consists of exactly 3 nonnegative integers sep原创 2013-08-02 01:50:45 · 66 阅读 · 0 评论 -
Meteor Shower(BFS)
riptionBessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they hit. Anxious for her safety, she vows to find her way to a safe location (one that is never destroyed by原创 2013-07-29 16:36:00 · 56 阅读 · 0 评论 -
Cow Bowling(递归)
ling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a standard bowling-pin-like triangle like this: 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5Then the other c原创 2013-07-28 17:33:13 · 50 阅读 · 0 评论 -
Backward Digit Sums(序列生成 + 模拟)
ying a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certain order and then sum adjacent numbers to produce a new list with one fewer number. They repeat this until only a single number is left. For example, one ins原创 2013-07-28 16:55:24 · 91 阅读 · 0 评论 -
Thrall's Dream(强连通分量 + Tarjan)
prophecies, like fools we clung to the old hatreds, and fought as we had for generations. Until one day the sky rained fire, and a new enemy came upon us. We stand now upon the brink of destruction, for the Reign of Chaos has come at last.Thrall, the wa原创 2014-04-29 01:11:45 · 89 阅读 · 0 评论