Input
Two strings with lowercase letters on two of the input lines individually. Number of characters in each one will never exceed 100000.
Output
A single line with a single integer number – what is the maximum length of the original text written by the little cat.
Sample Input
yeshowmuchiloveyoumydearmotherreallyicannotbelieveit
yeaphowmuchiloveyoumydearmother
Sample Output
27
Time—1125ms
Memory—3836k
代码:
#include<iostream>
#include<vector>
#include<algorithm>
#include<stdio.h>
#include<string.h>
using namespace std;
typedef unsigned long long ull;
const int N=1e5+7;
char P[N],T[N];
ull hashp[N],hasht[N],pm[N],p=13331;
ull getseg(int l