拼数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

设有 n 个正整数a~1~ ,····,a~n~将它们联接成一排,相邻数字首尾相接,组成一个最大的整数。

Format

Input

第一行有一个整数,表示数字个数 n。

第二行有 n 个整数,表示给出的 n 个整数 a~i~ .

Output

一个正整数,表示最大的整数

Samples

3
13 312 343
34331213

Limitation

1s, 1024KiB for each test case.

第七届SWPU-ACM新生预选赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
103
Start at
2022-9-19 14:00
End at
2022-10-28 14:00
Duration
936 hour(s)
Host
Partic.
58