12 2020 档案

摘要:TBD 阅读全文
posted @ 2020-12-31 11:42 TheDa 阅读(66) 评论(0) 推荐(0)
摘要:思想是排序后 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 阅读(97) 评论(0) 推荐(0)
摘要:#include<unordered_map> unordered_map<int,int>mp; 阅读全文
posted @ 2020-12-30 17:30 TheDa 阅读(147) 评论(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 阅读(79) 评论(0) 推荐(0)
摘要:如果碰到了按行输入,那就 string s; getline(cin,s); 如果输入当中含有转义字符的话 *char c=getchar(); if(c=='\\')cout<<111<<endl; else cout<<c<<endl;*/ 然后回车换行\n可以用getchar读取识别 还有一个 阅读全文
posted @ 2020-12-29 21:08 TheDa 阅读(72) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/niiick/article/details/89153096 主要是看这一篇博客写的。 本来是想,是不是什么模拟退火,二分查找,随机搜索什么的算法。 但是最后不是,,,根据点的随机分布而得到了O(n^3)到线性时间的算法??? 就是最小圆覆盖一定是两个点 阅读全文
posted @ 2020-12-28 21:09 TheDa 阅读(98) 评论(0) 推荐(0)
摘要:for(map<ordered datatype , datatype >::iterator iter =mapname.begin();iter!=mapname.end()) cout<<mapname->first<<" "<<mapname->second. <<endl 阅读全文
posted @ 2020-12-28 17:54 TheDa 阅读(699) 评论(0) 推荐(0)