{"id":28576,"date":"2024-10-27T16:12:17","date_gmt":"2024-10-27T16:12:17","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=28576"},"modified":"2024-11-26T07:00:47","modified_gmt":"2024-11-26T07:00:47","slug":"%ec%bd%94%ed%8b%80%eb%a6%b0-%ec%bd%94%eb%94%a9%ed%85%8c%ec%8a%a4%ed%8a%b8-%ea%b0%95%ec%a2%8c-%ec%b5%9c%ec%86%8c-%ea%b3%b5%ed%86%b5-%ec%a1%b0%ec%83%81-%ea%b5%ac%ed%95%98%ea%b8%b0-1","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/28576\/","title":{"rendered":"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1"},"content":{"rendered":"<p><body><\/p>\n<div class=\"problem\">\n<h2>\ubb38\uc81c \uc124\uba85<\/h2>\n<p>\uc8fc\uc5b4\uc9c4 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \ub450 \ub178\ub4dc A\uc640 B\uc758 \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1(LCA, Lowest Common Ancestor)\uc744 \ucc3e\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc2dc\uc624. \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1\uc740 \ub450 \ub178\ub4dc A\uc640 B\uac00 \uac00\uc9c0\ub294 \uacf5\ud1b5 \uc870\uc0c1 \ub178\ub4dc \uc911\uc5d0\uc11c \uac00\uc7a5 \uae4a\uc740 \ub178\ub4dc\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4.<\/p>\n<h3>\uc785\ub825 \ud615\uc2dd<\/h3>\n<p>\uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub178\ub4dc \uac1c\uc218 N (1 \u2264 N \u2264 100,000)\uacfc N\uac1c\uc758 \ub178\ub4dc\uc5d0 \ub300\ud55c \uc815\ubcf4\uac00 \uc8fc\uc5b4\uc9c4\ub2e4. \uac01 \ub178\ub4dc \uc815\ubcf4\ub294 (\ubd80\ubaa8, \uc67c\ucabd \uc790\uc2dd, \uc624\ub978\ucabd \uc790\uc2dd) \ud615\ud0dc\ub85c \uc8fc\uc5b4\uc9c4\ub2e4. \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ub450 \ub178\ub4dc A\uc640 B\uac00 \uc8fc\uc5b4\uc9c4\ub2e4.<\/p>\n<h3>\ucd9c\ub825 \ud615\uc2dd<\/h3>\n<p>\ub450 \ub178\ub4dc A\uc640 B\uc758 \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \ub178\ub4dc\uc758 \uac12\uc744 \ucd9c\ub825\ud55c\ub2e4.<\/p>\n<\/div>\n<h2>\uc608\uc81c \uc785\ub825<\/h2>\n<pre>\n7\n1 2 3\n2 4 5\n3 6 7\n4 -1 -1\n5 -1 -1\n6 -1 -1\n7 -1 -1\n4 5\n<\/pre>\n<h2>\uc608\uc81c \ucd9c\ub825<\/h2>\n<pre>\n2\n<\/pre>\n<h2>\ubb38\uc81c \ud480\uc774 \uacfc\uc815<\/h2>\n<p>\ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574\uc11c\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uacfc\uc815\uc744 \uac70\uccd0\uc57c \ud569\ub2c8\ub2e4:<\/p>\n<h3>1\ub2e8\uacc4: \uc774\uc9c4 \ud2b8\ub9ac \uad6c\uc131<\/h3>\n<p>\uba3c\uc800, \uc785\ub825\uc744 \ubc1b\uc544 \uc774\uc9c4 \ud2b8\ub9ac\ub97c \uad6c\uc131\ud574\uc57c \ud569\ub2c8\ub2e4. \ud2b8\ub9ac\ub294 \uac01 \ub178\ub4dc\uac00 \ubd80\ubaa8, \uc67c\ucabd \uc790\uc2dd, \uc624\ub978\ucabd \uc790\uc2dd\uc744 \uac00\uc9c0\ub3c4\ub85d \uad6c\uc131\ub420 \uac83\uc785\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574, \ub178\ub4dc \ud074\ub798\uc2a4(Node)\ub97c \uc815\uc758\ud558\uace0, \ud2b8\ub9ac \uad6c\uc870\ub97c \uc800\uc7a5\ud560 \uc218 \uc788\ub294 \ubc29\uc2dd\uc73c\ub85c \uad6c\ud604\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-kotlin\">\ndata class Node(val value: Int) {\n    var left: Node? = null\n    var right: Node? = null\n}\n<\/code><\/pre>\n<h3>2\ub2e8\uacc4: \ubd80\ubaa8 \ud2b8\ub9ac \uad6c\uc131<\/h3>\n<p>\ud2b8\ub9ac\ub97c \uad6c\uc131\ud560 \ub54c \uac01 \ub178\ub4dc\uc758 \ubd80\ubaa8\ub97c \ucd94\uc801\ud560 \uc218 \uc788\ub294 \uad6c\uc870\ub3c4 \ud544\uc694\ud569\ub2c8\ub2e4. \ub530\ub77c\uc11c, \ubd80\ubaa8 \ub178\ub4dc\ub97c \ubaa8\ub450 \uae30\ub85d\ud558\uc5ec \uc5b4\ub5a4 \ub178\ub4dc\uac00 \ubd80\ubaa8\uc778\uc9c0 \uc27d\uac8c \ucc3e\uc744 \uc218 \uc788\ub294 \uad6c\uc870\ub97c \ub9cc\ub4ed\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-kotlin\">\nval parentMap = mutableMapOf<int, int=\"\">()\n<\/int,><\/code><\/pre>\n<h3>3\ub2e8\uacc4: \ub450 \ub178\ub4dc\uc758 \uacbd\ub85c \ucc3e\uae30<\/h3>\n<p>\ub450 \ub178\ub4dc A\uc640 B\uc758 \uacbd\ub85c\ub97c \ucc3e\uc544\uc57c \ud569\ub2c8\ub2e4. \uc774\ub294 \ub450 \ub178\ub4dc\uc758 \uc870\uc0c1\uc744 \ubaa8\uc544 \uac01 \ub178\ub4dc\uac00 \uac01\uac01\uc758 \uacbd\ub85c\ub97c \ub530\ub974\uac8c \ub9cc\ub4e4\uc5b4, \ud6c4\uc5d0 \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1\uc744 \ucc3e\ub294 \ub370 \uc720\uc6a9\ud569\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 A\uc640 B\uc758 \ubd80\ubaa8\ub97c \ucd94\uc801\ud558\uba70 \uacbd\ub85c\ub97c \uc800\uc7a5\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-kotlin\">\nfun findPathToRoot(node: Int): List<int> {\n    val path = mutableListOf<int>()\n    var current = node\n    while (current != -1) {\n        path.add(current)\n        current = parentMap[current] ?: -1\n    }\n    return path\n}\n<\/int><\/int><\/code><\/pre>\n<h3>4\ub2e8\uacc4: \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \ucc3e\uae30<\/h3>\n<p>A\uc640 B \uac01\uac01\uc758 \uacbd\ub85c\ub97c \uad6c\ud55c \ud6c4, \ub450 \uacbd\ub85c\ub97c \ube44\uad50\ud558\uc5ec \uac00\uc7a5 \ub9c8\uc9c0\ub9c9\uc5d0 \ub9cc\ub098\ub294 \uc870\uc0c1\uc744 \ucc3e\uc2b5\ub2c8\ub2e4. \uacbd\ub85c\ub97c \uac70\uafb8\ub85c \ube44\uad50\ud574\uc11c \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1\uc744 \ucc3e\uc73c\uba74 \ub429\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-kotlin\">\nfun findLCA(nodeA: Int, nodeB: Int): Int {\n    val pathA = findPathToRoot(nodeA)\n    val pathB = findPathToRoot(nodeB)\n    \n    var lca = -1\n    for (i in 0 until minOf(pathA.size, pathB.size)) {\n        if (pathA[pathA.size - 1 - i] == pathB[pathB.size - 1 - i]) {\n            lca = pathA[pathA.size - 1 - i]\n        } else {\n            break\n        }\n    }\n    return lca\n}\n<\/code><\/pre>\n<h3>5\ub2e8\uacc4: \uc804\uccb4 \uc54c\uace0\ub9ac\uc998 \uc870\ud569<\/h3>\n<p>\uc704\uc758 \ubaa8\ub4e0 \ub2e8\uacc4\ub97c \uc870\ud569\ud558\uc5ec \uc785\ub825\uc744 \ubc1b\uc544 \uc2e4\ud589\ud558\ub294 \uba54\uc778 \ud568\uc218\ub97c \uc791\uc131\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-kotlin\">\nfun main() {\n    val n = readLine()!!.toInt()\n    for (i in 0 until n) {\n        val (parent, left, right) = readLine()!!.split(\" \").map { it.toInt() }\n        if (parent != -1) {\n            parentMap[parent] = parent\n            if (left != -1) parentMap[left] = parent\n            if (right != -1) parentMap[right] = parent\n        }\n    }\n    val (a, b) = readLine()!!.split(\" \").map { it.toInt() }\n    \n    val lca = findLCA(a, b)\n    println(lca)\n}\n<\/code><\/pre>\n<h2>\ubcf5\uc7a1\ub3c4 \ubd84\uc11d<\/h2>\n<p>\ubcf8 \uc54c\uace0\ub9ac\uc998\uc758 \uc2dc\uac04 \ubcf5\uc7a1\ub3c4\ub294 O(N)\uc785\ub2c8\ub2e4. \uc774\ub294 \ubaa8\ub4e0 \ub178\ub4dc\ub97c \ud55c \ubc88\uc529 \ubc29\ubb38\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \uacf5\uac04 \ubcf5\uc7a1\ub3c4 \ub610\ud55c O(N)\uc73c\ub85c, \ubd80\ubaa8 \uad00\uacc4\ub97c \uc800\uc7a5\ud558\ub294 \ub370 \uc0ac\uc6a9\ub418\ub294 \uacf5\uac04 \ub54c\ubb38\uc785\ub2c8\ub2e4. \uc774 \uc54c\uace0\ub9ac\uc998\uc740 \uc8fc\uc5b4\uc9c4 \ubb38\uc81c\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \ud574\uacb0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\uacb0\ub860<\/h2>\n<p>\uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1\uc744 \ucc3e\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. \uc774 \uc54c\uace0\ub9ac\uc998\uc744 \ud1b5\ud574 \ud2b8\ub9ac \uad6c\uc870\uc5d0 \ub300\ud55c \uc774\ud574\ub3c4\ub97c \ub192\uc77c \uc218 \uc788\uc73c\uba70, \ub2e4\uc591\ud55c \ubb38\uc81c\ub97c \ud574\uacb0\ud558\ub294 \ub370 \ub3c4\uc6c0\uc744 \uc904 \uac83\uc785\ub2c8\ub2e4. \ub2e4\uc74c \uac15\uc88c\uc5d0\uc11c\ub294 \ub2e4\ub978 \uc720\ud615\uc758 \ud2b8\ub9ac \ubb38\uc81c\ub97c \ub2e4\ub8f0 \uacc4\ud68d\uc785\ub2c8\ub2e4. \uac10\uc0ac\ud569\ub2c8\ub2e4!<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \ub450 \ub178\ub4dc A\uc640 B\uc758 \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1(LCA, Lowest Common Ancestor)\uc744 \ucc3e\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc2dc\uc624. \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1\uc740 \ub450 \ub178\ub4dc A\uc640 B\uac00 \uac00\uc9c0\ub294 \uacf5\ud1b5 \uc870\uc0c1 \ub178\ub4dc \uc911\uc5d0\uc11c \uac00\uc7a5 \uae4a\uc740 \ub178\ub4dc\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4. \uc785\ub825 \ud615\uc2dd \uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub178\ub4dc \uac1c\uc218 N (1 \u2264 N \u2264 100,000)\uacfc N\uac1c\uc758 \ub178\ub4dc\uc5d0 \ub300\ud55c \uc815\ubcf4\uac00 \uc8fc\uc5b4\uc9c4\ub2e4. \uac01 \ub178\ub4dc \uc815\ubcf4\ub294 (\ubd80\ubaa8, &hellip; <a href=\"https:\/\/atmokpo.com\/w\/28576\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1&#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":[28],"tags":[],"class_list":["post-28576","post","type-post","status-publish","format-standard","hentry","category-28"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1 - \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\/28576\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \ub450 \ub178\ub4dc A\uc640 B\uc758 \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1(LCA, Lowest Common Ancestor)\uc744 \ucc3e\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc2dc\uc624. \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1\uc740 \ub450 \ub178\ub4dc A\uc640 B\uac00 \uac00\uc9c0\ub294 \uacf5\ud1b5 \uc870\uc0c1 \ub178\ub4dc \uc911\uc5d0\uc11c \uac00\uc7a5 \uae4a\uc740 \ub178\ub4dc\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4. \uc785\ub825 \ud615\uc2dd \uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub178\ub4dc \uac1c\uc218 N (1 \u2264 N \u2264 100,000)\uacfc N\uac1c\uc758 \ub178\ub4dc\uc5d0 \ub300\ud55c \uc815\ubcf4\uac00 \uc8fc\uc5b4\uc9c4\ub2e4. \uac01 \ub178\ub4dc \uc815\ubcf4\ub294 (\ubd80\ubaa8, &hellip; \ub354 \ubcf4\uae30 &quot;\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/28576\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-27T16:12:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T07:00:47+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\/28576\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/28576\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1\",\"datePublished\":\"2024-10-27T16:12:17+00:00\",\"dateModified\":\"2024-11-26T07:00:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/28576\/\"},\"wordCount\":26,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/28576\/\",\"url\":\"https:\/\/atmokpo.com\/w\/28576\/\",\"name\":\"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-27T16:12:17+00:00\",\"dateModified\":\"2024-11-26T07:00:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/28576\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/28576\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/28576\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1\"}]},{\"@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":"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1 - \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\/28576\/","og_locale":"ko_KR","og_type":"article","og_title":"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \ub450 \ub178\ub4dc A\uc640 B\uc758 \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1(LCA, Lowest Common Ancestor)\uc744 \ucc3e\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc2dc\uc624. \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1\uc740 \ub450 \ub178\ub4dc A\uc640 B\uac00 \uac00\uc9c0\ub294 \uacf5\ud1b5 \uc870\uc0c1 \ub178\ub4dc \uc911\uc5d0\uc11c \uac00\uc7a5 \uae4a\uc740 \ub178\ub4dc\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4. \uc785\ub825 \ud615\uc2dd \uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub178\ub4dc \uac1c\uc218 N (1 \u2264 N \u2264 100,000)\uacfc N\uac1c\uc758 \ub178\ub4dc\uc5d0 \ub300\ud55c \uc815\ubcf4\uac00 \uc8fc\uc5b4\uc9c4\ub2e4. \uac01 \ub178\ub4dc \uc815\ubcf4\ub294 (\ubd80\ubaa8, &hellip; \ub354 \ubcf4\uae30 \"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1\"","og_url":"https:\/\/atmokpo.com\/w\/28576\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-27T16:12:17+00:00","article_modified_time":"2024-11-26T07:00:47+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\/28576\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/28576\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1","datePublished":"2024-10-27T16:12:17+00:00","dateModified":"2024-11-26T07:00:47+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/28576\/"},"wordCount":26,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/28576\/","url":"https:\/\/atmokpo.com\/w\/28576\/","name":"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-27T16:12:17+00:00","dateModified":"2024-11-26T07:00:47+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/28576\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/28576\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/28576\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"\ucf54\ud2c0\ub9b0 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ucd5c\uc18c \uacf5\ud1b5 \uc870\uc0c1 \uad6c\ud558\uae30 1"}]},{"@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\/28576","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=28576"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/28576\/revisions"}],"predecessor-version":[{"id":28577,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/28576\/revisions\/28577"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=28576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=28576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=28576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}