Life is like a Markov chain. It is independent of your past, and only depends on your present.

Leetcode 804: 唯一摩尔斯密码词

Leetcode 804 唯一摩尔斯密码词没什么难度,水题。如果不是每日一题不建议刷。 #include <iostream> #include <string> #include <vector> #include <queue> #include <map> using namespace std; class Solution { public: int uniqueMorseRepresentations(vector<string>& words) { vector<string> password{".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."}; map<string,bool> exist; for(int i=0;i<words.size();i++){ string& word = words[i]; string origin; for(int j=0;j<word.length();j++){ origin = origin
0%