๋ฌธ์ 1: ์ ๋ ฌ๋์ด ์๋ n๊ฐ์ ์ ์ ํค(์ฌ์ )์ ํ์ํ ํค k1, k2๋ฅผ ์ ๋ ฅ๋ฐ์, ์ฌ์ ์์ k1 ≤ k ≤ k2 ๋ฅผ ๋ง์กฑํ๋ ์์น๋ค์ ์ถ๋ ฅํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑ - ์ฌ๊ท ๋ฒ์ ๊ตฌํ ์ ๋ ฅ ์์ 1 8 –7 15 โฆ n=8, k1=–7, k2=15 -92 -31 -7 4 14 20 29 44 ์ถ๋ ฅ ์์ 1 โก2 3 4 โฆ ์ฌ์ ์์ -7์ ์์น๋ 2, 15๋ณด๋ค ์์ผ๋ฉด์ ๊ฐ์ฅ ํฐ ์์น๋ 4 ์ ๋ ฅ ์์ 2 8 33 40 โฆ n=8, k1=33, k2=40 -92 -31 -7 4 14 20 29 44 ์ถ๋ ฅ ์์ 2 โก-1 โฆ ๋ฌธ์ ์กฐ๊ฑด์ ๋ง์กฑํ๋ ์ฌ์ ์ ํค ์์ #include #include int t1 = 0; int t2 = NULL; int rFE(int k, int left, int right, int ..
์ด์งํ์ - ์ฌ๊ท ๋ฒ์ - x ≤ k ๋ฅผ ๋ง์กฑํ๋ ์ฌ์ ์ ํค x ์ค ๊ฐ์ฅ ํฐ ๊ฐ์ ์์น(์ฆ, ์ธ๋ฑ์ค) ์ถ๋ ฅ (์์น๋ 0๋ถํฐ ์์ํ๋ค๊ณ ๊ฐ์ ํ๊ณ , ์ ์กฐ๊ฑด์ ๋ง์กฑํ๋ x๊ฐ ์๋ ๊ฒฝ์ฐ –1 ์ถ๋ ฅ) - ์ฆ, ํค k๊ฐ ์กด์ฌํ๋ ๊ฒฝ์ฐ์๋ k์ ์์น๋ฅผ ์ถ๋ ฅํ๋ฉด ๋๊ณ , ๊ทธ๋ ์ง ์์ ๊ฒฝ์ฐ k๋ณด๋ค ์์ผ๋ฉด์ ๊ฐ์ฅ ํฐ ์์ ์์น๋ฅผ ์ถ๋ ฅํ๋ฉด ๋๋ค. ์ ๋ ฅ ์์ 1 8 -7 โฆ n = 8, k = –7 ์ถ๋ ฅ ์์ 1 -92 -31 -7 4 14 20 29 44 โก2 โฆ ์ฌ์ ์์ -7์ ์์น๋ 2 ์ ๋ ฅ ์์ 2 8 33 โฆ n = 8, k = 33 ์ถ๋ ฅ ์์ 2 -92 -31 -7 4 14 20 29 44 โก6 โฆ ๋ฌธ์ ์กฐ๊ฑด์ ๋ง์กฑํ๋ ์ฌ์ ์ ํค๋ 29์ด๊ณ , ์ฌ์ ์์ 29์ ์์น๋ 6 #include #include int n;/..
- - - #include #include #include int findPivot(int* x, int l, int r) { if (r - l = right) break; tmp = x[left]; x[left] = x[right]; x[right] = tmp; } tmp = x[left - 1]; x[left - 1] = x[l]; x[l] = tmp; return right; } void inPlaceQuickSort(int *x, int l, int r) { int k, a, b; int t; if (l >= r) return; k = findPivot(x, l, r); t = b = inPlacePartition(x, l, r, k); while (1) { if (x[t] != x[b]) { a..
๋ถํ ํต์น๋ฒ 1. ๋ถํ 2. ์ฌ๊ท 3. ํต์น ํฉ๋ณ์ ๋ ฌ: ๋ถํ ํต์น๋ฒ์ ๊ธฐ์ดํ ์ ๋ ฌ ์๊ณ ๋ฆฌ์ฆ - ํ ์ ๋ ฌ๊ณผ ๋ฌ๋ฆฌ ์ฐ์ ์์ ํ ์ฌ์ฉํ์ง X - ๋ฐ์ดํฐ๋ฅผ ์์ฐจ์ ๋ฐฉ์์ผ๋ก ์ ๊ทผ ๋จ์ผ์ฐ๊ฒฐ๋ฆฌ์คํธ๋ฅผ ์ด์ฉํ ํฉ๋ณ์ ๋ ฌ ๊ตฌํ(์ค๋ณต ์ ๋ ฅ O) ์ ๋ ฅ ์์ 1 3 โฆ n 4 9 1 ์ถ๋ ฅ ์์ 1 โก1 4 9 โฆ ์ ๋ ฌ ๊ฒฐ๊ณผ ์ ๋ ฅ ์์ 2 8 โฆ n 73 65 48 31 29 20 8 3 ์ถ๋ ฅ ์์ 2 โก3 8 20 29 31 48 65 73 โฆ ์ ๋ ฌ ๊ฒฐ๊ณผ #define _CRT_SECURE_NO_WARNINGS #include #include //ํฉ๋ณ์ ๋ ฌ typedef struct ListNode { int elem; struct ListNode* next; }node; void addList(node** L, int elem) {..
[์ ์๋ฆฌ ํ ์ ๋ ฌ] - ํ ์์ฑ ๋ฐฉ์์ ์ฝ์ ์, ์ํฅ์ ์ค ์๋ฌด๊ฑฐ๋ ์ฌ์ฉ - ์์ฐจํ์ ํตํด ๊ตฌํํ๋ค๋ฉด ์ถ๊ฐ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ฌ์ฉํ์ง ์๊ณ ์ ์๋ฆฌ ํ ์ ๋ ฌ์ด ๊ฐ๋ฅํจ - ์ ์ผํค - ์ค๋ณตํค - ์ค๋ณต ํค๋ฅผ ์ฒ๋ฆฌํ ์ ์๋๋ก ์์ฑ๋ ์๊ณ ๋ฆฌ์ฆ์ ์ ์ผ ํค ํ๊ฒฝ์์๋ ์ ํํ ์๋ํ๋ค. ํ์ง๋ง ์ ์ผ ํค๋ฅผ ์ฒ๋ฆฌํ ์ ์๋๋ก ์์ฑ๋ ์๊ณ ๋ฆฌ์ฆ์ ์ค๋ณต ํค ํ๊ฒฝ์์๋ ์ ํํ ์๋ํ๋ค๋ ๋ณด์ฅ์ ์์ >> ์ ์ผํค ์๊ณ ๋ฆฌ์ฆ์ = (๋ฑํธ) ๊ฒฝ์ฐ๋ฅผ ๋นผ์ง์์๋ค๋ฉด ์ค๋ณตํค ํ๊ฒฝ์์๋ ์๋ํ ๊ฒ์ด๋ผ๊ณ ๊ต์๋์ด ๊ฐ์ ์ค ์ธ๊ธํ์ฌ ์๋ ์ฝ๋๋ ์ํฅ์์ผ๋ก ํ์ ์์ฑํ๊ณ ์ฌ๊ทํจ์๋ฅผ ์ด์ฉํด์ ์ ์๋ฆฌ ํ ์ ๋ ฌ์ ํ๋ ์๊ณ ๋ฆฌ์ฆ์ด๋ค. #include #include int H[99];// ํ int n;// ํค ๊ฐ์(ํ์ ํฌ๊ธฐ) int s;// ํ์ ์๋ ํฌ๊ธฐ ์ ์ฅ..
[ํ ์์ฑ] 1. ์ฝ์ ์ >> ๋ชจ๋ ํค๋ค์ด ๋ฏธ๋ฆฌ ์ฃผ์ด์ง ๊ฒฝ์ฐ, ๋๋ ํค๋ค์ด ์ฐจ๋ก๋ก ์ฃผ์ด์ง๋ ๊ฒฝ์ฐ ์ ์ฉ ๊ฐ๋ฅ 2. ์ํฅ์ >> ๋ชจ๋ ํค๋ค์ด ๋ฏธ๋ฆฌ ์ฃผ์ด์ง ๊ฒฝ์ฐ๋ง ์ ์ฉ ๊ฐ๋ฅ 1. ์ฝ์ ์ ํ ์์ฑ #include #include int H[99]; // ํ ๋ฐฐ์ด int n = 0; // ํ์ ํฌ๊ธฐ void upHeap(int i) {// ket ์ฝ์ ํ ์ ๋ ฌํ๋ ํจ์ int tmp; if (i == 1) return; if (H[i] = right) {// ์ค๋ฅธ์ชฝ ์์๋ ธ๋๋ ์๋ค๋ฉด if (H[max] < H[right]) {//๊ทธ๋ฆฌ๊ณ ์ผ์ชฝ ์์๋ ธ๋ ๊ฐ๋ณด๋ค ์ค๋ฅธ์ชฝ ์์๋ ธ๋ ๊ฐ์ด ํฌ๋ค๋ฉด max = right;// max์ ์ค๋ฅธ์ชฝ ์์๋ ธ๋ ์ธ๋ฑ์ค๋ฅผ ์ ์ฅ } } if (H[max]

์ ๋ ฅ์์ 1 5 KimSooJin 010-1234-5678 ParkGilDong 010-2468-2468 ChungSangChul 010-1230-4567 LeeYoungHee 010-1357-2468 ChoiMyungHee 010-3458-1267 2468 ์ถ๋ ฅ์์ 1 2 LeeYoungHee 010-1357-2468 3 ParkGilDong 010-2468-2468 ์ฝ๋: #include #include #include struct customer { char id[5]; char* name; char* phone; }; int main() { struct customer* ct; int n, cnt = 0; char tmp1[51], tmp2[51]; int len1 = 0, len2 = 0; ch..

์ ๋ ฅ์์ 1 5 KimSooJin 010-1234-5678 ParkGilDong 010-2468-2468 ChungSangChul 010-1230-4567 LeeYoungHee 010-1357-2468 ChoiMyungHee 010-3458-1267 2468 ์ถ๋ ฅ์์1 2 ParkGilDong 010-2468-2468 4 LeeYoungHee 010-1357-2468 #include #include #include struct customer { char id[5]; char* name; char* phone; }; int main() { struct customer *ct; int n, cnt = 0; char tmp1[51], tmp2[51]; int len1 = 0, len2 = 0; char nu..

์ ๋ ฅ ์์ 1 ์ถ๋ ฅ ์์ 1 marriott 4 12.5 hyatt 5 7.4 ibis 2 5.6 novotel 3 2.7 renaissance 3 4.8 hyatt 5 7.4 bestwestern 2 3.8 0 3 7.5 #include #include #include struct hotel_info { char name[31]; int g; double d; }; int in_hotel_info(struct hotel_info* p); void out_hotel_info(struct hotel_info* p, int N, int G, double D); int main() { struct hotel_info ht[100]; int N = 0; int G; double D; N = in_hotel_in..

์ ๋ ฅ ์์ 1 ์ถ๋ ฅ ์์ 1 red orange yellow green orange red 1 orange 2 yellow 1 green 1 ์ ๋ ฅ ์์ 2 ์ถ๋ ฅ ์์ 2 yellow pink red yellow pink yellow yellow 3 pink 2 red 1 #include #include #include int main() { int i = 0, t = 1; char A[101], str[20][51], str2[20][51]; int cnt[20]; gets(A); int k = 0, s = 0; while (A[i] != '\0') { if (A[i] != ' ' && A[i]!='\0') { str[k][s] = A[i]; s++; } else { str[k][s] = '\0'; k+..
- Total
- Today
- Yesterday
- SKTECHSUMMIT
- ์ฝํ ์ค๋น
- ํ์ด์ฌ
- AIRUSH
- ๋ ผ๋ฌธ๋ฆฌ๋ทฐ
- Gaussian Splatting
- ํ๋ก๊ทธ๋๋จธ์ค
- AI์ปจํผ๋ฐ์ค
- dreambooth
- ํ ํฌ์๋ฐ
- AIRUSH2023
- SQL
- gan
- MYSQL
- ๋ ผ๋ฌธ์ฝ๊ธฐ
- CLOVAX
- Aimers
- C์ธ์ด
- ์ฝ๋ฉ๊ณต๋ถ
- ์คํ ์ด๋ธ๋ํจ์
- ํ์ด์ฌ์ฝํ
- 3d-gs
- lgaimers
- ์ปดํจํฐ๋น์
- gs๋ ผ๋ฌธ
- ๋๋ฆผ๋ถ์ค
- Paper review
- ์ฝ๋ฉ์๋ฌ
- ๋ ผ๋ฌธ
- 2d-gs
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 | 29 | 30 |