QOJ.ac

QOJ

حد الوقت: 10 s حد الذاكرة: 256 MB مجموع النقاط: 100

#23823. เกมทายตัวเลข

الإحصائيات

JOI-kun ตัดสินใจเล่นเกมกับเพื่อนๆ ของเขา เกมนี้มีผู้เล่นเข้าร่วม $N$ คน กติกาการเล่นใน $1$ รอบมีดังต่อไปนี้:

ผู้เล่นแต่ละคนจะเขียนจำนวนเต็มที่ตนชอบตั้งแต่ $1$ ถึง $100$ ลงในบัตรแล้วส่ง หากไม่มีผู้เล่นคนอื่นเขียนจำนวนเดียวกับตน ผู้เล่นคนนั้นจะได้รับคะแนนเท่ากับจำนวนที่ตนเขียน แต่หากมีผู้เล่นคนอื่นเขียนจำนวนเดียวกับตน ผู้เล่นคนนั้นจะไม่ได้รับคะแนน

JOI-kun และเพื่อนๆ เล่นเกมนี้ทั้งหมด $3$ รอบ เมื่อกำหนดจำนวนที่ผู้เล่นแต่ละคนเขียนในการเล่นทั้ง $3$ รอบ จงเขียนโปรแกรมเพื่อหาคะแนนรวมที่ผู้เล่นแต่ละคนได้รับจากการเล่นทั้ง $3$ รอบ

ข้อมูลนำเข้า

ข้อมูลนำเข้าประกอบด้วย $1 + N$ บรรทัด

บรรทัดที่ $1$ มีจำนวนเต็ม $N$ ($2 \le N \le 200$) แทนจำนวนผู้เล่น

บรรทัดที่ $i$ ($1 \le i \le N$) จาก $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.