自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 动态规划经典问题

1,最长回文子串代码:#include <bits/stdc++.h>using namespace std;char a[100];int dp[100][100];int main(int argc, char** argv) {cin>>a;int len=strlen(a),ans=1;for(int i=0;i<len;i++){dp[i...

2020-03-09 09:31:00 96

原创 2019 几大复试

2019 第三题/*#include#include <bits/stdc++.h>using namespace std;stackm;int first,sum=0,n;void fun(){for(int i=0;i<3;i++){if(m.size()==0){first=i;m.push(i); }else if(m.top()!=i)m.pu...

2020-03-08 23:02:35 181

原创 2018

第一题斐波那契数列#include <bits/stdc++.h>using namespace std;int dp[1000];int fun(int n){if(n1||n2)return 1;elsereturn fun(n-1)+fun(n-2);}int main(int argc, char** argv) {int n;cin>>n...

2020-03-08 22:31:10 139

原创 2017

第三题#include <bits/stdc++.h>using namespace std;int main(int argc, char** argv) {int a=0,b=0,flag=0;char c;while((c=getchar())!=’.’){if(c==’\n’) a++;else if(c==‘a’){c=getchar();if(c==‘t...

2020-03-08 21:35:33 89

原创 2014真题

第一题:n的阶乘代码#include <bits/stdc++.h>using namespace std;/* run this program using the console pauser or add your own getch, system(“pause”) or input loop /string f(int n){int temp=0;if(n1)...

2020-03-08 17:51:32 128

原创 2015暨大复试真题

1,问题描述 字符处理:输入某字符,以"#"结束。输出的字符串要满足以下要求:①删除元音字母(包括大小写)。②辅音字母前加“!”。③字母大小写互换。例如:输入"tour#",输出"!T!R"。2,代码#include#includeusing namespace std;/* run this program using the console pauser or add yo...

2020-03-08 17:22:23 223

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除