摘要:
点击查看代码 #include<iostream> #include<vector> using namespace std; //判断 A>=B返回true A<B返回false bool cmp(vector<int> A, vector<int> B){ //当A的位数和B的位数不相同时,若A 阅读全文
摘要:
点击查看代码 #include <iostream> #include <vector> //含有size方法 using namespace std; //C = A+B vector<int> add(vector<int> &A, vector<int> &B){ vector<int> C; 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; int main(){ double x; cin >> x; double l = -10000, r = 10000; //保证结果在此区间内 while(r-l > 1e-8){ //经验值,保留六位 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; const int N = 100010; int n, m; int q[N]; int main(){ cin >> n >> m; for(int i = 0; i < n; i++) cin >> 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; const int N =100010; int n; int q[N], tmp[N]; typedef long long LL; //最坏情况下逆序数为n*(n-1)/2 结果值会爆int LL me 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; const int N = 100010; int n; int q[N], tmp[N]; void merge_sort(int q[], int l, int r){ if(l >= r) retur 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; const int N = 100010; int n, k; int q[N]; int quick_sort(int l, int r, int k){ if(l == r) return q[l]; 阅读全文
摘要:
第一篇博客诶!!! 点击查看代码 #include<iostream> using namespace std; const int N = 100010; int n; int q[N]; void quick_sort(int q[], int l, int r){ if(l >= r) ret 阅读全文