串
yue_luo_
这个作者很懒,什么都没留下…
展开
-
3348 数据结构实验之数组二:稀疏矩阵
数据结构实验之数组二:稀疏矩阵#include<iostream> #include<iomanip> using namespace std; int y,x; struct node//使用数组结果超时 { int x,y,z; }t[1001]; int juzhen(int k,int x) { for(int i=0;i<k;i++) if(x==t[原创 2016-11-03 10:38:16 · 672 阅读 · 0 评论 -
2130 数据结构实验之数组一:矩阵转置
数据结构实验之数组一:矩阵转置#include<iostream> int a[101][101]; using namespace std; int n; int juzhen(int m,int n) { for(int i=0;i<n;i++) for(int j=0;j<m;j++) { if(j!=m-1)原创 2016-11-03 10:40:10 · 241 阅读 · 0 评论 -
3347 数据结构实验之数组三:快速转置
数据结构实验之数组三:快速转置#include<iostream> #include<algorithm>//sort函数 或使用#include<bits/stdc++.h> 这个万能头文件 using namespace std; struct node { int x,y,z; }t[10001]; bool cmp(struct node a,struct node b) {原创 2016-11-03 10:36:30 · 447 阅读 · 0 评论 -
2772. 数据结构实验之串一:KMP简单应用
数据结构实验之串一:KMP简单应用#include<iostream> #include<cstring> using namespace std; char s1[1000005],s2[1000005]; int next[1000005],k=0; void get_next() { int i=0,j=-1; next[0]=-1; while(s2[i]!='\0'原创 2016-11-03 12:51:02 · 316 阅读 · 0 评论 -
2125 数据结构实验之串二:字符串匹配
数据结构实验之串二:字符串匹配 这题与串一代码基本一致#include<iostream> #include<cstring> using namespace std; char s1[1000005],s2[1000005]; int next[1000005],k=0; void get_next() { int i=0,j=-1; next[0]=-1; while(原创 2016-11-03 13:00:41 · 261 阅读 · 0 评论 -
3311 数据结构实验之串三:KMP应用
数据结构实验之串三:KMP应用#include<stdio.h> #include<string.h> int s1[1000005],s2[1000005]; int next[1000005],k=0; void get_next(int m) { int i=0,j=-1; next[0]=-1; while(i<m) { if(j==-1||s原创 2016-10-30 21:36:00 · 368 阅读 · 0 评论