摘要: C语言字符串函数大全函数名: stpcpy功 能: 拷贝一个字符串到另一个用 法: char *stpcpy(char *destin, char *source);程序例: 1 #include 2 3 #include 4 5 6 7 int main(void) 8 9 {10... 阅读全文
posted @ 2015-06-05 18:02 Vmetrio 阅读(487) 评论(0) 推荐(0)
摘要: Problem DescriptionEddy usually writes articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "co... 阅读全文
posted @ 2015-06-05 17:38 Vmetrio 阅读(509) 评论(0) 推荐(0)
摘要: DescriptionIgnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words an... 阅读全文
posted @ 2015-06-05 17:32 Vmetrio 阅读(206) 评论(0) 推荐(0)
摘要: Description妈妈每天都要出去买菜,但是回来后,兜里的钱也懒得数一数,到底花了多少钱真是一笔糊涂帐。现在好了,作为好儿子(女儿)的你可以给她用程序算一下了,呵呵。Input输入含有一些数据组,每组数据包括菜种(字串),数量(计量单位不论,一律为double型数)和单价(double型数,表示... 阅读全文
posted @ 2015-06-04 19:12 Vmetrio 阅读(519) 评论(0) 推荐(0)
摘要: DescriptionThere are N people want to choose the best person. Each person select the best person $a_i$, .John wants to know that who received the most... 阅读全文
posted @ 2015-06-04 19:10 Vmetrio 阅读(339) 评论(0) 推荐(0)
摘要: Description甜甜从小就喜欢画图画,最近他买了一支智能画笔,由于刚刚接触,所以甜甜只会用它来画直线,于是他就在平面直角坐标系中画出如下的图形:甜甜的好朋友蜜蜜发现上面的图还是有点规则的,于是他问甜甜:在你画的图中,我给你两个点,请你算一算连接两点的折线长度(即沿折线走的路线长度)吧。Inpu... 阅读全文
posted @ 2015-06-04 19:08 Vmetrio 阅读(173) 评论(0) 推荐(0)
摘要: Description假设有x1个字母A, x2个字母B,..... x26个字母Z,同时假设字母A的价值为1,字母B的价值为2,..... 字母Z的价值为26。那么,对于给定的字母,可以找到多少价值 2 #include 3 4 int le[30],n1[55],n2[55]; 5 6 ... 阅读全文
posted @ 2015-06-04 18:00 Vmetrio 阅读(251) 评论(0) 推荐(0)
摘要: 为什么 str[]-'0' ?while(cin>>a)//说明读进去的a[i]不是数字,而是字符的形式,如'0','1'...'9',它们的ascii码不是简单的0,1,...9,而是表示为48,49...57所以在你想要得到它们表示的数字,还要减去一个偏移量'0',即48。 阅读全文
posted @ 2015-06-04 17:50 Vmetrio 阅读(146) 评论(0) 推荐(0)
摘要: Description给定一个日期,输出这个日期是该年的第几天。Input输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。Output对于每组输入数据,输出一行,表示该日期是该年的第几天。Sample In... 阅读全文
posted @ 2015-06-04 17:45 Vmetrio 阅读(194) 评论(0) 推荐(0)
摘要: DescriptionToday is Saturday, 17th Nov,2007. Now, if i tell you a date, can you tell me what day it is ? InputThere are multiply cases. One line is on... 阅读全文
posted @ 2015-06-04 17:40 Vmetrio 阅读(353) 评论(0) 推荐(0)