
C语言练习
梦因you而美
因为坚守,所以花开不败!
展开
-
hd-1089:A+B for Input-Output Practice (I)
Problem DescriptionYour 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原创 2015-07-20 21:21:17 · 854 阅读 · 0 评论 -
hd-1093:A+B for Input-Output Practice (V)
Problem DescriptionYour task is to calculate the sum of some integers. InputInput contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and t原创 2015-07-22 11:38:21 · 917 阅读 · 0 评论 -
hd-1095:A+B for Input-Output Practice (VII)
Problem DescriptionYour task is to Calculate a + b. InputThe input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. Out原创 2015-07-22 21:27:57 · 793 阅读 · 0 评论 -
hd-1096:A+B for Input-Output Practice (VIII)
Problem DescriptionYour task is to calculate the sum of some integers. InputInput contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and t原创 2015-07-22 21:30:19 · 869 阅读 · 0 评论 -
开门人和关门人
Problem Description每天第一个到机房的人要把门打开,最后一个离开的人要把门关好。现有一堆杂乱的机房签 到、签离记录,请根据记录找出当天开门和关门的人。 Input测试输入的第一行给出记录的总天数N ( > 0 )。下面列出了N天的记录。 每天的记录在第一行给出记录的条目数M ( > 0 ),下面是M行,每行的格式为 证件号码 签到时间 签离时间 其中时原创 2015-07-23 16:36:06 · 884 阅读 · 0 评论 -
lx-0721-1008不要62
Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。不吉利的数字为所有含有4或62的号码。例如:62315 73418 88914都属于不吉利号码。但是,61152虽然含有6和原创 2015-07-21 20:17:13 · 1441 阅读 · 0 评论 -
hd-2544:最短路 dijkstra
Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<=10000),N表示成都的大街上有...原创 2015-08-18 10:44:17 · 978 阅读 · 0 评论 -
hd-1863:畅通工程 Kruskal
Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( <...原创 2015-08-18 10:42:38 · 944 阅读 · 0 评论 -
hd-1863:畅通工程prim
Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( <...原创 2015-08-18 10:40:11 · 1029 阅读 · 0 评论 -
hd-1094:A+B for Input-Output Practice (VI)
Problem DescriptionYour task is to calculate the sum of some integers. InputInput contains multiple test cases, and one case one line. Each case starts with an integer N, and then N intege原创 2015-07-22 11:39:44 · 867 阅读 · 0 评论 -
hd-1000-A + B Problem
Problem DescriptionCalculate A + B. InputEach line will contain two integers A and B. Process to end of file. OutputFor each case, output A + B in one line. Sa原创 2015-07-22 21:34:32 · 894 阅读 · 0 评论 -
hd-1092:A+B for Input-Output Practice (IV)
Problem DescriptionYour task is to Calculate the sum of some integers. InputInput contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same原创 2015-07-20 21:28:21 · 885 阅读 · 0 评论 -
hd-1091:A+B for Input-Output Practice (III)
Problem DescriptionYour task is to Calculate a + b. InputInput contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case co原创 2015-07-20 21:26:45 · 995 阅读 · 0 评论 -
hd-1090:A+B for Input-Output Practice (II)
Problem DescriptionYour task is to Calculate a + b. InputInput 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原创 2015-07-20 21:25:41 · 989 阅读 · 0 评论 -
九度-1192:回文字符串
题目描述: 给出一个长度不超过1000的字符串,判断它是不是回文(顺读,逆读均相同)的。输入: 输入包括一行字符串,其长度不超过1000。输出: 可能有多组测试数据,对于每组数据,如果是回文字符串则输出"Yes!”,否则输出"No!"。样例输入: hellollehhelloworld样例输出: Yes!No! #原创 2015-07-21 11:51:28 · 990 阅读 · 0 评论 -
lx-0721-1002首字母变大写
Problem Description输入一个英文句子,将每个单词的第一个字母改成大写字母。Input输入数据包含多个测试实例,每个测试实例是一个长度不超过100的英文句子,占一行。Output请输出按照要求改写后的英文句子。Sample Inputi like acmi want to get an acceptedSample Out原创 2015-07-21 20:08:45 · 1578 阅读 · 0 评论 -
lx-0721-1003统计元音
Problem Description统计每个元音字母在字符串中出现的次数。Input输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串。Output对于每个测试实例输出5行,格式如下:a:num1e:num2i:num3o:num4u:num5多个测试实例之间由一个空行隔开。请特别注意:最后一块输出后面没原创 2015-07-21 20:10:27 · 1253 阅读 · 0 评论 -
lx-0721-1001字符串统计
Problem Description对于给定的一个字符串,统计其中数字字符出现的次数。 Input输入数据有多行,第一行是一个整数n,表示测试实例的个数,后面跟着n行,每行包括一个由字母和数字组成的字符串。Output对于每个测试实例,输出该串中数值的个数,每个输出占一行。 Sample Input2asdfasdf123123asdfasdfas原创 2015-07-21 20:06:10 · 931 阅读 · 0 评论 -
lx-0721-1004汉字统计
Problem Description统计给定文本文件中汉字的个数。 Input输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本。 Output对于每一段文本,输出其中的汉字的个数,每个测试实例的输出占一行。[Hint:]从汉字机内码的特点考虑~Sample Input2WaHaHa! WaHaHa! 今年过节不说话要说只说普通话W原创 2015-07-21 20:15:53 · 1275 阅读 · 0 评论 -
hd-1342:Lotto DFS
Problem DescriptionIn a Lotto I have ever played, one has to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn't increase your chance of winning - is t...原创 2015-08-18 10:35:28 · 844 阅读 · 0 评论