http://www.spoj.com/problems/LCS/ 题目:求两个串的最长公共子串 参考:https://www.cnblogs.com/autoint/p/10345276.html: 分析: 给定两个字符串 S 和 T ,求出最长公共子串,公共子串定义为在 S 和 T 中 都作为子串出现过的字符串 X . 我们为字符串 S 构造后缀自动机. 我们现在处理字符串 T ,对于每一个前缀都在 S 中寻找这个前缀的最长后缀.换句话 说,对于每个字符串 T 中的位置,我们想要找到这个位置…
题意:告诉你两个圆环,求圆环相交的面积. /* gyt Live up to every day */ #include<cstdio> #include<cmath> #include<iostream> #include<algorithm> #include<vector> #include<stack> #include<cstring> #include<queue> #include<set&…
Big Event in HDU Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 48364 Accepted Submission(s): 16581 Problem Description Nowadays, we all know that Computer College is the biggest department in H…
Mirror and Light Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 650 Accepted Submission(s): 316 Problem Description The light travels in a straight line and always goes in the minimal path b…