上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 28 下一页
摘要: 分数加减法Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8801Accepted: 2798Description编写一个C程序,实现两个分数的加减法Input输入包含多行数据 每行数据是一个字符串,格式是"a/boc/d"。 其中a, b, c, d是一个0-9的整数。o是运算符"+"或者"-"。 数据以EOF结束 输入数据保证合法Output对于输入数据的每一行输出两个分数的运算结果。 注意结果应符合书写习惯,没有多余的符号、分子、分母,并且化简至最简分数Samp 阅读全文
posted @ 2011-11-23 11:21 w0w0 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 取模运算Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6776Accepted: 4182Description编写一个C函数mod(int n, int m),实现取模运算%Input输入包含多行数据 每行数据是两个整数a, b (1 <= a, b <= 32767) 数据以EOF结束Output于输入的每一行输出a%bSample Input5 3100 2Sample Output20#include<stdio.h>int mod(int n, int m){ if(n<m) retur 阅读全文
posted @ 2011-11-23 11:21 w0w0 阅读(174) 评论(0) 推荐(0) 编辑
摘要: String LDTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 488Accepted: 262DescriptionStringld (left delete) is a function that gets a string and deletes its leftmost character (for instance Stringld(“acm”) returns “cm”). You are given a list of distinct words, and at each step, we apply stri 阅读全文
posted @ 2011-11-23 10:30 w0w0 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 小孩报数问题Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6459Accepted: 3024Description有N个小孩围成一圈,给他们从1开始依次编号,现指定从第W个开始报数,报到第S个时,该小孩出列,然后从下一个小孩开始报数,仍是报到S个出列,如此重复下去,直到所有的小孩都出列(总人数不足S个时将循环报数),求小孩出列的顺序。Input第一行输入小孩的人数N(N<=64) 接下来每行输入一个小孩的名字(人名不超过15个字符) 最后一行输入W,S (W < N),用逗号","间隔Outp 阅读全文
posted @ 2011-11-23 10:29 w0w0 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 时间日期格式转换Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5562Accepted: 2569Description世界各地有多种格式来表示日期和时间。对于日期的常用格式,在中国常采用格式的是“年年年年/月月/日日”或写为英语缩略表示的”yyyy/mm/dd”,此次编程大赛的启动日期“2009/11/07”就是符合这种格式的一个日期,而北美所用的日期格式则为“月月/日日/年年年年”或”mm/dd/yyyy”,如将“2009/11/07”改成这种格式,对应的则是”11/07/2009”。对于时间的格式,则常有12小时制和24 阅读全文
posted @ 2011-11-23 10:29 w0w0 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 位操作Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7076Accepted: 2769Description假设你工作在一个32位的机器上,你需要将某一个外设寄存器的第X位设置成0(最低位为第0位,最高位为第31位),将第Y位开始的连续三位设置成110(从高位到低位的顺序),而其他位保持不变。对给定的寄存器值R,及X,Y,编程计算更改后的寄存器值R。Input仅一行,包括R,X,Y,以逗号","分隔,R为16进制表示的32位整数,X,Y在0-31之间且Y>=3,(Y-X)的绝对值>=3,保证两 阅读全文
posted @ 2011-11-23 10:28 w0w0 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 破译密码Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5834Accepted: 3596Description据说最早的密码来自于罗马的凯撒大帝。消息加密的办法是:对消息原文中的每个字母,分别用该字母之后的第5个字母替换(例如:消息原文中的每个字母A都分别替换成字母F)。而你要获得消息原文,也就是要将这个过程反过来。 密码字母:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z M 原文字母:V W X Y Z A B C D E F G H I J K L M N O P 阅读全文
posted @ 2011-11-23 10:28 w0w0 阅读(266) 评论(0) 推荐(0) 编辑
摘要: Panda's Birthday PresentTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1200Accepted: 796DescriptionOn Panda's Birthday party, he received a strange present from Jason. The present is a black box with 4 dices in it which is used to play a game. The dice in the box is unusual. Instea 阅读全文
posted @ 2011-11-23 10:27 w0w0 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Long Distance RacingTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5783Accepted: 3081DescriptionBessie is training for her next race by running on a path that includes hills so that she will be prepared for any terrain. She has planned a straight path and wants to run as far as she can -- 阅读全文
posted @ 2011-11-23 10:26 w0w0 阅读(194) 评论(0) 推荐(0) 编辑
摘要: Cow MultiplicationTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 9215Accepted: 6185DescriptionBessie is tired of multiplying pairs of numbers the usual way, so she invented her own style of multiplication. In her style, A*B is equal to the sum of all possible pairwise products between the 阅读全文
posted @ 2011-11-23 10:26 w0w0 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Costume PartyTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8495Accepted: 3279DescriptionIt's Halloween! Farmer John is taking the cows to a costume party, but unfortunately he only has one costume. The costume fits precisely two cows with a length of S (1 ≤ S ≤ 1,000,000). FJ has N co 阅读全文
posted @ 2011-11-23 10:25 w0w0 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Election TimeTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5030Accepted: 2750DescriptionThe cows are having their first election after overthrowing the tyrannical Farmer John, and Bessie is one of N cows (1 ≤ N ≤ 50,000) running for President. Before the election actually happens, however 阅读全文
posted @ 2011-11-23 10:25 w0w0 阅读(259) 评论(0) 推荐(0) 编辑
摘要: The Dragon of LoowaterTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2266Accepted: 1173DescriptionOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due 阅读全文
posted @ 2011-11-23 10:24 w0w0 阅读(234) 评论(0) 推荐(0) 编辑
摘要: The Seven Percent SolutionTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6130Accepted: 4066DescriptionUniform Resource Identifiers (or URIs) are strings like http://icpc.baylor.edu/icpc/, mailto:foo@bar.org, ftp://127.0.0.1/pub/linux, or even just readme.txt that are used to identify a res 阅读全文
posted @ 2011-11-23 10:24 w0w0 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Optimal ParkingTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6436Accepted: 3650DescriptionWhen shopping on Long Street, Michael usually parks his car at some random location, and then walks to the stores he needs. Can you help Michael choose a place to park which minimises the distance he 阅读全文
posted @ 2011-11-23 10:23 w0w0 阅读(250) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 28 下一页