
UVA
kewlgrl
好大一只咸鱼哇
展开
-
UVA-11000 Bee-蜜蜂繁殖
In Africa there is a very special species of bee. Every year, the female bees of such species give birth to one male bee, while the male bees give birth to one male bee and one female bee, and then t原创 2015-08-08 08:34:05 · 1227 阅读 · 0 评论 -
UVA-1068 Sum-1-N之间所有数的和
1068. Sum Time limit: 2.0 second Memory limit: 64 MB Your task is to find the sum of all integer numbers lying between 1 and N inclusive. Input The input consists of a single integer N that is no原创 2015-08-07 19:50:52 · 805 阅读 · 0 评论 -
UVA 11235-Frequent values(RMQ)
Frequent values 题目意思: 给出一个非降序排列的整数数组A,对于一系列询问(L,R),求出AL~AR区间内出现次数最多的值出现的次数。 解题思路: 数组非降序,所以对整个数组进行游程编码。 所求的最大值是以下三个部分的最大值: ①从L到L所在的段的结束处的元素个数:right[L]-L+1 ②从R到R所在的段的开始处的元素个数:R-left[R]+1 ③原创 2016-08-08 17:17:19 · 599 阅读 · 0 评论 -
UVA 11729-Commando War(排序分任务)
Commando War “Waiting for orders we held in the wood, word from the front never came By evening the sound of the gunfire was miles away Ah softly we moved through the shadows, slip away through t原创 2016-10-28 19:58:47 · 824 阅读 · 0 评论 -
UVA 11464-Even Parity(偶数矩阵-开关问题)
11464 - Even Parity Time limit: 3.000 seconds We have a grid of size N × N. Each cell of the grid initially contains a zero(0) or a one(1). The parityof a cell is the number of 1s surrounding th原创 2016-10-19 20:05:12 · 1302 阅读 · 1 评论