摘要: 题目描述Kayaking is playing a puzzle game containing n different blocks. He marks the blocks with integers from 1 to n, which show the blocks’ original po 阅读全文
posted @ 2020-04-15 16:28 AlexLIN· 阅读(192) 评论(0) 推荐(0)
摘要: Putting two similar strings together will create a very strong power that can quake the earth into parts and the person who did that can be called the 阅读全文
posted @ 2020-04-15 16:00 AlexLIN· 阅读(315) 评论(0) 推荐(0)
摘要: 小希到了大学,发现宿舍里有很多蟑螂,蟑螂有两种颜色:红色和黑色 他把宿舍里的蟑螂排成一排,一共n只,小希想让他们变成颜色交替。 每次操作可以为:一、将一只蟑螂染成另一种颜色,二、交换两个蟑螂的位置 小希没有带电脑,他请你帮忙计算一下,最少需要操作几次才能形成颜色交替的一排蟑螂 Input 第一行一个 阅读全文
posted @ 2020-04-15 01:03 AlexLIN· 阅读(208) 评论(0) 推荐(0)
摘要: WNJXYK hates Destinys so that he does not want to meet him at any time. Luckily, their classrooms and dormitories are at different places. The only ch 阅读全文
posted @ 2020-04-14 15:33 AlexLIN· 阅读(339) 评论(0) 推荐(0)
摘要: You are given a grid consisting of n rows each of which is dived into n columns. The rows are numbered from 1 to n from top to bottom, and the columns 阅读全文
posted @ 2020-04-14 12:24 AlexLIN· 阅读(170) 评论(0) 推荐(0)
摘要: 给你一个n*n的格子的棋盘,每个格子里面有一个非负数。 从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。 Input包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(n<=20)Output对于每个测试实例,输出可能取 阅读全文
posted @ 2020-04-14 12:03 AlexLIN· 阅读(184) 评论(0) 推荐(0)
摘要: Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn 阅读全文
posted @ 2020-04-14 10:23 AlexLIN· 阅读(129) 评论(0) 推荐(0)
摘要: You are given an array a consists of n elements, find the maximum number of elements you can select from the array such that the absolute difference b 阅读全文
posted @ 2020-04-13 13:08 AlexLIN· 阅读(273) 评论(0) 推荐(0)
摘要: Signals of most probably extra-terrestrial origin have been received and digitalized by The Aeronautic and Space Administration (that must be going th 阅读全文
posted @ 2020-04-13 11:25 AlexLIN· 阅读(192) 评论(0) 推荐(0)
摘要: Jessica's a very lovely girl wooed by lots of boys. Recently she has a problem. The final exam is coming, yet she has spent little time on it. If she 阅读全文
posted @ 2020-04-13 09:48 AlexLIN· 阅读(227) 评论(0) 推荐(0)