摘要: 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在 阅读全文
posted @ 2021-01-29 17:53 AA、 阅读(35) 评论(0) 推荐(0) 编辑
摘要: Given a set of integers (it can contain equal elements). You have to split it into two subsets AA and BB (both of them can contain equal elements or b 阅读全文
posted @ 2021-01-25 21:40 AA、 阅读(89) 评论(0) 推荐(0) 编辑
摘要: You are playing a very popular game called Cubecraft. Initially, you have one stick and want to craft kk torches. One torch can be crafted using one s 阅读全文
posted @ 2021-01-24 13:12 AA、 阅读(60) 评论(0) 推荐(0) 编辑
摘要: Problem Description: Alexandra has an even-length array aa, consisting of 00s and 11s. The elements of the array are enumerated from 11 to nn. She wan 阅读全文
posted @ 2021-01-13 21:19 AA、 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Problem Description You are given N baskets of gold coins. The baskets are numbered from 1 to N. In all except one of the baskets, each gold coin weig 阅读全文
posted @ 2021-01-06 13:45 AA、 阅读(67) 评论(0) 推荐(0) 编辑
摘要: Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line 阅读全文
posted @ 2021-01-06 11:31 AA、 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Problem Description HDOJ 上面已经有 10 来道 A+B 的题目了,相信这些题目曾经是大家的最爱,希望今天的这个 A+B 能给大家带来好运,也希望这个题目能唤起大家对ACM 曾经的热爱。这个题目的 A 和 B 不是简单的整数,而是两个时间,A 和 B 都是由 3 个整数组成, 阅读全文
posted @ 2021-01-04 20:40 AA、 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Problem Description 有 n(n<=100) 个整数,已经按照从小到大顺序排列好,现在另外给一个整数x,请将该数插入到序列中,并使新的序列仍然有序。 Input 输入数据包含多个测试实例,每组数据由两行组成, 第一行是 n 和 m,第二行是已经有序的n 个数的数列。 n 和 m 同 阅读全文
posted @ 2021-01-04 18:03 AA、 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Problem Description 输入 n(n<100) 个数,找出其中最小的数,将它与最前面的数交换后输出这些数。 Input 输入数据有多组, 每组占一行, 每行的开始是一个整数n,表示这个测试实例的数值的个数,跟着就是 n 个整数。 n=0 表示输入的结束,不做处理。 Output 对于 阅读全文
posted @ 2021-01-03 22:24 AA、 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Problem Description 青年歌手大奖赛中, 评委会给参赛选手打分。 选手得分规则为去掉一个最高分和一个最低分,然后计算平均得分,请编程输出某选手的得分。 Input 输入数据有多组,每组占一行,每行的第一个数是n(2<n<100) ,表示评委的人数,然后是n个评委的打分。 Outpu 阅读全文
posted @ 2021-01-03 21:45 AA、 阅读(145) 评论(0) 推荐(0) 编辑