본문 바로가기

전체 글400

타일 채우기 4 첫번째 코드 넓이를 구한 후 타일의 크기의 넓이(1 * 2)로 나눈 몫을 구한다! import sys input = sys.stdin.readline n, m = map(int, input().split()) answer = n * m // 2 print(answer) 통과링크https://github.com/ornni/programmers/tree/main/%EB%B0%B1%EC%A4%80/Bronze/15700.%E2%80%85%ED%83%80%EC%9D%BC%E2%80%85%EC%B1%84%EC%9A%B0%EA%B8%B0%E2%80%854 programmers/백준/Bronze/15700. 타일 채우기 4 at main · ornni/programmersrepository for recording .. 2024. 6. 23.
Attention Is All You Need 리뷰 목차0. Abstract1. Introduction2. Background3. Model Architecture3.1 Encoder and Decoder Stacks3.2 Attention3.2.1 Scaled Dot-Product Attention3.2.2 Multi-Head Attention3.2.3 Applications if Attention in our Model3.3 Position-wise Feed-Forward Networks3.4 Embeddings and Softmax3.5 Positional Encoding4. Why Self-Attention5. Training5.1 Training Data and Batching5.2 Hardware and Schedule5.3 Optimizer5.. 2024. 6. 22.
Split a String in Balanced Strings 첫번째 코드 개수로 생각하면 되겠다는 생각을 했다.R이 나오면 1을 더하고L이 나오면 1을 빼서0이 나올때 마다 정답에 1을 더하는 방법으로 진행하였다. class Solution:     def balancedStringSplit(self, s: str) -> int:         count = 0         answer = 0         for i in s:             if i == 'R':                 count += 1             else:                 count -= 1                          if count == 0:                 answer += 1                      ret.. 2024. 6. 22.
Find Words Containing Character 첫번째 코드 만약 단어 안에 x가 있으면 해당 인덱스를 정답에 포함하는 방법을 이용한다. class Solution:     def findWordsContaining(self, words: List[str], x: str) -> List[int]:         answer = []         index = 0         for i in words:             if x in i:                 answer.append(index)             index += 1                  return answer 통과!링크https://github.com/ornni/leetcode/tree/main/2942-find-words-containing-charac.. 2024. 6. 21.
Florida Authorities Warn of Shark Dangers Along Gulf Coast After Three People Are Attacked Florida Authorities Warn of Shark Dangers Along Gulf Coast After Three People Are AttackedBY ASSOCIATED PRESSJUNE 8, 2024 1:50 PM EDT바다의 수온이 점점 뜨거워 지면서 상어가 해안가로 나오는 일이 많아지고 있다는 소식은 들은 적이 있다.florida가 평소에는 어떤 상황이었는지 모르지만, 최근에 갑자기 상어의 공격이 많이 생겼다는데....상어가 나타날 수 있는 지역을 미리 예측하는 프로그램을 개발하는 것도 방법이지 않을까?상어의 움직임에 대한 데이터와 특성은 주로 많으니까!이번에 변칙적인 시간에 공격이 있었다는데 이런 데이터도 합쳐진다면 더 좋은 예측이 될 수 있지 않을까?라는 생각이 들었다.patro.. 2024. 6. 21.
048 이분 그래프 첫번째 코드 사실 이분 그래프의 정의는 알았지만 문제와 풀이를 아직 잘 이해하지 못했다.책을 참고해서 코드를 작성하였다...천천히 뒷 문제들을 풀면서 이해하고 다시 돌아와야 할 문제이다.... import sys input = sys.stdin.readline sys.setrecursionlimit(10**6) n = int(input()) iseven = True def DFS(x):     global iseven     visited[x] = True     for i in A[x]:         if not visited[i]:             check[i] = (check[x] + 1) % 2             DFS(i)         elif check[x] == check[i].. 2024. 6. 20.
728x90