上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 43 下一页
摘要: Description 有一个N个整数的序列(每个数的初值为0)。每个数都是整数。你有M次操作。操作有两种类型: ——Add Di Xi 从第一个数开始每隔Di 个位置增加Xi ——Query Li Ri 回答当前序列Li项到Ri项的和 有一个N个整数的序列(每个数的初值为0)。每个数都是整数。你有 阅读全文
posted @ 2016-04-17 20:35 Pat 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 传送门 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Finally, you come to the interview room. You know that a Microsoft interviewer is in the room though the do 阅读全文
posted @ 2016-04-17 12:03 Pat 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2016-04-14 19:05 Pat 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 传送门 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 在遥远的未来,小Hi成为了地球联邦外空间联合开发工作组的一员,前往一颗新发现的星球开发当地的重金属资源。 为了能够在当地生存下来,小Hi首先要建立一个基地。建立基地的材料可以直接使用当地的石材和富裕的重金属资源。基 阅读全文
posted @ 2016-04-11 22:39 Pat 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 转自Avril,略有改动 Problem: 给定两个边与坐标轴平行的矩形,分别由左上角与右下角两点指定,判断两矩形是否相交。 Solution: 如下图所示,首先求出$P_1$与$P_3$点(即坐标值较小的两点)在$X$方向较大值与$Y$方向较大值构成的点,在下图中就是$P_3$,用红点(记为M点) 阅读全文
posted @ 2016-04-10 00:08 Pat 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 传送门 总结: 1.仔细读题 2.仔细分析复杂度 3.不要想当然,乱下结论 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi、小Ho还有被小Hi强拉来的小Z,准备组队参加一个智力竞赛。竞赛采用过关制,共计N个关卡。在第i个关卡中,小Hi他们需要获得Ai点分数才能够进 阅读全文
posted @ 2016-04-08 00:17 Pat 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 1.模板 2.实现细节 阅读全文
posted @ 2016-04-06 18:36 Pat 阅读(184) 评论(0) 推荐(0) 编辑
摘要: A source file is made up of text, formulas, and instructions (commands) to $\LaTeX$. Commands start with a backslash (\) and tells $\LaTeX$ something 阅读全文
posted @ 2016-04-03 20:57 Pat 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 传送门 Time Limit: 6 Sec Memory Limit: 128 MBSubmit: 73 Solved: 14 Description Input 多组输入数据。 每组数据: 第一行两个整数n,r(1 <= r <= n <= 1000000)。 第二行r个不同的整数表示:集合S的一 阅读全文
posted @ 2016-04-03 16:44 Pat 阅读(309) 评论(0) 推荐(0) 编辑
摘要: Extracted from Section 17.4 Random Numbers, C++ Primer 5th. Ed. The random-number library generates random numbers through a set of cooperating classe 阅读全文
posted @ 2016-04-03 14:19 Pat 阅读(233) 评论(0) 推荐(0) 编辑
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 43 下一页