01 2021 档案

摘要:Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large re 阅读全文
posted @ 2021-01-29 20:52 AA、 阅读(73) 评论(0) 推荐(0)
摘要:在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。 Output 共 阅读全文
posted @ 2021-01-29 18:09 AA、 阅读(94) 评论(0) 推荐(0)
摘要:在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在 阅读全文
posted @ 2021-01-29 17:53 AA、 阅读(57) 评论(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、 阅读(126) 评论(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、 阅读(93) 评论(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、 阅读(162) 评论(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、 阅读(106) 评论(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、 阅读(174) 评论(0) 推荐(0)
摘要:Problem Description HDOJ 上面已经有 10 来道 A+B 的题目了,相信这些题目曾经是大家的最爱,希望今天的这个 A+B 能给大家带来好运,也希望这个题目能唤起大家对ACM 曾经的热爱。这个题目的 A 和 B 不是简单的整数,而是两个时间,A 和 B 都是由 3 个整数组成, 阅读全文
posted @ 2021-01-04 20:40 AA、 阅读(136) 评论(0) 推荐(0)
摘要:Problem Description 有 n(n<=100) 个整数,已经按照从小到大顺序排列好,现在另外给一个整数x,请将该数插入到序列中,并使新的序列仍然有序。 Input 输入数据包含多个测试实例,每组数据由两行组成, 第一行是 n 和 m,第二行是已经有序的n 个数的数列。 n 和 m 同 阅读全文
posted @ 2021-01-04 18:03 AA、 阅读(229) 评论(0) 推荐(0)
摘要:Problem Description 输入 n(n<100) 个数,找出其中最小的数,将它与最前面的数交换后输出这些数。 Input 输入数据有多组, 每组占一行, 每行的开始是一个整数n,表示这个测试实例的数值的个数,跟着就是 n 个整数。 n=0 表示输入的结束,不做处理。 Output 对于 阅读全文
posted @ 2021-01-03 22:24 AA、 阅读(249) 评论(0) 推荐(0)
摘要:Problem Description 青年歌手大奖赛中, 评委会给参赛选手打分。 选手得分规则为去掉一个最高分和一个最低分,然后计算平均得分,请编程输出某选手的得分。 Input 输入数据有多组,每组占一行,每行的第一个数是n(2<n<100) ,表示评委的人数,然后是n个评委的打分。 Outpu 阅读全文
posted @ 2021-01-03 21:45 AA、 阅读(178) 评论(0) 推荐(0)
摘要:Problem Description 输入 n(n<=100) 个整数,按照绝对值从大到小排序后输出。题目保证对于每一个测试实例,所有的数的绝对值都不相等。 Input 输入数据有多组,每组占一行,每行的第一个数字为n,接着是 n 个整数, n=0 表示输入数据的结束,不做处理。 Output 对 阅读全文
posted @ 2021-01-03 11:59 AA、 阅读(233) 评论(0) 推荐(1)
摘要:Problem Description 对于给定的一个字符串,统计其中数字字符出现的次数。 Input 输入数据有多行,第一行是一个整数n,表示测试实例的个数,后面跟着n 行,每行包括一个由字母和数字组成的字符串。 Output 对于每个测试实例,输出该串中数值的个数,每个输出占一行。 Sample 阅读全文
posted @ 2021-01-02 20:31 AA、 阅读(290) 评论(0) 推荐(0)