摘要: set的基本用法就不多阐述了 set里面会自动排序(从小到大),以后可以利用好这个特性 set里面用的是平衡二叉搜索树(也就是红黑树)维护 看代码 #include <iostream>#include <set>using namespace std; int main(){ set<int> s 阅读全文
posted @ 2019-07-15 04:49 李艳艳665 阅读(4574) 评论(0) 推荐(0) 编辑
摘要: 强烈推荐手动模拟程序 #include <bits/stdc++.h> using namespace std; int gcd(int a,int b){ return b==0?a:gcd(b,a%b);}int lcm(int a,int b){ return a*b/gcd(a,b);}in 阅读全文
posted @ 2019-07-15 04:48 李艳艳665 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 一个容斥定理的运用,代码实现感觉有点难理解,不过自己手动模拟一下程序就好了 #include <iostream>#include <cmath>#include <cstdio>using namespace std; typedef long long ll; int fac[100000];/ 阅读全文
posted @ 2019-07-15 04:47 李艳艳665 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 目前由于Phantomjs已经不维护了,而新版的Chrome(59+)推出了Headless模式 如果继续使用Phantomjs会有以下警告 UserWarning: Selenium support for PhantomJS has been deprecated, please use hea 阅读全文
posted @ 2019-07-15 04:46 李艳艳665 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 快速排序 #include <iostream> using namespace std;int a[100];int f(int low,int high){ int t=a[low]; while(low<high) { while(low<high && a[high]>=t) high--; 阅读全文
posted @ 2019-07-15 04:44 李艳艳665 阅读(221) 评论(0) 推荐(0) 编辑