随笔分类 -  PAT题解

摘要:段错误出现的可能 数组越界 类型的比较 除了题目中的表述,运算的过程中也要注意如果出现了数据的比较、运算也要变成double 阅读全文
posted @ 2019-10-18 20:09 明卿册 阅读(253) 评论(0) 推荐(0) 编辑
摘要:1、CODE 2、TEST 3、NOTE 3.1 不要再使用gets()这个函数啦!!!! 这个函数会把换行符读进来,而且在c++11中已经不建议使用,c++14完全丢弃 可以使用cin.getline(),而且这个函数还不会把回车符吃进去 3.2 c++文件读写 3.3 "边读边增长" 阅读全文
posted @ 2019-10-12 20:32 明卿册 阅读(213) 评论(0) 推荐(0) 编辑
摘要:```c++ include include include include define maxn 300 using namespace std; char str[maxn]; bool isBackStr() { bool flag = true; int half, len = strle 阅读全文
posted @ 2019-10-11 15:31 明卿册 阅读(106) 评论(0) 推荐(0) 编辑
摘要:```c++ include include include include define maxn 50 using namespace std; int a,b,d; int z[maxn]; void sum2d() { int num = 0, sum = a+b; do { z[num++ 阅读全文
posted @ 2019-10-11 15:21 明卿册 阅读(131) 评论(0) 推荐(0) 编辑
摘要:只有13分,不知道为什么 阅读全文
posted @ 2019-10-08 20:03 明卿册 阅读(105) 评论(0) 推荐(0) 编辑
摘要:错误点: 10^5应该定义成100005,中间四个零 第二个循环需要指到n(≤n),因为学校的编号是1~n,注意细节! 如果只有两个数字,不需要用结构体 阅读全文
posted @ 2019-10-07 20:19 明卿册 阅读(130) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示