摘要: 参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合的减法运算。(当然,大家都知道集合的定义,就是同一个集合中不会有两个相同的元素,这里还是提醒大家一下) 呵呵,很简单吧? Input每组输入数据占 阅读全文
posted @ 2021-02-01 16:00 FantasticDoulbeFish 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Every girl likes shopping,so does dandelion.Now she finds the shop is increasing the price every day because the Spring Festival is coming .She is fon 阅读全文
posted @ 2021-02-01 15:59 FantasticDoulbeFish 阅读(183) 评论(0) 推荐(0) 编辑
摘要: ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(. As a smart 阅读全文
posted @ 2021-01-29 15:36 FantasticDoulbeFish 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebu 阅读全文
posted @ 2021-01-29 15:11 FantasticDoulbeFish 阅读(81) 评论(0) 推荐(0) 编辑
摘要: Welcome to HDU to take part in the first CCPC girls' competition! As a pretty special competition, many volunteers are preparing for it with high enth 阅读全文
posted @ 2021-01-29 15:00 FantasticDoulbeFish 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 题目描述 铁路进行列车调度时,常把站台设计成栈式结构的站台,试问: 设有编号为1到n的n辆列车,顺序开入栈式结构的站台,则可能的出栈序列有多少种? 输入 输入包含多组测试数据。每组为一个正整数n(1<=n<=20),表示有n辆列车。 输出 输出可能的出栈序列有多少种。 样例输入 Copy 4 3 样 阅读全文
posted @ 2021-01-27 19:54 FantasticDoulbeFish 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 题目描述 已知自然数1,2,...,N(1<=N<=100)依次入栈,请问序列C1,C2,...,CN是否为合法的出栈序列。 输入 输入包含多组测试数据。 每组测试数据的第一行为整数N(1<=N<=100),当N=0时,输入结束。 第二行为N个正整数,以空格隔开,为出栈序列。 输出 对于每组输入,输 阅读全文
posted @ 2021-01-27 19:09 FantasticDoulbeFish 阅读(560) 评论(0) 推荐(0) 编辑
摘要: 题目描述 有n个赌徒打算赌一局。规则是: 每人下一个赌注,赌注为非负整数,且任意两个赌注都不相同。胜者为赌注恰好是其余任意三个人的赌注之和的那个人。如果有多个胜者,我们取赌注最大的那个为最终胜者。 例如,A,B,C,D,E分别下赌注为2、3、5、7、12,最终胜者是E,因为12=2+3+7。 输入 阅读全文
posted @ 2021-01-27 16:40 FantasticDoulbeFish 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 题目描述 把一个个大小差一圈的筐叠上去,使得从上往下看时,边筐花色交错。这个工作现在要让计算机来完成,得看你的了。 输入 输入是一个个的三元组,分别是,外筐尺寸n(n为满足0<n<80的奇整数),中心花色字符,外筐花色字符,后二者都为ASCII可见字符; 输出 输出叠在一起的筐图案,中心花色与外筐花 阅读全文
posted @ 2021-01-27 16:38 FantasticDoulbeFish 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 题目描述 A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。 输入 数据的第一行是一个T,表示有T组数据。每组数据的第一行有n(2 <= n <= 10)和k(2 <= k < 10^9)两个数据。接下来有n行,每行有n个数据,每个数据的范围是[0,9], 阅读全文
posted @ 2021-01-27 16:36 FantasticDoulbeFish 阅读(140) 评论(0) 推荐(0) 编辑