上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: 易错点 测试点1、4、5:如果这些点错了,可以尝试测试一下下面这组数据: 00100 9 10 00100 -18 12309 12309 -7 33218 33218 -3 00000 00000 0 99999 99999 -5 68237 68237 -6 23333 23333 -10 27 阅读全文
posted @ 2022-07-17 14:12 qwasdasd 阅读(84) 评论(0) 推荐(0)
摘要: 易错点 测试点6:输入给出一个不超过1000位的正整数,需要用数组存放这个数 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; bool is_Palindromic(string a){ 阅读全文
posted @ 2022-07-17 10:34 qwasdasd 阅读(39) 评论(0) 推荐(0)
摘要: 易错点 测试点2:插入排序的判断,思路是否正确,可检验测试点:3 1 3 2 1 3 2,如果输出:插入排序,1 2 3,即正确 测试点5、6:归并排序中,若归并的每组数的数量为n,若最后一组数的数量不足n,此时最后一组数也要记得进行排序。如: 7 3 1 2 8 7 5 9 1 3 2 8 5 7 阅读全文
posted @ 2022-07-17 09:33 qwasdasd 阅读(232) 评论(0) 推荐(0)
摘要: 易错点 测试点2、3:要用long long,同时这两个点卡求gcd的运行时间,因此需要熟练掌握求gcd的辗转相除法的代码 int gcd(int a,int b){//求最大公约数,辗转相除法 if(a<0){ a=-a; } if(b<0){ b=-b; } if(b==0){ return a 阅读全文
posted @ 2022-07-16 19:07 qwasdasd 阅读(100) 评论(0) 推荐(0)
摘要: 易错点 注意范围,int会溢出的话要用long long 代码 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; long long a[100001]; int main() { int 阅读全文
posted @ 2022-07-16 16:54 qwasdasd 阅读(18) 评论(0) 推荐(0)
摘要: 注意点 unordered_set 代码 #include <iostream> #include <cstdio> #include <string> #include <queue> #include <map> using namespace std; string to_c(string a 阅读全文
posted @ 2022-07-16 16:00 qwasdasd 阅读(30) 评论(0) 推荐(0)
摘要: 易错点 测试点3:k=1的情况 测试点6:有无效结点,此时结点总个数不等于要反转的链表的结点总个数 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int a[100001]; strin 阅读全文
posted @ 2022-07-16 15:00 qwasdasd 阅读(43) 评论(0) 推荐(0)
摘要: 易错点 注意题目要求:运行时间必须按照 hh:mm:ss(即2位的 时:分:秒)格式输出 代码 #include <iostream> #include <cstdio> using namespace std; int main() { int t; float c1,c2; cin>>c1>>c 阅读全文
posted @ 2022-07-16 12:58 qwasdasd 阅读(21) 评论(0) 推荐(0)
摘要: 易错点 测试点8:A2的和为零但不为空的情况 代码 #include <iostream> #include <cstdio> #include <iomanip> using namespace std; int a[1002]; int main() { int n; int cnt1=0; i 阅读全文
posted @ 2022-07-16 12:38 qwasdasd 阅读(28) 评论(0) 推荐(0)
摘要: 易错点 测试点2、4:当输入只有指数为0的数,这时候输出要特别设置为“0 0” 代码 #include <iostream> #include <cstdio> using namespace std; int main() { int a,b; int tmp=0; while(cin>>a>>b 阅读全文
posted @ 2022-07-16 11:43 qwasdasd 阅读(51) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 11 下一页