C. The Drift King
time limit per test
1 second
memory limit per test
960 megabytes
input
standard input
output
standard output
Example
Input
2
3 2
LRR
2 -1
LRR
Output
0.41421356237309504876
1.82842712474619009753