cosc2406 assignment 1 辅导记录
原创 2022-10-10 19:55:56
104阅读
文章目录​​基本概念​​​​文件和文件结构​​​​记录和记录格式​​​​页和页格式​​​​本周quiz​​​​cost model​​​​ordered file​​​​page occupancy​​​​索引​​​​是什么​​​​分类​​​​其他概念​​​​总结​​老师讲得和课件基本一致。基本概念文件和文件结构记录和记录格式页和页格式本周quizcost model 总共有B页,每页要花D个时间
原创 2022-10-10 19:56:37
40阅读
文章目录CAP定理事务并发的一些问题The Lost Update Problem.The Temporary Update (or Dirty Read) Problem.
原创 2022-09-02 23:15:49
103阅读
#include<stdio.h> #include<string.h> char s2[1000100]; int next[1000010]; void getnext(){ int i=1,j=0,k; next[1]=0; k=strlen(&s2[1]); while(i<=k){ if(j==0 || s2[i]==s2[j]){ i++,j++; next[i]=j; } else j=next[j]; } } int main(){ int t,T,n,i,j,temp; while(scanf("%s",&s2
转载 2012-06-23 23:44:00
26阅读
2评论
#include#includechar s2[1000100];int next[1000010];void getnext(){ int i=1,j=0,k; next[1]=0; k=strlen(&s2[1]); while(i<=k){ if(j==0 || s2[i]==s2[j]){ i++,j++; next[i]=j; } else
原创 2023-09-15 09:39:22
47阅读
简单题#include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>using namespace std;#define maxn 1000005char st[maxn];int len;bool ok(int a){ for (int i = a; i < len; i++) if (st[i] != st[i % a]) return false; return true;}int work(){ for (int i = 1; i <= len
转载 2013-06-07 17:01:00
26阅读
2评论
View Code 1 //kmp算法2 #include"iostream"3 using namespace std;4 char s[10000001];5 int next[100001];6 int L;7 int i,j;8 void Index_kmp()9 {10 while(i<L) //kmp
原创 2021-07-28 17:06:36
103阅读
(http://www.elijahqi.win/2017/07/13/%E3%80%90poj2406%E3%80%91/) Power Strings Time Limit: 3000MS Memiven two st...
原创 2022-08-08 14:41:19
31阅读
求循环节之类的问题
转载 2019-07-29 15:36:00
25阅读
2评论
View Code /*Poj2406题解:if(len%(len-next[len])==0),则重复子串的长度为 len-next[len].证明如下,next[len]表示到len为止,满足既是前缀子串又是后缀子串的最长长度,如下图{a,c} = {b,d}若len%(
原创 2021-07-28 17:06:52
59阅读
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 41252 Accepte
原创 2022-08-10 12:13:08
43阅读
#include <iostream> //KMP算法using namespace std;char B[2000000]; int m,next[2000000]; void get_next(){ next[1]=0; int j=0; for(int i=2;i<=m;++i) { while(j>0&&B[j+1]!=B[i]) j=next[j]; if(B[j+1]==B[i]) j=j+1; next[i]=j; }}int main(){ while(scanf("%s",B+1)&&B[1]!=
转载 2011-07-18 11:41:00
38阅读
2评论
Power Strings Time Limit: 3000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Submit Status Description Given two strings a and b we define a*
转载 2020-06-24 20:17:00
25阅读
2评论
#include#includeconst int N = 1000000+10;char str[N];int next[N];int len;void GetNext1(char str[N],int next[N])//寻找模式串的粗
原创 2022-08-22 15:49:55
52阅读
基准特征”就是指没有体积和质量属性的几何元素,它们在构建几何实体模型中扮演了重要的参照角色,可是却是一种不具有体积和质量属性的特征。
原创 2024-07-16 10:07:38
55阅读
【代码】NX 2406 局部视图。
NX
原创 2024-08-03 22:18:53
42阅读
题意:给定一个字符串 L,已知这个字符串是由某个字符串 S 重复 R 次而得到的,求 R 的最大值。(长度#include #include #include #include using namespace std;int p[20000...
原创 2021-08-11 12:01:03
164阅读
只要判断前面一截能不能成为字符串的一部分(整除)即可。 #include<iostream>#include<cstdio>#include<cstring>#define maxn 1000005using namespace std;int next[maxn],l;char s[maxn];v
转载 2016-02-05 22:30:00
40阅读
2评论
题意:求字符串中循环节出现的次数 KMP!!! #include<cstdio> #include<iostream> #include<cstring> #define M 1000010 using namespace std; int fail[M],a[M],m; char ch[M]; v
转载 2016-06-28 21:09:00
39阅读
2评论
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate
转载 2017-05-04 20:37:00
52阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5