QOJ.ac

QOJ

Süre Sınırı: 10 s Bellek Sınırı: 256 MB Toplam puan: 100

#23823. 估數遊戲

İstatistikler

JOI 君決定同朋友玩一個遊戲。呢個遊戲有 $N$ 位玩家參加。$1$ 局遊戲嘅規則如下:

每位玩家喺張卡上面寫一個自己鍾意嘅 $1$ 至 $100$ 之間(包頭尾)嘅整數然後交出嚟。每位玩家如果冇其他人寫同自己一樣嘅數,就可以得到同自己寫嘅數一樣嘅分數;如果有其他人寫咗同自己一樣嘅數,就唔會得到分數。

JOI 君佢哋玩咗呢個遊戲 $3$ 次。畀定每位玩家喺 $3$ 次遊戲入面寫嘅數,請寫一個程式求每位玩家喺 $3$ 次遊戲入面得到嘅總分。

輸入格式

輸入由 $1 + N$ 行組成。

第 $1$ 行包含整數 $N$ ($2 \le N \le 200$),代表玩家嘅人數。

接住落嚟 $N$ 行入面嘅第 $i$ 行 ($1 \le i \le N$) 包含 $3$ 個用空格隔開、介乎 $1$ 至 $100$ 之間(包頭尾)嘅整數,分別代表第 $i$ 位玩家喺第 $1$ 次、第 $2$ 次、第 $3$ 次遊戲入面寫嘅數。

輸出格式

輸出由 $N$ 行組成。

喺第 $i$ 行 ($1 \le i \le N$) 輸出一個整數,代表第 $i$ 位玩家喺 $3$ 次遊戲入面得到嘅總分。

範例

輸入格式 1

5
100 99 98
100 97 92
63 89 63
99 99 99
89 97 98

輸出格式 1

0
92
215
198
89

說明

喺範例輸入 1 入面,每位玩家喺 $3$ 次遊戲入面得到嘅分數詳情如下:

  • 玩家 $1$: $0 + 0 + 0 = 0$
  • 玩家 $2$: $0 + 0 + 92 = 92$
  • 玩家 $3$: $63 + 89 + 63 = 215$
  • 玩家 $4$: $99 + 0 + 99 = 198$
  • 玩家 $5$: $89 + 0 + 0 = 89$

輸入格式 2

3
89 92 77
89 92 63
89 63 77

輸出格式 2

0
63
63

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.