




已阅读5页,还剩30页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
主页讨论版问题名次状态统计问题 B: 采药时间限制:1 Sec内存限制:128 MB提交:87解决:72提交状态讨论版题目描述辰辰是个很有潜能、天资聪颖的孩子,他的梦想是成为世界上最伟大的医师。为此,他想拜附近最有威望的医师为师。医师为了判断他的资质,给他出了一个难题。医师把他带到个到处都是草药的山洞里对他说:“孩子,这个山洞里有一些不同的草药,采每一株都需要一些时间,每一株也有它自身的价值。我会给你一段时间,在这段时间里,你可以采到一些草药。如果你是一个聪明的孩子,你应该可以让采到的草药的总价值最大。”如果你是辰辰,你能完成这个任务吗?输入输入的第一行有两个整数T(1 T 1000)和M(1M 100),T代表总共能够用来采药的时间,M代表山洞里的草药的数目。接下来的M行每行包括两个在1到100之间(包括1和100)的整数,分别表示采摘某株草药的时间和这株草药的价值。输出输出只包括一行,这一行只包含一个整数,表示在规定的时间内,可以采到的草药的最大总价值。样例输入70 371 10069 11 2 样例输出3主页讨论版问题名次状态统计问题 A: 金字塔问题时间限制:1 Sec内存限制:128 MB提交:54解决:32提交状态讨论版题目描述給一个金字塔,如上图所示,请你求出一个从塔顶到塔底的路径,要求路径经过的点的数字和最小。例如上图所示的金字塔的最小路径为:40输入输入第一行是一个整数n1000;接下来是n行,第一行一个数;第二行两个数;。第n行n个数;数之间用空格分开。数的链接方式如图所示。输出一个数,就是从塔顶到塔底的路径的最小距离。样例输入5912 1510 6 83 18 9 519 7 10 4 16样例输出40提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 B: 毛毛虫问题时间限制:1 Sec内存限制:128 MB提交:32解决:16提交状态讨论版题目描述Mary在她家门口水平种了一排苹果树,共有N棵。突然Mary发现在左起第P棵树上(从1开始计数)有一条毛毛虫。为了看到毛毛虫变蝴蝶的过程,Lele在苹果树旁观察了很久。虽然没有看到蝴蝶,但Lele发现了一个规律:每过1分钟,毛毛虫会随机从一棵树爬到相邻的一棵树上。比如刚开始毛毛虫在第2棵树上,过1分钟后,毛毛虫可能会在第1棵树上或者第3棵树上。如果刚开始时毛毛虫在第1棵树上,过1分钟以后,毛毛虫一定会在第2棵树上。现在告诉你苹果树的数目N,以及毛毛刚开始所在的位置P,请问,在M分钟后,毛毛虫到达第T棵树,一共有多少种行走方案数。输入输入四个整数N P M T。输出输出一个整数,就是行走的方案数。样例输入7 4 4 4样例输出6提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 A: Hamming Problem时间限制:1 Sec内存限制:128 MB提交:61解决:23提交状态讨论版题目描述For each three prime numbers p1, p2 and p3, lets define Hamming sequence Hi(p1, p2, p3), i=1, . as containing in increasing order all the natural numbers whose only prime divisors are p1, p2 or p3.For example, H(2, 3, 5) = 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, .So H5(2, 3, 5)=6.输入In the single line of input file there are space-separated integers p1 p2 p3 i.输出The output file must contain the single integer - Hi(p1, p2, p3). All numbers in input and output are less than 1018.样例输入2 3 5 5样例输出6提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 B: 【C语言训练】字符串正反连接时间限制:1 Sec内存限制:128 MB提交:68解决:42提交状态讨论版题目描述所给字符串正序和反序连接,形成新串并输出输入任意字符串(长度=2),最优秀的雇员得到其中最重的一块,最差的雇员得到其中最轻的一块。假设有一台比较重量的仪器,希望用最少的比较次数找出最重和最轻的金块。输入输入共两行,第一行输入金块的数量N100000;第二行N金块的重量,用空格间隔。输出两个数用空格分开,最重金块 最轻金块样例输入53 7 9 6 4样例输出9 3提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 B: 工资问题时间限制:1 Sec内存限制:128 MB提交:121解决:74提交状态讨论版题目描述某单位给每个职工发工资(精确到元),为了保证不要临时兑换零钱,且取款的张数最少,取工资前要统计出所有职工的工资所需各种 币值(100,50,20,10,5,2,1元共7种)的张数,请编程完成。输入输入一个工资数10000元输出输出各个币种的张数,没有的用0代替,中间用空格分开样例输入173样例输出1 1 1 0 0 1 1提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 C: 【C语言训练】水仙花数问题1时间限制:1 Sec内存限制:128 MB提交:138解决:75提交状态讨论版题目描述判断一个数是否为水仙花数,所谓水仙花数是指这样的一人数:其各位数字的立方和等于该数本身。例如:371是一个水仙花数,371=33+73+13.输入一个三位数输出1或者0(1代表此数为水仙花数,0代表此数不是水仙花数)样例输入371样例输出1提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 E: 大小写转换时间限制:1000 Sec内存限制:65536 MB提交:182解决:116提交状态讨论版题目描述读入一些字符串,将其中的小写字母转成大写字母(其他字符不变)。输入输入为多行,每行为一个字符串,字符串只由字母和数字组成,长度不超过80。输入以“End of file”结束。输出对于每行输入,输出转换后的字符串。样例输入HelloICPC200412345abcde样例输出HELLOICPC200412345ABCDE提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM 主页讨论版问题名次状态统计问题 B: 取数游戏时间限制:1 Sec内存限制:128 MB提交:46解决:39提交状态讨论版题目描述有2个人轮流取2n个数中的n个数,所取数之和大者为胜,请编写算法,让先取数者胜,模拟取数过程。输入输入两行,第一行一个整数N100000;第二行N个数,用空格分开。输出输出取胜人取数和。失败人取数的和,空格分开。样例输入61 2 3 4 5 6样例输出12 9提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 A: 警察抓小偷主页讨论版问题名次状态统计问题 C: 整除问题时间限制:1 Sec内存限制:128 MB提交:70解决:44提交状态讨论版题目描述编写算法对输入的一个整数,判断它能否被3,5,7整除,并输出以下信息之一:能同时被3,5,7整除;能被其中两个数(要指出哪两个)整除;能被其中一个数(要指出那一个)整除;不能被3,5,7任一个整除;输入输入一个整数100000;输出如果都能整除输出“all如果都不能整除输出nonel如果能被3和5整除则输出“3 5”。中间有一个空格,注意按由小到大输出。样例输入35样例输出5 7提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM时间限制:1 Sec内存限制:128 MB提交:115解决:88提交状态讨论版题目描述警察局抓了a,b,c,d,4名小偷嫌疑犯,其中只有一个人是小偷,审问中,a说:我不是小偷,b说:c是小偷,c说:小偷肯定是d,d说:c在冤枉人。 现在已经知道4个人中3人说的是真话,一人说的是假话,问到底谁是小偷。输入输出小偷是c样例输入样例输出小偷是c提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 A: 主页讨论版问题名次状态统计问题 B: n!时间限制:1 Sec内存限制:128 MB提交:262解决:162提交状态讨论版题目描述输入一个整数N,输出它的阶乘。输入输入一个整数20;输出输出它的阶乘样例输入5样例输出120提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM时间限制:1 Sec内存限制:128 MB提交:224解决:138提交状态讨论版题目描述把N个盘子从A柱子借助B柱子移到C柱子,要求每次只能移动一个盘子,并且小盘子不能放到大盘子上。问如何移动。输入输入盘子的个数N(=10)输出输出移动的次数。样例输入3样例输出7提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 D: 猴子吃桃子问题(递归)时间限制:1 Sec内存限制:128 MB提交:98解决:87提交状态讨论版题目描述一只猴子摘了若干桃子,每天吃现有桃子的一半多一个,到第10天时就只有一个桃子了,求原来有多少个桃。输入输出输出原来的桃子数样例输入样例输出提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 A: A+B for Input-Output Practice (I)时间限制:1 Sec内存限制:128 MB提交:402解决:183提交状态讨论版题目描述Your task is to Calculate a + b.Too easy?! Of course! I specially designed the problem for acm beginners.You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim.输入The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.输出For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.样例输入1 510 20样例输出630提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 B: 主页讨论版问题名次状态统计问题 C: A+B for Input-Output Practice (III)时间限制:1 Sec内存限制:128 MB提交:314解决:169提交状态讨论版题目描述Your task is to Calculate a + b.输入Input contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case containing 0 0 terminates the input and this test case is not to be processed.输出For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.样例输入1 510 200 0样例输出630提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM时间限制:1 Sec内存限制:128 MB提交:310解决:179提交状态讨论版题目描述Your task is to Calculate a + b.输入Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a space, one pair of integers per line.输出For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.样例输入21 510 20样例输出630提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 D: A+B for Input-Output Practice (IV)时间限制:1 Sec内存限制:128 MB提交:287解决:166提交状态讨论版题目描述Your task is to Calculate the sum of some integers.输入Input contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A test case starting with 0 terminates the input and this test case is not to be processed.输出For each group of input integers you should output their sum in one line, and with one line of output for each line in input.Sample Input样例输入4 10 2 3 405 11 2 8 5 50 样例输出5531提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 A: Packets时间限制:1 Sec内存限制:128 MB提交:37解决:9提交状态讨论版题目描述A factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the square parcels of the same height h as the products have and of the size 6*6. Because of the expenses it is the interest of the factory as well as of the customer to minimize the number of parcels necessary to deliver the ordered products from the factory to the customer. A good program solving the problem of finding the minimal number of parcels necessary to deliver the given products according to an order would save a lot of money. You are asked to make such a program.输入输入每行6个整数,空格分开,第1到第6位为1*1,2*2,。6*6盒子的个数。当输入为6个0时结束。输出输出每行一个整数,表示需要的盒子数。样例输入0 0 4 0 0 1 7 5 1 0 0 0 0 0 0 0 0 0 样例输出2 1 提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 B: 埃及分数时间限制:1 Sec内存限制:128 MB提交:21解决:11提交状态讨论版题目描述 设计一个算法,把一个真分数表示为最少埃及分数之和的形式,所谓埃及分数,是指分子为1的分数。 如7/8=1/2+1/3+1/24。输入输入两个整数,第一个表示分子,第二个数表示分母。输出输出埃及分数之和,按分母有小到大的顺序,中间用空格分开。样例输入7 8样例输出2 3 24提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 A: 雇用计划时间限制:1 Sec内存限制:128 MB提交:5解决:2提交状态讨论版题目描述A project manager wants to determine the number of the workers needed in every month. He does know the minimal number of the workers needed in each month. When he hires or fires a worker, there will be some extra cost. Once a worker is hired, he will get the salary even if he is not working. The manager knows the costs of hiring a worker, firing a worker, and the salary of a worker. Then the manager will confront such a problem: how many workers he will hire or fire each month in order to keep the lowest total cost of the project.输入input include three lines;the first line is the time the project will cost.the second line is the costs of hiring a workerr , salary of a worker,and thefiring a worke.the third line is the number of worker each month need.输出output only one line.the lowest total of the project样例输入34 5 610 9 110样例输出199提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ ProjectTEAM主页讨论版问题名次状态统计问题 A: 完数时间限制:1 Sec内存限制:128 MB提交:192解决:70提交状态讨论版题目描述完数的定义:如果一个大于1的正整数的所有因子之和等于它的本身,则称这个数是完数,比如6,28都是完数:6=1+2+3;28=1+2+4+7+14。本题的任务是判断两个正整数之间完数的个数。输入输入数据包含多行,第一行是一个正整数n,表示测试实例的个数,然后就是n个测试实例,每个实例占一行,由两个正整数num1和num2组成,(1num1,num210000)。输出对于每组测试数据,请输出num1和num2之间(包括num1和num2)存在的完数个数。样例输入22 55 7样例输出01提示提交状态讨论版中文English Anything about the Problems, Please Contact Admin:adminAll Copyright Reserved 2010-2013SYUCTOJTEAMGPL2.02003-2013HUSTOJ Project
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 课件比例设置
- 螃蟹谜语导入课件
- 许愿荷花灯课件
- 体智能新人培训大纲
- 课件标题设置颜色的目的
- 快乐的派对课件
- 礼仪考试题及答案中职
- 2025年中国汽车雾灯灯具数据监测研究报告
- 客运中心考试题及答案
- 科学防疫考试题及答案
- 中小学生文明上网主题班会课件
- 十四年抗战史
- 餐饮业管理规范标准
- 2024年成都隆科城乡发展集团有限公司招聘笔试冲刺题(带答案解析)
- 中华人民共和国医师法解读培训课件
- (正式版)YST 1682-2024 镁冶炼行业绿色工厂评价要求
- DL-T 5148-2021水工建筑物水泥灌浆施工技术条件-PDF解密
- 电工技能训练(第6版)中职技工电工类专业全套教学课件
- 泛光夜景照明亮化工程项目实施的重点难点和解决方案
- 输血科三基培训课件
- 塑料成型工艺课件
评论
0/150
提交评论