随笔分类 - 洛谷
摘要:2019-11-30 10:08:41 #include<bits/stdc++.h> #include <stdlib.h> #include <stdio.h> using namespace std; int w[30],v[30],f[50000]; int n,m; int main(){
阅读全文
posted @ 2019-11-30 10:10
JasonPeng1
摘要:2019-11-24 14:57:51 比较100位的数字,属于高精度。直接上字符串 #include<bits/stdc++.h> #define f(a,b,c) for(int a=b;a<=c;a++) #define f1(a,b,c) for(int a=b;a>=c;i--) usin
阅读全文
posted @ 2019-11-24 14:59
JasonPeng1
摘要:解法1: #include<bits/stdc++.h> using namespace std; int n,m,i,f,k[5001],s[5001],sub[5001]; bool cmp(int a,int b){ if(s[a] == s[b]){ return k[a]<k[b]; }
阅读全文
posted @ 2019-11-24 14:57
JasonPeng1
摘要:#include<bits/stdc++.h> using namespace std; set<int> s; int a[105]; int main(){ int n; cin>>n; for(int i=0;i<n;++i){ cin>>a[i]; s.insert(a[i]); } cou
阅读全文
posted @ 2019-11-24 14:55
JasonPeng1
摘要:#include<iostream> using namespace std; int n,a[1000001]; void qsort(int l,int r){ int mid = a[(l+r)/2];//中间数 int i = l,j = r; do{ while(a[i]<mid) i++
阅读全文
posted @ 2019-11-24 14:53
JasonPeng1
摘要:2019-11-24 10:04:17 解法1: O(N平方)复杂度 #include<bits/stdc++.h> #include <stdlib.h> #include <stdio.h> using namespace std; int main(){ int n,m,s=0; bool v
阅读全文
posted @ 2019-11-24 10:24
JasonPeng1
摘要:2019-11-17 11:30:34 #include<iostream> using namespace std; int n,a[1000001]; void qsort(int l,int r){ int mid = a[(l+r)/2];//中间数 int i = l,j = r; do{
阅读全文
posted @ 2019-11-17 12:29
JasonPeng1