http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/B A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when t…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/A In an open credit system, the students can choose any course they like, but there is a problem. Some of the students are more senior than other students. The professor of such a c…
题 SmallR is an archer. SmallR is taking a match of archer with Zanoes. They try to shoot in the target in turns, and SmallR shoots first. The probability of shooting the target each time is  for SmallR while  for Zanoes. The one who shoots in the tar…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/E Description An infinitely long railway has a train consisting of n cars, numbered from 1 to n (the numbers of all the cars are distinct) and positioned in arbitrary order. David B…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/D The famous Korean internet company has provided an internet-based photo service which allows The famous Korean internet company users to directly take a photo of an astronomical p…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/C Description I’ve bought an orchard and decide to plant some apple trees on it. The orchard seems like an N * M two-dimensional map. In each grid, I can either plant an apple tree…
偶数矩阵(Even Parity, UVa 11464) 给你一个n×n的01矩阵(每个元素非0即1),你的任务是把尽量少的0变成1,使得每个元素的上.下.左.右的元素(如果存在的话)之和均为偶数.比如,如图1-6(a)所示的矩阵至少要把3个0变成1,最终如图1-6(b)所示,才能保证其为偶数矩阵. (a)                 (b) [输入格式] 输入的第一行为数据组数T(T≤30).每组数据的第一行为正整数n(1≤n≤15):接下来的n行每行包含n个非0即1的整数,相邻整数间用一…
(解方程建模+中位数求最短累积位移) 分金币(Spreading the Wealth, UVa 11300) 圆桌旁坐着n个人,每人有一定数量的金币,金币总数能被n整除.每个人可以给他左右相邻的人一些金币,最终使得每个人的金币数目相等.你的任务是求出被转手的金币数量的最小值.比如,n=4,且4个人的金币数量分别为1,2,5,4时,只需转移4枚金币(第3个人给第2个人两枚金币,第2个人和第4个人分别给第1个人1枚金币)即可实现每人手中的金币数目相等. [输入格式] 输入包含多组数据.每组数据第一…
Piotr's Ants Porsition:Uva 10881 白书P9 中文改编题:[T^T][FJUT]第二届新生赛真S题地震了 "One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome our new insect overlords."Kent Brockman Piotr likes playing with ants. H…
[Link]:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=52 [Description] 给你一个n*m的数字矩阵; 矩阵上的每个位置包含一个数字a[i][j]; 你一开始可以在第一列的某一个位置开始取数; 然后再往右,或右上或右下走; 直到走到最后一列为止; 你可以拿走你所走过的格子上的所有数字; 问你拿走的所有数字的和的最小值;…