摘要: 编写一个函数来查找字符串数组中的最长公共前缀。如果不存在公共前缀,返回空字符串 ""。示例 1:输入: ["flower","flow","flight"]输出: "fl"示例 2:输入: ["dog","racecar","car"]输出: ""解释: 输入不存在公... 阅读全文
posted @ 2018-10-21 20:53 strawqqhat 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 编写一个函数来查找字符串数组中的最长公共前缀。如果不存在公共前缀,返回空字符串 ""。示例 1:输入: ["flower","flow","flight"]输出: "fl"示例 2:输入: ["dog","racecar","car"]输出: ""解释: 输入不存在公... 阅读全文
posted @ 2018-10-21 20:53 strawqqhat 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为1000。示例 1:输入: "babad"输出: "bab"注意: "aba"也是一个有效答案。示例 2:输入: "cbbd"输出: "bb"class Solution {public: ... 阅读全文
posted @ 2018-10-21 16:45 strawqqhat 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为1000。示例 1:输入: "babad"输出: "bab"注意: "aba"也是一个有效答案。示例 2:输入: "cbbd"输出: "bb"class Solution {public: ... 阅读全文
posted @ 2018-10-21 16:45 strawqqhat 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 这个马拉车算法Manacher‘s Algorithm是用来查找一个字符串的最长回文子串的线性方法,由一个叫Manacher的人在1975年发明的,这个方法的最大贡献是在于将时间复杂度提升到了线性,这是非常了不起的。对于回文串想必大家都不陌生,就是正读反读都一样的字符... 阅读全文
posted @ 2018-10-21 15:57 strawqqhat 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 这个马拉车算法Manacher‘s Algorithm是用来查找一个字符串的最长回文子串的线性方法,由一个叫Manacher的人在1975年发明的,这个方法的最大贡献是在于将时间复杂度提升到了线性,这是非常了不起的。对于回文串想必大家都不陌生,就是正读反读都一样的字符... 阅读全文
posted @ 2018-10-21 15:57 strawqqhat 阅读(277) 评论(0) 推荐(0) 编辑
#home h1{ font-size:45px; } body{ background-image: url("放你的背景图链接"); background-position: initial; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-origin: initial; background-clip: initial; height:100%; width:100%; } #home{ opacity:0.7; } .wall{ position: fixed; top: 0; left: 0; bottom: 0; right: 0; } div#midground{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -1; -webkit-animation: cc 200s linear infinite; -moz-animation: cc 200s linear infinite; -o-animation: cc 200s linear infinite; animation: cc 200s linear infinite; } div#foreground{ background: url("https://i.postimg.cc/z3jZZD1B/foreground.png"); z-index: -2; -webkit-animation: cc 253s linear infinite; -o-animation: cc 253s linear infinite; -moz-animation: cc 253s linear infinite; animation: cc 253s linear infinite; } div#top{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -4; -webkit-animation: da 200s linear infinite; -o-animation: da 200s linear infinite; animation: da 200s linear infinite; } @-webkit-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-o-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-moz-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @keyframes cc { 0%{ background-position: 0 0; } 100%{ background-position: 600% 0; } } @keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-webkit-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-moz-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-ms-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } }