Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
2022 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2023 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2024 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2251 . A. 髮廊服務優化問題
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Caido
$\mathbb{W}\mathcal{aimai}\sim$
User's AC Ratio
100.0% (
105/105
)
Submission's AC Ratio
92.9% (
130
/
140
)
Tags
Show solution-related tags
全國賽
2021-全國賽
nhspc110
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
3
3 1 2
Sample Output 1
copy
10
Sample Input 2
copy
5
5 2 1 4 3
Sample Output 2
copy
35
Sample Input 3
copy
10
9 5 3 4 10 1 7 6 8 2
Sample Output 3
copy
220
Hints
Problem Source
110 學年度全國資訊學科能力競賽
測資來源:
TWPCA GitHub
Subtasks
No.
Testdata Range
Constraints
Score
1
0~2
範例測資。
0
2
3~13
$t_i \le 3$
20
3
14~34
$t_i \le 100$
30
4
35~55
無額外限制。
50
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
1000
1048576
65536
1
1
1000
1048576
65536
1
2
1000
1048576
65536
1
3
1000
1048576
65536
2
4
1000
1048576
65536
2
5
1000
1048576
65536
2
6
1000
1048576
65536
2
7
1000
1048576
65536
2
8
1000
1048576
65536
2
9
1000
1048576
65536
2
10
1000
1048576
65536
2
11
1000
1048576
65536
2
12
1000
1048576
65536
2
13
1000
1048576
65536
2
14
1000
1048576
65536
3
15
1000
1048576
65536
3
16
1000
1048576
65536
3
17
1000
1048576
65536
3
18
1000
1048576
65536
3
19
1000
1048576
65536
3
20
1000
1048576
65536
3
21
1000
1048576
65536
3
22
1000
1048576
65536
3
23
1000
1048576
65536
3
24
1000
1048576
65536
3
25
1000
1048576
65536
3
26
1000
1048576
65536
3
27
1000
1048576
65536
3
28
1000
1048576
65536
3
29
1000
1048576
65536
3
30
1000
1048576
65536
3
31
1000
1048576
65536
3
32
1000
1048576
65536
3
33
1000
1048576
65536
3
34
1000
1048576
65536
3
35
1000
1048576
65536
4
36
1000
1048576
65536
4
37
1000
1048576
65536
4
38
1000
1048576
65536
4
39
1000
1048576
65536
4
40
1000
1048576
65536
4
41
1000
1048576
65536
4
42
1000
1048576
65536
4
43
1000
1048576
65536
4
44
1000
1048576
65536
4
45
1000
1048576
65536
4
46
1000
1048576
65536
4
47
1000
1048576
65536
4
48
1000
1048576
65536
4
49
1000
1048576
65536
4
50
1000
1048576
65536
4
51
1000
1048576
65536
4
52
1000
1048576
65536
4
53
1000
1048576
65536
4
54
1000
1048576
65536
4
55
1000
1048576
65536
4
Submit
Back to Top