- 博客(5)
- 收藏
- 关注
原创 最长上升子序列长度
#include<iostream>#include<algorithm>using namespace std;int main(){ int n; cin>>n; int num[n],dp[n]; for(int i=0;i<n;i++){ cin>>num[i]; ...
2019-09-01 08:42:07 127
原创 快排
#include<iostream>using namespace std;int partition(int a[], int low, int high){ int i=low; int j=high; int temp=a[i]; while(i!=j){ while(i<j&&a[j]>temp)...
2019-08-29 18:38:40 220
原创 最大公约数和最小公倍数
#include<iostream>using namespace std;class myclass{public: int measure1(int x, int y){ int z=y; while(x%y!=0){ z=x%y; x=y; y=z; ...
2019-08-29 18:19:30 180
原创 A字符串中包含多少个B字符串?
#include<iostream>using namespace std;int main(){ char str1[50]; char str2[4]; cin>>str1>>str2; char *p1,*p2; p1=str1; p2=str2; int count=0; while(*...
2019-08-29 18:17:56 413
原创 最长回文字符串
最长回文字符串#include#include#includeusing namespace std;int expendAroundCenter(string str, int i, int j){int left=i;int right=j;while(left>=0&&right<str.size()&&str[left]==str...
2019-08-27 16:25:01 89
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人