분류 전체보기

2021.09.27 랩미팅 준비 : Self-Attentive Associative Memory (ICML 2020) [Introduction] 지금까지 external memory를 가지는 neural network는 memory를 1개(single)만 사용하였지만 이 논문에서는 2개의 메모리(item memory, relational memory)를 사용하여 represnetation 을 저장할 수 있다. 논문에서 새롭게 제안하는 모델은 SAM(Self-Attentive Associative Memory) operator 이다. [Methods] 1. Outer product attention (OPA) 'Attention is all you need' 의 dot product attention(DP..
백준 11654번 a = input() print(ord(a)) * 아스키 코드(ASCII) -> 문자(str) 변환 : chr() 함수 ex) chr(65) >> 'A' * 문자 -> 아스키코드 변환: ord() 함수 ex) ord('A') >> 65 아스키 코드 표 백준 10809번 import sys S = list(sys.stdin.readline().rstrip()) def Num(S): L = [] num = [] for i in range(97, 123): # ASCII number L.append(i) num.append(-1) for j, l in enumerate(L): for n, c in enumerate(S): if ord(c) == l: if num[j] != -1: pass e..
백준 15596번: 정수 N개의 합 함수 만들기 Python 2, Python 3, PyPy, PyPy3: def solve(a: list) -> int a: 합을 구해야 하는 정수 n개가 저장되어 있는 리스트 (0 ≤ a[i] ≤ 1,000,000, 1 ≤ n ≤ 3,000,000) 리턴값: a에 포함되어 있는 정수 n개의 합 (정수) [ref] https://www.acmicpc.net/problem/15596 15596번: 정수 N개의 합 C++17, Java 8, Python 3, C11, PyPy3, C99, C++98, C++11, C++14, Python 2, PyPy2, Go, C99 (Clang), C++98 (Clang), C++11 (Clang), C++14 (Clang), C11 (..
백준 8958번 import sys n = int(sys.stdin.readline().rstrip()) for i in range(n): s = 0 m = 0 p = 'X' str = sys.stdin.readline().rstrip() for c in str: if c == 'O': if p != 'O': p = 'O' m += 1 else: m += 1 s += m else: m = 0 p = 'X' print(s) * 조금 생각해야하는 문제였다 백준 4344번 import sys num = int(sys.stdin.readline().rstrip()) for n in range(num): i = 0 L = list(map(int, sys.stdin.readline().rstrip().split()..
섬섬옥수수
'분류 전체보기' 카테고리의 글 목록 (15 Page)