QOJ.ac

QOJ

Süre Sınırı: 1 s Bellek Sınırı: 64 MB Toplam puan: 20

#23751. 问卷调查

İstatistikler

题目描述

某所学校计划去修学旅行,并为此进行了一次问卷调查。学生拥有从 $1$ 到 $n$ 的学生编号,旅行的候选地点用从 $1$ 到 $m$ 的编号表示,学生在想去的地方标上 $\circ$,在不想去的地方标上 $\times$ 后提交问卷。

此时,请编写一个程序,按想去的人数从多到少的顺序输出地点的编号。当人数相同时,按地点编号从小到大的顺序输出。

输入文件的文件名为 input.txt。input.txt 的第 $1$ 行包含用空格分隔的学生人数 $n$ 与旅行候选地点的数量 $m$,第 $i + 1$ 行排列着用空格分隔的 $m$ 个数字,表示学生 $i$ 的问卷结果,其中 $\circ$ 用 $1$ 表示,$\times$ 用 $0$ 表示。设 $1 \le n \le 1000, 1 \le m \le 100$。

输出文件的文件名为 output.txt。在 output.txt 中,请在输出(地点的编号)之后加入换行。

样例 1

样例输入 1

4 6
1 0 1 0 1 1
1 1 0 1 0 0
1 1 1 0 0 0
1 0 1 0 1 0

样例输出 1

1 3 2 5 4 6

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.