![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
刷题
文章平均质量分 59
大T小C
95后,教育行业,爱技术,爱唠嗑
展开
-
Error Curves(三分习题)(精度)
之前对double类型的数据的比较一直一无所知,A了这道题后感觉很神奇突然很想写个博客记录一下,以便后面查看 题目:http://acm.bnu.edu.cn/v3/external/50/5009.pdf下面代码中的宏定义“#define eps 1e-12”刚开始,我是“#define eps 1e-8”,提交是:然后网上找了找,看到有位大佬写的是“#define ep...原创 2018-07-18 22:29:06 · 243 阅读 · 0 评论 -
1007 Maximum Subsequence Sum (25 分)遇到的坑
坑1:注意“ If all the K numbers are negative, then its maximum sum is defined to be 0, and you are supposed to output the first and the last numbers of the whole sequence.” 如果不注意这个要求,结果应该是这样的:坑2:其实...原创 2018-09-15 17:09:53 · 7864 阅读 · 5 评论 -
1008 Elevator (20 分)数组长度设定的重要性(PAT段错误+运行时错误)
这道题目简单:先输入这段序列的个数,然后依次输入序列,计算从第0层开始走完这段序列需要的时间下面是第一次提交的代码及结果:吓我一跳,“段错误”还行改成下面的就通过了(差别就在int in[105])#include<iostream> using namespace std;int main(){ int N; int in[105]; cin>...原创 2018-09-22 17:02:38 · 1334 阅读 · 0 评论 -
[Warning] multi-character character constant [-Wmultichar]——字符+空格导致输出错误
在使用Devc++做题的时候遇到了如下的【警告】:[警告]多字符字符常量〔Wmultichar〕(题目是http://codeup.cn/problem.php?cid=100000583&pid=1)代码如下:#include<iostream>#include<stdlib.h>using namespace std;int fib(in...原创 2018-10-06 12:12:40 · 58298 阅读 · 3 评论