๋ถํ ํต์น๋ฒ 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+..
์ ๋ ฅ ์์ 1 ์ถ๋ ฅ ์์ 1 red orange yellow green orange orange โฆ ๋ฌธ์์ด์์ ์ค๋ณต๋ ๋จ์ด๋ orange์ด๋ค. ์ ๋ ฅ ์์ 2 ์ถ๋ ฅ ์์ 2 pink red yellow black yellow purple yellow #include #include #include int main() { int i = 0, cnt = 0, t = 0; char A[101], str[20][101]; 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++; s = 0; } i++; } str[k][s] =..
1. ์ฝ๋: #include #include #include int isPalindrome(char A[], int n, int i) { if (n < 2) return 1; else if (A[i] != A[n - 1]) return 0; else isPalindrome(A, n - 1, ++i); } int main() { char A[100]; gets(A); printf("%d", isPalindrome(A, strlen(A), 0)); } 2. ์ฝ๋: #include #include #include void divide(int a, int b, int cnt) { if (a < b) printf("%d %d", cnt, a); else { cnt++; divide(a - b, b, cnt); }..
1. ์ฝ๋: int _max(int a[], int m, int b) { if (b == 0) return m; if (a[b - 1] >= m) m = a[b - 1]; return _max(a, m, b - 1); } int main() { int n, x[20]; scanf("%d", &n); for (int i = 0; i 1) { hanoi(n - 1, A, C, B); printf("%c %c\n", A, C)..
- Total
- Today
- Yesterday
- ๊ตฌ๊ธ์ฝ๋ฉ
- SKTECHSUMMIT
- WGAN
- ๋ ผ๋ฌธ์ฝ๊ธฐ
- ์ฝ๋ฉ์๋ฌ
- gan
- ์ฝํ ์ค๋น
- lgaimers
- ์คํ ์ด๋ธ๋ํจ์
- C์ธ์ด
- SQL
- ์ฝํ
- ๋ ผ๋ฌธ๋ฆฌ๋ทฐ
- dreambooth
- Aimers
- ์ฝ๋ฉ๊ณต๋ถ
- ํ์ด์ฌ์ฝํ
- DALLE
- ํ ํฌ์๋ฐ
- AIRUSH2023
- HyperCLOVA
- AI์ปจํผ๋ฐ์ค
- CLOVAX
- AIRUSH
- StableDiffusion
- MYSQL
- ํ๋ก๊ทธ๋๋จธ์ค
- ๊ธฐ์ ์ปจํผ๋ฐ์ค
- ํ์ด์ฌ
- ๋๋ฆผ๋ถ์ค
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 | 31 |