{
    "current_index": 3,
    "name": "试题集1",
    "problems": [
        {
            "cases": [
                {
                    "expected": "Yes\nin\nin\nin\nout\nout\nout",
                    "expected_output_filename": "",
                    "input": "3\n123\n321",
                    "input_filename": "",
                    "name": "试题案例1"
                },
                {
                    "expected": "Yes\nin\nout\nin\nout\n",
                    "expected_output_filename": "",
                    "input": "2\n12\n12",
                    "input_filename": "",
                    "name": "试题案例2"
                },
                {
                    "expected": "No\n",
                    "expected_output_filename": "",
                    "input": "3\n123\n312\n",
                    "input_filename": "",
                    "name": "试题案例3"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★实验任务</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">TonyY 等火车无聊的时候，会去观察火车的排列，有一天他思考这么一个问题，火车总站的火车只能进站，要出站的话只能先出最后进站的那辆车，那么知道火车的进站顺序，能不能把它的出站顺序调整成火车站想要的呢？</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输入</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输入第一行为一个正整数 n 表示火车辆数(编号 1-n)（1&lt;=n&lt;=9）。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">然后为两个长度为 n 的序列，表示火车的进站顺序和出站顺序。每辆火车刚好进出站各一次。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输出</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">如果可以调整，输出 Yes 和出入站顺序。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">如果不能，输出 No。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "火车",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/d952709f-9a5d-4c06-a411-2b9b89d1c56c/95db6445-452e-4625-b212-676b2293ac29/"
        },
        {
            "cases": [
                {
                    "expected": "60",
                    "expected_output_filename": "",
                    "input": "6\n3 1 6 4 5 2",
                    "input_filename": "",
                    "name": "试题案例1"
                },
                {
                    "expected": "48",
                    "expected_output_filename": "",
                    "input": "3\n4 4 4",
                    "input_filename": "",
                    "name": "试题案例2"
                },
                {
                    "expected": "52",
                    "expected_output_filename": "",
                    "input": "3\n4 4 5",
                    "input_filename": "",
                    "name": "试题案例3"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★实验任务</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">K 神最近喜欢上了刷题，一天不刷浑身难受。最近他研究发现，自己的人生价值在于他某段时间内的刷题总数乘上这几天刷题数的最小值，</span>现在 K 神很寂寞（无敌是多么寂寞），想知道他人生价值最高的时候究竟有多高（krz）</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输入</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第一行为总天数 N(1&lt;=N&lt;=100000)</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">接下来一行 N 个整数 ai（1&lt;=ai&lt;=100000），表示 K 神第 i 天的刷题数。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输出</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出 K 神在连续一段时间内可能的最高价值 W。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "价值",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/d952709f-9a5d-4c06-a411-2b9b89d1c56c/517b5f46-2e4f-4911-9cd6-1d907ab26d5e/"
        },
        {
            "cases": [
                {
                    "expected": "5 10 18",
                    "expected_output_filename": "",
                    "input": "6  \n3 1 4 1 5 9  \n3  \n7 7  \n0 2  \n8 17  \n",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★问题描述</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">少年甲很喜欢音乐，有一天他来到了少年乙的村落。少年甲一曲高山流水，寻觅到了乙这位知音。然而，天下没有不散的宴席，少年甲要回村杀猪了，离别在即，少年乙拿出了自己珍藏多年的吉他，作为离别的礼物。就在少年甲欣喜之际，少年乙说，这把吉他变幻莫测，每次你拿起它的时候，它会有n根弦，每根弦可以演奏出$10^{18}+1$个音符，而这$10^{18}+1$个音符是连续的，取决于它每根弦的第一个音符（请看样例说明）。<br />此时，少年甲提出了一个疑问，如果给定一个区间l，r（包括端点），里面共有几种不同的音符呢？少年乙对此谙熟于心，但是他想考验一下你，于是将这个问题抛给了你。</span></p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输入</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第一行一个正整数n(1&lt;=n&lt;=100,000)，表示吉他有几根弦。<br />第二行共n个数x，即代表对应弦的第一个音符(0&lt;=x&lt;=10^18)。<br />第三行一个正整数q(1&lt;=q&lt;=100,000)，表示少年甲的询问次数。<br />接下来q行，每行两个数l，r(0&lt;=l，r&lt;=10^18+1)，表示少年甲想要询问的区间。</span></p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输出</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出共q个数，表示对应q个询问的答案。即询问区间内有多少个不同的音符。以空格隔开。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★样例说明</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">列下标：0 1 2 3 4 5 ……<br />弦一：3 4 5 6 7 8 ……<br />弦二：1 2 3 4 5 6 ……<br />弦三：4 5 6 7 8 9 ……<br />弦四：1 2 3 4 5 6 ……<br />弦五：5 6 7 8 9 10 ……<br />弦六：9 10 11 12 13 14 ……</span></p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★Hint</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">（1）询问区间l，r即为样例说明中的列下标。<br />（2）所谓不同音符个数，即区间l，r内n行内不同的数字个数。<br />（3）由于l，r的范围巨大，请思考其与每行第一个数字的关系（即给出的第一个音符）。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "魔音吉他",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/3ba2602c-0dcb-48b4-bcc2-da17dc3b4493/df487d14-f6e0-4430-ae5a-3c2a1afc0cfe/"
        },
        {
            "cases": [
                {
                    "expected": "1 11 12 15\n",
                    "expected_output_filename": "",
                    "input": "4 2\n0 11 0 15 \n1 12 \n",
                    "input_filename": "",
                    "name": "试题案例1"
                },
                {
                    "expected": "-1\n",
                    "expected_output_filename": "",
                    "input": "4 2 \n0 0 11 15 \n1 12 \n",
                    "input_filename": "",
                    "name": "试题案例2"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★实验任务</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">给定两个序列 a b，序列 a 原先是一个单调递增的正数序列，但是由于某些 原因，使得序列乱序了，并且一些数丢失了（用 0 表示）。经过数据恢复后，找 到了正数序列 b ，且序列 a 中 0 的个数等于序列 b 的个数，打算使用序列 b 恢 复序列 a 。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">对于序列 a 来说，我们可以交换两个位置上的非零的数，并且可以交换任意 次。序列 b 同样也可以进行任意次交换。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">现在要将序列 b 填充到序列 a 中的值丢失的位置上，序列 b 中的每个数只能 填充一次，问最后构成的序列是否是单调递增的，如果是，则输出填充后的序列， 否则输出-1。</span></p>\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★数据输入</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输入给定 N M，表示序列 a 和序列 b 的长度。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第一行为序列 a ，第二行为 序列 b。 题目保证除了 0 以外的数，在序列 a 和 b 中只出现一次。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">数据保证:</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">80%的数据，N, M &lt;= 100</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">100%的数据，N, M &lt;= 100000, 0 &lt;= a[i] &lt;= 100000, 0 &lt; b[i] &lt;= 100000</span></p>\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★数据输出</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">如果最后序列 a 是单调递增的，输出该序列，否则输出-1。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "Just Sort",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/3ba2602c-0dcb-48b4-bcc2-da17dc3b4493/e510bf39-bd18-482c-bcd5-dea861a61607/"
        },
        {
            "cases": [
                {
                    "expected": "\n\n\n\n\n\n\n\n",
                    "expected_output_filename": "",
                    "input": "10\n2 3 74071\n3 1 2\n3 2 8\n2 3 71337\n3 3 7\n3 2 7\n4 2 10\n4 3 6\n4 3 4\n3 1 4",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">背景</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">操作系统具有对计算机硬件资源管理和调度的功能。文件是对占用了硬盘一定空间的对象的描述和抽象。考虑一般的文件具有文件名、大小和创建时间。文件管理在任何操作系统中都是必不可少的。文件管理器是用户用来观察和操作文件的一个软件。考虑一个简易的文件管理器，用户可以通过这个简易的文件管理器对某个目录下文件最大/小、文件名(字符串)字典序最大/最小的一些文件，即按XX排序功能，此外文件管理器具有删除和添加文件的功能。输入保证目录只有一级，操作随机。</span></p>\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">输入及输出格式</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第1行输入一个Q(1&lt;=Q&lt;=100000)，表示操作的次数。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第2-Q+1行输入一行操作序列</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">操作序列的格式为 op args</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">当op=1,即第一种操作时，args的格式为 folder name size 表示将要在某个folder目录(1&lt;=folder&lt;=5的整数)下添加文件名为name(1&lt;=name&lt;=100000的整数)的文件，文件大小为size(1&lt;=size&lt;=100000的整数)，如果文件名重复，就先删除原来的文件再进行1操作；</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">当op=2,即第二种操作时，args的格式为 folder name表示将要在某个folder目录(1&lt;=folder&lt;=5的整数)下删除文件名为name(1&lt;=name&lt;=100000的整数)的文件，如果文件名不存在，操作不执行；</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">当op=3,即第三种操作时，args的格式为 folder k 表示输出某个目录下文件大小最大至第k大的文件名，如果大小相同按文件名数字从小到大输出，如果不满k个文件只需要输出已有的文件名，如果文件夹为空或不存在则输出一个空行；</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">当op=4,即第四种操作时，args的格式为 folder k 表示输出某个目录下文件名数字大小最小至第k小的文件名，如果不满k个文件只需要输出已有的文件名，如果文件夹为空或不存在则输出一个空行；</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">保证1&lt;= k &lt;=10</span></p>\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">备注</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出文件名以空格隔开，不输出多余的换行和空格</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">样例说明</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">样例输出为8个空行</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "文件管理器",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/6155eb03-8746-4d1d-91c6-8f4aed0b2ea5/f0d3a30c-aa82-4e19-8352-103f522d74e2/"
        },
        {
            "cases": [
                {
                    "expected": "3<2><5<4><7>>",
                    "expected_output_filename": "",
                    "input": "5\n2 4 7 5 3",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★实验任务</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">Winder 养了一群会报数的鼹鼠，而且Winder喜欢用数字给他的鼹鼠们编号，如“311”、“1048”等。当然，为了不混淆，鼹鼠们的编号都是不同的。为了锻炼鼹鼠们的身体健康，Winder决定让鼹鼠们进行掘土训练，顺便提高鼹鼠们的挖掘能力。<br />鼹鼠们排成一列，由第一个开始向下挖洞，并待在洞中。第二只与第一只相比，若编号值大的鼹鼠，则向右下方挖洞，否则向左下方。接下来的鼹鼠们以此类推，若比洞中所在鼹鼠编号值大，则向右下方走，否则向左下方。<br />训练结束后，Winder会让他的鼹鼠们报数（既报出各自的编号）。通过报数的序列Winder想知道经过训练之后，鼹鼠们的位置是怎样的。<br />报数规则为：如果A鼹鼠的下方分别存在ALeft鼹鼠和ARight鼹鼠，则ALeft鼹鼠在ARight鼹鼠之前报数，ARight鼹鼠在A鼹鼠之前报数。<br />位置表达式规则为：“根节点&lt;左子树表达式&gt;&lt;右子树表达式&gt;”,如左子树不存在,则只输出“根节点&lt;右子树表达式&gt;”，右子树同理。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★数据输入</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第一行为N（2&lt;N&lt;=1000），表示有N只鼹鼠。<br />第二行为N个整数bi（0&lt;bi&lt;10000），表示报数顺序。</span></p>\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★数据输出</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出鼹鼠们的位置表达式。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "鼹鼠报数",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/6155eb03-8746-4d1d-91c6-8f4aed0b2ea5/070124e7-0af6-4498-9264-4d166c1e61f5/"
        },
        {
            "cases": [
                {
                    "expected": "2",
                    "expected_output_filename": "",
                    "input": "4 4\n1 4 5\n1 3 3\n2 3 10\n2 4 10\n1 2",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px; font-weight:600;\">★问题描述</span><span style=\" font-size:32px;\"> </span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">数据结构与算法课程里面有各种求解最短路的算法，比如floyd算法、dijkstra算法、bellman算法。但该难题需要求解的不是最短路，而是求最短路的路径条数。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px; font-weight:600;\">★实验任务</span><span style=\" font-size:32px;\"> </span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">我们定义从source到达target的路径：source→u→v→target是最短路，当且仅当该路径里面的所有边（u，v）满足：存在一条从v出发到终点的路径长度小于任意一条从u出发到终点的路径长度。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">对于给定的一个无向无自环的图给你一个起点和一个终点，求出从起点到终点的最短路的路径条数。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px; font-weight:600;\">★数据输入</span><span style=\" font-size:32px;\"> </span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第一行有两个正整数N(1&lt;=N&lt;=1000),M(0&lt;=M&lt;=(N-1)*N/2)。N代表图G的顶点个数,M代表图G有M条边。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">接下来一共有M 条边的描述， 每条边的描述有三个整数u(1&lt;=u&lt;=N),v(1&lt;=v&lt;=N),len(1&lt;=len&lt;=1000)。代表从u点到v点有一条边，且边的长度为len。数据保证u!=v且不会出现重边。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">最后一行有两个整数S(1&lt;=S&lt;=N),T(1&lt;=T&lt;=N)。分别表示起点和终点。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px; font-weight:600;\">★数据输出</span><span style=\" font-size:32px;\"> </span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出一行为从S到T的最短路长度，如果S根本就走不到T就输出-1</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "图论难题",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/c88a8d79-a930-44df-adb5-83bbc073fc30/69a218a9-6962-454b-a82c-866733291fa4/"
        },
        {
            "cases": [
                {
                    "expected": "6.47",
                    "expected_output_filename": "",
                    "input": "4\n0 0\n1 2\n-1 2\n0 4",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★问题描述</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">给定平面上的n个点，添加一些边使得任何两个点之间都能相互到达，求添加的边的长度总和最小为多少</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输入</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">第一行一个正整数n(1&lt;=n&lt;=5000)，表示序列有n个点，<br />接下来有n行，每行两个整数xi和yi，（-1000000≤xi,yi≤1000000），表示n个点的坐标</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输出</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">添加的边的长度总和的最小值，四舍五入保留两位小数</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "最小生成树",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/c88a8d79-a930-44df-adb5-83bbc073fc30/4912640d-4926-4784-a2cb-cadd5bd7c734/"
        },
        {
            "cases": [
                {
                    "expected": "1\n0\n0\n1\n1\n0\n",
                    "expected_output_filename": "",
                    "input": "3 6\n1 1 0\n1 1\n1 2\n1 3\n2 2\n2 3\n3 3",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★实验任务</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">如果一个序列的元素的异或和等于 1，我们称这个序列为优雅的序列。现在给你一个01序列，和m次询问。对于每次询问，给出l,r。请你输出子序列a[l…r]的异或和。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输入</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输入第一行为正整数 n，m。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第二行为 n 个正整数 a[1…n]。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">接下来的 m 行，每行两个数 l,r。(1&lt;=l&lt;=r&lt;=n)</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">80%的数据 1&lt;=n,m&lt;=1000.</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">100%的数据1&lt;=n,m&lt;=100000.</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输出</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出 m 行，每行一个数表示 a[l…r]的异或和。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "优雅的序列",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/ce34b147-55e9-415a-ad3c-5e23c118aa49/ca47d69d-7f9d-4656-a0f5-d6fd39ce93d6/"
        },
        {
            "cases": [
                {
                    "expected": "2\n",
                    "expected_output_filename": "",
                    "input": "10\n",
                    "input_filename": "",
                    "name": "试题案例1"
                },
                {
                    "expected": "2",
                    "expected_output_filename": "",
                    "input": "32",
                    "input_filename": "",
                    "name": "试题案例2"
                },
                {
                    "expected": "1",
                    "expected_output_filename": "",
                    "input": "4",
                    "input_filename": "",
                    "name": "试题案例3"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★实验任务</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">验证哥德巴赫猜想。计算给定的大偶数可以表示为多少对素数之和。例如，大偶数 10 可以表示为 2 对素数 3，7 和 5，5 之和。</span></p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输入</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输入数据只有一行，一个大偶数 N（2&lt;=N&lt;=30000）。</span></p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输出</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出计算出的相应的素数分解数。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "哥德巴赫猜想问题",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/ce34b147-55e9-415a-ad3c-5e23c118aa49/99640f61-4359-4aed-8746-351d6e47ccfa/"
        },
        {
            "cases": [
                {
                    "expected": "1 2 1 2 3\n-1\n3 2 1 3 1 2 1 2 3\n1\n3 2 3 2 2 3",
                    "expected_output_filename": "",
                    "input": "3 9\n2 1 2\n3 1 2 3\n4 3 2 1 3\nU 1 2\nQ 1\nQ 2\nU 3 1\nQ 3\nI 1 1\nQ 1\nD 3 1\nQ 3",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★实验任务</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">亚克星上住着许多神奇的生物。其中有聪慧的人族、优雅的精灵、彪悍的野蛮猪、粗鲁的首任驻….有一天，住在湛蓝球上的恶魔们突破空间的封锁入侵这个美丽的星球。为了保卫共同的家园，亚克星各族不得不摒弃前嫌，组成联盟。为了更有利的反击恶魔们的入侵，他们建立了统一的军事指挥中心。在前期，指挥中心会不停的发布军队调动命令，可是，麻烦来了。为了更好的做出决策，指挥中心必须迅速了解己方的各地区的军事力量详情。你能否帮帮这些可怜的种族呢？</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">每个地区有一个编号（从 1 到 N），如果一个地区有军队的话，这些军队将组成一个军团。指挥中心将发布的命令如下：</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">U a b:将 b 地区军团的调到 a 地区，从而组成一个新的军团。为了便于管理，每次新加入的军队将按顺序加入到 a 军团后面。数据保证 a 与 b 不相同。<br />I a x:将一支人数为 x的军队调到 a 地区。为了便于管理，每次新加入的军队将加入到a军团前面。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">D a x:将 a 地区中军队人数为x 的调走。若不存在，则不执行。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">Q a：询问 a 地区的具体军事信息（即按顺序输出该军团中每个军队的人数）。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输入</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输入第一行为两个正整数 N ,M(2 &lt;= N,M &lt;= 1000)。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">接下来 N 行，每行第一个数 K 表示该地区军队的个数 K(1&lt;=K&lt;=100)，接下来 K 个数,表示各个军队的人数信息(0&lt;=ai&lt;2^31)。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">接下来 M 行，每行一个操作。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输出</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">对于每个询问操作，输出一行表示 a 地区具体军事信息，每两个数之间空格隔开,，行末无空格。若 a 内无元素，输出-1。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "亚克星上的军队",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/e673befd-b4b2-4bf5-be31-fb95dc4aedd0/94e46928-8af7-4cac-a438-dc1ca6544e05/"
        },
        {
            "cases": [
                {
                    "expected": "2\n3\n29\n83",
                    "expected_output_filename": "",
                    "input": "4\n1\n2\n10\n20",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★实验任务</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">猪妈妈有很多小猪仔，每次吃完饭洗盘子是一个很大的问题。这天猪妈妈想出了一个方法。她让小猪们排成一队，从 2 开始给他们编号。每次排在最前面的不用洗盘子（假设它的编号是 i ），但是，排在它后面的第 i 只 ，2*i 只，3*i 只…的小猪要洗盘子。让排在最前面以及要洗盘子的小猪出队，然后重复上述过程。那些不用洗盘子的小猪被称为幸运猪（lucky pigs），把它们的编号从小到大排序，现在要问第 n 个幸运猪的编号是多少。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">比如说一开始，在最前面的小猪编号是 2，那么它不用洗盘子，出队。在它后面的第 2 只小猪，就是编号为 4 的小猪要洗盘子，编号为 6,8,10…的小猪都要洗盘子，然后它们都出队。其中编号为 2 的小猪就是第一只幸运猪了。接下排在最前面的小猪编号是 3，它是幸运猪，出队。在它后面的第 3 只，就是编号为 9 的小猪要洗盘子，出队。以此类推。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输入</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输入第一行为 T ，代表接下去有 T 个询问， 0 &lt; T &lt; =300</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">接下去有 T 行，每行一个数 n ，0 &lt; n &lt; =3000</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输出</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">对于每个询问输出一行，为第 n 个幸运猪的编号。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "洗盘子",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/e673befd-b4b2-4bf5-be31-fb95dc4aedd0/e40befeb-3a1d-4027-a32a-396d9679527c/"
        },
        {
            "cases": [
                {
                    "expected": "13",
                    "expected_output_filename": "",
                    "input": "7 8\n#.#####.\n#.a#..r.\n#..#x...\n..#..#.#\n#...##..\n.#......\n........",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★实验任务</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">有一天，公主被一个魔王抓走关在一个城堡里面，城堡可以用 N*M 的矩阵来描述，1&lt;N,M&lt;=200。监狱由 N*M 个方格组成，每个方格中可能为墙壁，空地，怪物，公主或者是勇士。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">现在勇士想去营救公主。他的任务是找到公主。约定，“找到公主”的意思是到达公主被关的位置。如果勇士想到达某个方格，但方格中有怪物，那么必须杀死怪物，才能到达这个方格。假设勇士只能向上，下，左，右四个方向移动一步。移动一步的需要花费 1 个单位的时间，杀死怪物也需要一个单位的时间。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">试着计算勇士找到公主需要多长时间。只能上，下，左，右移动，而且墙壁不能通过。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输入</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输入第一行包含 2 个整数 N，M，接下来 N 行，每行 M 个字符：“.”代表空地，“a”表示公主，“r”表示勇士，“#”代表墙壁，“x”表示怪物。（测试数据中“a”和“r”只有一个）。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输出</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出一个整数，表示找到公主所需要最短的时间。如果无法找到公主，输出-1。</span></p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "Rescue the princess",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/32dcccad-00e1-48c3-b56b-fd4ee00c45c9/f813adc7-d13f-4235-aaa0-a2dd68066692/"
        },
        {
            "cases": [
                {
                    "expected": "1",
                    "expected_output_filename": "",
                    "input": "1",
                    "input_filename": "",
                    "name": "试题案例1"
                },
                {
                    "expected": "1 3 5 7 4 2\n6",
                    "expected_output_filename": "",
                    "input": "7",
                    "input_filename": "",
                    "name": "试题案例2"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★实验任务</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">作为炉石传说的发牌员，你的任务就是发牌。从上到下有 n 张牌，编号 1~n。因为你和选手进行了一次“交易”，所以当至少还剩两张牌时，发出最上面的牌，<br />第二张牌放到最下面，重复这个过程直到只剩下一张牌。输出发牌的序列和最后剩下的牌。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输入</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">第一行 1 个正整数 n (1=&lt;n&lt;1000)</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">★数据输出</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:32px;\">输出一行为发牌的序列，一行为最后剩下的牌。两个数字之间用空格隔开，末尾没有空格。</span></p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">★Hint</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">第一个样例 n=1,只输出一行。</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "交易",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/32dcccad-00e1-48c3-b56b-fd4ee00c45c9/19079148-3e04-4862-b7fe-dfa5b3e6ee22/"
        },
        {
            "cases": [
                {
                    "expected": "59\n",
                    "expected_output_filename": "",
                    "input": "5\n5 3 8 2 9\n",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★问题描述</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">对于给定的一个数列，求出用该数列构造Huffman树的总费用。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">给出一列数{<span style=\" font-style:italic;\">pi</span>}={<span style=\" font-style:italic;\">p</span>0, <span style=\" font-style:italic;\">p</span>1, …, <span style=\" font-style:italic;\">pn</span>-1}，用这列数构造Huffman树的过程如下：</p>\n<ol style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">找到{<span style=\" font-style:italic;\">pi</span>}中<span style=\" font-weight:600;\">最小的两个数</span>，设为<span style=\" font-style:italic;\">pa</span>和<span style=\" font-style:italic;\">pb</span>，将<span style=\" font-style:italic;\">pa</span>和<span style=\" font-style:italic;\">pb</span>从{<span style=\" font-style:italic;\">pi</span>}中<span style=\" font-weight:600;\">删除</span>掉，然后**将它们的和加入到{<span style=\" font-style:italic;\">pi</span>}**中。<span style=\" font-weight:600;\">这个过程的费用记为</span><span style=\" font-weight:600; font-style:italic;\">pa</span><span style=\" font-weight:600;\"> + </span><span style=\" font-weight:600; font-style:italic;\">pb</span>。</li>\n<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">重复步骤1，<span style=\" font-weight:600;\">直到{</span><span style=\" font-weight:600; font-style:italic;\">pi</span><span style=\" font-weight:600;\">}中只剩下一个数</span>。</li></ol>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">在上面的操作过程中，把所有的费用相加，就得到了构造Huffman树的总费用。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">例如，对于数列{<span style=\" font-style:italic;\">pi</span>}={5, 3, 8, 2, 9}，Huffman树的构造过程如下：</p>\n<ol style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">找到{5, 3, 8, 2, 9}中最小的两个数，分别是2和3，从{<span style=\" font-style:italic;\">pi</span>}中删除它们并将和5加入，得到{5, 8, 9, 5}，费用为5。</li>\n<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">找到{5, 8, 9, 5}中最小的两个数，分别是5和5，从{<span style=\" font-style:italic;\">pi</span>}中删除它们并将和10加入，得到{8, 9, 10}，费用为10。</li>\n<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">找到{8, 9, 10}中最小的两个数，分别是8和9，从{<span style=\" font-style:italic;\">pi</span>}中删除它们并将和17加入，得到{10, 17}，费用为17。</li>\n<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">找到{10, 17}中最小的两个数，分别是10和17，从{<span style=\" font-style:italic;\">pi</span>}中删除它们并将和27加入，得到{27}，费用为27。</li>\n<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">现在，数列中只剩下一个数27，构造过程结束，总费用为5+10+17+27=59。</li></ol>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输入</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">输入的第一行包含一个正整数<span style=\" font-style:italic;\">n</span>（<span style=\" font-style:italic;\">n</span>&lt;=100）。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">接下来是<span style=\" font-style:italic;\">n</span>个正整数，表示<span style=\" font-style:italic;\">p</span>0, <span style=\" font-style:italic;\">p</span>1, …, <span style=\" font-style:italic;\">pn</span>-1，每个数不超过1000。</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输出</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">用这些数构造Huffman树的总费用。</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "Huffuman树问题",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/20760281-1aec-4acc-8441-b5c94d3e06aa/dda394a5-424b-42b7-94e1-91fe8f76bd9e/"
        },
        {
            "cases": [
                {
                    "expected": "5 12 4\n",
                    "expected_output_filename": "",
                    "input": "3\n10 10 5\n5 7 2\n",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★实验任务</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">火人喜欢堆雪人。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">已知火人在接下来的N天中，每天早上都会堆一个大小为vi的雪人。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">但是火人的温度太高了！每天晚上，所有已存在的雪人的体积都会由于融化而减少ti（若雪人体积不足ti，则雪人体积融化至0）。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">问，每天融化的总体积为多少？</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输入</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">输入第一行为正整数N (1&lt;=N&lt;=10^5)</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">第二行为N个正整数vi (1&lt;=vi&lt;=10^5)，代表每天堆的雪人的体积。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">第三行为N个正整数ti (1&lt;=ti&lt;=10^5)，表示每天雪人融化的体积。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">对于80%的数据， 1&lt;=N&lt;=100</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">对于100%的数据， 1&lt;=N&lt;=10^5</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输出</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">输出N个整数，代表每天融化的体积。（整数间以空格分隔）</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "森林冰火人",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/20760281-1aec-4acc-8441-b5c94d3e06aa/8e3c7464-bb6e-41b5-b115-1c9cca687651/"
        },
        {
            "cases": [
                {
                    "expected": "2 3\n",
                    "expected_output_filename": "",
                    "input": "3 3\n1 1 2\n1 3 2\n2 2\n",
                    "input_filename": "",
                    "name": "试题案例1"
                },
                {
                    "expected": "ERROR\n2 2\n3 3\n",
                    "expected_output_filename": "",
                    "input": "3 5\n1 1 2\n1 2 1\n2 1\n1 1 3\n2 1\n",
                    "input_filename": "",
                    "name": "试题案例2"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★实验任务</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">A国有 N个城市，这些城市编号为 1到 N，有一天，他们调查出恐怖分子在每个城市中都安放了炸弹，于是他们给炸弹也编上了序号，第 i 个城市里的炸弹编号为 i。现在他们想把这些炸弹转移，以便于销毁炸弹。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">由于炸弹是通过不同人转移的，所以需要一个指挥部门来记录转移炸弹的信息，以便于有些人要查询这些信息。我们有两个操作：</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">1.将 a 炸弹目前所在城市中所有的炸弹转移到 b 炸弹所在的城市。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">2.询问 a 炸弹目前在哪个城市编号和这个城市中有炸弹个数。</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输入</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">输入第一行包含两个数 N,Q（1&lt;=N&lt;=500000 , 1&lt;=Q&lt;=120000）。分别表示城市的个数和操作数。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">接下来有 Q 行，每行表示一个操作，第一种操作输入格式为 1 a b，第二种操作输入格式为 2 a。（1&lt;=a,b&lt;=N）</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输出</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">对于第一个操作，如果两个炸弹在同一个城市里，输出“ERROR”，并不执行此操作。否则执行操作并不输出任何东西。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">对于第二种操作，输出一行两个数表示炸弹所在的城市编号和该城市中炸弹个数，用一个空格分开。</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "转移炸弹",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/26d477e1-da96-41a5-a94a-7a629c23d17a/68f2e0ba-4c50-4c9b-834a-972e26774374/"
        },
        {
            "cases": [
                {
                    "expected": "Yes\nYes\nNo\nNo\n",
                    "expected_output_filename": "",
                    "input": "6 8 5 3 5 2 6 4 5 6 0 0\n8 1 7 3 6 2 8 9 7 5 7 4 7 8 7 6 0 0\n3 8 6 8 6 4 5 3 5 6 5 2 0 0\n1 2 3 4 0 0\n-1 -1\n",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★实验任务</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">某省调查城镇交通状况，得到现有城镇道路统计表，现给出每条道路连接的城镇编号，问当前的道路设计方案是否合理。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">合理的方案为任意两个城镇之间可以相互到达，有且只有一条通路。</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输入</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">输入a b(1&lt;=a,b&lt;=10,000)，表示城镇 a 和城镇 b 连通。输入包含多组数据，每组数据以 0 0 结束。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">整个文件以 -1 -1 结尾</p>\n<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">★数据输出</span></h3>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">如果方案合法，输出&quot;Yes&quot;,否则输出&quot;No&quot;。</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "道路",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/26d477e1-da96-41a5-a94a-7a629c23d17a/7149fa88-3534-40c0-9b91-f4fa4420ca98/"
        },
        {
            "cases": [
                {
                    "expected": "2\n2 4\n",
                    "expected_output_filename": "",
                    "input": "4\n2 2 4\n2 2 4\n3 2 2 4\n4 2 3 4 5\n",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★实验任务</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">正如你所知道sins是一个贪玩的不得了的小P孩（如果你非常讨厌他可以直接跳到第二段），你也知道他最近很喜欢玩一个叫做太阳帝国的原罪的策略游戏我向你保证这是太阳帝国原罪系列的第七章了。<br />现在sins拥护N个星球，每个星球m种不同的资源，每个资源都拥有一个编号A，对于sins来说N个星球都有的资源才是最宝贵的，他想知道这样的资源有哪些？</p>\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★数据输入</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">第1行是正整数N（1&lt;=N&lt;=1000）。<br />第2~N+1行各有一个正整数m和m个正整数编号A(有重复)，（0&lt;m&lt;=1000, 0 &lt;= A &lt;=10^9）.</p>\n<h2 style=\" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:x-large; font-weight:600;\">★数据输出</span></h2>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">第一行一个整数S，表示N个星球都拥有的资源个数。<br />如果S不等于0输出第二行，按照升序输出S个整数表示资源编号(无重复)，资源编号之间有空格，结尾没有空格。</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "Sins of a Solar Empire P7",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/622e2f54-967f-4504-b26b-db18f191f8fb/5c010c91-6256-4550-b91f-258d0566b0bd/"
        },
        {
            "cases": [
                {
                    "expected": "YES\nNO\nNO\n",
                    "expected_output_filename": "",
                    "input": "2 3\nbbbbb\nbcbcbcb\nbbabb\nccbcbcc\ncbbbc\n",
                    "input_filename": "",
                    "name": "试题案例1"
                }
            ],
            "description": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Microsoft YaHei UI'; font-size:32px; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">★实验任务</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">定义一种语言L，L语言中所有的字符串只能由abc三个字母组成。<br />在语言L之上定义一种特殊匹配规则R，R的定义如下：假设有两个字符串x和y，x和y等长，且x与y有且只有一个位置上的字符不同。<br />例如字符串x为“abc”：<br />（1）若字符串y为”abb”，这x与y符合R匹配；<br />（2）若y为”abc”或”bbb”或”abcc”，则x与y不符合R匹配。<br />现给定一个由n个x字符串构成的匹配表r，然后进行m次询问。每次询问输入一个y字符串，然后判断r表中是否存在与y符合R匹配的x字符串，若有输出”YES”，否则输出”NO”。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">★数据输入</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">输入中第一行给出一整数n，m（1&lt;=n,m&lt;=1000）。<br />接下来n行给出n个x字符串。<br />接下来m行，每行输入一个y字符串进行询问。<br />题目保证每一个字符串的长度在1000以内。</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">★数据输出</p>\n<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">对于m个询问，每个询问输出在x个字符串中是否有与y字符串符合R匹配的字符串，若有输出”YES”，否则输出”NO”。</p></body></html>",
            "memory_limit": 0,
            "memory_limit_unit": 1,
            "name": "特殊匹配R",
            "time_limit": 0,
            "time_limit_unit": 0,
            "url": "https://ds.fzu.edu.cn/std/exp/8862dcb0-8f7e-4796-a144-ed4714ec2b03/622e2f54-967f-4504-b26b-db18f191f8fb/5093d22e-fc65-41f4-a3a1-3a6d21dc94b3/"
        }
    ]
}
