随笔分类 -  ACM基础练习

摘要:告别2017的人和事,期待一下2018。SEE YOU Damn, who knew all the planes we flew Good things we've been through That I'll be standing right here Talking to you about 阅读全文
posted @ 2018-01-17 18:38 Rohlf 阅读(395) 评论(0) 推荐(0)
摘要:结构体中的char类型可以用strcpy完成操作。 定义一个结构的一般形式为: 1 struct 结构名 2 { 3 //成员表列 4 }; 成员表由若干个成员组成, 每个成员都是该结构的一个组成部分。对每个成员也必须作类型说明,其形式为: 类型说明符 成员名; 成员名的命名应符合标识符的书写规定。 阅读全文
posted @ 2017-12-23 22:23 Rohlf 阅读(219) 评论(0) 推荐(0)
摘要:10个学生5门课成绩,分别用三个函数实现三个内容:①计算每个学生的平均分②计算每门课的平均分③找出50个分数中最高分的学生并打印那一行 一个10×6的数组。第一列存学号:代码如下 规定:如果将二维数组作为参数传递给函数,那么在函数的参数声明中必须指明数组的列数,数组的行数没有太大关系,可以指定也可以 阅读全文
posted @ 2017-12-21 17:39 Rohlf 阅读(2439) 评论(0) 推荐(0)
摘要:未经过优化的冒泡和比较排序,有时间再学习如何优化效率; exmple: I'm wanted for addiction She's feeling for a thrill She's feeling for a thrill We've been scream for attention We' 阅读全文
posted @ 2017-12-21 11:50 Rohlf 阅读(376) 评论(0) 推荐(0)
摘要:Description There are some students in a class, Can you help teacher find the highest student . Input There are some cases. The first line contains an 阅读全文
posted @ 2017-11-11 22:32 Rohlf 阅读(204) 评论(0) 推荐(0)
摘要:HDU 2011:多项式求和 Description 多项式的描述如下: 1 - 1/2 + 1/3 - 1/4 + 1/5 - 1/6 + ... 现在请你求出该多项式的前n项的和。 多项式的描述如下: 1 - 1/2 + 1/3 - 1/4 + 1/5 - 1/6 + ... 现在请你求出该多项 阅读全文
posted @ 2017-11-05 23:15 Rohlf 阅读(485) 评论(0) 推荐(0)
摘要:这几道习题大概是ACM输入输出格式的普及 P1: Input:The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. O 阅读全文
posted @ 2017-11-04 19:19 Rohlf 阅读(331) 评论(0) 推荐(0)