{"id":27726,"date":"2024-10-27T14:43:25","date_gmt":"2024-10-27T14:43:25","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=27726"},"modified":"2024-11-26T07:15:49","modified_gmt":"2024-11-26T07:15:49","slug":"c-%ec%bd%94%eb%94%a9%ed%85%8c%ec%8a%a4%ed%8a%b8-%ea%b0%95%ec%a2%8c-%ec%a1%b0%ec%95%bd%eb%8f%8c-%ea%ba%bc%eb%82%b4%ea%b8%b0-2","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/27726\/","title":{"rendered":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30"},"content":{"rendered":"<p><body><\/p>\n<h2>1. \ubb38\uc81c \uc815\uc758<\/h2>\n<p>\n    \uc8fc\uc5b4\uc9c4 n\uac1c\uc758 \uc870\uc57d\ub3cc \uc911\uc5d0\uc11c m\uac1c\uc758 \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub824\uace0 \ud560 \ub54c, \uc5b4\ub5a4 \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub294 \uac83\uc774 \uac00\uc7a5 \uc88b\uc740 \uc120\ud0dd\uc778\uc9c0 \uc54c\uc544\ubcf4\ub294 \ubb38\uc81c\uc785\ub2c8\ub2e4.<br \/>\n    \uc774 \ubb38\uc81c\ub294 \ud0d0\uc695 \uc54c\uace0\ub9ac\uc998(Greedy Algorithm)\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud574\uacb0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc785\ub825\uc73c\ub85c\ub294 \uac01 \uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\uac00 \uc8fc\uc5b4\uc9c0\uba70,<br \/>\n    \uaebc\ub0bc \uc870\uc57d\ub3cc\ub4e4\uc758 \ucd1d \ubb34\uac8c\uac00 \ucd5c\ub300 K\uac00 \ub418\ub3c4\ub85d \ud574\uc57c \ud569\ub2c8\ub2e4.\n<\/p>\n<h2>2. \ubb38\uc81c \uc774\ud574<\/h2>\n<p>\n<strong>\uc785\ub825:<\/strong><br \/>\n    &#8211; \uccab \ubc88\uc9f8 \uc904 : \uc870\uc57d\ub3cc\uc758 \uac1c\uc218 n (1 \u2264 n \u2264 100) <br \/>\n    &#8211; \ub450 \ubc88\uc9f8 \uc904 : \uaebc\ub0b4\uc57c \ud560 \uc870\uc57d\ub3cc\uc758 \uac1c\uc218 m (1 \u2264 m \u2264 n) <br \/>\n    &#8211; \uc138 \ubc88\uc9f8 \uc904 : \uc870\uc57d\ub3cc\uc758 \uac1c\uc218 n\uac1c\uc5d0 \ub300\ud55c \ubb34\uac8c (1 \u2264 weight \u2264 1000)<br \/>\n<strong>\ucd9c\ub825:<\/strong><br \/>\n    &#8211; \uaebc\ub0b8 \uc870\uc57d\ub3cc\ub4e4\uc758 \ubb34\uac8c\uc758 \ucd1d\ud569\uc774 \ucd5c\ub300 K\uac00 \ub418\ub3c4\ub85d \ud560 \ub54c, \uadf8 \ucd1d\ud569\uc744 \uad6c\ud558\ub77c.\n<\/p>\n<h2>3. \uc608\uc2dc<\/h2>\n<p>\n<strong>\uc785\ub825 \uc608\uc2dc:<\/strong><br \/>\n    5<br \/>\n    3<br \/>\n    1 2 3 4 5<br \/>\n<strong>\ucd9c\ub825 \uc608\uc2dc:<\/strong><br \/>\n    12 (3 + 4 + 5)\n<\/p>\n<h2>4. \uc54c\uace0\ub9ac\uc998 \uc124\uacc4<\/h2>\n<p>\n    \uc774 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574\uc11c\ub294 \uc6b0\uc120 \uc8fc\uc5b4\uc9c4 \uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\ub97c \uc815\ub82c\ud55c \ud6c4, \uac00\uc7a5 \ubb34\uac70\uc6b4 \uc870\uc57d\ub3cc\ubd80\ud130 m\uac1c\ub97c \uc120\ud0dd\ud558\ub294 \uacfc\uc815\uc744 \uac70\uccd0\uc57c \ud569\ub2c8\ub2e4.<br \/>\n    \uc774\ub54c, \uc120\ud0dd\ub41c \uc870\uc57d\ub3cc\uc758 \ucd1d \ubb34\uac8c\ub97c \uacc4\uc0b0\ud558\uc5ec \uacb0\uacfc\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4. \uc54c\uace0\ub9ac\uc998\uc758 \ub2e8\uacc4\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n<\/p>\n<ul>\n<li>\uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\ub97c \uc624\ub984\ucc28\uc21c\uc73c\ub85c \uc815\ub82c\ud55c\ub2e4.<\/li>\n<li>\uc815\ub82c\ub41c \uc870\uc57d\ub3cc\uc758 \ub9c8\uc9c0\ub9c9 m\uac1c\ub97c \uc120\ud0dd\ud55c\ub2e4.<\/li>\n<li>\uc120\ud0dd\ub41c \uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\ub97c \ud569\uc0b0\ud558\uc5ec \uacb0\uacfc\ub97c \ucd9c\ub825\ud55c\ub2e4.<\/li>\n<\/ul>\n<h2>5. \ucf54\ub4dc \uad6c\ud604<\/h2>\n<p>\n    \uc774\uc81c \uc704\uc758 \uc54c\uace0\ub9ac\uc998\uc744 \ubc14\ud0d5\uc73c\ub85c C++ \ucf54\ub4dc\ub97c \uad6c\ud604\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n<\/p>\n<pre><code>\n#include &lt;iostream&gt;\n#include &lt;vector&gt;\n#include &lt;algorithm&gt;\n\nint main() {\n    int n, m;\n    std::cout &lt;&lt; \"\uc870\uc57d\ub3cc\uc758 \uac1c\uc218\ub97c \uc785\ub825\ud558\uc138\uc694: \";\n    std::cin &gt;&gt; n;\n    std::cout &lt;&lt; \"\uaebc\ub0b4\uc57c \ud560 \uc870\uc57d\ub3cc\uc758 \uac1c\uc218\ub97c \uc785\ub825\ud558\uc138\uc694: \";\n    std::cin &gt;&gt; m;\n\n    std::vector&lt;int&gt; weights(n);\n    std::cout &lt;&lt; \"\uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\ub97c \uc785\ub825\ud558\uc138\uc694 (\ub744\uc5b4\uc4f0\uae30\ub85c \uad6c\ubd84): \";\n    for (int i = 0; i &lt; n; ++i) {\n        std::cin &gt;&gt; weights[i];\n    }\n\n    \/\/ \uc870\uc57d\ub3cc \ubb34\uac8c \uc815\ub82c\n    std::sort(weights.begin(), weights.end());\n\n    \/\/ \uac00\uc7a5 \ubb34\uac70\uc6b4 m\uac1c \uc870\uc57d\ub3cc \uc120\ud0dd\n    int total_weight = 0;\n    for (int i = n - m; i &lt; n; ++i) {\n        total_weight += weights[i];\n    }\n\n    std::cout &lt;&lt; \"\uc120\ud0dd\ub41c \uc870\uc57d\ub3cc\uc758 \ucd1d \ubb34\uac8c: \" &lt;&lt; total_weight &lt;&lt; std::endl;\n\n    return 0;\n}\n<\/code><\/pre>\n<h2>6. \ucf54\ub4dc \uc124\uba85<\/h2>\n<p>\n    \uc704\uc758 C++ \ucf54\ub4dc\ub294 \uc8fc\uc5b4\uc9c4 \uc870\uc57d\ub3cc\uc758 \uac1c\uc218\uc640 \uc120\ud0dd\ud574\uc57c \ud558\ub294 \uc870\uc57d\ub3cc\uc758 \uac1c\uc218\ub97c \uc785\ub825\ubc1b\uace0, \uac01 \uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\ub97c \ubc30\uc5f4\uc5d0 \uc800\uc7a5\ud569\ub2c8\ub2e4.<br \/>\n    \uadf8\ub7f0 \ub2e4\uc74c, STL\uc758 <code>sort<\/code> \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\uc5ec \ubb34\uac8c\ub97c \uc815\ub82c\ud569\ub2c8\ub2e4. \uc815\ub82c\ub41c \ubc30\uc5f4\uc5d0\uc11c \uac00\uc7a5 \ubb34\uac70\uc6b4 m\uac1c\ub97c \uc120\ud0dd\ud558\uc5ec \ucd1d \ubb34\uac8c\ub97c \uacc4\uc0b0\ud558\uace0 \ucd9c\ub825\ud569\ub2c8\ub2e4.\n<\/p>\n<h2>7. \uc54c\uace0\ub9ac\uc998 \ubcf5\uc7a1\ub3c4 \ubd84\uc11d<\/h2>\n<p>\n    \uc774 \uc54c\uace0\ub9ac\uc998\uc758 \uc2dc\uac04 \ubcf5\uc7a1\ub3c4\ub294 \uc870\uc57d\ub3cc\uc758 \uac1c\uc218\ub97c n\uc774\ub77c\uace0 \ud560 \ub54c, O(n log n)\uc785\ub2c8\ub2e4. \uc815\ub82c \uacfc\uc815\uc774 \uac00\uc7a5 \ud070 \ube44\uc911\uc744 \ucc28\uc9c0\ud569\ub2c8\ub2e4.<br \/>\n    \uacf5\uac04 \ubcf5\uc7a1\ub3c4\ub294 O(n)\uc774\uba70, \uc774\ub294 \uc785\ub825\uc73c\ub85c \ubc1b\uc740 \uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\ub97c \uc800\uc7a5\ud558\uae30 \uc704\ud574 \ud544\uc694\ud55c \uba54\ubaa8\ub9ac\uc785\ub2c8\ub2e4.\n<\/p>\n<h2>8. \ubb38\uc81c \ud574\uacb0 \ud6c4\uae30<\/h2>\n<p>\n    \uc774 \ubb38\uc81c\ub294 \ud0d0\uc695 \uc54c\uace0\ub9ac\uc998\uc758 \uae30\ucd08\ub97c \ubc30\uc6b0\uae30\uc5d0 \uc801\ud569\ud55c \uc5f0\uc2b5 \ubb38\uc81c\uc785\ub2c8\ub2e4. \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub294 \ubb38\uc81c\ub97c \ud1b5\ud574<br \/>\n    \ucd5c\uc801\ud654\ub41c \uc120\ud0dd\uc744 \ud560 \uc218 \uc788\ub294 \ubc29\ubc95\uc744 \uc775\ud790 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc2e4\uc81c \ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c\ub3c4 \uc720\uc0ac\ud55c \ud615\ud0dc\uc758 \ubb38\uc81c\uac00 \uc790\uc8fc \ucd9c\uc81c\ub418\ubbc0\ub85c<br \/>\n    \ubc18\ubcf5\uc801\uc778 \uc5f0\uc2b5\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. \uc55e\uc73c\ub85c \ub2e4\uc591\ud55c \ubb38\uc81c\ub97c \ud480\uc5b4\ubcf4\uba74\uc11c \ub354 \ub9ce\uc740 \uacbd\ud5d8\uc744 \uc313\uc544\uac00\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4.\n<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \ubb38\uc81c \uc815\uc758 \uc8fc\uc5b4\uc9c4 n\uac1c\uc758 \uc870\uc57d\ub3cc \uc911\uc5d0\uc11c m\uac1c\uc758 \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub824\uace0 \ud560 \ub54c, \uc5b4\ub5a4 \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub294 \uac83\uc774 \uac00\uc7a5 \uc88b\uc740 \uc120\ud0dd\uc778\uc9c0 \uc54c\uc544\ubcf4\ub294 \ubb38\uc81c\uc785\ub2c8\ub2e4. \uc774 \ubb38\uc81c\ub294 \ud0d0\uc695 \uc54c\uace0\ub9ac\uc998(Greedy Algorithm)\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud574\uacb0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc785\ub825\uc73c\ub85c\ub294 \uac01 \uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\uac00 \uc8fc\uc5b4\uc9c0\uba70, \uaebc\ub0bc \uc870\uc57d\ub3cc\ub4e4\uc758 \ucd1d \ubb34\uac8c\uac00 \ucd5c\ub300 K\uac00 \ub418\ub3c4\ub85d \ud574\uc57c \ud569\ub2c8\ub2e4. 2. \ubb38\uc81c \uc774\ud574 \uc785\ub825: &#8211; \uccab \ubc88\uc9f8 \uc904 : \uc870\uc57d\ub3cc\uc758 \uac1c\uc218 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/27726\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[25],"tags":[],"class_list":["post-27726","post","type-post","status-publish","format-standard","hentry","category-c---2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/27726\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"1. \ubb38\uc81c \uc815\uc758 \uc8fc\uc5b4\uc9c4 n\uac1c\uc758 \uc870\uc57d\ub3cc \uc911\uc5d0\uc11c m\uac1c\uc758 \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub824\uace0 \ud560 \ub54c, \uc5b4\ub5a4 \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub294 \uac83\uc774 \uac00\uc7a5 \uc88b\uc740 \uc120\ud0dd\uc778\uc9c0 \uc54c\uc544\ubcf4\ub294 \ubb38\uc81c\uc785\ub2c8\ub2e4. \uc774 \ubb38\uc81c\ub294 \ud0d0\uc695 \uc54c\uace0\ub9ac\uc998(Greedy Algorithm)\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud574\uacb0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc785\ub825\uc73c\ub85c\ub294 \uac01 \uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\uac00 \uc8fc\uc5b4\uc9c0\uba70, \uaebc\ub0bc \uc870\uc57d\ub3cc\ub4e4\uc758 \ucd1d \ubb34\uac8c\uac00 \ucd5c\ub300 K\uac00 \ub418\ub3c4\ub85d \ud574\uc57c \ud569\ub2c8\ub2e4. 2. \ubb38\uc81c \uc774\ud574 \uc785\ub825: &#8211; \uccab \ubc88\uc9f8 \uc904 : \uc870\uc57d\ub3cc\uc758 \uac1c\uc218 &hellip; \ub354 \ubcf4\uae30 &quot;C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/27726\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-27T14:43:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T07:15:49+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/27726\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27726\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30\",\"datePublished\":\"2024-10-27T14:43:25+00:00\",\"dateModified\":\"2024-11-26T07:15:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27726\/\"},\"wordCount\":31,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/27726\/\",\"url\":\"https:\/\/atmokpo.com\/w\/27726\/\",\"name\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-27T14:43:25+00:00\",\"dateModified\":\"2024-11-26T07:15:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27726\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/27726\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/27726\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/27726\/","og_locale":"ko_KR","og_type":"article","og_title":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"1. \ubb38\uc81c \uc815\uc758 \uc8fc\uc5b4\uc9c4 n\uac1c\uc758 \uc870\uc57d\ub3cc \uc911\uc5d0\uc11c m\uac1c\uc758 \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub824\uace0 \ud560 \ub54c, \uc5b4\ub5a4 \uc870\uc57d\ub3cc\uc744 \uaebc\ub0b4\ub294 \uac83\uc774 \uac00\uc7a5 \uc88b\uc740 \uc120\ud0dd\uc778\uc9c0 \uc54c\uc544\ubcf4\ub294 \ubb38\uc81c\uc785\ub2c8\ub2e4. \uc774 \ubb38\uc81c\ub294 \ud0d0\uc695 \uc54c\uace0\ub9ac\uc998(Greedy Algorithm)\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud574\uacb0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc785\ub825\uc73c\ub85c\ub294 \uac01 \uc870\uc57d\ub3cc\uc758 \ubb34\uac8c\uac00 \uc8fc\uc5b4\uc9c0\uba70, \uaebc\ub0bc \uc870\uc57d\ub3cc\ub4e4\uc758 \ucd1d \ubb34\uac8c\uac00 \ucd5c\ub300 K\uac00 \ub418\ub3c4\ub85d \ud574\uc57c \ud569\ub2c8\ub2e4. 2. \ubb38\uc81c \uc774\ud574 \uc785\ub825: &#8211; \uccab \ubc88\uc9f8 \uc904 : \uc870\uc57d\ub3cc\uc758 \uac1c\uc218 &hellip; \ub354 \ubcf4\uae30 \"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30\"","og_url":"https:\/\/atmokpo.com\/w\/27726\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-27T14:43:25+00:00","article_modified_time":"2024-11-26T07:15:49+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/27726\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/27726\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30","datePublished":"2024-10-27T14:43:25+00:00","dateModified":"2024-11-26T07:15:49+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/27726\/"},"wordCount":31,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/27726\/","url":"https:\/\/atmokpo.com\/w\/27726\/","name":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-27T14:43:25+00:00","dateModified":"2024-11-26T07:15:49+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/27726\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/27726\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/27726\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uc870\uc57d\ub3cc \uaebc\ub0b4\uae30"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=27726"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27726\/revisions"}],"predecessor-version":[{"id":27727,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27726\/revisions\/27727"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=27726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=27726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=27726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}