QOJ.ac

QOJ

시간 제한: 2 s 메모리 제한: 64 MB 총점: 100

#23779. コンテスト

통계

先日,オンラインでのプログラミングコンテストが行われた.W大学とK大学のコンピュータクラブは以前からライバル関係にあり,このコンテストを利用して両者の優劣を決めようということになった.

今回,この $2$ つの大学からはともに $10$ 人ずつがこのコンテストに参加した.長い議論の末,参加した $10$ 人のうち,得点の高い方から $3$ 人の得点を合計し,大学の得点とすることにした.

W大学およびK大学の参加者の得点のデータが与えられる.このとき,おのおのの大学の得点を計算するプログラムを作成せよ.

入力

入力は $20$ 行からなる.$1$ 行目から $10$ 行目にはW大学の各参加者の得点を表す整数が,$11$ 行目から $20$ 行目にはK大学の各参加者の得点を表す整数が書かれている.これらの整数はどれも $0$ 以上 $100$ 以下である.

出力

W大学の得点とK大学の得点を,この順に空白区切りで出力せよ.

入出力例

入力例 1

23
23
20
15
15
14
13
9
7
6
25
19
17
17
16
13
12
11
9
5

出力例 1

66 61

入力例 2

17
25
23
25
79
29
1
61
59
100
44
74
94
57
13
54
82
0
42
45

出力例 2

240 250

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.