![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OJ题
那花
这个作者很懒,什么都没留下…
展开
-
查找字符串中重复次数最多的子字符串,若有多个,返回最长的一个
#include <iostream>#include <string>#include <vector>using namespace std;class Solution {public: string longestRepeatOfStrings(string str) { if(str.size()==0) retur...原创 2020-03-13 00:10:40 · 1131 阅读 · 1 评论 -
HDOJ 1005 Number Sequence 非48周期法
Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n). InputThe input cons...原创 2018-02-10 13:52:27 · 116 阅读 · 0 评论