上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: class Solution { public: bool isPalindrome(int x) { vector tmp; int y; if(x<0) return false; y=x; cout<<y<<endl; int count=0; while(y!=0) { tmp.pus... 阅读全文
posted @ 2017-12-14 20:30 PirateLHX 阅读(153) 评论(0) 推荐(0)
摘要: 环境准备:Ubuntu16,matlab2017(目前只支持gcc4.9) You could set priority to use [g++/gcc-4.9] before [g++/gcc-5] . Follow these steps: --> Make sure gcc-4.9 and g 阅读全文
posted @ 2017-12-09 18:19 PirateLHX 阅读(1556) 评论(0) 推荐(0)
摘要: class Solution { public: int myAtoi(string str) { if (str.empty()) return 0; int sign = 1, base = 0, i = 0, n = str.size(); while (i = '0' && str[i] INT_MAX / 10 || (base... 阅读全文
posted @ 2017-12-03 21:08 PirateLHX 阅读(165) 评论(0) 推荐(0)
摘要: class Solution { public: int reverse(int x) { long long res = 0; while (x != 0) { res = 10 * res + x % 10; x /= 10; } return (res > INT_MAX... 阅读全文
posted @ 2017-12-03 20:22 PirateLHX 阅读(119) 评论(0) 推荐(0)
摘要: class Solution { public: string convert(string s, int numRows) { if(numRows==1) return s; else { int len=s.size(); int count=0; ... 阅读全文
posted @ 2017-12-03 19:53 PirateLHX 阅读(131) 评论(0) 推荐(0)
摘要: class Solution { public: string longestPalindrome(string s) { int len=s.size(); int left,right; int begin=0,maxlen=0; if(len=0&&rightmaxlen) { ... 阅读全文
posted @ 2017-11-25 19:11 PirateLHX 阅读(132) 评论(0) 推荐(0)
摘要: ffmpeg -f image2 -r 1/5 -i image%05d.png -vcodec mpeg4 -y movie.mp4This command takes images with 5 digit padding (image00001.png) and compresses them 阅读全文
posted @ 2017-11-23 16:33 PirateLHX 阅读(187) 评论(0) 推荐(0)
摘要: ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory #5343:针对这个问题,首先先分析你电脑是否装了cuda8.0,若不是,这可能是你在默认tensorflow配置时没有选 阅读全文
posted @ 2017-11-20 16:09 PirateLHX 阅读(1661) 评论(0) 推荐(0)
摘要: class Solution { public: double findMedianSortedArrays(vector& nums1, vector& nums2) { int m = nums1.size(), n = nums2.size(); return (findKth(nums1, nums2, (m + n + 1) / 2) + fin... 阅读全文
posted @ 2017-11-19 21:50 PirateLHX 阅读(103) 评论(0) 推荐(0)
摘要: class Solution { public: int lengthOfLongestSubstring(string s) { string res=""; int maxlen=0; for(int i=0;ires.length())?maxlen:res.length(); } el... 阅读全文
posted @ 2017-11-19 21:29 PirateLHX 阅读(119) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页