{"raw_statement":[{"iden":"statement","content":"You are given an array $b$ of size $m$.\n\nAn array $a$ of size $n$ is built from $b$ by the following formula:\n\n for every $i$ $(0 <= i < n)$ $a [ i ] = b [ i$ $m o d$ $m ]$.\n\nYou should find a sub-array from the array $a$ with a sum equal to $k$ and minimum possible size.\n\nThe arrays are 0 indexed.\n\nThe first line of input contains one integer $t$ which is the number of test cases.\n\nFor every test case :\n\nThe First line contains three integers $m$ $n$ $k$, which are the size of array $b$ and the size of array $a$ and the needed sum $(1 <= m <= 10^5)$ $(m <= n <= 10^9)$ $(-10^(18) <= k <= 10^(18))$.\n\nThe second line contains $m$ integers, the $i_{t h}$ one is $b_i$ $(-10^9 <= b_i <= 10^9)$, which is the $i_{t h}$ element in array $b$.\n\nit is guaranteed that the sum of $m$ between all test cases will not exceed $3 times 10^5$.\n\nFor every test case : If there is no sub-array of sum $k$ print $-1$ on a line.\n\nOtherwise print two integers $l$ and $r$ $(1 <= l <= r <= n)$ which is a sub-array with minimal possible size and sum equal to $k$.\n\nIf there is more than one answer print the sub-array with minimum possible $l$.\n\n"},{"iden":"input","content":"The first line of input contains one integer $t$ which is the number of test cases.For every test case :The First line contains three integers $m$ $n$ $k$, which are the size of array $b$ and the size of array $a$ and the needed sum $(1 <= m <= 10^5)$ $(m <= n <= 10^9)$ $(-10^(18) <= k <= 10^(18))$.The second line contains $m$ integers, the $i_{t h}$ one is $b_i$ $(-10^9 <= b_i <= 10^9)$, which is the $i_{t h}$ element in array $b$.it is guaranteed that the sum of $m$ between all test cases will not exceed $3 times 10^5$."},{"iden":"output","content":"For every test case : If there is no sub-array of sum $k$ print $-1$ on a line.Otherwise print two integers $l$ and $r$ $(1 <= l <= r <= n)$ which is a sub-array with minimal possible size and sum equal to $k$.If there is more than one answer print the sub-array with minimum possible $l$."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ t \\in \\mathbb{Z}^+ $ be the number of test cases.  \nFor each test case:  \n- Let $ m, n \\in \\mathbb{Z}^+ $ with $ 1 \\le m \\le 10^5 $, $ m \\le n \\le 10^9 $.  \n- Let $ b = (b_0, b_1, \\dots, b_{m-1}) \\in \\mathbb{Z}^m $ be the base array.  \n- Define array $ a = (a_0, a_1, \\dots, a_{n-1}) $ by $ a_i = b_{i \\bmod m} $.  \n- Let $ k \\in \\mathbb{Z} $ with $ -10^{18} \\le k \\le 10^{18} $ be the target sum.\n\n**Constraints**  \n1. $ \\sum_{\\text{test cases}} m \\le 3 \\times 10^5 $  \n2. All values are integers as specified.\n\n**Objective**  \nFind a contiguous sub-array $ a[l:r] $ (0-indexed, $ 0 \\le l \\le r < n $) such that:  \n$$\n\\sum_{i=l}^{r} a_i = k\n$$  \nand the length $ r - l + 1 $ is minimized.  \nIf multiple such sub-arrays exist, choose the one with minimum $ l $.  \nIf no such sub-array exists, output $-1$.  \nOutput the 1-indexed bounds $ (l+1, r+1) $.","simple_statement":"Given array $b$ of size $m$, create array $a$ of size $n$ where $a[i] = b[i \\mod m]$.\n\nFind the shortest contiguous subarray of $a$ with sum exactly $k$. If multiple exist, choose the one with smallest starting index. If none exists, output $-1$.","has_page_source":false}