{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"MD","content":"\u003cp\u003eOjk是一个很帅气的程序员,他准备去找网恋对象奔现。但这并不像听起来那么容易,Ojk现在面临的问题是找到最便宜的方式去对象的城市。\u003c/p\u003e\n\u003cp\u003eOjk知道$n$个机场。所有的机场都位于一条直线上。每个机场都有唯一的编号,从$1$到$n$, Ojk的家位于编号为$a$的机场旁边,对象所在的城市位于编号为$b$的机场旁边。Ojk的家和对象所在的城市有可能位于同一个机场附近。\u003c/p\u003e\n\u003cp\u003e为了去找对象,Ojk可以在任意一对机场之间飞行任意次数,但他必须从机场$a$开始,在机场b结束。\u003c/p\u003e\n\u003cp\u003e每个机场属于两家公司中的一家。如果两个机场属于同一家公司,则从机场$i$到机场$j$的飞行成本为零,如果两个机场属于不同的公司,则为$|i - j|$。\u003c/p\u003e\n\u003cp\u003e求Ojk找到对象的最低费用。\u003c/p\u003e"}},{"title":"Input","value":{"format":"MD","content":"\u003cp\u003e第一行包含三个整数$n, a, b(1≤n≤10^5,1≤a,b≤n)$—机场的数量,Ojk开始他的路线的机场编号和他要到达的机场编号。\n\u003c/p\u003e\n\u003cp\u003e第二行包含长度为n的字符串,仅由字符$0$和$1$组成。如果该字符串中的第$i$个字符为$0$,则第$i$个机场属于第一家公司,否则属于第二家公司。\u003c/p\u003e"}},{"title":"Output","value":{"format":"MD","content":"\u003cp\u003e1个整数——Ojk找到对象的最低费用。\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4 1 4\n1010\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5 5 2\n10110\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}