討論串[閒聊] 每日LeetCode
共 719 篇文章

推噓1(1推 0噓 1→)留言2則,0人參與, 3月前最新作者wu10200512 (廷廷)時間3月前 (2024/02/24 01:44), 編輯資訊
2
0
0
內容預覽:
我她媽就用了一個map一個queue. 記憶體就爆了. 他這限制也抓太緊. 操機掰哩 還medium. 改一個小時還是改不出來. 明天再看看. ==. 787. Cheapest Flights Within K Stops. class Solution {. public:. int findC
(還有841個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 3月前最新作者JIWP (神楽めあ的錢包)時間3月前 (2024/02/24 03:13), 3月前編輯資訊
0
0
0
內容預覽:
if(ans<=temp.second+v.second) continue. 你應該是錯在這一行,條件要改一下. 改一下試試看. --. 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.73.133.158 (臺灣). 文章網址: https://www.ptt.cc/bbs/Ma

推噓1(1推 0噓 0→)留言1則,0人參與, 3月前最新作者wu10200512 (廷廷)時間3月前 (2024/02/24 17:00), 編輯資訊
0
0
0
內容預覽:
多用一個mp做dp. 這樣記憶體就不會爆了. 這不算hard太狠了. class Solution {. public:. int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int. dst, int k) {.
(還有844個字)

推噓4(4推 0噓 2→)留言6則,0人參與, 3月前最新作者JIWP (神楽めあ的錢包)時間3月前 (2024/02/24 18:48), 3月前編輯資訊
0
0
0
內容預覽:
你版今天線蟲帥朝都去FF惹. 剩我還在解每日leetcode,今天還是hard,我要吐了. 2092. Find All People With Secret. 有0~n-1個人,並且0有一個秘密,他告訴了firstPerson. 有一個array meetings[x,y,time]. 如果x、y
(還有1988個字)

推噓2(2推 0噓 2→)留言4則,0人參與, 3月前最新作者wu10200512 (廷廷)時間3月前 (2024/02/24 20:05), 編輯資訊
0
0
0
內容預覽:
原本用map寫會超時. 後來看別人用pq. 換個思路重寫一個. 2092. Find All People With Secret. class Solution {. public:. #define p pair<int, int>. vector<int> findAllPeople(int
(還有950個字)