\documentclass{article}
\input{preamble}
\title{Cross-Country Circus - MathGames}

\begin{document}

\maketitle
\vspace{-20pt}
{\bf Difficulty:} \stars{1}\\
{\bf Key words: Geometry, Topography} \\
Carla is one of the most legendary tightrope walkers alive today, and she is planning on performing another record-breaking stunt next year. Her plan is to walk on a tightrope across \textit{two entire countries}, Abyssnia and Balantia. Carla has asked you to deal with her visa applications for both countries, since she will be busy practicing, and filling out visa application forms while high above the Grand Canyon is an entirely different feat, one which she is only planning to do in the year after her cross-country circus performance.\\

Conveniently, the two countries of Abyssnia and Balantia are perfectly circular, and touch in a single point, in a place called Crossing-Bordernia. To avoid dealing with any other bordering countries, Carla ties her tightrope in such a way that it crosses the border precisely above Crossing-Bordernia. Due to the good relations between Abyssnia and Balantia, Carla only needs a single visum, with a specification for what fraction of the time she will be in Abyssnia. Thus, you only need to calculate this ratio. As Carla is an amazing acrobat, she walks along the tightrope with a constant speed.\\

In Figure \ref{examplecrosscountry}, the first sample case is illustrated. Here, Carla spends precisely half her time in Abyssnia.
\begin{figure}[!h]
    \centering
    \begin{tikzpicture}[scale = 2]
        \draw[very thick, dashed] (-1,0) -- (1,0); 
        \draw[very thick] (-1,0) circle (1); 
        \draw[very thick] (1,0) circle (1);
        \draw[very thick] (-1,-1) -- (1,1); 
        \filldraw[very thick] (-1,0) circle (1pt); 
        \filldraw[very thick] (1,0) circle (1pt); 
        \node[] at (-1.5,0) {\Large A};
        \node[] at (1.5,0) {\Large B};
        \node[] at (0.3,0.15) {\Large $\theta$};
    \end{tikzpicture}
    \caption{Sample case 1.}
    \label{examplecrosscountry}
\end{figure}
\vspace{0.5cm}
\vspace{0.5cm}

{\Large \textbf Input}
\begin{itemize}
    \item The first line contains two space-separated integers $0 < r_A, r_B \leq 10^5$, the radii in meters of the countries of Abyssnia and Balantia respectively.
    \item The second line contains a single integer $-90 < \theta < 90$, the angle in degrees Carla's tightrope makes with the straight road between the capitals of Abyssnia and Balantia, located at their respective midpoints.
\end{itemize}

{\Large \textbf Output}
\begin{itemize}
    \item The fraction of time Carla spends in Abyssnia. Your answer should have a relative error of at most $10^{-6}$.
\end{itemize}


{\Large \textbf Examples}\\
\begin{center}
\scalebox{1.5}{
\begin{tabular}{|l|l|}
\hline
Input & Output \\ \hline
1000 1000 & 0.5\\ 
45&\\\hline

\end{tabular}
}

\vspace{1em}

\scalebox{1.5}{
\begin{tabular}{|l|l|}
\hline
Input & Output \\ \hline
655 1834 & 0.263157894\\
13&\\\hline
\end{tabular}
}
\end{center}


\end{document}