Re: [閒聊] 每日leetcode

看板 Marginalman
作者 DJYOMIYAHINA (通通打死)
時間 2024-11-23 00:48:20
留言 2 ( 1推 0噓 1→ )
回文 60則
把 row 跟 inverse(row) 視為一樣 然後去找max count 說是這樣說 我也很不會用 就全部硬做string來稿== 看答案好像有其他特別的方法 明天再來研究 先睡 def maxEqualRowsAfterFlips(self, matrix: List[List[int]]) -> int: def flip(s): tmp = [] for c in s: if c == '0': tmp.append('1') else: tmp.append('0') return "".join(tmp) mp = {} for row in matrix: mp["".join([str(i) for i in row])] += 1 ans = 0 for key, val in mp.items(): cur_cnt = val if flip(key) in mp: cur_cnt += mp[flip(key)] ans = max(ans, cur_cnt) return ans -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.229.37.69 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1732294102.A.E85.html

回文

[閒聊] 每日Leetcode
marginalman Rushia
2022-03-29 10:59:05
[閒聊] 每日LeetCode
1 3 marginalman Rushia
2022-09-14 23:02:29
Re: [閒聊] 每日LeetCode
1 3 marginalman Rushia
2022-09-15 12:15:47
Re: [閒聊] 每日LeetCode
2 2 marginalman pandix
2022-09-15 12:57:55
Re: [閒聊] 每日LeetCode
marginalman Rushia
2022-09-21 15:41:31
Re: [閒聊] 每日LeetCode
3 5 marginalman Rushia
2022-09-21 15:53:41
Re: [閒聊] 每日LeetCode
4 5 marginalman Rushia
2022-09-22 10:40:56
Re: [閒聊] 每日LeetCode
1 6 marginalman yam276
2022-09-22 11:38:13
Re: [閒聊] 每日LeetCode
1 2 marginalman yam276
2022-09-22 16:12:43
Re: [閒聊] 每日LeetCode
2 7 marginalman Rushia
2022-09-24 12:54:51
Re: [閒聊] 每日LeetCode
marginalman Rushia
2022-09-25 15:51:32
Re: [閒聊] 每日LeetCode
2 4 marginalman pandix
2022-09-26 19:55:34
Re: [閒聊] 每日LeetCode
marginalman pandix
2022-09-27 23:40:49
Re: [閒聊] 每日LeetCode
2 5 marginalman Rushia
2022-09-27 23:48:21
Re: [閒聊] 每日LeetCode
2 2 marginalman Rushia
2022-09-28 10:06:53
Re: [閒聊] 每日LeetCode
3 5 marginalman pandix
2022-09-28 19:00:24
Re: [閒聊] 每日LeetCode
4 5 marginalman Rushia
2022-09-29 10:22:39
Re: [閒聊] 每日LeetCode
3 6 marginalman pandix
2022-09-29 10:45:51
Re: [閒聊] 每日LeetCode
marginalman pandix
2022-09-29 23:33:27
Re: [閒聊] 每日LeetCode
3 3 marginalman Rushia
2022-10-01 15:21:10
Re: [閒聊] 每日LeetCode
2 3 marginalman pandix
2022-10-01 23:23:27
Re: [閒聊] 每日LeetCode
3 8 marginalman Pash97143
2022-10-02 00:38:24
Re: [閒聊] 每日LeetCode
2 2 marginalman fxfxxxfxx
2022-10-02 09:00:25
Re: [閒聊] 每日LeetCode
4 5 marginalman pandix
2022-10-02 17:01:46
Re: [閒聊] 每日LeetCode
5 7 marginalman fxfxxxfxx
2022-10-03 09:12:35
Re: [閒聊] 每日LeetCode
4 4 marginalman pandix
2022-10-03 09:37:14
Re: [閒聊] 每日LeetCode
marginalman qwer338859
2022-10-03 11:25:38
Re: [閒聊] 每日LeetCode
5 6 marginalman Rushia
2022-10-03 11:26:31
Re: [閒聊] 每日LeetCode
3 3 marginalman Rushia
2022-10-04 09:52:42
Re: [閒聊] 每日LeetCode
5 5 marginalman Rushia
2022-10-05 09:25:45
Re: [閒聊] 每日LeetCode
4 5 marginalman pandix
2022-10-05 09:40:08
Re: [閒聊] 每日LeetCode
4 6 marginalman Rushia
2022-10-06 10:18:27
Re: [閒聊] 每日LeetCode
marginalman pandix
2022-10-06 10:27:49
Re: [閒聊] 每日LeetCode
1 3 marginalman Rushia
2022-10-06 10:53:34
Re: [閒聊] 每日LeetCode
marginalman fxfxxxfxx
2022-10-06 15:02:54
Re: [閒聊] 每日LeetCode
2 5 marginalman pandix
2022-10-07 12:06:19
Re: [閒聊] 每日LeetCode
1 4 marginalman fxfxxxfxx
2022-10-07 19:36:15
Re: [閒聊] 每日LeetCode
3 3 marginalman Rushia
2022-10-08 12:37:47
Re: [閒聊] 每日LeetCode
marginalman pandix
2022-10-08 13:02:09
Re: [閒聊] 每日LeetCode
2 4 marginalman fxfxxxfxx
2022-10-08 14:13:09
Re: [閒聊] 每日LeetCode
1 1 marginalman SecondRun
2022-10-08 16:09:03
Re: [閒聊] 每日LeetCode
2 2 marginalman Rushia
2022-10-09 14:11:02
Re: [閒聊] 每日LeetCode
1 2 marginalman Rushia
2022-10-10 14:38:07
Re: [閒聊] 每日LeetCode
2 2 marginalman Rushia
2022-10-11 11:21:19
Re: [閒聊] 每日LeetCode
2 3 marginalman Rushia
2022-10-12 10:06:55
Re: [閒聊] 每日LeetCode
6 10 marginalman Rushia
2022-10-13 09:12:42
Re: [閒聊] 每日LeetCode
4 6 marginalman fxfxxxfxx
2022-10-13 12:17:26
Re: [閒聊] 每日LeetCode
6 7 marginalman Rushia
2022-10-14 16:24:57
Re: [閒聊] 每日LeetCode
3 3 marginalman pandix
2022-10-15 18:59:40
Re: [閒聊] 每日LeetCode
4 7 marginalman pandix
2022-10-16 16:24:59
Re: [閒聊] 每日LeetCode
2 2 marginalman Rushia
2022-10-17 09:42:50
Re: [閒聊] 每日LeetCode
2 3 marginalman abcd991276
2022-10-18 15:24:10
Re: [閒聊] 每日LeetCode
1 2 marginalman Rushia
2022-10-18 16:37:56
Re: [閒聊] 每日LeetCode
2 3 marginalman pandix
2022-10-18 16:50:13
Re: [閒聊] 每日LeetCode
marginalman Rushia
2022-10-19 09:45:48
Re: [閒聊] 每日LeetCode
1 3 marginalman pandix
2022-10-19 11:07:59
Re: [閒聊] 每日LeetCode
3 4 marginalman Rushia
2022-10-20 09:21:06
Re: [閒聊] 每日LeetCode
6 6 marginalman fxfxxxfxx
2022-10-21 02:46:22
Re: [閒聊] 每日LeetCode
1 2 marginalman Rushia
2022-10-21 09:12:55
Re: [閒聊] 每日LeetCode
3 4 marginalman pandix
2022-10-22 15:36:18

留言

※ 編輯: DJYOMIYAHINA (125.229.37.69 臺灣), 11/23/2024 00:48:40
Pash97143 DJ寶 你別卷了 11/23 00:48 1F
sustainer123 大佬 養我 11/23 00:51 2F

最新文章

[日本] 日本各大網站代購
helpbuy b7753251
2024-11-23 07:36:29
[贈送] 一葉蓮小苗
aqua-shop notre927
2024-11-23 07:34:54
[代買] Pchome 24H 9折代買
helpbuy bastille
2024-11-23 07:28:02
Re: [請益] Lush洗髮皂
beautysalon umunya
2024-11-23 07:01:10