Hack
Now
EN
Login
Register
HackNow
LCA — binary lifting | HackNow
Go back
Reading Mode
Problem
Submissions
LCA — binary lifting
lock
UZ only
Oson
100 points
5 s
256 MB
Input format
Output format
Constraints
Examples
1
1
Example #1
Input
5 3 1 2 1 3 2 4 2 5 4 5 4 3 5 5
Output
2 1 5
Solution editor
Python 3
Clear
Language
PYTHON
UTF-8
Tab
4 spaces
Ctrl
+
Enter
Submit
Submit