<?xml version="1.0" encoding="utf-8" standalone="no"?>
<problem revision="14" short-name="mex-and-cards" url="https://polygon.codeforces.com/p6Av6tL/tourist/mex-and-cards">
    <names>
        <name language="english" value="Mex and Cards"/>
        <name language="russian" value="Mex and Cards"/>
    </names>
    <statements>
        <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 charset="UTF-8" language="english" mathjax="true" path="statements/.html/english/problem.html" type="text/html"/>
        <statement charset="UTF-8" language="russian" mathjax="true" path="statements/.html/russian/problem.html" type="text/html"/>
        <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>
        <tutorial charset="UTF-8" language="english" mathjax="true" path="statements/english/tutorial.tex" type="application/x-tex"/>
        <tutorial language="english" path="statements/.pdf/english/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>3000</time-limit>
            <memory-limit>536870912</memory-limit>
            <test-count>76</test-count>
            <input-path-pattern>tests/%02d</input-path-pattern>
            <answer-path-pattern>tests/%02d.a</answer-path-pattern>
            <tests>
                <test method="manual" sample="true"/>
                <test cmd="gen_random -n=1 -mina=0 -maxa=0 -q=0 -padd=0.5" method="generated"/>
                <test cmd="gen_random -n=10 -mina=0 -maxa=10 -q=20 -padd=0.6" method="generated"/>
                <test cmd="gen_random -n=10 -mina=0 -maxa=10 -q=20 -padd=0.6 -sorted" method="generated"/>
                <test cmd="gen_random -n=100 -mina=0 -maxa=1000 -q=1000 -padd=0.5" method="generated"/>
                <test cmd="gen_random -n=100 -mina=0 -maxa=1000 -q=1000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random -n=1000 -mina=0 -maxa=1000000 -q=10000 -padd=0.5" method="generated"/>
                <test cmd="gen_random -n=1000 -mina=0 -maxa=1000000 -q=10000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random -n=10000 -mina=0 -maxa=1000000 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random -n=10000 -mina=0 -maxa=1000000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=1000000 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=1000000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=1000000 -q=200000 -padd=0" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=1000000 -q=200000 -padd=0 -sorted" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=1000000 -q=200000 -padd=1" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=1000000 -q=200000 -padd=1 -sorted" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=0 -q=200000 -padd=0" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=0 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=0 -q=200000 -padd=1" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -padd=0" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -padd=1" method="generated"/>
                <test cmd="gen_random -n=123456 -mina=0 -maxa=1000000 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random -n=200000 -mina=0 -maxa=1000000 -q=123456 -padd=0.5" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=1 -v=0" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=1 -v=1" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=1 -v=1234" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=1 -v=123456" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=1 -v=199998" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=1 -v=199999" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=2 -v=0" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=2 -v=1" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=2 -v=1234" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=2 -v=123456" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=2 -v=199998" method="generated"/>
                <test cmd="gen_equal_queries -n=200000 -mina=1000000 -maxa=1000000 -q=200000 -p=2 -v=199999" method="generated"/>
                <test cmd="gen_random_pairs -n=1 -mina=123456 -maxa=123456 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=10 -mina=0 -maxa=10 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=100 -mina=0 -maxa=10 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=100 -mina=0 -maxa=10 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=1000 -mina=0 -maxa=10 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=1000 -mina=0 -maxa=10 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=10000 -mina=0 -maxa=10 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=10000 -mina=0 -maxa=10 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=10000 -mina=0 -maxa=100 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=0 -maxa=10 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=0 -maxa=10 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=0 -maxa=100 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=0 -maxa=1000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=0 -maxa=10000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=0 -maxa=100000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=0 -maxa=1000000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900001 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900002 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900005 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900014 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900042 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900132 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900429 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=901500 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=904444 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=910000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=930000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=1000000 -q=200000 -padd=0.5 -sorted" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900001 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900002 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900005 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900014 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900042 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900132 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=900429 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=901500 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=904444 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=910000 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=930000 -q=200000 -padd=0.5" method="generated"/>
                <test cmd="gen_random_pairs -n=200000 -mina=900001 -maxa=1000000 -q=200000 -padd=0.5" method="generated"/>
            </tests>
        </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_equal_queries.cpp" type="cpp.g++17"/>
                <binary path="files/gen_equal_queries.exe" type="exe.win32"/>
            </executable>
            <executable>
                <source path="files/gen_random.cpp" type="cpp.g++17"/>
                <binary path="files/gen_random.exe" type="exe.win32"/>
            </executable>
            <executable>
                <source path="files/gen_random_pairs.cpp" type="cpp.g++17"/>
                <binary path="files/gen_random_pairs.exe" type="exe.win32"/>
            </executable>
            <executable>
                <source path="files/validate.cpp" type="cpp.g++17"/>
                <binary path="files/validate.exe" type="exe.win32"/>
            </executable>
        </executables>
    </files>
    <assets>
        <checker name="std::ncmp.cpp" type="testlib">
            <source path="files/check.cpp" type="cpp.g++17"/>
            <binary path="check.exe" type="exe.win32"/>
            <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/validate.cpp" type="cpp.g++17"/>
                <binary path="files/validate.exe" type="exe.win32"/>
                <testset>
                    <test-count>10</test-count>
                    <input-path-pattern>files/tests/validator-tests/%02d</input-path-pattern>
                    <tests>
                        <test verdict="valid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="valid"/>
                        <test verdict="valid"/>
                        <test verdict="invalid"/>
                    </tests>
                </testset>
            </validator>
        </validators>
        <solutions>
            <solution tag="accepted">
                <source path="solutions/mex_egor.rs" type="rust"/>
                <binary path="solutions/mex_egor.exe" type="exe.win32"/>
            </solution>
            <solution tag="main">
                <source path="solutions/mex_tourist.cpp" type="cpp.g++17"/>
                <binary path="solutions/mex_tourist.exe" type="exe.win32"/>
            </solution>
            <solution tag="accepted">
                <source path="solutions/mex_tourist_better.cpp" type="cpp.g++17"/>
                <binary path="solutions/mex_tourist_better.exe" type="exe.win32"/>
            </solution>
            <solution tag="time-limit-exceeded">
                <source path="solutions/mex_tourist_stupid.cpp" type="cpp.g++17"/>
                <binary path="solutions/mex_tourist_stupid.exe" type="exe.win32"/>
            </solution>
            <solution tag="time-limit-exceeded">
                <source path="solutions/mex_tourist_stupid_2.cpp" type="cpp.g++17"/>
                <binary path="solutions/mex_tourist_stupid_2.exe" type="exe.win32"/>
            </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="mex"/>
    </tags>
</problem>
