摘要: 思想是排序后 bool getSumNum(int[] arr,int Sum), //arr为数组,Sum为和 { int i,j; for(i = 0, j = n-1; i < j ; ) { if(arr[i] + arr[j] == Sum) return true; else if(ar 阅读全文
posted @ 2020-12-30 19:41 TheDa 阅读(87) 评论(0) 推荐(0) 编辑
摘要: #include<unordered_map> unordered_map<int,int>mp; 阅读全文
posted @ 2020-12-30 17:30 TheDa 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 求<=K的所有质数 #include<cstdio> #include<queue> #include<stack> #include<algorithm> #include<cstring> #include<string> #include<vector> #include<iostream> 阅读全文
posted @ 2020-12-30 15:33 TheDa 阅读(65) 评论(0) 推荐(0) 编辑