首页 [最新]第五届河南省大师长教师法度模范设计比赛正式赛题目

[最新]第五届河南省大师长教师法度模范设计比赛正式赛题目

举报
开通vip

[最新]第五届河南省大师长教师法度模范设计比赛正式赛题目[最新]第五届河南省大师长教师法度模范设计比赛正式赛题目 第五届河南省大学生程序设计竞赛 主办:河南省计算机学会 承办:郑州轻工业学院 (正式赛) 地点:郑州轻工业学院 时间:2012年5月13日 【 T1 】 奇怪的排序 最近,Dr. Kong 新设计一个机器人Bill。这台机器人很聪明,会做许多事情。惟独对自然 数的理解与人类不一样,它是从右往左读数。比如,它看到123时,会理解成321。让它比较23 与15哪一个大,它说15大。原因是它的大脑会以为是32与51在进行比较。再比如让它比较29 与...

[最新]第五届河南省大师长教师法度模范设计比赛正式赛题目
[最新]第五届河南省大师长教师法度模范设计比赛正式赛 快递公司问题件快递公司问题件货款处理关于圆的周长面积重点题型关于解方程组的题及答案关于南海问题 目 第五届河南省大学生程序设计竞赛 主办:河南省计算机学会 承办:郑州轻工业学院 (正式赛) 地点:郑州轻工业学院 时间:2012年5月13日 【 T1 】 奇怪的排序 最近,Dr. Kong 新设计一个机器人Bill。这台机器人很聪明,会做许多事情。惟独对自然 数的理解与人类不一样,它是从右往左读数。比如,它看到123时,会理解成321。让它比较23 与15哪一个大,它说15大。原因是它的大脑会以为是32与51在进行比较。再比如让它比较29 与30,它说29大。 给定Bill两个自然数A和B,让它将 [A,B] 区间中的所有数按从小到大排序出来。你会认 为它如何排序, 【标准输入】 第一行: N 表示有多少组测试数据。 接下来有N行, 每一行有两个正整数A B 表示待排序元素的区间范围。 【标准输出】 对于每一行测试数据,输出一行,为所有排好序的元素,元素之间有一个空格。 【约束条件】 2<=N<=5 1<=A<=B<=200000 B-A<=50。 【 样 例 】 标准输入 标准输出 2 10 8 9 11 12 13 14 15 8 15 30 31 22 32 23 33 24 34 25 35 26 36 27 37 28 38 29 39 22 39 【 T2 】 最强DE 战斗力 春秋战国时期,赵国地大物博,资源非常丰富,人民安居乐业。但许多国家对它虎视眈眈,准备联合起来对赵国发起一场战争。 显然,面对多个国家的部队去作战,赵国的兵力明显处于劣势。战斗力是决定战争成败的关键因素,一般来说,一支部队的战斗力与部队的兵力成正比。但当把一支部队分成若干个作战队伍时,这个部队的战斗力就会大大的增强。 一支部队的战斗力是可以通过以下两个规则计算出来的: 1.若一支作战队伍的兵力为N,则这支作战队伍的战斗力为N; 2.若将一支部队分为若干个作战队伍,则这支部队的总战斗力为这些作战队伍战斗力的 乘积。 比如:一支部队的兵力为5时的战斗力分析如下: 情况 作战安排 总的战斗力 1 1,1,1,1,1(共分为5个作战队伍) 1*1*1*1*1=1 2 1,1,1,2 (共分为4个作战队伍) 1*1*1*2=2 3 1,2,2 (共分为3个作战队伍) 1*2*2=4 4 1,1,3 (共分为3个作战队伍) 1*1*3=3 5 2,3 (共分为2个作战队伍) 2*3=6 6 1,4 (共分为2个作战队伍) 1*4=4 7 5 (共分为1个作战队伍) 5=5 显然,将部队分为2个作战队伍(一个为2,另一个为3),总的战斗力达到最大~ 【标准输入】 第一行: N 表示有N组测试数据。 (2<=N<=5) 接下来有N行,每行有一个整数Ti 代表赵国部队的兵力。 (1 <= Ti <= 1000)i=1,…N 【输【标准输出】 对于每一行测试数据,输出占一行,仅一个整数S, 表示作战安排的最大战斗力。 【 样 例 】 标准输入 标准输出 2 6 5 4 4 【 T3 】 试 制 品 ZZ大学的Dr.Kong最近发现实验室的很多试制品都已经用完。由于项目经费有限,为了节省,Dr.Kong决定利用实验室现有的试制品来生成所缺的试制品。为此,Dr.Kong连续几天通宵达旦整理出一份研究资料并让研究生Bill去实验并统计能产生多少种所缺的试制品。 Bill从头到尾翻完所有的资料,发现资料上写满了一大堆的化学方程式,上面除了大小写英文字母、数字、加号、等号外,再也没有其他的符号了。其中,每个方程式都是A+A+……12+A=B+B+……+B的形式, 表示试制品A,A,……和A反应,生成了试制品B,B,……,B。其中p12q12p12qA和B都是一种单质或化合物的化学式(长度不超过10个字符),1?p,q ? 20 。每个方程式的ij 总长不超过100个字符。有些试制品的化学式可能在现代社会的化学元素周期表里找不到,这是由于化学反应过程中可能又有物理反应导致的结果。 Bill头疼了,从哪个实验开始呢,你能帮助他吗, 【标准输入】 第一行: N 表示Dr.Kong写的化学方程式个数 (1? N ? 400) 接下来有N行, 每一行是一个方程式。 再接下来的一行:M 表示已有多少种试制品。 (1? M ?500) 接下来有M行,每一行是已有的一种试制品的化学式。 【标准输出】 第一行包含一个数T,表示可以产生多少种所缺的试制品。 在接下来的T行中,按ASCII码升序输出产生的试制品的化学式。 【 样 例 】 标准输入 标准输出 4 4 H2O+Na=NaOH+H2 H2 Cl2+H2=HCl HCl Fe+O2=Fe3O4 NaCl NaOH+HCl=H2O+NaCl NaOH 3 H2O Na Cl2 【 T4 】 遥 控 器 Dr.Kong 有一台高级电视机,这台电视机可以接受100个频道(从0到99编号)。电视的配套遥控器有13个按钮: 1 2 3 ? 4 5 6 ? 7 8 9 — 0 当按"?"键时,当前频道编号会增加1(如果当前为99频道,则会切换到0频道)。如果按"?"键,当前频道编号会减小1(如果当前为0频道,则会切换到99频道)。当要切换到0~9频道时,可以直接在遥控器上按相应的键。当要切换到10~99频道时,可以先按"—"键,然后按2个与频道编号相对应的数字键(即先按与频道编号的十位数字相对应的键,然后按与个位数字相对应的键)。 由于遥控器长时间的使用和某些未知原因,遥控器上的某些键已经坏了,不能再起作用了。现在你的任务是,能否告诉Dr.Kong,如何用最少的按键次数来将频道从编号X切换到编号Y。 【标准输入】 第一行: N 表示有N组测试数据。 (1<=N<=5) 对每组测试数据有5行,前4行包含遥控器上每个按键的信息。0表示对应的键坏了,1表示对应的键可以使用。第5行包含2个整数,分别是X 和 Y (0 <= X <= 99; 0 <= Y <= 99)。 【标准输出】 对每组测试数据输出一行,即将频道从编号X切换到编号Y所需要的最小按键次数。如果不可能将频道从编号X 切换到编号Y,则输出-1. 【 样 例 】 标准输入 标准输出 2 4 0 0 1 1 -1 1 1 1 1 1 1 1 1 1 23 52 1 1 1 0 1 1 1 0 1 0 1 0 1 23 52 【 T5 】 奇妙的图案 最近,Dr. Kong对几何图形发生了浓厚的兴趣。他发现在一个凸多边形里随意加上几个等半 径的圆,再将圆涂成不同的颜色,就能构造出一幅美妙的图案。进而,Dr. Kong大发灵感,在此 图案的基础上,又加入了几条连接凸多边形的两个不相邻顶点的直线,图形更加奇妙。 这时,Dr. Kong遇到了一个问题,他不想让加入的直线相互交叉,也不想让加入的直线穿过 凸多边形里的任何一个圆,甚至不能与任何圆相切。 已经知道凸多边形的N个顶点的坐标,也知道了其中M个圆的圆心坐标和半径R。你能帮助 Dr. Kong计算出可加上的满足所有条件的最多直线数吗, 【标准输入】 第1行: N M R 三个正整数 接下来有N行, 每一行为凸多边形一个坐标TXi TYi (i=1,…,N) 再接下来有M行,每一行为一个圆的圆心坐标PXj PYj (j=1,…,M) 【标准输出】 输出有一个整数, 表示可加上的最多直线数。 【约束条件】 5? N ?150 0? M ?100 1? R ?100,000 0? 所有坐标X,Y?100,000 【 样 例 】 标准输入 标准输出 5 3 1 1 6 10 10 7 9 1 2 0 0 3 2 2 5 6 8 3 【T6】 Metric Matrice Given as input a square distance matrix, where a[i][j] is the distance between point i and point j, determine if the distance matrix is "a metric" or not. A distance matrix a[i][j] is a metric if and only if 1. a[i][i] = 0 2, a[i][j]> 0 if i != j 3. a[i][j] = a[j][i] 4. a[i][j] + a[j][k] >= a[i][k] i j k 【Standard input】 The first line of input gives a single integer, 1 ? N ? 5, the number of test cases. Then follow, for each test case, * Line 1: One integer, N, the rows and number of columns, 2 <= N <= 30 * Line 2..N+1: N lines, each with N space-separated integers (-32000 <=each integer <= 32000). 【Standard output】 Output for each test case , a single line with a single digit, which is the lowest digit of the possible facts on this list: * 0: The matrix is a metric * 1: The matrix is not a metric, it violates rule 1 above * 2: The matrix is not a metric, it violates rule 2 above * 3: The matrix is not a metric, it violates rule 3 above * 4: The matrix is not a metric, it violates rule 4 above 【Sample Input】 【Sample Output】 2 0 4 3 0 1 2 3 1 0 1 2 2 1 0 1 3 2 1 0 2 0 3 2 0 【 T7 】 Divideing Jewels Mary and Rose own a collection of jewells. They want to split the collection among themselves so that both receive an equal share of the jewels. This would be easy if all the jewels had the same value, because then they could just split the collection in half. But unfortunately, some of the jewels are larger, or more beautiful than others. So, Mary and Rose start by assigning a value, a natural number between one and ten, to each jewel. Now they want to divide the jewels so that each of them gets the same total value. Unfortunately, they realize that it might be impossible to divide the jewels in this way (even if the total value of all jewels is even). For example, if there are one jewel of value 1, one of value 3 nd two of value 4, then they cannot be split into sets of equal value. So, they ask you to a write a program that checks whether there is a fair partition of the jewels. 【Standard input】 Each line in the input file describes one collection of jewels to be divided. The lines contain ten non-negative integers n1 , . . . , n10 , where ni is the number of jewels of value i. The maximum total number of jewells will be 10000. he last line of the input file will be "0 0 0 0 0 0 0 0 0 0"; do not process this line. T 【Standard output】 For each collection, output "#k:", where k is the number of the test case, and then either "Can be divided." or "Can't be divided.". Output a blank line after each test case. 【Standard input】 1 0 1 2 0 0 0 0 2 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 【Standard output】 #1:Can't be divided. #2:Can be divided. 【 T8 】 Interesting Punch-Bowl Dr.Kong has taken a side job designing interesting punch-bowl designs. The designs are created as follows: * A flat board of size W cm * H cm is procured (3 <= W <= 300, 3 <= H <= 300) * On every 1 cm x 1 cm square of the board, a 1 cm x 1 cm block is placed. This block has some integer height B (1 <= B <= 1,000,000,000) The blocks are all glued together carefully so that punch will not drain through them. They are glued so well, in fact, that the corner blocks really don't matter! Dr.Kong can never figure out, however, just how much punch their bowl designs will hold. Presuming the bowl is freestanding (i.e., no special walls around the bowl), calculate how much juice the bowl can hold. Some juice bowls, of course, leak out all the juice on the edges and will hold 0. 【Standard input】 * Line 1: Two space-separated integers, W and H * Lines 2..H+1: Line i+1 contains row i of bowl heights: W space-separated integers each of which represents the height B of a square in the bowl. The first integer is the height of column 1, the second integers is the height of column 2, and so on. 【Standard output】 * Line 1: A single integer that is the number of cc's the described bowl will hold. 【Sample input】 4 5 5 8 7 7 5 2 1 5 7 1 7 1 8 9 6 9 9 8 9 9 【Sample output】
本文档为【[最新]第五届河南省大师长教师法度模范设计比赛正式赛题目】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_212655
暂无简介~
格式:doc
大小:30KB
软件:Word
页数:0
分类:生活休闲
上传时间:2018-01-05
浏览量:25