์ „์ฒด ๊ธ€

์ „์ฒด ๊ธ€

    [ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/์ฟผ๋ฆฌ๋ฌธ ์—ฐ์Šต] SUM, MAX, MIN

    1. ์ตœ๋Œ“๊ฐ’ ๊ตฌํ•˜๊ธฐ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ์ตœ๋Œ“๊ฐ’ ๊ตฌํ•˜๊ธฐ | ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ANIMAL_INS ํ…Œ์ด๋ธ”์€ ๋™๋ฌผ ๋ณดํ˜ธ์†Œ์— ๋“ค์–ด์˜จ ๋™๋ฌผ์˜ ์ •๋ณด๋ฅผ ๋‹ด์€ ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. ANIMAL_INS ํ…Œ์ด๋ธ” ๊ตฌ์กฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์œผ๋ฉฐ, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE๋Š” ๊ฐ๊ฐ ๋™๋ฌผ์˜ ์•„์ด๋””, ์ƒ๋ฌผ ์ข…, ๋ณดํ˜ธ ์‹œ์ž‘์ผ, ๋ณดํ˜ธ ์‹œ์ž‘ ์‹œ ์ƒํƒœ, ์ด๋ฆ„, ์„ฑ๋ณ„ ๋ฐ ์ค‘์„ฑํ™” ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. NAME TYPE NULLABLE ANIMAL_ID VARCHAR(N) FALS programmers.co.kr [์ •๋‹ต ์ ‘์–ด๋†“์Œ] ๋”๋ณด๊ธฐ SELECT MAX(DATETIME) AS '์‹œ๊ฐ„' FROM ANIMAL_INS LIMIT 1; ๋˜๋Š” SELECT DATETI..

    [ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/์ฟผ๋ฆฌ๋ฌธ ์—ฐ์Šต] SELECT

    1. ๋ชจ๋“  ๋ ˆ์ฝ”๋“œ ์กฐํšŒํ•˜๊ธฐ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ๋ชจ๋“  ๋ ˆ์ฝ”๋“œ ์กฐํšŒํ•˜๊ธฐ | ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ANIMAL_INS ํ…Œ์ด๋ธ”์€ ๋™๋ฌผ ๋ณดํ˜ธ์†Œ์— ๋“ค์–ด์˜จ ๋™๋ฌผ์˜ ์ •๋ณด๋ฅผ ๋‹ด์€ ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. ANIMAL_INS ํ…Œ์ด๋ธ” ๊ตฌ์กฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์œผ๋ฉฐ, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE๋Š” ๊ฐ๊ฐ ๋™๋ฌผ์˜ ์•„์ด๋””, ์ƒ๋ฌผ ์ข…, ๋ณดํ˜ธ ์‹œ์ž‘์ผ, ๋ณดํ˜ธ ์‹œ์ž‘ ์‹œ ์ƒํƒœ, ์ด๋ฆ„, ์„ฑ๋ณ„ ๋ฐ ์ค‘์„ฑํ™” ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. NAME TYPE NULLABLE ANIMAL_ID VARCHAR(N) FALS programmers.co.kr [์ •๋‹ต ์ ‘์–ด๋†“์Œ] ๋”๋ณด๊ธฐ SELECT * from animal_ins order by animal_id; 2. ์—ญ์ˆœ ์ •๋ ฌํ•˜๊ธฐ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ..

    [๋ฐฑ์ค€/c++] 1012๋ฒˆ - ์œ ๊ธฐ๋† ๋ฐฐ์ถ”

    ๋ฌธ์ œ 1012๋ฒˆ: ์œ ๊ธฐ๋† ๋ฐฐ์ถ” ์ฐจ์„ธ๋Œ€ ์˜๋†์ธ ํ•œ๋‚˜๋Š” ๊ฐ•์›๋„ ๊ณ ๋žญ์ง€์—์„œ ์œ ๊ธฐ๋† ๋ฐฐ์ถ”๋ฅผ ์žฌ๋ฐฐํ•˜๊ธฐ๋กœ ํ•˜์˜€๋‹ค. ๋†์•ฝ์„ ์“ฐ์ง€ ์•Š๊ณ  ๋ฐฐ์ถ”๋ฅผ ์žฌ๋ฐฐํ•˜๋ ค๋ฉด ๋ฐฐ์ถ”๋ฅผ ํ•ด์ถฉ์œผ๋กœ๋ถ€ํ„ฐ ๋ณดํ˜ธํ•˜๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ํ•œ๋‚˜๋Š” ํ•ด์ถฉ ๋ฐฉ์ง€์— ํšจ๊ณผ์ ์ธ ๋ฐฐ์ถ”ํฐ์ง€๋ ์ด๋ฅผ ๊ตฌ์ž…ํ•˜๊ธฐ๋กœ ๊ฒฐ์‹ฌํ•œ๋‹ค. ์ด ์ง€๋ ์ด๋Š” ๋ฐฐ์ถ”๊ทผ์ฒ˜์— ์„œ์‹ํ•˜๋ฉฐ ํ•ด์ถฉ์„ ์žก์•„ ๋จน์Œ์œผ๋กœ์จ ๋ฐฐ์ถ”๋ฅผ ๋ณดํ˜ธํ•œ๋‹ค. ํŠนํžˆ, ์–ด๋–ค ๋ฐฐ์ถ”์— ๋ฐฐ์ถ”ํฐ์ง€๋ ์ด๊ฐ€ ํ•œ ๋งˆ๋ฆฌ๋ผ๋„ ์‚ด๊ณ  ์žˆ์œผ๋ฉด ์ด ์ง€๋ ์ด๋Š” ์ธ์ ‘ํ•œ ๋‹ค๋ฅธ ๋ฐฐ์ถ”๋กœ ์ด๋™ํ•  ์ˆ˜ ์žˆ์–ด, ๊ทธ ๋ฐฐ์ถ”๋“ค ์—ญ์‹œ ํ•ด์ถฉ์œผ๋กœ๋ถ€ํ„ฐ ๋ณดํ˜ธ๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค. ( www.acmicpc.net ํ’€์ด ๋ถ„๋ฅ˜ : ๊ทธ๋ž˜ํ”„, DFS 1. ๋ฐญ์„ ๋‚˜ํƒ€๋‚ผ int 2์ฐจ๋ฐฐ์—ด, ๋ฐฉ๋ฌธ์ฒดํฌํ•  bool 2์ฐจ๋ฐฐ์—ด์„ ์„ ์–ธํ•ฉ๋‹ˆ๋‹ค. 2. field[0][0] ~ field[M-1][N-1] ๊นŒ์ง€ for๋ฌธ์œผ๋กœ ๋Œ๋ฉด์„œ,..

    [๋งํฌ] HTTP ์„œ๋ฒ„ ์‘๋‹ต ์ฝ”๋“œ (Response Code) ์ •๋ฆฌ_1

    ์ถœ์ฒ˜ : https://ooz.co.kr/260 HTTP ์„œ๋ฒ„ ์‘๋‹ต ์ฝ”๋“œ (Response Code) ์ •๋ฆฌ ์˜ค๋Š˜์€ HTTP ํ†ต์‹  ์‹œ, ์„œ๋ฒ„์—์„œ ๋ณด๋‚ด์ฃผ๋Š” ์‘๋‹ต ์ฝ”๋“œ์— ๋Œ€ํ•ด ๊ฐ„๋‹จํžˆ ์ •๋ฆฌํ•ด ๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. (๊ฐœ์ธ์ ์œผ๋กœ๋„ ๊ฐ€๋” ์‰ฝ๊ฒŒ ์ฐพ์•„๋ณด๋ ค๊ณ  ์ •๋ฆฌํ•˜๋Š” ๊ฒธ ํ•ด์„œ ๊ฒŒ์‹œ๋ฌผ์„ ์ž‘์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค.^^) ํด๋ผ์ด์–ธํŠธ(์›น ๋ธŒ๋ผ์šฐ์ €)์—์„œ ์„œ๋ฒ„.. ooz.co.kr 1. ๊ฐ Response Code ์— ๋”ฐ๋ฅธ ์‘๋‹ต Response Class Code Response Class ์˜๋ฏธ ์„ค๋ช… 1 Informational (์ •๋ณด) ๋ฆฌํ€˜์ŠคํŠธ๋ฅผ ๋ฐ›๊ณ , ์ฒ˜๋ฆฌ ์ค‘์— ์žˆ์Œ. 2 Success (์„ฑ๊ณต) ๋ฆฌํ€˜์ŠคํŠธ๋ฅผ ์ •์ƒ์ ์œผ๋กœ ์ฒ˜๋ฆฌํ•จ. 3 Redirection (๋ฆฌ๋””๋ ‰์…˜) ๋ฆฌํ€˜์ŠคํŠธ ์™„๋ฃŒ๋ฅผ ์œ„ํ•ด ์ถ”๊ฐ€ ๋™์ž‘์ด ํ•„์š”ํ•จ. 4 Client Error (ํด๋ผ์ด์–ธํŠธ ..

    [Mysql/๊ฐ•์ขŒ] SQL Full Tutorial Course using MySQL Database

    *ํ”Œ๋ ˆ์ด ๋ฆฌ์ŠคํŠธ ์ž…๋‹ˆ๋‹ค. ์šฐ์ธก ์ƒ๋‹จ์˜ ไธ‰ ์•„์ด์ฝ˜์„ ํด๋ฆญํ•˜๋ฉด ์ „์ฒด๋ชฉ๋ก์ด ๋‚˜์˜ต๋‹ˆ๋‹ค.

    [๋งํฌ/์นดํŽ˜24/์›๊ฒฉ๋ฐ์Šคํฌํ†ฑ์—ฐ๊ฒฐ] ์œˆ๋„์šฐ ์„œ๋ฒ„ ์ ‘์†ํ•˜๊ธฐ ๊ฐ€์ด๋“œ

    [์œˆ๋„์šฐ] ์œˆ๋„์šฐ ์„œ๋ฒ„ ์ ‘์†ํ•˜๊ธฐ (์›๊ฒฉ๋ฐ์Šคํฌํƒ‘ ์—ฐ๊ฒฐ ์ด์šฉ) ์นดํŽ˜24 ์„œ๋ฒ„ํ˜ธ์ŠคํŒ… Guide ์œˆ๋„์šฐ ์„œ๋ฒ„ ์ ‘์†ํ•˜๊ธฐ (์›๊ฒฉ๋ฐ์Šคํฌํƒ‘ ์—ฐ๊ฒฐ ์ด์šฉ) - ์œˆ๋„์šฐ ์„œ๋ฒ„๋Š” "์›๊ฒฉ๋ฐ์Šคํฌํƒ‘ ์ ‘์†" ํ”„๋กœ๊ทธ๋žจ์„ ์ด์šฉํ•ฉ๋‹ˆ๋‹ค. - ์ด ํ”„๋กœ๊ทธ๋žจ์€ ์œˆ๋„์šฐ์— ๊ธฐ๋ณธ์œผ๋กœ ํฌํ•จ์ด ๋˜.. blog.cafe24.com

    [Mysql/์„ค์น˜] Failed to connect to mysql at 127.0.0.1 with user root

    [Mysql/์„ค์น˜] Failed to connect to mysql at 127.0.0.1 with user root

    1. ์—๋Ÿฌ OS๋Š” ์œˆ๋„์šฐ10. mysql-installer-community-5.7.24.0๋กœ mysql์„ ์„ค์น˜ํ•œ๋’ค, mysql workbench๋กœ ํ…Œ์ŠคํŠธ์ ‘์† ํ–ˆ์„ ์‹œ ๋œจ๋Š” ์—๋Ÿฌ์˜€๋‹ค. ์•„๋ž˜์˜ ์‚ฌ์ง„์ฒ˜๋Ÿผ ๋กœ์ปฌ ์„œ๋น„์Šค์—๋„ mysql57๊ฐ€ ๋œจ์ง€ ์•Š์•˜๋‹ค. 2. ํ•ด๊ฒฐ๋ฐฉ๋ฒ• 1. ์ œ์–ดํŒ - ํ”„๋กœ๊ทธ๋žจ์ œ๊ฑฐ ์—์„œ mysql๊ด€๋ จ ์„ค์น˜ํŒŒ์ผ๋“ค ๋ชจ์กฐ๋ฆฌ ์‚ญ์ œ + MySQL Installer - Community๊นŒ์ง€ ์‚ญ์ œํ•ด์ค€๋‹ค. 2. C:\Program Files\MySQL ์•ˆ์— ์ƒ์„ฑ๋œ ํด๋” ๋ฐ ํŒŒ์ผ๋„ ๋ชจ์กฐ๋ฆฌ ์‚ญ์ œ. 3. ์•„๋ž˜์˜ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ mysql-installer-community-5.7.24.0 ๋กœ ๋‹ค์‹œ ์ฒ˜์Œ๋ถ€ํ„ฐ ์žฌ์„ค์น˜ํ•œ๋‹ค. *์„ค์น˜ ์ค‘ Accounts and Roles ํ•ญ๋ชฉ์„ ๋ฐ˜๋“œ์‹œ ์ž‘์„ฑํ•ด์ค˜์•ผ ํ•จ. Windows10์—์„œ M..

    [๋ฐฑ์ค€/c++] 11729๋ฒˆ - ํ•˜๋…ธ์ด ํƒ‘ ์ด๋™ ์ˆœ์„œ

    ๋ฌธ์ œ 11729๋ฒˆ: ํ•˜๋…ธ์ด ํƒ‘ ์ด๋™ ์ˆœ์„œ ์„ธ ๊ฐœ์˜ ์žฅ๋Œ€๊ฐ€ ์žˆ๊ณ  ์ฒซ ๋ฒˆ์งธ ์žฅ๋Œ€์—๋Š” ๋ฐ˜๊ฒฝ์ด ์„œ๋กœ ๋‹ค๋ฅธ n๊ฐœ์˜ ์›ํŒ์ด ์Œ“์—ฌ ์žˆ๋‹ค. ๊ฐ ์›ํŒ์€ ๋ฐ˜๊ฒฝ์ด ํฐ ์ˆœ์„œ๋Œ€๋กœ ์Œ“์—ฌ์žˆ๋‹ค. ์ด์ œ ์ˆ˜๋„์Šน๋“ค์ด ๋‹ค์Œ ๊ทœ์น™์— ๋”ฐ๋ผ ์ฒซ ๋ฒˆ์งธ ์žฅ๋Œ€์—์„œ ์„ธ ๋ฒˆ์งธ ์žฅ๋Œ€๋กœ ์˜ฎ๊ธฐ๋ ค ํ•œ๋‹ค. ํ•œ ๋ฒˆ์— ํ•œ ๊ฐœ์˜ ์›ํŒ๋งŒ์„ ๋‹ค๋ฅธ ํƒ‘์œผ๋กœ ์˜ฎ๊ธธ ์ˆ˜ ์žˆ๋‹ค. ์Œ“์•„ ๋†“์€ ์›ํŒ์€ ํ•ญ์ƒ ์œ„์˜ ๊ฒƒ์ด ์•„๋ž˜์˜ ๊ฒƒ๋ณด๋‹ค ์ž‘์•„์•ผ ํ•œ๋‹ค. ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š”๋ฐ ํ•„์š”ํ•œ ์ด๋™ ์ˆœ์„œ๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜๋ผ. ๋‹จ, ์ด๋™ ํšŸ์ˆ˜๋Š” ์ตœ์†Œ๊ฐ€ ๋˜์–ด์•ผ ํ•œ๋‹ค. ์•„๋ž˜ ๊ทธ๋ฆผ์€ ์›ํŒ์ด 5 www.acmicpc.net ํ’€์ด ๋ถ„๋ฅ˜ : ๋ถ„ํ•  ์ •๋ณต ์ฃผ์–ด์ง„ ์˜ˆ์ œ๋กœ ํ•˜๋…ธ์ด์˜ ํƒ‘ ์›๋ฆฌ๋ฅผ ์ƒ๊ฐํ•ด๋ด…๋‹ˆ๋‹ค. (1)์›ํŒ์˜ ๊ฐฏ์ˆ˜๊ฐ€ 1๊ฐœ์ผ ๊ฒฝ์šฐ -ํ•˜๋‚˜๋ฟ์ด๋ฏ€๋กœ 3๋ฒˆ๊ธฐ๋‘ฅ์œผ๋กœ ๋ฐ”๋กœ ์˜ฎ๊น๋‹ˆ๋‹ค. 1 3 (2)์›ํŒ์˜ ๊ฐฏ์ˆ˜๊ฐ€ 2๊ฐœ์ผ ..

    [Spring/์—๋Ÿฌ] org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 9

    1. ์ „์ฒด ์—๋Ÿฌ๋กœ๊ทธ(์ ‘์–ด๋‘ /์Šค์••์ฃผ์˜) ๋”๋ณด๊ธฐ HTTP Status 500 – Internal Server Error Type Exception Report Message An exception occurred processing JSP page /index.jsp at line 9 Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 9 6: 7: 8: 9: 10: 11: Stackt..

    [๋ฐฑ์ค€/c++] 1107๋ฒˆ - ๋ฆฌ๋ชจ์ปจ

    ๋ฌธ์ œ 1107๋ฒˆ: ๋ฆฌ๋ชจ์ปจ ์ฒซ์งธ ์ค„์— ์ˆ˜๋นˆ์ด๊ฐ€ ์ด๋™ํ•˜๋ ค๊ณ  ํ•˜๋Š” ์ฑ„๋„ N (0 ≤ N ≤ 500,000)์ด ์ฃผ์–ด์ง„๋‹ค. ๋‘˜์งธ ์ค„์—๋Š” ๊ณ ์žฅ๋‚œ ๋ฒ„ํŠผ์˜ ๊ฐœ์ˆ˜ M (0 ≤ M ≤ 10)์ด ์ฃผ์–ด์ง„๋‹ค. ๊ณ ์žฅ๋‚œ ๋ฒ„ํŠผ์ด ์žˆ๋Š” ๊ฒฝ์šฐ์—๋Š” ์…‹์งธ ์ค„์—๋Š” ๊ณ ์žฅ๋‚œ ๋ฒ„ํŠผ์ด ์ฃผ์–ด์ง€๋ฉฐ, ๊ฐ™์€ ๋ฒ„ํŠผ์ด ์—ฌ๋Ÿฌ ๋ฒˆ ์ฃผ์–ด์ง€๋Š” ๊ฒฝ์šฐ๋Š” ์—†๋‹ค. www.acmicpc.net ํ’€์ด ๋ถ„๋ฅ˜ : ์™„์ „ํƒ์ƒ‰, ์ˆ˜ํ•™ ์ฝ”๋“œ(O(nm)) *O(nm)์ด ์•„๋‹ˆ๋ผ๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค(--)(__)*

    [๋ฐฑ์ค€/c++] 10819๋ฒˆ - ์ฐจ์ด๋ฅผ ์ตœ๋Œ€๋กœ

    ๋ฌธ์ œ 10819๋ฒˆ: ์ฐจ์ด๋ฅผ ์ตœ๋Œ€๋กœ ์ฒซ์งธ ์ค„์— N (3 ≤ N ≤ 8)์ด ์ฃผ์–ด์ง„๋‹ค. ๋‘˜์งธ ์ค„์—๋Š” ๋ฐฐ์—ด A์— ๋“ค์–ด์žˆ๋Š” ์ •์ˆ˜๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. ๋ฐฐ์—ด์— ๋“ค์–ด์žˆ๋Š” ์ •์ˆ˜๋Š” -100๋ณด๋‹ค ํฌ๊ฑฐ๋‚˜ ๊ฐ™๊ณ , 100๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™๋‹ค. www.acmicpc.net ํ’€์ด ๋ถ„๋ฅ˜ : ์™„์ „ํƒ์ƒ‰ ๋ฌด์ž‘์œ„๋กœ ๋‚˜์—ด๋œ ์ˆ˜์—ด์—์„œ |A[0] - A[1]| + |A[1] - A[2]| + ... + |A[N-2] - A[N-1]| ์œ„ ์‹์˜ ์ตœ๋Œ“๊ฐ’์„ ๊ตฌํ•˜๋Š” ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. 1. algorithmํ—ค๋”์˜ next_permutationํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฌด์ž‘์œ„์˜ ์ˆ˜์—ด์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค. 2. ๋ฌด์ž‘์œ„๋กœ ๋งŒ๋“ค์–ด์ง„ ์ˆ˜์—ด์— ์œ„์˜ ์‹์„ ๋Œ€์ž…ํ•˜์—ฌ, ๊ฐ€์žฅ ํฐ ๊ฐ’์ด ๋‚˜์˜ฌ๋•Œ๋งˆ๋‹ค ์ตœ๋Œ“๊ฐ’์„ ๊ฐฑ์‹ ํ•ด์ค๋‹ˆ๋‹ค. ์ฝ”๋“œ(O(n+1)!) *O(n+1)!์ด ์•„๋‹ˆ๋ผ๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค(--)(__)*