<?xml version="1.0" encoding="utf-8" standalone="no"?>
<problem revision="18" short-name="water-puzzle" url="https://polygon.codeforces.com/p7sJ41Q/linsierra/water-puzzle">
        
    <names>
                
        <name language="russian" value="Водный пазл"/>
            
    </names>
        
    <statements>
                
        <statement charset="UTF-8" language="russian" path="statements/russian/problem.tex" type="application/x-tex"/>
                
        <statement language="russian" path="statements/.pdf/russian/problem.pdf" type="application/pdf"/>
            
    </statements>
        
    <judging cpu-name="Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz" cpu-speed="3600" input-file="" output-file="">
                
        <testset name="tests">
                        
            <time-limit>1000</time-limit>
                        
            <memory-limit>268435456</memory-limit>
                        
            <test-count>129</test-count>
                        
            <input-path-pattern>tests/%02d</input-path-pattern>
                        
            <answer-path-pattern>tests/%02d.a</answer-path-pattern>
                        
            <tests>
                                
                <test group="samples" method="manual" points="0.0" sample="true"/>
                                
                <test group="samples" method="manual" points="0.0" sample="true"/>
                                
                <test group="samples" method="manual" points="0.0" sample="true"/>
                                
                <test group="subtask1" method="manual" points="25.0"/>
                                
                <test group="subtask1" method="manual" points="0.0"/>
                                
                <test group="subtask1" method="manual" points="0.0"/>
                                
                <test group="subtask1" method="manual" points="0.0"/>
                                
                <test group="subtask1" method="manual" points="0.0"/>
                                
                <test group="subtask1" method="manual" points="0.0"/>
                                
                <test group="subtask1" method="manual" points="0.0"/>
                                
                <test group="subtask1" method="manual" points="0.0"/>
                                
                <test group="subtask1" method="manual" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 500 11 500 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 500 11 500 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 500 11 500 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 500 11 500 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 500 11 500 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 501 1000 501 1000 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 501 1000 501 1000 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 501 1000 501 1000 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 501 1000 501 1000 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 501 1000 501 1000 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 0 0 3" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 0 0 4" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 0 0 5" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000000000 1000000000 1000000000 1000000000 0 0 1" group="subtask1" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000000000 1000000000 1000000000 1000000000 0 0 2" group="subtask1" method="generated" points="0.0"/>
                                
                <test group="subtask2" method="manual" points="35.0"/>
                                
                <test group="subtask2" method="manual" points="0.0"/>
                                
                <test group="subtask2" method="manual" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 1 10 1" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 1 10 2" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 1 10 3" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 1 10 4" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 1 10 1 10 1 10 5" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 1" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 2" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 3" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 4" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 5" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 6" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 7" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 8" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 9" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 11 50 11 50 11 50 10" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 1" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 2" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 3" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 4" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 5" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 6" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 7" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 8" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 9" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 51 100 51 100 51 100 10" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 100 100 100 100 100 100 1" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 100 100 100 100 100 100 2" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 100 100 100 100 100 100 3" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 100 100 100 100 100 100 4" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 100 100 100 100 100 100 5" group="subtask2" method="generated" points="0.0"/>
                                
                <test cmd="gener 101 1000 101 1000 101 1000 1" group="subtask3" method="generated" points="40.0"/>
                                
                <test cmd="gener 101 1000 101 1000 101 1000 2" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 101 1000 101 1000 101 1000 3" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 101 1000 101 1000 101 1000 4" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 101 1000 101 1000 101 1000 5" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 1001 10000 1" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 1001 10000 2" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 1001 10000 3" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 1001 10000 4" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1001 10000 1001 10000 1001 10000 5" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 10001 100000 1" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 10001 100000 2" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 10001 100000 3" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 10001 100000 4" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10001 100000 10001 100000 10001 100000 5" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 100001 1000000 1" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 100001 1000000 2" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 100001 1000000 3" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 100001 1000000 4" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100001 1000000 100001 1000000 100001 1000000 5" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 1000001 10000000 1" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 1000001 10000000 2" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 1000001 10000000 3" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 1000001 10000000 4" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000001 10000000 1000001 10000000 1000001 10000000 5" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 10000001 100000000 1" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 10000001 100000000 2" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 10000001 100000000 3" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 10000001 100000000 4" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 10000001 100000000 10000001 100000000 10000001 100000000 5" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 100000001 1000000000 1" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 100000001 1000000000 2" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 100000001 1000000000 3" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 100000001 1000000000 4" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 100000001 1000000000 100000001 1000000000 100000001 1000000000 5" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1" group="subtask3" method="generated" points="0.0"/>
                                
                <test cmd="gener 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 2" group="subtask3" method="generated" points="0.0"/>
                            
            </tests>
                        
            <groups>
                                
                <group feedback-policy="complete" name="samples" points="0.0" points-policy="complete-group"/>
                                
                <group feedback-policy="complete" name="subtask1" points="25.0" points-policy="complete-group">
                                        
                    <dependencies>
                                                
                        <dependency group="samples"/>
                                            
                    </dependencies>
                                    
                </group>
                                
                <group feedback-policy="complete" name="subtask2" points="35.0" points-policy="complete-group">
                                        
                    <dependencies>
                                                
                        <dependency group="samples"/>
                                                
                        <dependency group="subtask1"/>
                                            
                    </dependencies>
                                    
                </group>
                                
                <group feedback-policy="complete" name="subtask3" points="40.0" points-policy="complete-group">
                                        
                    <dependencies>
                                                
                        <dependency group="samples"/>
                                                
                        <dependency group="subtask1"/>
                                                
                        <dependency group="subtask2"/>
                                            
                    </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++"/>
                    
        </resources>
                
        <executables>
                        
            <executable>
                                
                <source path="files/gener.cpp" type="cpp.g++17"/>
                                
                <binary path="files/gener.exe" type="exe.win32"/>
                            
            </executable>
                        
            <executable>
                                
                <source path="files/validator.cpp" type="cpp.g++17"/>
                                
                <binary path="files/validator.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/validator.cpp" type="cpp.g++17"/>
                                
                <binary path="files/validator.exe" type="exe.win32"/>
                                
                <testset>
                                        
                    <test-count>5</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"/>
                                            
                    </tests>
                                    
                </testset>
                            
            </validator>
                    
        </validators>
                
        <solutions>
                        
            <solution tag="rejected">
                                
                <source path="solutions/np_task1.cpp" type="cpp.g++17"/>
                                
                <binary path="solutions/np_task1.exe" type="exe.win32"/>
                                
                <extra-tags>
                                        
                    <extra-tag tag="rejected" testset="tests"/>
                                        
                    <extra-tag group="subtask3" tag="rejected"/>
                                        
                    <extra-tag group="subtask2" tag="rejected"/>
                                        
                    <extra-tag group="subtask1" tag="accepted"/>
                                        
                    <extra-tag group="samples" tag="accepted"/>
                                    
                </extra-tags>
                            
            </solution>
                        
            <solution tag="rejected">
                                
                <source path="solutions/np_task2_dp.cpp" type="cpp.g++17"/>
                                
                <binary path="solutions/np_task2_dp.exe" type="exe.win32"/>
                                
                <extra-tags>
                                        
                    <extra-tag tag="rejected" testset="tests"/>
                                        
                    <extra-tag group="subtask3" tag="rejected"/>
                                        
                    <extra-tag group="subtask2" tag="accepted"/>
                                        
                    <extra-tag group="subtask1" tag="accepted"/>
                                        
                    <extra-tag group="samples" tag="accepted"/>
                                    
                </extra-tags>
                            
            </solution>
                        
            <solution tag="main">
                                
                <source path="solutions/np_task3.cpp" type="cpp.g++17"/>
                                
                <binary path="solutions/np_task3.exe" type="exe.win32"/>
                                
                <extra-tags>
                                        
                    <extra-tag tag="accepted" testset="tests"/>
                                        
                    <extra-tag group="subtask3" tag="accepted"/>
                                        
                    <extra-tag group="subtask2" tag="accepted"/>
                                        
                    <extra-tag group="subtask1" tag="accepted"/>
                                        
                    <extra-tag group="samples" tag="accepted"/>
                                    
                </extra-tags>
                            
            </solution>
                        
            <solution tag="rejected">
                                
                <source path="solutions/vm_task2_dp.cpp" type="cpp.g++17"/>
                                
                <binary path="solutions/vm_task2_dp.exe" type="exe.win32"/>
                                
                <extra-tags>
                                        
                    <extra-tag tag="rejected" testset="tests"/>
                                        
                    <extra-tag group="subtask3" tag="rejected"/>
                                        
                    <extra-tag group="subtask2" tag="accepted"/>
                                        
                    <extra-tag group="subtask1" tag="rejected"/>
                                        
                    <extra-tag group="samples" tag="accepted"/>
                                    
                </extra-tags>
                            
            </solution>
                    
        </solutions>
            
    </assets>
        
    <properties>
                
        <property name="tests-wellformed" value="true"/>
            
    </properties>
        
    <stresses>
                
        <stress-count>5</stress-count>
                
        <stress-path-pattern>stresses/%03d</stress-path-pattern>
                
        <list>
                        
            <stress index="5" path="stresses/005"/>
                        
            <stress index="4" path="stresses/004"/>
                        
            <stress index="3" path="stresses/003"/>
                        
            <stress index="2" path="stresses/002"/>
                        
            <stress index="1" path="stresses/001"/>
                    
        </list>
            
    </stresses>
        
    <tags>
                
        <tag value="dp"/>
                
        <tag value="implementation"/>
            
    </tags>
    
</problem>
