Login
Sign-Up
Problem
Contest
Category
Submissions
English
Problem
Contest
Category
Submissions
English
#288
Submit Code
Submissions
Garage Game
Time Limit: 1 Sec
Memory Limit: 1024 MiB
한국어
Example Input 1
Copy
2 1 1 2 2 1 1 3 3 4 4 1 2
Example Output 1
Copy
15
Example Input 2
Copy
3 18 5 1 9 6 1 10 7 1 11 1 3 12 1 3 13 1 3 1 2 2 1 2 2 1 2 2
Example Output 2
Copy
36
Language-Specific Restrictions