{"raw_statement":[{"iden":"statement","content":"FIFA changed the style of the World Cup. There are no group rounds anymore, therefore the World Cup will be a pure knockout competition. In a knockout competition, each match that is played between two teams, the losing team is knocked-out of the competition and will not play again, until there's exactly one winner (we are not concerned about other positions, only the first place).\n\nHaving N teams in the World Cup, our ERCD wants to know how many matches he needs to watch (he will really watch all matches). He is lazy to count that number, so he needs you to write a program that calculates it.\n\nThe first line of the input contains a single integer 1 ≤ T ≤ 100 the number of test cases. Each test case consists of 1 line, containing a single integer N, the number of teams; where 1 ≤ N ≤ 100.\n\nFor each test case output a single line displaying the case number, followed by the number of matches the ERCD will watch.\n\n"},{"iden":"input","content":"The first line of the input contains a single integer 1 ≤ T ≤ 100 the number of test cases. Each test case consists of 1 line, containing a single integer N, the number of teams; where 1 ≤ N ≤ 100."},{"iden":"output","content":"For each test case output a single line displaying the case number, followed by the number of matches the ERCD will watch."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}_{\\geq 0} $, $ l \\in \\mathbb{Z}_{>0} $.  \nLet $ I = \\{ (x_i, y_i) \\mid i \\in \\{1, \\dots, n\\} \\} $ be the set of islands, where $ 0 < x_i < l $, $ -1000 \\leq y_i \\leq 1000 $, and all points are distinct.  \nLet $ S = (0, 0) $ be the Reverse Mountain.  \nLet $ T = (l, 0) $ be the New World entrance.  \n\n**Graph Construction**  \nDefine a directed graph $ G = (V, E) $, where:  \n- $ V = I \\cup \\{S, T\\} $  \n- $ E = \\{ (u, v) \\mid u, v \\in V, u \\neq v, \\, |x_u - x_v| + |y_u - y_v| \\leq 5, \\, x_u < x_v \\} $  \n\n**Constraints**  \n1. $ 0 \\leq n \\leq 10^5 $  \n2. $ 1 \\leq l \\leq 10^5 $  \n3. For all $ (x_i, y_i) \\in I $: $ 0 < x_i < l $, $ -1000 \\leq y_i \\leq 1000 $  \n4. All island coordinates are distinct.  \n5. There exists at least one path from $ S $ to $ T $ in $ G $.  \n\n**Objective**  \nFind the maximum number of islands in $ I $ that can be visited on any path from $ S $ to $ T $ in $ G $.  \nThat is, compute:  \n$$\n\\max_{P \\in \\mathcal{P}} \\left( |P \\cap I| \\right)\n$$  \nwhere $ \\mathcal{P} $ is the set of all directed paths from $ S $ to $ T $ in $ G $.","simple_statement":"You start at (0, 0) and want to reach (l, 0).  \nYou can only move from one point to another if:  \n- The new point is to the right (x increases),  \n- And the Manhattan distance ≤ 5.  \n\nYou can visit islands (given as (x_i, y_i)) along the way.  \nFind the maximum number of islands you can visit before reaching (l, 0).","has_page_source":false}