自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (3)
  • 收藏
  • 关注

原创 并查集

#include<iostream> using namespace std; int pre[1005]; int num[1005]; int find(int a){ int r=a; while(r!=pre[r]){ r=pre[r]; } int i=a; while(i!=r){ int j=pre[i]; pre[i]=r; i=j; } ...

2018-03-29 12:34:00 180

原创 方格填数

#include<bits/stdc++.h> using namespace std; int num=0; int a[4][5]; int used[10]; bool check(int i){ int r=i/4; int c=i%4; if(abs(a[r][c-1]-a[r][c])==1 && c-1>=0){ return false;...

2018-03-22 15:33:10 317

原创 string的输入输出加速改进

#include<stdio.h> #include<iostream> #include<cmath> #include<vector> #include<algorithm> using namespace std; int main(){ char c[10]; scanf("%s",c); string s=c;//用来替代...

2018-03-20 13:00:41 412

原创 1030. Travel Plan (30)

#include<bits/stdc++.h> #include<iostream> #include<vector> #include<stack> #define inf 1000000 using namespace std; int n,m,s,d; int dist[505][505]; int cost[505][505]; int v...

2018-03-17 13:45:57 207

原创 PAT A1079.Total Sales of Supply Chain

#include <bits/stdc++.h> #include <string> #include <map> #include <queue> using namespace std; double ans=0.0; int data[100005]; double rate; struct node{ vector<int&gt...

2018-03-15 22:43:11 176

转载 回溯法

#include<iostream> #include<fstream> #include<vector> using namespace std; #define MAX 505 #define INF 10000 int cap,N,sp,M; int vex; int dist[MAX][MAX]; int bike[MAX]; #define PF...

2018-03-10 10:03:46 256

原创 习题集

#include<iostream> #include<vector> #include<algorithm> #include<cmath> using namespace std; struct uu{ int exp; float coeff; }; int main(){ uu a[10]; int numofa; cin&gt...

2018-03-06 22:26:53 317

转载 Flyod算法

#include <bits/stdc++.h> #define inf 0x3f3f3f3f using namespace std; int G[105][105]; int n,m; int next[105][105]; void init() { cin>>n>>m; for(int i=0; i<=n; i++)//初始化 ...

2018-03-03 19:00:30 500

转载 最小生成树--prim算法

#include<iostream> #include<stdio.h> #include<string.h> using namespace std; int INF = 999999999; int G[110][110]; int sta[110]; //以i为终点以visit的连通点为起点的最短边的起点 int low[110];//以i为终点...

2018-02-25 13:20:24 180

转载 迪杰特斯拉算法

#include <stdio.h> #include<stack> using namespace std; int main() { int inf=99999999; int n,m; //n顶点个数,m边的条数 scanf("%d %d",&n,&m); int e[n+1][n+1]; ...

2018-02-24 20:10:04 936

原创 深度优先搜索

#include <cstdio> const int INT_MAX = 10000; const int MAX = 501; int wei[MAX];//weight quanzhi int visit[MAX];//visited or not int map[MAX][MAX];//distance between two points int mind;//min ...

2018-02-24 14:58:20 163

原创 素数筛

#include<stdio.h> #include<iostream> #include<cmath> #include<vector> #include<algorithm> using namespace std; int main(){ int n; cin>>n; bool isprime[n+1]; int...

2018-02-24 14:51:44 125

转载 Longest Increasing Subsequence

#include<stdio.h> #include<iostream> #include<cmath> #include<vector> #include<algorithm> using namespace std; int main(){ int n; cin>>n; int s[n+1]; for(int i=...

2018-02-24 11:56:03 137

原创 Longest Common Subsequence

#include<stdio.h> #include<iostream> #include<cmath> #include<vector> #include<algorithm> using namespace std; int main(){ int n,m; cin>>n>>m; string s1,s2

2018-02-23 21:20:35 207

原创 01背包和完全背包

#include<stdio.h> #include<iostream> #include<cmath> #include<vector> #include<algorithm> using namespace std; int main(){ int n,w; cin>>n>>w; int wei[n+

2018-02-23 19:50:06 137

原创 Fence Repair

#include<stdio.h> #include<iostream> #include<cmath> #include<vector> #include<algorithm> using namespace std; int main(){ int n; long long res=0,temp;//long long 类型,...

2018-02-23 16:00:40 175

数据结构实验报告+代码(链表 二叉树 图 字符串 数组 排序 队列 栈)

数据结构实验报告+代码(链表 二叉树 图 字符串 数组 排序 队列 栈)

2018-01-25

数据库大作业实验报告

学生信息管理系统 数据库大作业实验报告的标准格式与整齐的排版

2018-01-25

实验7: 内部排序算法比较.doc

实验7: 内部排序算法比较.doc 实验7: 内部排序算法比较.doc 实验7: 内部排序算法比较.doc

2018-01-25

空空如也

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

TA关注的人

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