Elections

题意翻译

## 题目描述 有n(n<=100)个人,m(m<=100)个投票站,每个投票站对每个人都有一定的票数(<=1000). 第n个是坏蛋,请问去除掉哪几个投票站才能使他的票数不大于其他每个人中的一个,也就是不能让第n个人的总票数最多。 ### 输入格式 第一行是两个整数,分别是n和m. 接下来m行n列,代表每个投票站对这n个人的票数。 ### 输出格式 第一行一个整数k,代表需要去掉几个投票站。 第二行有k个数,代表投票站的号数,不要求字典序.

题目描述

Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the constituencies. Even one opposition member can disturb the stability in the Senate, so the head of the Party asks you to ensure that the opposition candidate will not be elected. There are $ n $ candidates, numbered from 1 to $ n $ . Candidate $ n $ is the opposition candidate. There are $ m $ polling stations in the constituency, numbered from 1 to $ m $ . You know the number of votes cast for each candidate at each polling station. The only thing you can do to prevent the election of the opposition candidate is to cancel the election results at some polling stations. The opposition candidate will be elected if the sum of the votes cast in their favor at all non-canceled stations will be strictly greater than the analogous sum for every other candidate. Your task is to prevent the election of the opposition candidate by canceling the election results at the minimal possible number of polling stations. Notice that solution always exists, because if you cancel the elections at all polling stations, the number of votes for each candidate will be 0, and the opposition candidate will not be elected.

输入输出格式

输入格式


The first line of the input contains two integers $ n $ and $ m $ ( $ 2\le n\le 100 $ ; $ 1\le m \le 100 $ ) — the number of candidates and the number of polling stations. The next $ m $ lines contain the election results at each polling station with $ n $ numbers on each line. In the $ i $ -th line the $ j $ -th number is $ a_{i,j} $ — the number of votes cast for the candidate $ j $ at the station $ i $ ( $ 0\le a_{i,j} \le 1\,000 $ ).

输出格式


In the first line output integer $ k $ — the minimal number of the polling stations in which you need to cancel the election results. In the second line output $ k $ integers — the indices of canceled polling stations, in any order. If there are multiple ways to cancel results at $ k $ stations, output any one of them.

输入输出样例

输入样例 #1

5 3
6 3 4 2 8
3 7 5 6 7
5 2 4 7 9

输出样例 #1

2
3 1 

输入样例 #2

2 1
1 1

输出样例 #2

0

输入样例 #3

3 3
2 3 8
4 2 9
3 1 7

输出样例 #3

3
1 2 3 

说明

In the first example, the candidates from 1 to 5 received 14, 12, 13, 15, and 24 votes correspondingly. The opposition candidate has the most votes. However, if you cancel the election results at the first and the third polling stations, then only the result from the second polling station remains and the vote sums become 3, 7, 5, 6, and 7, without the opposition candidate being in the lead anymore.