<?xml version="1.0" encoding="utf-8" standalone="no"?>
<problem revision="29" short-name="keyboard-chaos" url="https://polygon.codeforces.com/p2jWXJE/tourist/keyboard-chaos">
    <names>
        <name language="english" value="Keyboard Chaos"/>
    </names>
    <statements>
        <statement charset="UTF-8" language="english" mathjax="true" path="statements/english/problem.tex" type="application/x-tex"/>
        <statement charset="UTF-8" language="english" mathjax="true" path="statements/.html/english/problem.html" type="text/html"/>
        <statement language="english" path="statements/.pdf/english/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>2000</time-limit>
            <memory-limit>1073741824</memory-limit>
            <test-count>92</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 method="manual" sample="true"/>
                <test method="manual" sample="true"/>
                <test cmd="gen-rand N=7 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=7 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=7 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=7 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=8 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=8 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=8 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=8 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=9 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=9 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=9 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=9 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=10 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=10 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=10 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=10 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=11 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=11 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=11 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=11 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=12 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=12 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=12 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=12 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=13 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=13 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=13 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=13 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=14 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=14 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=14 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=14 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=15 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=15 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=15 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=15 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=16 E=3 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=16 E=4 EQ=1 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=100 E=16 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=16 E=3 MN=1 MX=3" method="generated"/>
                <test cmd="gen-rand N=1 E=2 MN=1 MX=1 34" method="generated"/>
                <test cmd="gen-rand N=5 E=2 MN=2 MX=3 34" method="generated"/>
                <test cmd="gen-rand N=100 E=26 MN=1 MX=10 34" method="generated"/>
                <test cmd="gen-rand N=100 E=2 MN=5 MX=7 EQ=1 34" method="generated"/>
                <test cmd="gen-rand N=100 E=3 MN=5 MX=7 EQ=1 34" method="generated"/>
                <test cmd="gen-rand N=100 E=5 MN=5 MX=7 EQ=1 34" method="generated"/>
                <test cmd="gen-rand N=100 E=10 MN=5 MX=7 EQ=1 34" method="generated"/>
                <test cmd="gen-rand N=100 E=26 MN=5 MX=7 EQ=1 34" method="generated"/>
                <test cmd="gen-rand N=1 E=2 MN=1 MX=1 35" method="generated"/>
                <test cmd="gen-rand N=5 E=2 MN=2 MX=3 35" method="generated"/>
                <test cmd="gen-rand N=100 E=26 MN=1 MX=10 35" method="generated"/>
                <test cmd="gen-rand N=100 E=2 MN=5 MX=7 EQ=1 35" method="generated"/>
                <test cmd="gen-rand N=100 E=3 MN=5 MX=7 EQ=1 35" method="generated"/>
                <test cmd="gen-rand N=100 E=5 MN=5 MX=7 EQ=1 35" method="generated"/>
                <test cmd="gen-rand N=100 E=10 MN=5 MX=7 EQ=1 35" method="generated"/>
                <test cmd="gen-rand N=100 E=26 MN=5 MX=7 EQ=1 35" method="generated"/>
                <test cmd="gen-rand N=100 E=26 MN=10 MX=10 EQ=1" method="generated"/>
                <test cmd="gen-rand N=100 E=26 MN=3 MX=3 EQ=1" method="generated"/>
                <test cmd="gen-rand N=100 E=26 MN=1 MX=1 EQ=1" method="generated"/>
                <test cmd="gen-rand N=100 E=3 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=100 E=4 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=100 E=5 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen-rand N=100 E=6 MN=2 MX=2 EQ=1" method="generated"/>
                <test cmd="gen_special -n=10 -e=5 -type=1 -lmin=1 -lmax=10 -skip=0" method="generated"/>
                <test cmd="gen_special -n=10 -e=5 -type=1 -lmin=1 -lmax=10 -skip=1" method="generated"/>
                <test cmd="gen_special -n=10 -e=5 -type=2 -lmin=1 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=10 -e=5 -type=3 -lmin=1 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=30 -e=10 -type=1 -lmin=1 -lmax=10 -skip=0" method="generated"/>
                <test cmd="gen_special -n=30 -e=10 -type=1 -lmin=1 -lmax=10 -skip=1" method="generated"/>
                <test cmd="gen_special -n=30 -e=10 -type=2 -lmin=1 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=30 -e=10 -type=3 -lmin=1 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=26 -e=26 -type=1 -lmin=1 -lmax=10 -skip=0" method="generated"/>
                <test cmd="gen_special -n=26 -e=26 -type=1 -lmin=1 -lmax=10 -skip=1" method="generated"/>
                <test cmd="gen_special -n=26 -e=26 -type=2 -lmin=1 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=26 -e=26 -type=3 -lmin=1 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=1 -lmin=1 -lmax=10 -skip=0" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=1 -lmin=1 -lmax=10 -skip=1" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=2 -lmin=1 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=3 -lmin=1 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=1 -lmin=5 -lmax=10 -skip=0" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=1 -lmin=5 -lmax=10 -skip=1" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=2 -lmin=5 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=3 -lmin=5 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=1 -lmin=10 -lmax=10 -skip=0" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=1 -lmin=10 -lmax=10 -skip=1" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=2 -lmin=10 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=100 -e=26 -type=3 -lmin=10 -lmax=10" method="generated"/>
                <test cmd="gen_special -n=100 -e=2 -type=2 -lmin=10 -lmax=10" method="generated"/>
                <test method="manual"/>
            </tests>
        </testset>
    </judging>
    <files>
        <resources>
            <file path="files/get-options.h" type="h.g++"/>
            <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/checker.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="files/checker.exe" type="exe.win32"/>
            </executable>
            <executable>
                <source path="files/gen-rand.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="files/gen-rand.exe" type="exe.win32"/>
            </executable>
            <executable>
                <source path="files/gen_special.cpp" type="cpp.gcc14-64-msys2-g++23"/>
                <binary path="files/gen_special.exe" type="exe.win32"/>
            </executable>
            <executable>
                <source path="files/validator.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="files/validator.exe" type="exe.win32"/>
            </executable>
        </executables>
    </files>
    <assets>
        <checker type="testlib">
            <source path="files/checker.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
            <binary path="check.exe" type="exe.win32"/>
            <copy path="check.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
            <testset>
                <test-count>10</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>
                    <test verdict="ok"/>
                    <test verdict="wrong-answer"/>
                    <test verdict="wrong-answer"/>
                    <test verdict="crashed"/>
                    <test verdict="ok"/>
                    <test verdict="wrong-answer"/>
                    <test verdict="crashed"/>
                    <test verdict="wrong-answer"/>
                    <test verdict="wrong-answer"/>
                    <test verdict="crashed"/>
                </tests>
            </testset>
        </checker>
        <validators>
            <validator>
                <source path="files/validator.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="files/validator.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="valid"/>
                        <test verdict="invalid"/>
                        <test verdict="valid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                        <test verdict="invalid"/>
                    </tests>
                </testset>
            </validator>
        </validators>
        <solutions>
            <solution tag="accepted">
                <source path="solutions/290699955_zidder_ok.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="solutions/290699955_zidder_ok.exe" type="exe.win32"/>
            </solution>
            <solution tag="accepted">
                <source path="solutions/290831131_ikrpprppp_SomethingNew_goncharovmike_ok.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="solutions/290831131_ikrpprppp_SomethingNew_goncharovmike_ok.exe" type="exe.win32"/>
            </solution>
            <solution tag="rejected">
                <source path="solutions/290835533_smalyarovsky_shevlopmes_TimDee_wa4.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="solutions/290835533_smalyarovsky_shevlopmes_TimDee_wa4.exe" type="exe.win32"/>
            </solution>
            <solution tag="rejected">
                <source path="solutions/290835923_smalyarovsky_shevlopmes_TimDee_wa1.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="solutions/290835923_smalyarovsky_shevlopmes_TimDee_wa1.exe" type="exe.win32"/>
            </solution>
            <solution tag="accepted">
                <source path="solutions/290841247_smalyarovsky_shevlopmes_TimDee_ok.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="solutions/290841247_smalyarovsky_shevlopmes_TimDee_ok.exe" type="exe.win32"/>
            </solution>
            <solution tag="accepted">
                <source path="solutions/290871474_izban_ok.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="solutions/290871474_izban_ok.exe" type="exe.win32"/>
            </solution>
            <solution tag="accepted">
                <source path="solutions/291128329_ksun48_ok.cpp" type="cpp.gcc14-64-msys2-g++23"/>
                <binary path="solutions/291128329_ksun48_ok.exe" type="exe.win32"/>
            </solution>
            <solution tag="accepted">
                <source path="solutions/291233519_xiaowuc1_ok.cpp" type="cpp.g++17"/>
                <binary path="solutions/291233519_xiaowuc1_ok.exe" type="exe.win32"/>
            </solution>
            <solution tag="accepted">
                <source path="solutions/k_gk.py" type="python.3"/>
                <binary path="solutions/k_gk.pys3" type="pythonx.3"/>
            </solution>
            <solution tag="wrong-answer">
                <source path="solutions/k_gk_wa_max_prefix.py" type="python.3"/>
                <binary path="solutions/k_gk_wa_max_prefix.pys3" type="pythonx.3"/>
            </solution>
            <solution tag="wrong-answer">
                <source path="solutions/sol-wa.cpp" type="cpp.gcc14-64-msys2-g++23"/>
                <binary path="solutions/sol-wa.exe" type="exe.win32"/>
            </solution>
            <solution tag="main">
                <source path="solutions/solve_ok.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="solutions/solve_ok.exe" type="exe.win32"/>
            </solution>
            <solution tag="wrong-answer">
                <source path="solutions/solve_stress_wa.cpp" type="cpp.gcc13-64-winlibs-g++20"/>
                <binary path="solutions/solve_stress_wa.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="easy"/>
        <tag value="greedy"/>
    </tags>
</problem>
