TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

10
2 2 6 2 1 3 6 4 1 4

Sample Output 1

2 6 4 1 2 2 6 3 1 4

Sample Input 2

10
2 5 5 5 10 2 3 3 10 2

Sample Output 2

2 10 5 5 5 2 3 3 10 2

Sample Input 3

10
8 4 9 4 6 5 8 2 4 8

Sample Output 3

8 2 4 9 4 6 5 8 4 8

Sample Input 4

7
2 3 2 1 4 3 4

Sample Output 4

2 3 4 3 2 1 4

Hints

Problem Source

111 學年度全國資訊學科能力競賽模擬賽

Subtasks

No. Testdata Range Constraints Score
1 0~3 範例測資 0
2 0~28 $N \leq 10$ 9
3 29~46 $a_i \leq 2$ 20
4 0~28, 47~64 $N \leq 1000$ 17
5 0~28, 47~82 $N \leq 10^ 5$ 21
6 0~91 無額外限制 33

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 4000 1048576 65536 1 2 4 5 6
1 4000 1048576 65536 1 2 4 5 6
2 4000 1048576 65536 1 2 4 5 6
3 4000 1048576 65536 1 2 4 5 6
4 4000 1048576 65536 2 4 5 6
5 4000 1048576 65536 2 4 5 6
6 4000 1048576 65536 2 4 5 6
7 4000 1048576 65536 2 4 5 6
8 4000 1048576 65536 2 4 5 6
9 4000 1048576 65536 2 4 5 6
10 4000 1048576 65536 2 4 5 6
11 4000 1048576 65536 2 4 5 6
12 4000 1048576 65536 2 4 5 6
13 4000 1048576 65536 2 4 5 6
14 4000 1048576 65536 2 4 5 6
15 4000 1048576 65536 2 4 5 6
16 4000 1048576 65536 2 4 5 6
17 4000 1048576 65536 2 4 5 6
18 4000 1048576 65536 2 4 5 6
19 4000 1048576 65536 2 4 5 6
20 4000 1048576 65536 2 4 5 6
21 4000 1048576 65536 2 4 5 6
22 4000 1048576 65536 2 4 5 6
23 4000 1048576 65536 2 4 5 6
24 4000 1048576 65536 2 4 5 6
25 4000 1048576 65536 2 4 5 6
26 4000 1048576 65536 2 4 5 6
27 4000 1048576 65536 2 4 5 6
28 4000 1048576 65536 2 4 5 6
29 4000 1048576 65536 3 6
30 4000 1048576 65536 3 6
31 4000 1048576 65536 3 6
32 4000 1048576 65536 3 6
33 4000 1048576 65536 3 6
34 4000 1048576 65536 3 6
35 4000 1048576 65536 3 6
36 4000 1048576 65536 3 6
37 4000 1048576 65536 3 6
38 4000 1048576 65536 3 6
39 4000 1048576 65536 3 6
40 4000 1048576 65536 3 6
41 4000 1048576 65536 3 6
42 4000 1048576 65536 3 6
43 4000 1048576 65536 3 6
44 4000 1048576 65536 3 6
45 4000 1048576 65536 3 6
46 4000 1048576 65536 3 6
47 4000 1048576 65536 4 5 6
48 4000 1048576 65536 4 5 6
49 4000 1048576 65536 4 5 6
50 4000 1048576 65536 4 5 6
51 4000 1048576 65536 4 5 6
52 4000 1048576 65536 4 5 6
53 4000 1048576 65536 4 5 6
54 4000 1048576 65536 4 5 6
55 4000 1048576 65536 4 5 6
56 4000 1048576 65536 4 5 6
57 4000 1048576 65536 4 5 6
58 4000 1048576 65536 4 5 6
59 4000 1048576 65536 4 5 6
60 4000 1048576 65536 4 5 6
61 4000 1048576 65536 4 5 6
62 4000 1048576 65536 4 5 6
63 4000 1048576 65536 4 5 6
64 4000 1048576 65536 4 5 6
65 4000 1048576 65536 5 6
66 4000 1048576 65536 5 6
67 4000 1048576 65536 5 6
68 4000 1048576 65536 5 6
69 4000 1048576 65536 5 6
70 4000 1048576 65536 5 6
71 4000 1048576 65536 5 6
72 4000 1048576 65536 5 6
73 4000 1048576 65536 5 6
74 4000 1048576 65536 5 6
75 4000 1048576 65536 5 6
76 4000 1048576 65536 5 6
77 4000 1048576 65536 5 6
78 4000 1048576 65536 5 6
79 4000 1048576 65536 5 6
80 4000 1048576 65536 5 6
81 4000 1048576 65536 5 6
82 4000 1048576 65536 5 6
83 4000 1048576 65536 6
84 4000 1048576 65536 6
85 4000 1048576 65536 6
86 4000 1048576 65536 6
87 4000 1048576 65536 6
88 4000 1048576 65536 6
89 4000 1048576 65536 6
90 4000 1048576 65536 6
91 4000 1048576 65536 6