{"problem":{"name":"A. Nearest Minimums","description":{"content":"You are given an array of _n_ integer numbers _a_0, _a_1, ..., _a__n_ - 1. Find the distance between two closest (nearest) minimums in it. It is guaranteed that in the array a minimum occurs at least ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF911A"},"statements":[{"statement_type":"Markdown","content":"You are given an array of _n_ integer numbers _a_0, _a_1, ..., _a__n_ - 1. Find the distance between two closest (nearest) minimums in it. It is guaranteed that in the array a minimum occurs at least two times.\n\n## Input\n\nThe first line contains positive integer _n_ (2 ≤ _n_ ≤ 105) — size of the given array. The second line contains _n_ integers _a_0, _a_1, ..., _a__n_ - 1 (1 ≤ _a__i_ ≤ 109) — elements of the array. It is guaranteed that in the array a minimum occurs at least two times.\n\n## Output\n\nPrint the only number — distance between two nearest minimums in the array.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"给定一个包含 #cf_span[n] 个整数的数组 #cf_span[a0, a1, ..., an - 1]。请找出其中两个最近的最小值之间的距离。题目保证数组中最小值至少出现两次。\n\n第一行包含一个正整数 #cf_span[n] (#cf_span[2 ≤ n ≤ 105]) —— 数组的大小。第二行包含 #cf_span[n] 个整数 #cf_span[a0, a1, ..., an - 1] (#cf_span[1 ≤ ai ≤ 109]) —— 数组的元素。题目保证数组中最小值至少出现两次。\n\n请输出一个数字——数组中两个最近的最小值之间的距离。\n\n## Input\n\n第一行包含一个正整数 #cf_span[n] (#cf_span[2 ≤ n ≤ 105]) —— 数组的大小。第二行包含 #cf_span[n] 个整数 #cf_span[a0, a1, ..., an - 1] (#cf_span[1 ≤ ai ≤ 109]) —— 数组的元素。题目保证数组中最小值至少出现两次。\n\n## Output\n\n请输出一个数字——数组中两个最近的最小值之间的距离。\n\n[samples]","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the size of the array, with $ 2 \\leq n \\leq 10^5 $.  \nLet $ A = (a_0, a_1, \\dots, a_{n-1}) $ be a sequence of integers with $ 1 \\leq a_i \\leq 10^9 $.  \nLet $ m = \\min(A) $ be the minimum value in $ A $.  \nLet $ I = \\{ i \\in \\{0, 1, \\dots, n-1\\} \\mid a_i = m \\} $ be the set of indices where the minimum occurs.\n\n**Constraints**  \n1. $ |I| \\geq 2 $\n\n**Objective**  \nCompute the minimum distance between any two distinct indices in $ I $:  \n$$\n\\min_{\\substack{i,j \\in I \\\\ i \\ne j}} |i - j|\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF911A","tags":["implementation"],"sample_group":[["2\n3 3","1"],["3\n5 6 5","2"],["9\n2 1 3 5 4 1 2 3 1","3"]],"created_at":"2026-03-03 11:00:39"}}