自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2021算法实验机试复习内容

一.复习内容分治算法 二分查找,归并排序回溯 01背包,八皇后分支限界 +1*2平方,电子老鼠闯迷宫dp贪心 最长公共子序列,最大连续子序列和,活动安排二.源代码1.二分查找#include<iostream>#include<cstdio> using namespace std;const int N = 1e4 + 10;int a[N];int n, m;int main(){ cin >> n; f

2021-11-02 01:20:09 343

原创 西工大算法设计与分析 1041最长公共子序列(实验四)

#include<iostream>#include<cstring>using namespace std;const int N = 210;char a[N], b[N];int f[N][N];int main(){ cin >> a + 1 >> b + 1; a[0] = ' ', b[0] = ' '; int la = strlen(a) - 1, lb = strlen(b) - 1; fo.

2021-10-25 01:20:58 304

原创 西工大算法设计与分析 noj1576 最大连续子序列和问题(实验四)

#include<iostream>#include<cstdio>using namespace std;const int N = 1010;int n;int a[N], f[N];int main(){ cin >> n; for(int i = 0; i < n; i ++ ) scanf("%d", &a[i]); for(int i = 0; i < n; i ++ ) { f[i] = a[i];.

2021-10-25 01:19:43 322

原创 西工大算法设计与分析 noj1205 活动安排(实验四)

#include<iostream>#include<algorithm>using namespace std;const int N = 1010;pair<int, int> act[N];int n;int main(){ cin >> n; for(int i = 0; i < n; i ++ ) cin >> act[i].second >> act[i].first; sort(act,.

2021-10-25 01:18:34 416

原创 西工大算法设计与分析 noj1654 僵尸双来了(实验三)

名字#include<iostream>#include<queue>using namespace std;#define _for(i, a, b) for(int i = (a); i < (b); i ++ )#define _rep(i, a, b) for(int i = (a); i <= (b); i ++ )struct state{ int x, y, hp, nut_hp, t; state() {};

2021-10-17 22:40:51 464

原创 西工大算法设计与分析 noj1653 僵尸又来了(实验三)

#include<iostream>#include<queue>using namespace std;#define _for(i, a, b) for(int i = (a); i < (b); i ++ )#define _rep(i, a, b) for(int i = (a); i <= (b); i ++ )struct state{ int x, y, t_f, t; state() {} state(in.

2021-10-17 22:38:38 850

原创 西工大算法设计与分析 noj1652 僵尸来了(实验三)

学校有点离谱,一周十二道,三道都是新题。马上考试周还这么折腾前面题都能搜到学长代码,搜搜都能应付原来每次ddl都是拿祖传代码应付的,这次补充下#include<iostream>#include<queue>using namespace std;#define _for(i, a, b) for(int i = (a); i < (b); i ++ )#define _rep(i, a, b) for(int i = (a); i <

2021-10-17 22:35:56 959 1

空空如也

空空如也

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

TA关注的人

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