[{"content":"TopKFrequentElements Difficulty: Medium\nTopics: Hash Table, Heap, Frequency Counting\nGiven an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.\nApproach This problem asks us to find the k most frequent elements. We first use an unordered_map to count the frequency of each element. Then we use a min-heap of size k to maintain the current top-k elements. When the heap size exceeds k, we remove the smallest element. Finally, we obtain a list of size k that contains the top-k elements.\nCode class Solution { public: vector\u0026lt;int\u0026gt; topKFrequent(vector\u0026lt;int\u0026gt;\u0026amp; nums, int k) { unordered_map\u0026lt;int,int\u0026gt; freq; for(int n : nums) freq[n]++; // min heap (freq, num) priority_queue\u0026lt; pair\u0026lt;int,int\u0026gt;, vector\u0026lt;pair\u0026lt;int,int\u0026gt;\u0026gt;, greater\u0026lt;pair\u0026lt;int,int\u0026gt;\u0026gt; \u0026gt; pq; for(auto\u0026amp; [num, f] : freq) { pq.push({f, num}); if(pq.size() \u0026gt; k) pq.pop(); } vector\u0026lt;int\u0026gt; res; while(!pq.empty()) { res.push_back(pq.top().second); pq.pop(); } return res; } }; Complexity Analysis Let n be the size of the input array, and u be the number of unique elements. Here, u is the number of unique elements stored in the unordered_map, and k is the required number of most frequent elements.\ntime complexity : $O(n + u \\log k)$ space complexity : $O(u + k)$\n","permalink":"https://suigetsu312.github.io/blog/posts/topkfrequentelements/","summary":"\u003ch1 id=\"topkfrequentelements\"\u003eTopKFrequentElements\u003c/h1\u003e\n\u003cp\u003e\u003cstrong\u003eDifficulty:\u003c/strong\u003e Medium\u003cbr\u003e\n\u003cstrong\u003eTopics:\u003c/strong\u003e Hash Table, Heap, Frequency Counting\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eGiven an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch2 id=\"approach\"\u003eApproach\u003c/h2\u003e\n\u003cp\u003eThis problem asks us to find the k most frequent elements.\nWe first use an \u003ccode\u003eunordered_map\u003c/code\u003e to count the frequency of each element.\nThen we use a \u003ccode\u003emin-heap\u003c/code\u003e of size k to maintain the current top-k elements.\nWhen the heap size exceeds k, we remove the smallest element.\nFinally, we obtain a list of size k that contains the top-k elements.\u003c/p\u003e","title":"TopKFrequentElements"},{"content":"C++ STL Cheatsheet STL (Standard Template Library) provides generic containers and algorithms for C++ development. This note summarizes commonly used containers, typical usage patterns, and pitfalls.\nHeaders (common) #include \u0026lt;vector\u0026gt; #include \u0026lt;array\u0026gt; #include \u0026lt;string\u0026gt; #include \u0026lt;deque\u0026gt; #include \u0026lt;list\u0026gt; #include \u0026lt;forward_list\u0026gt; #include \u0026lt;queue\u0026gt; #include \u0026lt;stack\u0026gt; #include \u0026lt;set\u0026gt; #include \u0026lt;unordered_set\u0026gt; #include \u0026lt;map\u0026gt; #include \u0026lt;unordered_map\u0026gt; #include \u0026lt;algorithm\u0026gt; #include \u0026lt;utility\u0026gt; #include \u0026lt;tuple\u0026gt; #include \u0026lt;bitset\u0026gt; Vector Dynamic array with contiguous memory.\nvector\u0026lt;int\u0026gt; v = {1,2,3}; v.push_back(4); v.emplace_back(5); int x = v[0]; v.pop_back(); Notes\nRandom access: O(1) Insert/erase in middle: O(n) reserve(n) reduces reallocations Iterator invalidation: reallocation invalidates all iterators/pointers/references Array Fixed-size array (stack-friendly, no dynamic allocation).\narray\u0026lt;int, 3\u0026gt; a = {1,2,3}; a[0] = 10; Notes\nSize is compile-time constant Useful when size is known and small String std::string behaves like a dynamic array of char.\nstring s = \u0026#34;abc\u0026#34;; s.push_back(\u0026#39;d\u0026#39;); s += \u0026#34;ef\u0026#34;; Notes\ns.size() is O(1) Be careful with repeated concatenation inside loops (consider reserve) Deque Double-ended queue; random access supported, efficient push/pop at both ends.\ndeque\u0026lt;int\u0026gt; dq; dq.push_back(1); dq.push_front(0); dq.pop_back(); dq.pop_front(); Notes\nRandom access: O(1) (not contiguous) Often used as the underlying container for queue / stack List Doubly linked list.\nlist\u0026lt;int\u0026gt; lst; lst.push_back(1); lst.push_front(0); Notes\nInsert/erase with iterator: O(1) No random access High overhead; rarely needed unless frequent splicing/erase in middle Forward List Singly linked list.\nforward_list\u0026lt;int\u0026gt; fl; fl.push_front(1); fl.insert_after(fl.before_begin(), 0); Notes\nLower overhead than list, but only forward iteration Also less commonly used Queue FIFO adapter (default underlying container: deque).\nqueue\u0026lt;int\u0026gt; q; q.push(1); int front = q.front(); q.pop(); Stack LIFO adapter (default underlying container: deque).\nstack\u0026lt;int\u0026gt; st; st.push(1); int t = st.top(); st.pop(); Priority Queue (Heap) Default is max heap.\nMax heap priority_queue\u0026lt;int\u0026gt; pq; pq.push(3); pq.push(1); pq.push(2); int mx = pq.top(); // 3 pq.pop(); Min heap priority_queue\u0026lt;int, vector\u0026lt;int\u0026gt;, greater\u0026lt;int\u0026gt;\u0026gt; pq; Heap of pairs (common) priority_queue\u0026lt; pair\u0026lt;int,int\u0026gt;, vector\u0026lt;pair\u0026lt;int,int\u0026gt;\u0026gt;, greater\u0026lt;pair\u0026lt;int,int\u0026gt;\u0026gt; \u0026gt; pq; // (freq, value) -\u0026gt; smallest freq on top Notes\npush/pop: O(log n), top: O(1) Not iterable (no begin/end) Comparator semantics: priority_queue keeps “largest” by comparator; greater\u0026lt;\u0026gt; makes it a min heap Set / Multiset Ordered tree-based containers.\nset\u0026lt;int\u0026gt; s; s.insert(3); s.insert(3); // ignored multiset\u0026lt;int\u0026gt; ms; ms.insert(3); ms.insert(3); // allowed Notes\nOperations: O(log n) Sorted order maintained Supports lower_bound / upper_bound Unordered Set Hash-based unique container.\nunordered_set\u0026lt;int\u0026gt; us; us.insert(3); if (us.count(3)) {} Notes\nAverage O(1), worst-case O(n) No ordering guarantee Use reserve if you know size to reduce rehashing: us.reserve(100000); Map / Multimap Ordered key-value containers (tree).\nmap\u0026lt;int,int\u0026gt; mp; mp[1] = 10; mp[2] = 20; multimap\u0026lt;int,int\u0026gt; mmp; mmp.insert({1,10}); mmp.insert({1,20}); // duplicate keys allowed Notes\nOperations: O(log n) mp[key] default-constructs value if key not present (can be a pitfall) Unordered Map Hash-based key-value container.\nunordered_map\u0026lt;int,int\u0026gt; mp; mp[1]++; // frequency counting if (mp.find(1) != mp.end()) {} Notes\nAverage O(1), worst-case O(n) Prefer find when you don’t want implicit insertion Pair / Tuple pair pair\u0026lt;int,int\u0026gt; p = {1, 2}; auto [a, b] = p; // structured binding tuple tuple\u0026lt;int, string, double\u0026gt; t = {1, \u0026#34;x\u0026#34;, 3.14}; auto [i, s, d] = t; Bitset Fixed-size bit operations (fast, memory efficient).\nbitset\u0026lt;64\u0026gt; b; b.set(3); b.test(3); b.flip(); Algorithms (high frequency) sort + lambda sort(v.begin(), v.end(), [](const auto\u0026amp; a, const auto\u0026amp; b){ return a.second \u0026gt; b.second; }); lower_bound / upper_bound (on sorted range) auto it = lower_bound(v.begin(), v.end(), x); accumulate #include \u0026lt;numeric\u0026gt; int sum = accumulate(v.begin(), v.end(), 0); Pitfalls \u0026amp; Notes (worth remembering) Iterator invalidation\nvector: reallocation invalidates all iterators/pointers/references deque: push/pop at ends may invalidate iterators (rules are trickier) list: iterators stay valid except erased element unordered_ rehash*\nrehash can invalidate iterators; reserve helps map operator[]\ninserts default value when key missing; use find if you only want lookup erase while iterating\nassociative containers: for (auto it = s.begin(); it != s.end(); ) { if (*it % 2 == 0) it = s.erase(it); else ++it; } Quick Complexity Summary (common) vector random access: O(1), push_back amortized O(1), insert middle O(n) deque push/pop ends: O(1), random access O(1) set/map operations: O(log n) unordered_set/unordered_map average O(1) priority_queue push/pop O(log n), top O(1) When to Choose Which Container Choosing the correct container is more important than memorizing APIs. Below are practical guidelines for real-world usage.\nUse vector when: You need fast random access (O(1)) You iterate frequently You care about cache locality Insertions are mostly at the end Default choice in most situations.\nUse deque when: You need efficient push/pop at both ends You still need random access Good for sliding window or double-ended buffering.\nUse list when: You need frequent insert/erase in the middle Iterator stability is important Rarely necessary in performance-critical code.\nUse unordered_map / unordered_set when: You need fast lookup (average O(1)) Order does not matter You are doing frequency counting or membership checks Default choice for hash-based lookup.\nUse map / set when: You need ordered traversal You need lower_bound / upper_bound You require predictable O(log n) Prefer when ordering matters.\nUse priority_queue when: You repeatedly need the largest or smallest element You need to maintain top-k elements Full sorting is unnecessary Useful when partial ordering is sufficient.\nUse array when: Size is fixed and known at compile time You want stack allocation Use bitset when: You need compact bit manipulation The size is fixed and small Practical Advice Prefer vector unless you have a strong reason not to. Prefer unordered_* over ordered containers unless ordering is required. Avoid premature optimization; choose based on access pattern. Always consider iterator invalidation rules. ","permalink":"https://suigetsu312.github.io/blog/posts/stl_review/","summary":"\u003ch1 id=\"c-stl-cheatsheet\"\u003eC++ STL Cheatsheet\u003c/h1\u003e\n\u003cp\u003eSTL (Standard Template Library) provides generic containers and algorithms for C++ development.\nThis note summarizes commonly used containers, typical usage patterns, and pitfalls.\u003c/p\u003e\n\u003chr\u003e\n\u003ch2 id=\"headers-common\"\u003eHeaders (common)\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-cpp\" data-lang=\"cpp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;vector\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;array\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;string\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;deque\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;list\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;forward_list\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;queue\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;stack\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;set\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;unordered_set\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;map\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;unordered_map\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;algorithm\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;utility\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;tuple\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;bitset\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch2 id=\"vector\"\u003eVector\u003c/h2\u003e\n\u003cp\u003eDynamic array with contiguous memory.\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-cpp\" data-lang=\"cpp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evector\u003cspan style=\"color:#f92672\"\u003e\u0026lt;\u003c/span\u003e\u003cspan style=\"color:#66d9ef\"\u003eint\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e\u0026gt;\u003c/span\u003e v \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e {\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e,\u003cspan style=\"color:#ae81ff\"\u003e2\u003c/span\u003e,\u003cspan style=\"color:#ae81ff\"\u003e3\u003c/span\u003e};\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ev.push_back(\u003cspan style=\"color:#ae81ff\"\u003e4\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ev.emplace_back(\u003cspan style=\"color:#ae81ff\"\u003e5\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003eint\u003c/span\u003e x \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e v[\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e];\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ev.pop_back();\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e\u003cstrong\u003eNotes\u003c/strong\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eRandom access: O(1)\u003c/li\u003e\n\u003cli\u003eInsert/erase in middle: O(n)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ereserve(n)\u003c/code\u003e reduces reallocations\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eIterator invalidation\u003c/strong\u003e: reallocation invalidates all iterators/pointers/references\u003c/li\u003e\n\u003c/ul\u003e\n\u003chr\u003e\n\u003ch2 id=\"array\"\u003eArray\u003c/h2\u003e\n\u003cp\u003eFixed-size array (stack-friendly, no dynamic allocation).\u003c/p\u003e","title":"C++ STL Cheatsheet"},{"content":"Markdown syntax # Title ## Title ### Title #### Title ##### Title ###### Title bold italic strike\nblockquote\nstruct Packet { uint32_t seq; uint32_t ack; }; Euler: $e^{i\\pi} + 1 = 0$\ngraph TD SoC --\u0026gt; MCU_A SoC --\u0026gt; MCU_B Feature Status RSS OK Math OK Mermaid OK Hugo commands Local host develop hugo server -D Create Post 單篇文章\nhugo new posts/hello.md Page Bundle hugo new posts/hello/index.md 圖片放 content/posts/hello/img/{img_name}.{img_extension}\nProduction build hugo --minify ","permalink":"https://suigetsu312.github.io/blog/posts/hello/","summary":"\u003ch1 id=\"markdown-syntax\"\u003eMarkdown syntax\u003c/h1\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-markdown\" data-lang=\"markdown\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# Title \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e## Title\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e### Title\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#### Title\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e##### Title\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###### Title\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003cp\u003e\u003cstrong\u003ebold\u003c/strong\u003e\n\u003cem\u003eitalic\u003c/em\u003e\n\u003cdel\u003estrike\u003c/del\u003e\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eblockquote\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003chr\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-cpp\" data-lang=\"cpp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003estruct\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003ePacket\u003c/span\u003e {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003euint32_t\u003c/span\u003e seq;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003euint32_t\u003c/span\u003e ack;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e};\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003cp\u003eEuler: $e^{i\\pi} + 1 = 0$\u003c/p\u003e\n\u003chr\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode class=\"language-mermaid\" data-lang=\"mermaid\"\u003egraph TD\n    SoC --\u0026gt; MCU_A\n    SoC --\u0026gt; MCU_B\n\u003c/code\u003e\u003c/pre\u003e\u003chr\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\n      \u003ctr\u003e\n          \u003cth\u003eFeature\u003c/th\u003e\n          \u003cth\u003eStatus\u003c/th\u003e\n      \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n      \u003ctr\u003e\n          \u003ctd\u003eRSS\u003c/td\u003e\n          \u003ctd\u003eOK\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd\u003eMath\u003c/td\u003e\n          \u003ctd\u003eOK\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd\u003eMermaid\u003c/td\u003e\n          \u003ctd\u003eOK\u003c/td\u003e\n      \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003chr\u003e\n\u003cp\u003e\u003cimg alt=\"test\" loading=\"lazy\" src=\"/blog/posts/hello/img/hiro.jpg\"\u003e\u003c/p\u003e\n\u003ch1 id=\"hugo-commands\"\u003eHugo commands\u003c/h1\u003e\n\u003ch3 id=\"local-host-develop\"\u003eLocal host develop\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-zsh\" data-lang=\"zsh\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehugo server -D\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"create-post\"\u003eCreate Post\u003c/h3\u003e\n\u003cp\u003e單篇文章\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-zsh\" data-lang=\"zsh\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehugo new posts/hello.md\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"page-bundle\"\u003ePage Bundle\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-zsh\" data-lang=\"zsh\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehugo new posts/hello/index.md\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e圖片放\n\u003ccode\u003econtent/posts/hello/img/{img_name}.{img_extension}\u003c/code\u003e\u003c/p\u003e","title":"hugo markdown syntax pratice and command list"}]