Hack
Now
EN
Login
Register
HackNow
Eng qisqa yo'l (BFS) | HackNow
Go back
Reading Mode
Problem
Submissions
Eng qisqa yo'l (BFS)
lock
UZ only
Qiyin
30 points
1 s
256 MB
Input format
Output format
Examples
1
1
Example #1
Input
5 5 1 2 1 3 2 4 3 4 4 5 1 5
Output
3
Solution editor
Python 3
Clear
Language
PYTHON
UTF-8
Tab
4 spaces
Ctrl
+
Enter
Submit
Submit