討論串[閒聊] 每日LeetCode
共 719 篇文章
內容預覽:
我她媽就用了一個map一個queue. 記憶體就爆了. 他這限制也抓太緊. 操機掰哩 還medium. 改一個小時還是改不出來. 明天再看看. ==. 787. Cheapest Flights Within K Stops. class Solution {. public:. int findC
(還有841個字)
內容預覽:
多用一個mp做dp. 這樣記憶體就不會爆了. 這不算hard太狠了. class Solution {. public:. int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int. dst, int k) {.
(還有844個字)
內容預覽:
你版今天線蟲帥朝都去FF惹. 剩我還在解每日leetcode,今天還是hard,我要吐了. 2092. Find All People With Secret. 有0~n-1個人,並且0有一個秘密,他告訴了firstPerson. 有一個array meetings[x,y,time]. 如果x、y
(還有1988個字)
內容預覽:
原本用map寫會超時. 後來看別人用pq. 換個思路重寫一個. 2092. Find All People With Secret. class Solution {. public:. #define p pair<int, int>. vector<int> findAllPeople(int
(還有950個字)