Login
Sign-Up
Problem
Contest
Category
Submissions
English
Problem
Contest
Category
Submissions
English
#299
Submit Code
Submissions
순서대로 방문하기
Time Limit: 1 Sec
Memory Limit: 1024 MiB
한국어
Example Input 1
Copy
3 3 0 0 0 0 0 0 0 0 1 3 1 1 2 2 3
Example Output 1
Copy
5
Example Input 2
Copy
3 3 0 0 1 0 0 0 0 0 1 3 1 1 2 2 3
Example Output 2
Copy
1
Language-Specific Restrictions