QOJ.ac

QOJ

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

#23751. Sondaggio

İstatistikler

Testo del problema

In una scuola si sta pianificando una gita scolastica e a tale scopo è stato condotto un sondaggio tramite questionario. Gli studenti hanno un numero di matricola da $1$ a $n$, mentre le località candidate per il viaggio sono rappresentate da numeri da $1$ a $m$. Ogni studente consegna il questionario segnando con $\circ$ i luoghi in cui vorrebbe andare e con $\times$ i luoghi in cui non vorrebbe andare.

Scrivi un programma che stampi i numeri dei luoghi in ordine decrescente rispetto al numero di studenti che desiderano visitarli. A parità di numero di studenti, i luoghi vanno ordinati secondo il loro numero identificativo.

Il nome del file di input è input.txt. Nella $1$-ª riga di input.txt sono indicati, separati da uno spazio, il numero di studenti $n$ e il numero di località candidate $m$; nella riga $i + 1$ sono elencati $m$ numeri separati da spazi che rappresentano i risultati del questionario dello studente $i$, esprimendo $\circ$ con $1$ e $\times$ con $0$. Si assuma $1 \le n \le 1000, 1 \le m \le 100$.

Il nome del file di output è output.txt. In output.txt, inserisci un ritorno a capo dopo l'output (i numeri dei luoghi).

Esempio 1

Input di esempio 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

Output di esempio 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.