04 2016 档案
摘要:传送门 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 在 Warcraft III 之冰封王座中,毁灭者是不死族打三本后期时的一个魔法飞行单位。 毁灭者的核心技能之一,叫做魔法吸收(Absorb Mana): 现在让我们来考虑下面的问题: 假设你拥有 n 个魔法单位,
阅读全文
摘要:Nearly all of the interesting files for users live under the data directory. The data directory is ~/.config/sublime-text-3 for LinuxThe Package Direc
阅读全文
摘要:这是AC自动机系列的第一篇 传送门 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)0 大意 给出N个仅由小写字母组成的字符串S[1]...S[N],它们的总长度为L。有Q组询问,询问
阅读全文
摘要:传送门 Time Limit: 3 Sec Memory Limit: 128 MB Description Alice likes playing games. So she will take part in the movements of M within N days, and each
阅读全文
摘要:Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description After inventing Turing Tree, 3xian always felt bo
阅读全文
摘要:Description 有一个N个整数的序列(每个数的初值为0)。每个数都是整数。你有M次操作。操作有两种类型: ——Add Di Xi 从第一个数开始每隔Di 个位置增加Xi ——Query Li Ri 回答当前序列Li项到Ri项的和 有一个N个整数的序列(每个数的初值为0)。每个数都是整数。你有
阅读全文
摘要:传送门 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Finally, you come to the interview room. You know that a Microsoft interviewer is in the room though the do
阅读全文
摘要:Pat
Lost Boy Calling 。。。。
DLUTOJ 1331 Maximum Sum
传送门
Time Limit: 1 Sec Memory Limit: 128 MB
Description
You are given an array of size N and another integer M.Your target is to find the maximum value of sum of subarray modulo M.
Subarray is a continous subset of array elements.
Note that we need to find the maximum value of (Sum of Subarray)%M , where there are N*(N+1)/2 possible subarrays.
Input
First line contains T , number of test cases to follow. Each test case consits of exactly 2
阅读全文
摘要:传送门 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 在遥远的未来,小Hi成为了地球联邦外空间联合开发工作组的一员,前往一颗新发现的星球开发当地的重金属资源。 为了能够在当地生存下来,小Hi首先要建立一个基地。建立基地的材料可以直接使用当地的石材和富裕的重金属资源。基
阅读全文
摘要:转自Avril,略有改动 Problem: 给定两个边与坐标轴平行的矩形,分别由左上角与右下角两点指定,判断两矩形是否相交。 Solution: 如下图所示,首先求出 与 点(即坐标值较小的两点)在 方向较大值与 方向较大值构成的点,在下图中就是 ,用红点(记为M点)
阅读全文
摘要:传送门 总结: 1.仔细读题 2.仔细分析复杂度 3.不要想当然,乱下结论 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi、小Ho还有被小Hi强拉来的小Z,准备组队参加一个智力竞赛。竞赛采用过关制,共计N个关卡。在第i个关卡中,小Hi他们需要获得Ai点分数才能够进
阅读全文
摘要:A source file is made up of text, formulas, and instructions (commands) to . Commands start with a backslash (\) and tells something
阅读全文
摘要:传送门 Time Limit: 6 Sec Memory Limit: 128 MBSubmit: 73 Solved: 14 Description Input 多组输入数据。 每组数据: 第一行两个整数n,r(1 <= r <= n <= 1000000)。 第二行r个不同的整数表示:集合S的一
阅读全文
摘要:Extracted from Section 17.4 Random Numbers, C++ Primer 5th. Ed. The random-number library generates random numbers through a set of cooperating classe
阅读全文