Jayden`s
[๋ฅ๋ฌ๋, CV] ์คํ ์ธ์ฝ๋, ์ ์ฌ ๋ฒกํฐ, ์ด์์น ํ์ง, ๋ ธ์ด์ฆ ์ ๊ฑฐ
์คํ ์ธ์ฝ๋(AutoEncoder, AE) ์ ๋ ฅ ๋ฐ์ดํฐ๋ฅผ ์ ์ฐจ์์ ๋ฒกํฐ(์ ์ฌ ๋ฒกํฐ ; Latent Vector)๋ก ์์ถํ๊ณ ๋ค์ ์๋ ํฌ๊ธฐ์ ์ถ๋ ฅ ๋ฐ์ดํฐ๋ก ๋ณต์ํ๋ ์ ๊ฒฝ๋ง์ ๋๋ค. ์คํ ์ธ์ฝ๋์ ๊ฐ์ฅ ์ค์ํ ๋ชฉ์ ์ ์ธ์ฝ๋์ ๋์ฝ๋ ์ฌ์ด์ ์ ์ฌ ๋ฒกํฐ๋ฅผ ์ผ๋ง๋ ์ ์ป์ด๋ด๋๋ ์ ๋๋ค. ์คํ ์ธ์ฝ๋๋ ๋น์ง๋ํ์ต์ ์ผ์ข ์ผ๋ก, ์ ๋ ฅ๊ฐ์ ์ ๋ต์ผ๋ก๋ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์๊ธฐ์ง๋ํ์ต์ด๊ธฐ๋ ํฉ๋๋ค. ์ ์ฌ ๋ฒกํฐ(Latent Vector) ์คํ ์ธ์ฝ๋์์ ๊ฐ์ฅ ์ค์ํ ๋ชฉ์ ์ผ๋ก, ์ ๋ ฅ๊ฐ์ ๋ํ ์ค์ํ ํน์ฑ๋ค์ด ๊ฐ์ฅ ํจ์จ์ ์ผ๋ก ์ ์ฅ๋๊ฒ๋ ํ์ต๋ฉ๋๋ค. ์๋ณธ ๋ฐ์ดํฐ๋ฅผ ์์ถ ํ ๋ค์ ๋ณต์ํ๊ณ ๊ทธ ๋ณต์๊ฐ๊ณผ ์๋ณธ ๋ฐ์ดํฐ(์ ๋ ฅ๊ฐ์ด์ ์ค์ ๊ฐ)์ ๋น๊ตํ์ฌ ๊ฐ์ค์น๊ฐ ์กฐ์ ๋๋ฉฐ ์ ์ฌ๋ฒกํฐ๊ฐ ๊ฒฐ์ ๋ฉ๋๋ค. ์ด์์น ํ์ง(Anomaly Detection) ์ ์์ผ๋ก ๊ท์ ..
[1712] ์์ต๋ถ๊ธฐ์
import sys A, B, C = map(int, sys.stdin.readline().rstrip().split()) if B >= C: print(-1) else: nums = A // (C - B) print(nums + 1) 1712 ์์ต๋ถ๊ธฐ์ ๊ต์ฅํ ์ฌ์ด ๋ฌธ์ ์ธ๋ฐ, ํ์คํ ์ด๋ฐ ๋ฌธ์ ์์ ํ๋ก๊ทธ๋๋ฐ์ ์ธ ์ฌ๊ณ ๊ฐ ์ฐ์ด๋ ๊ฒ ๊ฐ๋ค. ๊ทธ๋ฅ for๋ฌธ์ ํตํด์ count ์ฒ๋ฆฌํ๋ฉด ํจ์ฌ ์๊ฐ์ด ๊ฑธ๋ฆฌ๋๋ฐ ์ด๋ ๊ฒ ๋๋ ๋ฒ๋ฆฌ๋ ์์ผ๋ก ํ๋ฉด ๊ธ๋ฐฉ ๊ตฌํด์ง๋ค.
[1316]๊ทธ๋ฃน ๋จ์ด ์ฒด์ปค
import sys N = int(sys.stdin.readline()) for _ in range(N): noun = sys.stdin.readline().rstrip() arr = [] temp = 0 for alp in noun: arr.append(alp) if len(arr) == 1: continue else: for i in range(len(arr) - 1): if arr[i] != arr[i+1]: temp += 1 if temp >= len(set(arr)): N -= 1 print(N) 1316 ๊ทธ๋ฃน ๋จ์ด ์ฒด์ปค
[2941]ํฌ๋ก์ํฐ์ ์ํ๋ฒณ
import sys alp_cro = sys.stdin.readline().rstrip() arr = ['c=', 'c-', 'dz=', 'd-', 'lj', 'nj', 's=', 'z='] for alp in arr: if alp in alp_cro: alp_cro = alp_cro.replace(alp, '*') print(len(alp_cro)) 2941 ํฌ๋ก์ํฐ์ ์ํ๋ฒณ
[5622]๋ค์ด์ผ
import sys alp_arr = sys.stdin.readline().rstrip() time_tot = 0 for alp in alp_arr: if alp in 'ABC': time_tot += 3 elif alp in 'DEF': time_tot += 4 elif alp in 'GHI': time_tot += 5 elif alp in 'JKL': time_tot += 6 elif alp in 'MNO': time_tot += 7 elif alp in 'PQRS': time_tot += 8 elif alp in 'TUV': time_tot += 9 else: time_tot += 10 print(t..