Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
leetcode: finished #822
Browse files Browse the repository at this point in the history
  • Loading branch information
xqm32 committed Jan 8, 2024
1 parent f8ab473 commit 1454aaa
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions content/leetcode/2024/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@ title: 2024.1
draft: false
---

# 2024.1.8

```python
#
# @lc app=leetcode.cn id=822 lang=python3
#
# [822] 翻转卡片游戏
#

# @lc code=start
from typing import List


class Solution:
def flipgame(self, fronts: List[int], backs: List[int]) -> int:
same = {x for i, x in enumerate(fronts) if x == backs[i]}
return min([x for x in set(fronts + backs) if x not in same], default=0)


# @lc code=end
```

# 2024.1.7

```python
Expand Down

0 comments on commit 1454aaa

Please sign in to comment.