Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- leetcode dart
- com.google.GIDSignIn
- dart new
- flutter widget
- 파이썬
- dart
- keychain error
- widget
- AnimationController
- 롤 api dart
- swift 동시성
- dart new 키워드
- docker overview
- Architectural overview
- PlatformException(sign_in_failed
- valorant api dart
- swift concurrency
- flutter ios 폴더
- generate parentheses dart
- flutter
- flutter android 폴더
- lol api dart
- tft api dart
- dart.dev
- 발로란트 api dart
- 롤토체스 api dart
- riot api dart
- flutter statefulwidget
- 파이썬 부동소수점
- flutter bloc
Archives
- Today
- Total
목록파이썬 (2)
aspe

list = [i * 0.01 for i in range(1, 10000)] for i in list: if int(i * 100) != int(i * 100 + 0.5): print(i, i * 100, int(i * 100), int(i * 100 + 0.5))
카테고리 없음
2023. 9. 24. 12:32
알고리즘/Programmers - 양과 늑대(Python3)
import collections answer = 0 def solution(info, edges): graph = collections.defaultdict(list) for src, dst in edges: graph[src].append(dst) def dfs(s, sheep, wolf, path): # 양, 늑대 확인 if not info[s]: sheep += 1 else: wolf += 1 if wolf >= sheep: return global answer answer = max(answer, sheep) # 직후 DFS에서는 현재 노드를 탐색할 필요가 없다. if path: path.remove(s) path.extend(graph[s]) for i in path: dfs(i, sheep,..
알고리즘
2022. 11. 15. 14:26