{"problem":{"name":"A. Balloons","description":{"content":"There are quite a lot of ways to have fun with inflatable balloons. For example, you can fill them with water and see what happens. Grigory and Andrew have the same opinion. So, once upon a time, the","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF998A"},"statements":[{"statement_type":"Markdown","content":"There are quite a lot of ways to have fun with inflatable balloons. For example, you can fill them with water and see what happens.\n\nGrigory and Andrew have the same opinion. So, once upon a time, they went to the shop and bought $n$ packets with inflatable balloons, where $i$\\-th of them has exactly $a_i$ balloons inside.\n\nThey want to divide the balloons among themselves. In addition, there are several conditions to hold:\n\n*   Do not rip the packets (both Grigory and Andrew should get unbroken packets);\n*   Distribute all packets (every packet should be given to someone);\n*   Give both Grigory and Andrew at least one packet;\n*   To provide more fun, the total number of balloons in Grigory's packets should not be equal to the total number of balloons in Andrew's packets.\n\nHelp them to divide the balloons or determine that it's impossible under these conditions.\n\n## Input\n\nThe first line of input contains a single integer $n$ ($1 \\le n \\le 10$) — the number of packets with balloons.\n\nThe second line contains $n$ integers: $a_1$, $a_2$, $\\ldots$, $a_n$ ($1 \\le a_i \\le 1000$) — the number of balloons inside the corresponding packet.\n\n## Output\n\nIf it's impossible to divide the balloons satisfying the conditions above, print $-1$.\n\nOtherwise, print an integer $k$ — the number of packets to give to Grigory followed by $k$ distinct integers from $1$ to $n$ — the indices of those. The order of packets doesn't matter.\n\nIf there are multiple ways to divide balloons, output any of them.\n\n[samples]\n\n## Note\n\nIn the first test Grigory gets $3$ balloons in total while Andrey gets $1$.\n\nIn the second test there's only one way to divide the packets which leads to equal numbers of balloons.\n\nIn the third test one of the boys won't get a packet at all.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"有非常多的方式可以和充气气球玩得开心。例如，你可以给它们装满水，然后看会发生什么。\n\nGrigory 和 Andrew 有同样的想法。因此，有一天，他们去商店买了 $n$ 包充气气球，其中第 $i$ 包恰好有 $a_i$ 个气球。\n\n他们希望将这些气球分给自己。此外，还需要满足以下条件：\n\n请帮助他们分配气球，或判断在这些条件下是否不可能实现。\n\n输入的第一行包含一个整数 $n$ ($1 lt.eq n lt.eq 10$) —— 气球包的数量。\n\n第二行包含 $n$ 个整数：$a_1$, $a_2$, $dots.h$, $a_n$ ($1 lt.eq a_i lt.eq 1000$) —— 每个包中气球的数量。\n\n如果无法在满足上述条件的情况下分配气球，请输出 $-1$。\n\n否则，请输出一个整数 $k$ —— 给 Grigory 的包的数量，接着输出 $k$ 个从 $1$ 到 $n$ 的不同整数 —— 这些包的编号。包的顺序无关紧要。\n\n如果有多种分配方式，输出任意一种即可。\n\n在第一个测试用例中，Grigory 总共得到 $3$ 个气球，而 Andrey 得到 $1$ 个。\n\n在第二个测试用例中，只有一种分配方式能使两人得到的气球数量相等。\n\n在第三个测试用例中，其中一个男孩将得不到任何包。\n\n## Input\n\n输入的第一行包含一个整数 $n$ ($1 lt.eq n lt.eq 10$) —— 气球包的数量。第二行包含 $n$ 个整数：$a_1$, $a_2$, $dots.h$, $a_n$ ($1 lt.eq a_i lt.eq 1000$) —— 每个包中气球的数量。\n\n## Output\n\n如果无法在满足上述条件的情况下分配气球，请输出 $-1$。否则，请输出一个整数 $k$ —— 给 Grigory 的包的数量，接着输出 $k$ 个从 $1$ 到 $n$ 的不同整数 —— 这些包的编号。包的顺序无关紧要。如果有多种分配方式，输出任意一种即可。\n\n[samples]\n\n## Note\n\n在第一个测试用例中，Grigory 总共得到 $3$ 个气球，而 Andrey 得到 $1$ 个。在第二个测试用例中，只有一种分配方式能使两人得到的气球数量相等。在第三个测试用例中，其中一个男孩将得不到任何包。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of packets.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of positive integers, where $ a_i $ is the number of balloons in packet $ i $.  \n\nLet $ G \\subseteq \\{1, 2, \\dots, n\\} $ be the set of packet indices given to Grigory.  \nLet $ A = \\{1, 2, \\dots, n\\} \\setminus G $ be the set of packet indices given to Andrew.  \n\n**Constraints**  \n1. $ 1 \\leq n \\leq 10 $  \n2. $ 1 \\leq a_i \\leq 1000 $ for all $ i \\in \\{1, \\dots, n\\} $  \n3. The total number of balloons given to Grigory equals that given to Andrew:  \n   $$\n   \\sum_{i \\in G} a_i = \\sum_{j \\in A} a_j\n   $$\n\n**Objective**  \nFind a subset $ G \\subseteq \\{1, \\dots, n\\} $ such that  \n$$\n\\sum_{i \\in G} a_i = \\frac{1}{2} \\sum_{i=1}^{n} a_i\n$$  \nIf such a $ G $ exists, output $ |G| $ and the elements of $ G $.  \nIf no such subset exists, output $ -1 $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF998A","tags":["constructive algorithms","implementation"],"sample_group":[["3\n1 2 1","2\n1 2"],["2\n5 5","\\-1"],["1\n10","\\-1"]],"created_at":"2026-03-03 11:00:39"}}