
๋ฐฑ์ค 18870๋ฒ ๋ฌธ์ ์ ๋๋ค Xi > Xj ๋ฅผ ๋ง์กฑํ๋๋ก ์ขํ๋ฅผ ์์ถ์ํค๋ผ๊ณ ํฉ๋๋ค. ๋ฌธ์ ๋ง๋ด์๋ ์ดํด๊ฐ ์ ์๊ฐ๋๋ฐ ์ ์ถ๋ ฅ์ ๋ณด์๋ฉด ์ดํด๊ฐ ์ ๊ฐ์ค๊ฒ๋๋ค 2 4 -10 4 -9 ์ขํ๋ 2 3 0 3 1 ์ขํ๋ก ์์ถํ ์ ์๋ค๊ณ ํฉ๋๋ค ------------------------------------------------------------------------------- ํ์ด ์ ๋๋ค. ๋ฐฐ์ด [-10, -9, 2, 4, 4] ์ด ์๋ค๊ณ ํ๋ฉด 2 4 -10 4 -9 ์ ์์ถ๋ ์ขํ๋ ๋ฐฐ์ด์ index๊ฐ์ด๋ผ๊ณ ๋ณผ ์ ์์ ๊ฒ ๊ฐ์์. ๊ทธ๋์ 1. ์ ๋ ฅ๋ฐ์ ๋ฐฐ์ด ์ ๋ ฌ 2. ์ค๋ณต ์ ๊ฑฐ 3. ์ ๋ ฅ๋ฐ์ ๋ฐฐ์ด ์์๋๋ก ์ ๋ ฌ๋ ๋ฐฐ์ด์ index ์ถ๋ ฅ ์ ๋๋ค. import sys N = int(input()) inp..

๋ฐฑ์ค 1107๋ฒ ๋ฆฌ๋ชจ์ปจ ๋ฌธ์ ์ ๋๋ค ํ์ฌ ์ฑ๋์ 100๋ฒ์ด๊ณ ๋ฆฌ๋ชจ์ปจ์๋ +, -, 0 ~ 9 ๋ฒํผ์ด ์์ต๋๋ค. ์ ์ถ๋ ฅ์ ๋๋ค. ์ด๋ ๊ฒ ๊ณ ์ฅ๋ ๋ฒํผ๊ณผ ๋ชฉํ์ฑ๋์ ์ ๋ ฅ์ผ๋ก ๋ฐ์ต๋๋ค ์ ๋ฒํผ๋ค์ ์ด์ฉํ์ฌ ์ต์ ํ์๋ก ๋ชฉํ ์ฑ๋๋ก ๊ฐ๋ ์๋ฅผ ๊ตฌํ๋ ๋ฌธ์ ์ ๋๋ค ์๊ณ ๋ฆฌ์ฆ ๋ถ๋ฅ๋ brute force ์ ๋๋ค --------------------------------------------------------------------------------------------------------------------------------------- ์ ์ ํ์ด๋ฐฉ๋ฒ์ ๋๋ค. 1. ์ซ์ ๋ฒํผ์ผ๋ก ํน์ ์ฑ๋๋ก ๊ฐ ๋ค์์ +๋๋ - ๋ก ์ด๋ํ๋ ๋ฐฉ๋ฒ 2. + ๋๋ - ๋ง์ผ๋ก ๋ชฉํ ์ฑ๋๊น์ง ๊ฐ๋ ๋ฐฉ๋ฒ ์ด๋ ๊ฒ ๋๊ฐ์ง๋ก ๋ถ๋ฅํ๊ณ ์ด ๊ฐ๋ค..

๋ฐฑ์ค 9095๋ฒ์ 1, 2, 3 ๋ํ๊ธฐ ๋ฌธ์ ์ ๋๋ค ์ ์ถ๋ ฅ์ ์ด๋ฌํฉ๋๋ค ์ฐ์ 4๋ฅผ 1๊ณผ 2์ 3์ผ๋ก ํํํ๋ ๋ฐฉ๋ฒ์ 7๊ฐ์ง์ ๋๋ค. ์ฌ๊ธฐ์ 5๋ฅผ ํํํ๋ ๋ฐฉ๋ฒ์ผ๋ก๋ 4์์ 1์ ๋ํ๋๋ฐฉ๋ฒ (7๊ฐ์ง) 3์์ 2๋ฅผ ๋ํ๋ ๋ฐฉ๋ฒ 2์์ 3์ ๋ํ๋ ๋ฐฉ๋ฒ์ด ์์ต๋๋ค. 6์ ํํํ๋ ๋ฐฉ๋ฒ์ ๋์ผํ๊ฒ 5์์ 1์ ๋ํ๋ ๋ฐฉ๋ฒ 4์์ 2๋ฅผ ๋ํ๋ ๋ฐฉ๋ฒ 3์์ 3์ ๋ํ๋ ๋ฐฉ๋ฒ์ด ์๊ฒ ์ต๋๋ค. ๊ทธ๋์ N์ ํํํ๋ ๋ฐฉ๋ฒ์ผ๋ก๋ array[N] = array[N-1] + array[N-2] + array[N-3] ์ด๋ผ๊ณ ํ ์ ์๊ฒ ์ต๋๋ค ํ์ด์ฌ์ผ๋ก ์์ฑํ ์ฝ๋๋ ์ด๋ ์ต๋๋ค. import sys n = int(input()) arr = [0] * 11 arr[1] = 1 arr[2] = 2 arr[3] = 4 for i in r..

https://www.acmicpc.net/problem/1931 ๋ฌธ์ ์ ๋๋ค ํ๊ฐ์ ํ์์ค์ ์ต๋ค ํ์๊ฐ ์งํ๋๋๋ก ์๊ฐํ๋ฅผ ์์ฑํ๋ผ๊ณ ํฉ๋๋ค.์ถ๊ฐ๋ก ์์์๊ฐ๊ณผ ๋์๊ฐ์ด ๊ฐ์ ์๋ ์๋ค๊ณ ํฉ๋๋ค. ์ ์ถ๋ ฅ ์กฐ๊ฑด๊ณผ ํํธ๋ ์ด๋ฌํฉ๋๋ค. ํ์๋ฅผ ์ต๋ํ ๋ง์ด ์งํํ๊ธฐ์ํด์๋ 1. ์ผ์ฐ ๋๋๋ ์์ผ๋ก ๋จผ์ ํ์๋ฅผ ์ ๋ ฌํ๊ณ 2. ์ฒซ๋ฒ์งธ(n)ํ์ ๋๋๋ ์๊ฐ ์ด๋ ๊ฒ ์ ๊ทผํ์์ต๋๋ค ๊ทธ๋์ ์ ๋ ฌํ ๋ฐฐ์ด์ ํฌ๋ฌธ์ผ๋ก ๋๋๋ฐ2๋ฒ์กฐ๊ฑด์ ํด๋นํ๋ฉด countํ๋๋ก ํ์์ต๋๋ค. import sysn = int(input())endPoint: int = 0answer: int = 0arr = []for i in range(0,n): a, b = map(int,sys.stdin.readline().rstrip..

๋ฐฑ์ค 1074๋ฒ Z ์ ๋๋ค. ๋ฌธ์ ๋ฅผ ๋ณด์๋ฉด, ( ์ด๋ฏธ์ง ํด๋ฆญํ๋ฉด ํฌ๊ฒ ๋ณผ ์ ์์ ) ๋ฐฐ์ด์ ํฌ๊ธฐ๋ ๊ฐ๋ก (2 ** N ) * ์ธ๋ก (2 ** N) ์ด๋ฉฐ, ๊ทธ ๋ฐฐ์ด์์๋ ์์ ๊ฐ์ z ๋ชจ์์ ๊ท์น์ ๊ฐ์ง๋ฉฐ ์ซ์๊ฐ ๋ค์ด๊ฐ๋๋ค. ๊ทธ๋ฌ์๋ (r,c) ์ขํ์ ํด๋นํ๋ ์ซ์๋ฅผ ๊ตฌํ๋ฉด ๋ฉ๋๋ค. ์์ ์ ๋ ฅ2 ( 3, 7, 7 ) ์์ ๋ฅผ ๋ณผ๊ฒ์. N์ด 3์ผ๋ , 7ํ 7์ด์ ๊ฐ์ด 63์ธ ๋ชจ์ต. ( ๊ณ ๋ฏผํ์.. ) ----------------------------------------------------------- ๋ฌธ์ ์ ํ์ ๋ถํ ์ ๋ณต๊ณผ ์ฌ๊ท๋ผ๊ณ ํ๋ค์ ๊ฐ๋จํด ๋ณด์ด์ง๋ง ์๋นํ ์ด๋ ค์ ์ต๋๋ค ใ .. 2์ n๊ฐ๋งํผ ๋ฐฐ์ด์ ๋ง๋ค๊ณ ์ซ์๋ฅผ ๋ฃ๊ณ ์ขํ์ ํด๋นํ๋ ๊ฐ์ ์ฐพ์ผ๋ ค๊ณ ํ์ผ..
- Total
- Today
- Yesterday
- swift urlsession ๊ณตํตํ
- swift excel read
- rag ๊ธฐ๋ฐ llm ์ฑ๋ด
- chatgpt rag llm
- swift filemanager excel
- ๋ ๋์ธ์ด ์ดํ
- ์๋์ํํธ ๋ ์ด์ธ์ด
- swift ์์ ์ฝ๊ธฐ
- swift urlsession module
- readysay
- swift ์์ ๊ฐ์ ธ์ค๊ธฐ
- swift network module
- swift network refactoring
- swift urlsession refactoring
- swift network ๊ณตํตํ
- swift get excel
- llm csv
- ๋ ๋์ธ์ด
- swift ๋คํธ์ํฌ ๋ชจ๋ํ
- swift ์๊ฐ
- swift urlsession network module
- swift queryitem encode
- rag llm pdf
- filemanager excel read
- focus timer ์ดํ
- ๊ณต๋ถ ํ์ด๋จธ ์ดํ
- swift filemanager get excel
- swift urlcomponent encode
- rag ๊ธฐ๋ฐ llm
- llm pdf rag
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |