摘要: 基本思想: 无; 关键点: 无; #include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector> #include<string> #include<math.h> #include<algorithm> #inclu 阅读全文
posted @ 2020-02-06 18:44 暮云林凌 阅读(185) 评论(0) 推荐(0)
摘要: 基本思想: 水题,唯一值得启发的可能也就是传递糖果的过程; 关键点: i-1递给i,然后从后向前遍历,只需要把最后一个提前保存给第一位小孩即可; #include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector> #inc 阅读全文
posted @ 2020-02-06 18:40 暮云林凌 阅读(248) 评论(0) 推荐(0)
摘要: 基本思路: 判断字符,没啥可说的; 关键点: 在判断的时候,不用整体截取在挨个判断,可以边截边判断,便于及时舍去; #include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector> #include<string> #i 阅读全文
posted @ 2020-02-06 16:15 暮云林凌 阅读(157) 评论(0) 推荐(0)
摘要: 基本思路: 难点在于怎么输入整行元素,主要考察空格和回车的读入和甄别; 关键点: 这里注意几点: 1.while(cin)和while(scanf)雷同,都可以进行EOF的判断; 2.在读取时要注意,cin>>n由于回车结尾,会导致下一个getline直接把回车都进去,所以要getchar进行处理; 阅读全文
posted @ 2020-02-06 14:51 暮云林凌 阅读(266) 评论(0) 推荐(0)
摘要: 基本思路: 基本的判断素数,之前做过相关总结; 关键点: 无; #include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector> #include<string> #include<math.h> #include<al 阅读全文
posted @ 2020-02-06 14:27 暮云林凌 阅读(258) 评论(0) 推荐(0)
摘要: 基本思想: 弱智题; 关键点: 无; #include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector> #include<string> #include<math.h> #include<algorithm> #inc 阅读全文
posted @ 2020-02-06 14:19 暮云林凌 阅读(210) 评论(0) 推荐(0)
摘要: 基本思想: 没啥,ASCII的弱智题; 关键点: 蓝桥OJ的两个特点: 不支持边读入边输出,和PATOJ有区别; System pause 会导致超时问题; #include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector 阅读全文
posted @ 2020-02-06 14:17 暮云林凌 阅读(189) 评论(0) 推荐(0)
摘要: 基本思想: 弱智题,相邻计算可破; 关键点: 无; #include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector> #include<string> #include<math.h> #include<algorith 阅读全文
posted @ 2020-02-05 21:19 暮云林凌 阅读(157) 评论(0) 推荐(0)
摘要: 基本思想: 主要是hash表中的平方探测法得问题; 关键点: 注意一个问题,平方探测法并不能完美解决散列问题; 并且在这个题目中,平方探测法的step取值为step=1*1,2*2,.....,(n-1)*(n-1),其中n为散列表长度; #include<iostream> #include<st 阅读全文
posted @ 2020-02-05 21:07 暮云林凌 阅读(119) 评论(0) 推荐(0)
摘要: 1015 Reversible Primes (20point(s)) PAT中涉及到了多点测试问题,这个需要注意一下,一直没怎么注意过; 主要的表示为结尾不同寻常,是以不寻常输入作为结尾标志的。 73 10 23 2 23 10 -2 例如对上述输入,就不能按照格式按行读入,而是因该使用while 阅读全文
posted @ 2020-02-05 16:50 暮云林凌 阅读(191) 评论(0) 推荐(0)