Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Teams
Sign in
Sign up
×
Close
IOIC 2025 題目已公開!
連結
程式解題社網站
程式解題社網站
上線了!
NTUCPC OJ 現在支援 Rust !
NTUCPCPC 2026 初賽 & 決賽題目已公開!
連結
1472 . 想要修復朋友關係什麼的,果然不行!
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
1xlc
User's AC Ratio
100.0% (
1/1
)
Submission's AC Ratio
100.0% (
1
/
1
)
Tags
Show solution-related tags
ntucpcpc
ntucpcpc-2026
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
4 1 4 1 3 1 2 1 4 2 4 3 4
Sample Output 1
copy
Yes 1 1 4 2 3
Sample Input 2
copy
3 2 3 3 1 1 3 2 1
Sample Output 2
copy
No
Hints
Problem Source
Subtasks
No.
Testdata Range
Score
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
1000
2097152
65536
1
1000
2097152
65536
2
1000
2097152
65536
3
1000
2097152
65536
4
1000
2097152
65536
5
1000
2097152
65536
6
1000
2097152
65536
7
1000
2097152
65536
8
1000
2097152
65536
9
1000
2097152
65536
10
1000
2097152
65536
11
1000
2097152
65536
12
1000
2097152
65536
13
1000
2097152
65536
14
1000
2097152
65536
15
1000
2097152
65536
16
1000
2097152
65536
17
1000
2097152
65536
18
1000
2097152
65536
19
1000
2097152
65536
20
1000
2097152
65536
21
1000
2097152
65536
22
1000
2097152
65536
23
1000
2097152
65536
24
1000
2097152
65536
25
1000
2097152
65536
26
1000
2097152
65536
27
1000
2097152
65536
28
1000
2097152
65536
29
1000
2097152
65536
30
1000
2097152
65536
31
1000
2097152
65536
32
1000
2097152
65536
33
1000
2097152
65536
34
1000
2097152
65536
35
1000
2097152
65536
36
1000
2097152
65536
37
1000
2097152
65536
38
1000
2097152
65536
39
1000
2097152
65536
40
1000
2097152
65536
41
1000
2097152
65536
42
1000
2097152
65536
43
1000
2097152
65536
44
1000
2097152
65536
45
1000
2097152
65536
46
1000
2097152
65536
47
1000
2097152
65536
48
1000
2097152
65536
49
1000
2097152
65536
50
1000
2097152
65536
51
1000
2097152
65536
52
1000
2097152
65536
53
1000
2097152
65536
54
1000
2097152
65536
55
1000
2097152
65536
56
1000
2097152
65536
57
1000
2097152
65536
58
1000
2097152
65536
59
1000
2097152
65536
60
1000
2097152
65536
61
1000
2097152
65536
62
1000
2097152
65536
63
1000
2097152
65536
64
1000
2097152
65536
65
1000
2097152
65536
66
1000
2097152
65536
67
1000
2097152
65536
68
1000
2097152
65536
69
1000
2097152
65536
70
1000
2097152
65536
71
1000
2097152
65536
72
1000
2097152
65536
73
1000
2097152
65536
74
1000
2097152
65536
75
1000
2097152
65536
76
1000
2097152
65536
77
1000
2097152
65536
78
1000
2097152
65536
79
1000
2097152
65536
80
1000
2097152
65536
81
1000
2097152
65536
82
1000
2097152
65536
83
1000
2097152
65536
84
1000
2097152
65536
85
1000
2097152
65536
86
1000
2097152
65536
87
1000
2097152
65536
88
1000
2097152
65536
89
1000
2097152
65536
90
1000
2097152
65536
91
1000
2097152
65536
92
1000
2097152
65536
93
1000
2097152
65536
Submit
Back to Top