<?xml version="1.0" encoding="utf-8" standalone="no"?>
<problem revision="78" short-name="lca-subsets" url="https://polygon.codeforces.com/p1YEqGW/gmusya/lca-subsets">
    <names>
        <name language="bulgarian" value="Задачи от Сашко"/>
        <name language="english" value="Tasks from Sasha"/>
        <name language="russian" value="Задачи от Саши"/>
    </names>
    <statements latex-pdf-mode="obsolete">
        <statement charset="UTF-8" language="bulgarian" mathjax="true" path="statements/bulgarian/problem.tex" type="application/x-tex"/>
        <statement charset="UTF-8" language="english" mathjax="true" path="statements/english/problem.tex" type="application/x-tex"/>
        <statement charset="UTF-8" language="russian" mathjax="true" path="statements/russian/problem.tex" type="application/x-tex"/>
        <statement language="bulgarian" path="statements/.pdf/bulgarian/problem.pdf" type="application/pdf"/>
        <statement language="english" path="statements/.pdf/english/problem.pdf" type="application/pdf"/>
        <statement language="russian" path="statements/.pdf/russian/problem.pdf" type="application/pdf"/>
    </statements>
    <tutorials latex-pdf-mode="obsolete">
        <tutorial charset="UTF-8" language="english" mathjax="true" path="statements/english/tutorial.tex" type="application/x-tex"/>
        <tutorial charset="UTF-8" language="russian" mathjax="true" path="statements/russian/tutorial.tex" type="application/x-tex"/>
        <tutorial language="english" path="statements/.pdf/english/tutorial.pdf" type="application/pdf"/>
        <tutorial language="russian" path="statements/.pdf/russian/tutorial.pdf" type="application/pdf"/>
    </tutorials>
    <judging cpu-name="Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz" cpu-speed="3600" input-file="" output-file="" run-count="1">
        <testset name="tests">
            <time-limit>5000</time-limit>
            <memory-limit>536870912</memory-limit>
            <test-count>100</test-count>
            <input-path-pattern>tests/%02d</input-path-pattern>
            <answer-path-pattern>tests/%02d.a</answer-path-pattern>
            <tests>
                <test group="0" method="manual" points="0.0" sample="true"/>
                <test group="0" method="manual" points="0.0" sample="true"/>
                <test group="0" method="manual" points="0.0" sample="true"/>
                <test cmd="gen --policy random_tree -n 10 -k 3 --skew 0" group="1" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 10 -k 3 --skew -100" group="1" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 10 -k 3 --skew 100" group="1" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 10 -k 1 --skew 0" group="1" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 10 -k 5 --skew 0" group="1" method="generated" points="12.0"/>
                <test cmd="gen --policy random_tree -n 500 -k 250 --skew 0" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 500 -k 250 --skew -10000" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 500 -k 250 --skew 10000" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 500 -k 500 --skew 0" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 500 -k 500 --skew 10000" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 500 -k 500 --skew -10000" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy many_small_white_subtrees -n 500 -k 250 --n_compact 300 --skew_compact 0" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 500 -k 250 --n_compact 300 --skew_compact 0 --skew_white 0" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 500 -k 20 --n_compact 300 --skew_compact 0 --skew_white 0" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 500 -k 125 --n_compact 250 --skew_compact 1000000000 --skew_white 0" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy left_deep_tree -n 500 -k 250" group="2" method="generated" points="0.0"/>
                <test cmd="gen --policy right_deep_tree -n 500 -k 250" group="2" method="generated" points="13.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 1 --skew 0" group="3" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 1 --skew -10000" group="3" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 1 --skew 10000" group="3" method="generated" points="0.0"/>
                <test cmd="gen --policy many_small_white_subtrees -n 1000000 -k 1 --n_compact 300 --skew_compact 0" group="3" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 1 --n_compact 300 --skew_compact 0 --skew_white 0" group="3" method="generated" points="0.0"/>
                <test cmd="gen --policy left_deep_tree -n 1000000 -k 1" group="3" method="generated" points="0.0"/>
                <test cmd="gen --policy right_deep_tree -n 1000000 -k 1" group="3" method="generated" points="9.0"/>
                <test cmd="gen --policy one_child -n 100 -k 50" group="4" method="generated" points="0.0"/>
                <test cmd="gen --policy one_child -n 100 -k 1" group="4" method="generated" points="0.0"/>
                <test cmd="gen --policy one_child -n 100000 -k 2000" group="4" method="generated" points="0.0"/>
                <test cmd="gen --policy one_child -n 100000 -k 1" group="4" method="generated" points="0.0"/>
                <test cmd="gen --policy one_child -n 1000000 -k 2000" group="4" method="generated" points="0.0"/>
                <test cmd="gen --policy one_child -n 1000000 -k 1" group="4" method="generated" points="10.0"/>
                <test cmd="gen --policy two_children -n 100 -k 50 --skew 0" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy two_children -n 100 -k 1 --skew 0" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy two_children -n 100000 -k 2000 --skew 0" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy two_children -n 100000 -k 1 --skew 0" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy two_children -n 1000000 -k 2000 --skew 0" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy two_children -n 1000000 -k 1 --skew 0" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy two_children -n 1000000 -k 2000 --skew 10" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy two_children -n 1000000 -k 2000 --skew 100" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy two_children -n 1000000 -k 2000 --skew 100000" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy left_deep_tree -n 1000000 -k 2000" group="5" method="generated" points="0.0"/>
                <test cmd="gen --policy right_deep_tree -n 1000000 -k 2000" group="5" method="generated" points="13.0"/>
                <test cmd="gen --policy random_tree -n 200000 -k 500 --skew 0" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 200000 -k 500 --skew -10000" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 200000 -k 500 --skew 10000" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 200000 -k 500 --skew 1000000000" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy many_small_white_subtrees -n 200000 -k 500 --n_compact 10000 --skew_compact 0" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 200000 -k 500 --n_compact 10000 --skew_compact 0 --skew_white 0" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 200000 -k 500 --n_compact 2000 --skew_compact 0 --skew_white 0" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 200000 -k 500 --n_compact 10000 --skew_compact -10000 --skew_white 0" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 200000 -k 500 --n_compact 10000 --skew_compact 10000 --skew_white 0" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 200000 -k 500 --n_compact 10000 --skew_compact 1000000000 --skew_white 0" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 200000 -k 500 --n_compact 10000 --skew_compact 1000000000 --skew_white 1000000000" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 200000 -k 500 --n_compact 100000 --skew_compact 1000000000 --skew_white 0" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy left_deep_tree -n 200000 -k 500" group="6" method="generated" points="0.0"/>
                <test cmd="gen --policy right_deep_tree -n 200000 -k 500" group="6" method="generated" points="14.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 500 --skew 0" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 500 --skew -10000" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 500 --skew 10000" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 500 --skew 1000000000" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy many_small_white_subtrees -n 1000000 -k 500 --n_compact 10000 --skew_compact 0" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 500 --n_compact 10000 --skew_compact 0 --skew_white 0" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 500 --n_compact 2000 --skew_compact 0 --skew_white 0" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 500 --n_compact 10000 --skew_compact -10000 --skew_white 0" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 500 --n_compact 10000 --skew_compact 10000 --skew_white 0" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 500 --n_compact 10000 --skew_compact 1000000000 --skew_white 0" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 500 --n_compact 10000 --skew_compact 1000000000 --skew_white 1000000000" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 500 --n_compact 500000 --skew_compact 1000000000 --skew_white 0" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy left_deep_tree -n 1000000 -k 500" group="7" method="generated" points="0.0"/>
                <test cmd="gen --policy right_deep_tree -n 1000000 -k 500" group="7" method="generated" points="11.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 1000 --skew 0" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 1000 --skew -10000" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 1000 --skew 10000" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 1000 --skew 1000000000" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy many_small_white_subtrees -n 1000000 -k 1000 --n_compact 10000 --skew_compact 0" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 1000 --n_compact 10000 --skew_compact 0 --skew_white 0" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 1000 --n_compact 2000 --skew_compact 0 --skew_white 0" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 1000 --n_compact 10000 --skew_compact -10000 --skew_white 0" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 1000 --n_compact 10000 --skew_compact 10000 --skew_white 0" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 1000 --n_compact 10000 --skew_compact 1000000000 --skew_white 0" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 1000 --n_compact 10000 --skew_compact 1000000000 --skew_white 1000000000" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 1000 --n_compact 500000 --skew_compact 1000000000 --skew_white 0" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy left_deep_tree -n 1000000 -k 1000" group="8" method="generated" points="0.0"/>
                <test cmd="gen --policy right_deep_tree -n 1000000 -k 1000" group="8" method="generated" points="10.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 2000 --skew 0" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 2000 --skew -10000" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 2000 --skew 10000" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy random_tree -n 1000000 -k 2000 --skew 1000000000" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy many_small_white_subtrees -n 1000000 -k 2000 --n_compact 10000 --skew_compact 0" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 2000 --n_compact 10000 --skew_compact 0 --skew_white 0" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 2000 --n_compact 2000 --skew_compact 0 --skew_white 0" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 2000 --n_compact 10000 --skew_compact -10000 --skew_white 0" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 2000 --n_compact 10000 --skew_compact 10000 --skew_white 0" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 2000 --n_compact 10000 --skew_compact 1000000000 --skew_white 0" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 2000 --n_compact 10000 --skew_compact 1000000000 --skew_white 1000000000" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy black_vertices_large_white_subtrees -n 1000000 -k 2000 --n_compact 500000 --skew_compact 1000000000 --skew_white 0" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy left_deep_tree -n 1000000 -k 1999" group="9" method="generated" points="0.0"/>
                <test cmd="gen --policy right_deep_tree -n 1000000 -k 1999" group="9" method="generated" points="8.0"/>
            </tests>
            <groups>
                <group feedback-policy="complete" name="0" points="0.0" points-policy="complete-group"/>
                <group feedback-policy="icpc" name="1" points="12.0" points-policy="complete-group">
                    <dependencies>
                        <dependency group="0"/>
                    </dependencies>
                </group>
                <group feedback-policy="icpc" name="2" points="13.0" points-policy="complete-group">
                    <dependencies>
                        <dependency group="0"/>
                        <dependency group="1"/>
                    </dependencies>
                </group>
                <group feedback-policy="icpc" name="3" points="9.0" points-policy="complete-group"/>
                <group feedback-policy="icpc" name="4" points="10.0" points-policy="complete-group"/>
                <group feedback-policy="icpc" name="5" points="13.0" points-policy="complete-group">
                    <dependencies>
                        <dependency group="4"/>
                    </dependencies>
                </group>
                <group feedback-policy="icpc" name="6" points="14.0" points-policy="complete-group">
                    <dependencies>
                        <dependency group="0"/>
                        <dependency group="1"/>
                        <dependency group="2"/>
                    </dependencies>
                </group>
                <group feedback-policy="icpc" name="7" points="11.0" points-policy="complete-group">
                    <dependencies>
                        <dependency group="0"/>
                        <dependency group="1"/>
                        <dependency group="2"/>
                        <dependency group="3"/>
                        <dependency group="6"/>
                    </dependencies>
                </group>
                <group feedback-policy="icpc" name="8" points="10.0" points-policy="complete-group">
                    <dependencies>
                        <dependency group="0"/>
                        <dependency group="1"/>
                        <dependency group="2"/>
                        <dependency group="3"/>
                        <dependency group="6"/>
                        <dependency group="7"/>
                    </dependencies>
                </group>
                <group feedback-policy="none" name="9" points="8.0" points-policy="complete-group">
                    <dependencies>
                        <dependency group="0"/>
                        <dependency group="1"/>
                        <dependency group="2"/>
                        <dependency group="3"/>
                        <dependency group="4"/>
                        <dependency group="5"/>
                        <dependency group="6"/>
                        <dependency group="7"/>
                        <dependency group="8"/>
                    </dependencies>
                </group>
            </groups>
        </testset>
    </judging>
    <files>
        <resources>
            <file path="files/olymp.sty"/>
            <file path="files/problem.tex"/>
            <file path="files/statements.ftl"/>
            <file path="files/testlib.h" type="h.g++"/>
            <file path="files/tutorial.tex"/>
        </resources>
        <executables>
            <executable>
                <source path="files/gen.cpp" type="cpp.gcc14-64-msys2-g++23"/>
            </executable>
            <executable>
                <source path="files/validator.cpp" type="cpp.gcc14-64-msys2-g++23"/>
            </executable>
        </executables>
    </files>
    <assets>
        <checker name="std::hcmp.cpp" type="testlib">
            <source path="files/check.cpp" type="cpp.g++17"/>
            <copy path="check.cpp"/>
            <testset>
                <test-count>0</test-count>
                <input-path-pattern>files/tests/checker-tests/%02d</input-path-pattern>
                <output-path-pattern>files/tests/checker-tests/%02d.o</output-path-pattern>
                <answer-path-pattern>files/tests/checker-tests/%02d.a</answer-path-pattern>
                <tests/>
            </testset>
        </checker>
        <validators>
            <validator>
                <source path="files/validator.cpp" type="cpp.gcc14-64-msys2-g++23"/>
                <testset>
                    <test-count>13</test-count>
                    <input-path-pattern>files/tests/validator-tests/%02d</input-path-pattern>
                    <tests>
                        <test verdict="invalid"/>
                        <test verdict="valid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="valid"/>
                        <test verdict="valid"/>
                        <test verdict="invalid"/>
                        <test verdict="valid"/>
                        <test verdict="invalid"/>
                        <test verdict="valid"/>
                        <test verdict="invalid"/>
                    </tests>
                </testset>
            </validator>
        </validators>
        <solutions>
            <solution tag="rejected">
                <source path="solutions/Kapt_nk.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="rejected">
                <source path="solutions/Novikov_almost_full.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="time-limit-exceeded-or-accepted">
                <source path="solutions/Novikov_ok.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="time-limit-exceeded-or-accepted">
                <source path="solutions/Ormlis_ok.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="time-limit-exceeded-or-memory-limit-exceeded">
                <source path="solutions/gmusya_n_plus_k2_almost_v2.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="time-limit-exceeded-or-memory-limit-exceeded">
                <source path="solutions/gmusya_n_plus_k2_mangooste.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="time-limit-exceeded-or-memory-limit-exceeded">
                <source path="solutions/gmusya_nk.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="time-limit-exceeded-or-memory-limit-exceeded">
                <source path="solutions/mangooste_brute.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="main">
                <source path="solutions/mangooste_k_sqrtk_sqrtn.cpp" type="cpp.g++17"/>
            </solution>
            <solution tag="rejected">
                <source path="solutions/mangooste_k_sqrtk_sqrtn_nodedup.cpp" type="cpp.gcc14-64-msys2-g++23"/>
            </solution>
            <solution tag="time-limit-exceeded-or-memory-limit-exceeded">
                <source path="solutions/mangooste_nk.cpp" type="cpp.g++17"/>
            </solution>
        </solutions>
    </assets>
    <properties>
        <property name="tests-wellformed" value="true"/>
    </properties>
    <stresses>
        <stress-count>0</stress-count>
        <stress-path-pattern>stresses/%03d</stress-path-pattern>
        <list/>
    </stresses>
    <tags>
        <tag value="combinatorics"/>
        <tag value="trees"/>
    </tags>
</problem>
