![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM
文章平均质量分 57
sysu-yunz
这个作者很懒,什么都没留下…
展开
-
【常规解题报告】Chapter 0 Input and Output
这一chapter主要是利用a+b这样一个很简单的入门练习训练基本的输入输出,比如:最基本的单个输入输出、EOF输入、N组输入、特殊标记结束、输入的变化还有特殊的输出格式的考察。 一、输入 1、单个输入 最简单,不做代码示例 2、EOF输入 // All Copyright reserved by Informatic Lab of Sun Yat-sen University #includ原创 2013-10-05 20:35:25 · 948 阅读 · 0 评论 -
【算法解题报告】求三角形的面积
题目1(已知边长用海伦公式) 题目 1002. Triangle Total: 2069 Accepted: 574 Time Limit: 1sec Memory Limit:256MB Description Given three integers a, b, c indicate the three slide le原创 2013-10-06 10:28:18 · 1035 阅读 · 0 评论 -
C++ EOF、swap
C++中的EOF 虽然在【常规解题报告】Chapter 0 Input and Output写过关于C++以EOF结束输入的情况,但今天遇到还是G了一下才知道。while (cin>>n) swap函数和指针 也是很简单的问题 注意交换的是内容,不是指针。 by dukeyunz原创 2014-02-26 20:48:50 · 598 阅读 · 0 评论 -
【算法解题报告】棋盘上的距离&校门外的树
算法解题报告 by dukeyunz 百练1657 棋盘上的距离 #include #include #include int main() { i原创 2014-04-01 23:47:49 · 636 阅读 · 0 评论 -
【常规解题报告】C++格式化输出和关于字符串的一些常用法
cout setw设定输出数字的宽度,setfill确定填充数。 string.substr(begin, size); //begin 是要截断处的起始下标, size是要截的长度。 函数返回string。 string.c_str() 是把string类型的str。 atoi—C语言里吧字符串转化成整型数的函数。 year = atoi(input.substr(0,原创 2014-03-25 23:25:35 · 639 阅读 · 0 评论 -
【算法解题报告】求众数
问题分类: 1、只需要求出一列数的众数,不考虑多个众数的情况; 2、考虑多个众数,只需要输出一个; 3、如果有多个众数,则由小到大输出,并且输出个数。 简单情况 (数组已经分类) //忽略命名和风格,代码来自http://bbs.csdn.net/topics/330219507 int find_max_seq(int *a, int n) { int i, el原创 2014-03-25 23:03:31 · 1649 阅读 · 0 评论