摘要:
很多bug还不清楚。。用了网上答案 1 class Solution { 2 public: 3 int divide(int dividend, int divisor) { 4 // Start typing your C/C++ solution below 5 // DO NOT write int main() function 6 bool isnegtive = false; 7 int multiply = 0; 8 long long a = dividend; 9 lon... 阅读全文
摘要:
一开始dfs没过large, 网上看了别人的dp,哎,这题比较难。。 1 class Solution { 2 public: 3 int numDistinct(string S, string T) { 4 // Start typing your C/C++ solut... 阅读全文
摘要:
一开始dfs runtime exceed, 后来用dp想复杂了就看网上答案 1 class Solution { 2 public: 3 int numDecodings(string s) { 4 // Start typing your C/C++ solution b... 阅读全文