분류 전체보기

👉🏻 21760번: 야구 시즌import sys; input=sys.stdin.readlinefor _ in range(int(input())): answer = 0 n, m, k, d = map(int, input().split()) B = 1 while True: A = B * k temp = n * (m * (m-1) // 2) * A + n * m * (n-1) * m * B // 2 if temp 첫 시도에서는 math.comb()를 이용하여 풀려고 했으나, while문 내에서 comb()를 계속 돌리는 것이 시간 제약에 걸렸습니다.해서 comb()가 아닌 직접 조합식을 세워 각 팀마다 경기 수를 계산하여 최댓값을 갱신하였습니다.갱신..
·Paper Review/ML
Abstract Experimental results on nine real-life datasets show that LTSF-Linear surprisingly outperforms existing sophisticated Transformer-based LTSF models in all cases, and often by a large margin. 연구 배경최근 Transformer 기반 solution들이 장기 시계열 예측(LTSF) task에서 성능 향상 입증본 논문은 이런 Transformer 기반 연구 방향의 타당성에 대한 의문 제기Transformer의 한계점Transformer는 긴 시퀀스에서 의미론적 상관관계를 추출하는 데 효과적But! 시계열 모델링에서는 연속적인 점들의 집합에서 시..
👉🏻 5586번: JOI와 IOIs = input()count = 0for i in range(len(s)-1): if s[i] == 'I' and s[i+1] == 'O' and s[i+2] == 'I': count += 1 print(s.count('JOI'))print(count)'IOI' 같은 경우, 'IOIOI'와 같은 부분 문자열은 count() 함수로 세는 것에 제약이 있었습니다.따라서 반복문으로 'IOI'의 개수는 따로 계산하고,영향을 받지 않는 'JOI'는 count() 함수를 이용하여 계산하였습니다.
프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.krdef solution(storey): answer = 0 while storey: digit = storey % 10 next_digit = (storey // 10) % 10 if digit > 5 or (digit == 5 and next_digit >= 5): answer += (10 - digit) storey += 10 else: answer += digit ..
👉🏻 9184번: 신나는 함수 실행import sys; input=sys.stdin.readlinedef w(a, b, c): if a 20 or b > 20 or c > 20: return w(20, 20, 20) if (a, b, c) in dp: return dp[(a, b, c)] if a pseudo code로 작성되어 있는 재귀 문제를 dp 형식으로 변환하는 문제였습니다.저는 w(20, 20, 20)까지의 결과값을 미리 계산하여 dp로 처리하는 방식을 사용하였습니다.
👉🏻 5623번: 수열의 합n = int(input())s = [list(map(int, input().split())) for _ in range(n)]if n == 2: result = [1, 1]else: first_value = (s[0][1] + s[0][2] - s[1][2]) // 2 result = [first_value] + [s[0][i] - first_value for i in range(1, n)]print(*result)수열 A의 첫 번째 원소를 구하기만 하면 그에 따른 나머지 원소들은 첫 번째 원소를 기반으로 모두 구할 수 있습니다.첫 번째 원소를 구하는 식은 코드와 동일합니다!n이 2일 때 result가 [1, 1]만 출력하는 것은 문제에 나와있듯 입력으로 ..
👉🏻 2422번: 한윤정이 이탈리아에 가서 아이스크림을 사먹는데N, M = map(int, input().split())bad_pairs = [set() for _ in range(N+1)] for _ in range(M): a, b = map(int, input().split()) bad_pairs[a].add(b) bad_pairs[b].add(a) count = 0for i in range(1, N-1): for j in range(i+1, N): if j in bad_pairs[i]: continue for k in range(j+1, N+1): if k not in bad_pairs[i] and ..
·Paper Review/ML
AbstractA new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Transformer 모델의 주요 특징전적으로 attention mechanism에 기반한 새로운 network architecture기존 모델들의 recurrence와 convolution layer를 완전히 대체실험 결과 및 성능두 가지 machine translation task에서 우수한 성능 입증높은 parallelization 능력기존 모델 대비 훨씬 짧은 training time 소요구체적인 성과WMT 2014 English..
ReJoy
'분류 전체보기' 카테고리의 글 목록 (15 Page)