QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 64 MB Total points: 100

#23779. 競賽

Statistics

前幾天舉辦了一場線上程式設計競賽。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.