摘要: 描述 You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of 阅读全文
posted @ 2018-08-19 08:32 zdragon 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 描述 For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ul 阅读全文
posted @ 2018-08-19 08:20 zdragon 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 描述 给两个有一定容量的箱子,往里面装宝石(宝石总容量不能超过箱子容量),不同的宝石有不同的容量和价值。求两个箱子里最大宝石的价值。 给两个有一定容量的箱子,往里面装宝石(宝石总容量不能超过箱子容量),不同的宝石有不同的容量和价值。求两个箱子里最大宝石的价值。 输入 line 1: Input n; 阅读全文
posted @ 2018-08-19 08:11 zdragon 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 描述 Clickomania is a puzzle in which one starts with a rectangular grid of cells of different colours. In each step, a player selects ("clicks") a cell 阅读全文
posted @ 2018-08-18 22:34 zdragon 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 描述 Bessie has baked a rectangular brownie that can be thought of as an RxC grid (1 <= R <= 500; 1 <= C <= 500) of little brownie squares.The square at 阅读全文
posted @ 2018-08-18 22:26 zdragon 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 描述 设有N*N的方格图(N<=10,我们将其中的某些方格中填入正整数,而其他的方格中则放入数字0。如下图所示(见样例): 某人从图的左上角的A 点出发,可以向下行走,也可以向右走,直到到达右下角的B点。在走过的路上,他可以取走方格中的数(取走后的方格中将变为数字0)。 此人从A点到B 点共走两次, 阅读全文
posted @ 2018-08-18 22:15 zdragon 阅读(552) 评论(0) 推荐(0) 编辑
摘要: 描述 Given an N×N grid of fields (1≤N≤500), each labeled with a letter in the alphabet. For example: ABCD BXZXCDXBWCBA Each day, Susa walks from the upp 阅读全文
posted @ 2018-08-18 22:05 zdragon 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 描述 在河上有一座独木桥,一只青蛙想沿着独木桥从河的一侧跳到另一侧。在桥上有一些石子,青蛙很讨厌踩在这些石子上。由于桥的长度和青蛙一次跳过的距离都是正整数,我们可以把独木桥上青蛙可能到达的点看成数轴上的一串整点:0,1,……,L(其中L是桥的长度)。坐标为0的点表示桥的起点,坐标为L的点表示桥的终点 阅读全文
posted @ 2018-08-18 21:50 zdragon 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Summer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. The gym where they go is a matrix a with n 阅读全文
posted @ 2018-07-16 20:52 zdragon 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Furik and Rubik take part in a relay race. The race will be set up on a large square with the side of n meters. The given square is split into n × n c 阅读全文
posted @ 2018-07-16 20:45 zdragon 阅读(533) 评论(0) 推荐(0) 编辑