C. [NOIP 1998 提高组] 拼数

    远端评测题 1000ms 128MiB

[NOIP 1998 提高组] 拼数

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Description

Given nn positive integers a1ana_1 \dots a_n, arrange them in a row, concatenating adjacent numbers end to end, to form the largest possible integer.

Input Format

The first line contains an integer nn, the number of integers.

The second line contains nn integers aia_i, the given integers.

Output Format

Output a positive integer, the largest possible integer.

3
13 312 343

34331213

4
7 13 4 246
7424613

Hint

Constraints: For all test points, 1n201 \leq n \leq 20, 1ai1091 \leq a_i \leq 10^9.

NOIP 1998 Senior, Problem 2.

Translated by ChatGPT 5

清北信奥OJ平台初始上线友谊赛

未参加
状态
已结束
规则
XCPC
题目
4
开始于
2025-2-23 22:45
结束于
2025-2-25 10:45
持续时间
36 小时
主持人
参赛人数
0