eolymp
bolt
Try our new interface for solving problems
Problems

Explicit Formula

Explicit Formula

Consider \textbf{10} Boolean variables \textbf{x_1},\textbf{ x_2},\textbf{ x_3},\textbf{ x_4},\textbf{ x_5},\textbf{ x_6},\textbf{ x_7},\textbf{ x_8},\textbf{ x_9}, and \textbf{x_10}. Consider all pairs and triplets of distinct variables among these ten. (There are \textbf{45} pairs and \textbf{120} triplets.) Count the number of pairs and triplets that contain at least one variable equal to \textbf{1}. Set \textbf{f(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10)} = \textbf{1} if this number is odd and \textbf{f(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10)} = \textbf{0} if this number is even. Here's an explicit formula that represents the function \textbf{f(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10) }correctly: \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} \textbf{f(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10)} = (\textbf{x_1} V \textbf{x_2}) (\textbf{x_1} V \textbf{x_3}) (\textbf{x_1} V \textbf{x_4}) (\textbf{x_1} V \textbf{x_5}) (\textbf{x_1} V \textbf{x_6}) (\textbf{x_1} V \textbf{x_7}) (\textbf{x_1} V \textbf{x_8}) (\textbf{x_1} V \textbf{x_9}) (\textbf{x_1} V \textbf{x_10}) (\textbf{x_2} V \textbf{x_3}) (\textbf{x_2} V \textbf{x_4}) (\textbf{x_2} V \textbf{x_5}) (\textbf{x_2} V \textbf{x_6}) (\textbf{x_2} V \textbf{x_7}) (\textbf{x_2} V \textbf{x_8}) (\textbf{x_2} V \textbf{x_9}) (\textbf{x_2} V \textbf{x_10}) (\textbf{x_3} V \textbf{x_4}) (\textbf{x_3} V \textbf{x_5}) (\textbf{x_3} V \textbf{x_6}) (\textbf{x_3} V \textbf{x_7}) (\textbf{x_3} V \textbf{x_8}) (\textbf{x_3} V \textbf{x_9}) (\textbf{x_3} V \textbf{x_10}) (\textbf{x_4} V \textbf{x_5}) (\textbf{x_4} V \textbf{x_6}) (\textbf{x_4} V \textbf{x_7}) (\textbf{x_4} V \textbf{x_8}) (\textbf{x_4} V \textbf{x_9}) (\textbf{x_4} V \textbf{x_10}) (\textbf{x_5} V \textbf{x_6}) (\textbf{x_5} V \textbf{x_7}) (\textbf{x_5} V \textbf{x_8}) (\textbf{x_5} V \textbf{x_9}) (\textbf{x_5} V \textbf{x_10}) (\textbf{x_6} V \textbf{x_7}) (\textbf{x_6} V \textbf{x_8}) (\textbf{x_6} V \textbf{x_9}) (\textbf{x_6} V \textbf{x_10}) (\textbf{x_7} V \textbf{x_8}) (\textbf{x_7} V \textbf{x_9}) (\textbf{x_7} V \textbf{x_10}) (\textbf{x_8} V \textbf{x_9}) (\textbf{x_8} V \textbf{x_10}) (\textbf{x_9} V \textbf{x_10}) (\textbf{x_1} V \textbf{x_2} V \textbf{x_3}) (\textbf{x_1} V \textbf{x_2} V \textbf{x_4}) (\textbf{x_1} V \textbf{x_2} V \textbf{x_5}) (\textbf{x_1} V \textbf{x_2} V \textbf{x_6}) (\textbf{x_1} V \textbf{x_2} V \textbf{x_7}) (\textbf{x_1} V \textbf{x_2} V \textbf{x_8}) (\textbf{x_1} V \textbf{x_2} V \textbf{x_9}) (\textbf{x_1} V \textbf{x_2} V \textbf{x_10}) (\textbf{x_1} V \textbf{x_3} V \textbf{x_4}) (\textbf{x_1} V \textbf{x_3} V \textbf{x_5}) (\textbf{x_1} V \textbf{x_3} V \textbf{x_6}) (\textbf{x_1} V \textbf{x_3} V \textbf{x_7}) (\textbf{x_1} V \textbf{x_3} V \textbf{x_8}) (\textbf{x_1} V \textbf{x_3} V \textbf{x_9}) (\textbf{x_1} V \textbf{x_3} V \textbf{x_10}) (\textbf{x_1} V \textbf{x_4} V \textbf{x_5}) (\textbf{x_1} V \textbf{x_4} V \textbf{x_6}) (\textbf{x_1} V \textbf{x_4} V \textbf{x_7}) (\textbf{x_1} V \textbf{x_4} V \textbf{x_8}) (\textbf{x_1} V \textbf{x_4} V \textbf{x_9}) (\textbf{x_1} V \textbf{x_4} V \textbf{x_10}) (\textbf{x_1} V \textbf{x_5} V \textbf{x_6}) (\textbf{x_1} V \textbf{x_5} V \textbf{x_7}) (\textbf{x_1} V \textbf{x_5} V \textbf{x_8}) (\textbf{x_1} V \textbf{x_5} V \textbf{x_9}) (\textbf{x_1} V \textbf{x_5} V \textbf{x_10}) (\textbf{x_1} V \textbf{x_6} V \textbf{x_7}) (\textbf{x_1} V \textbf{x_6} V \textbf{x_8}) (\textbf{x_1} V \textbf{x_6} V \textbf{x_9}) (\textbf{x_1} V \textbf{x_6} V \textbf{x_10}) (\textbf{x_1} V \textbf{x_7} V \textbf{x_8}) (\textbf{x_1} V \textbf{x_7} V \textbf{x_9}) (\textbf{x_1} V \textbf{x_7} V \textbf{x_10}) (\textbf{x_1} V \textbf{x_8} V \textbf{x_9}) (\textbf{x_1} V \textbf{x_8} V \textbf{x_10}) (\textbf{x_1} V \textbf{x_9} V \textbf{x_10}) (\textbf{x_2} V \textbf{x_3} V \textbf{x_4}) (\textbf{x_2} V \textbf{x_3} V \textbf{x_5}) (\textbf{x_2} V \textbf{x_3} V \textbf{x_6}) (\textbf{x_2} V \textbf{x_3} V \textbf{x_7}) (\textbf{x_2} V \textbf{x_3} V \textbf{x_8}) (\textbf{x_2} V \textbf{x_3} V \textbf{x_9}) (\textbf{x_2} V \textbf{x_3} V \textbf{x_10}) (\textbf{x_2} V \textbf{x_4} V \textbf{x_5}) (\textbf{x_2} V \textbf{x_4} V \textbf{x_6}) (\textbf{x_2} V \textbf{x_4} V \textbf{x_7}) (\textbf{x_2} V \textbf{x_4} V \textbf{x_8}) (\textbf{x_2} V \textbf{x_4} V \textbf{x_9}) (\textbf{x_2} V \textbf{x_4} V \textbf{x_10}) (\textbf{x_2} V \textbf{x_5} V \textbf{x_6}) (\textbf{x_2} V \textbf{x_5} V \textbf{x_7}) (\textbf{x_2} V \textbf{x_5} V \textbf{x_8}) (\textbf{x_2} V \textbf{x_5} V \textbf{x_9}) (\textbf{x_2} V \textbf{x_5} V \textbf{x_10}) (\textbf{x_2} V \textbf{x_6} V \textbf{x_7}) (\textbf{x_2} V \textbf{x_6} V \textbf{x_8}) (\textbf{x_2} V \textbf{x_6} V \textbf{x_9}) (\textbf{x_2} V \textbf{x_6} V \textbf{x_10}) (\textbf{x_2} V \textbf{x_7} V \textbf{x_8}) (\textbf{x_2} V \textbf{x_7} V \textbf{x_9}) (\textbf{x_2} V \textbf{x_7} V \textbf{x_10}) (\textbf{x_2} V \textbf{x_8} V \textbf{x_9}) (\textbf{x_2} V \textbf{x_8} V \textbf{x_10}) (\textbf{x_2} V \textbf{x_9} V \textbf{x_10}) (\textbf{x_3} V \textbf{x_4} V \textbf{x_5}) (\textbf{x_3} V \textbf{x_4} V \textbf{x_6}) (\textbf{x_3} V \textbf{x_4} V \textbf{x_7}) (\textbf{x_3} V \textbf{x_4} V \textbf{x_8}) (\textbf{x_3} V \textbf{x_4} V \textbf{x_9}) (\textbf{x_3} V \textbf{x_4} V \textbf{x_10}) (\textbf{x_3} V \textbf{x_5} V \textbf{x_6}) (\textbf{x_3} V \textbf{x_5} V \textbf{x_7}) (\textbf{x_3} V \textbf{x_5} V \textbf{x_8}) (\textbf{x_3} V \textbf{x_5} V \textbf{x_9}) (\textbf{x_3} V \textbf{x_5} V \textbf{x_10}) (\textbf{x_3} V \textbf{x_6} V \textbf{x_7}) (\textbf{x_3} V \textbf{x_6} V \textbf{x_8}) (\textbf{x_3} V \textbf{x_6} V \textbf{x_9}) (\textbf{x_3} V \textbf{x_6} V \textbf{x_10}) (\textbf{x_3} V \textbf{x_7} V \textbf{x_8}) (\textbf{x_3} V \textbf{x_7} V \textbf{x_9}) (\textbf{x_3} V \textbf{x_7} V \textbf{x_10}) (\textbf{x_3} V \textbf{x_8} V \textbf{x_9}) (\textbf{x_3} V \textbf{x_8} V \textbf{x_10}) (\textbf{x_3} V \textbf{x_9} V \textbf{x_10}) (\textbf{x_4} V \textbf{x_5} V \textbf{x_6}) (\textbf{x_4} V \textbf{x_5} V \textbf{x_7}) (\textbf{x_\{4 \}}V \textbf{x_5} V \textbf{x_8}) (\textbf{x_4} V \textbf{x_5} V \textbf{x_9}) (\textbf{x_4} V \textbf{x_5} V \textbf{x_10}) (\textbf{x_4} V \textbf{x_6} V \textbf{x_7}) (\textbf{x_4} V \textbf{x_6} V \textbf{x_8}) (\textbf{x_4} V \textbf{x_6} V \textbf{x_9}) (\textbf{x_4} V \textbf{x_6} V \textbf{x_10}) (\textbf{x_4} V \textbf{x_7} V \textbf{x_8}) (\textbf{x_4} V \textbf{x_7} V \textbf{x_9}) (\textbf{x_4} V \textbf{x_7} V \textbf{x_10}) (\textbf{x_4} V \textbf{x_8} V \textbf{x_9}) (\textbf{x_4} V \textbf{x_8} V \textbf{x_10}) (\textbf{x_4} V \textbf{x_9} V \textbf{x_10}) (\textbf{x_5} V \textbf{x_6} V \textbf{x_7}) (\textbf{x_5} V \textbf{x_6} V \textbf{x_8}) (\textbf{x_5} V \textbf{x_6} V \textbf{x_9}) (\textbf{x_5} V \textbf{x_6} V \textbf{x_10}) (\textbf{x_5} V \textbf{x_7} V \textbf{x_8}) (\textbf{x_5} V \textbf{x_7} V \textbf{x_9}) (\textbf{x_5} V \textbf{x_7} V \textbf{x_10}) (\textbf{x_5} V \textbf{x_8} V \textbf{x_9}) (\textbf{x_5} V \textbf{x_8} V \textbf{x_10}) (\textbf{x_5} V \textbf{x_9} V \textbf{x_10}) (\textbf{x_6} V \textbf{x_7} V \textbf{x_8}) (\textbf{x_6} V \textbf{x_7} V \textbf{x_9}) (\textbf{x_6} V \textbf{x_7} V \textbf{x_10}) (\textbf{x_6} V \textbf{x_8} V \textbf{x_9}) (\textbf{x_6} V \textbf{x_8} V \textbf{x_10}) (\textbf{x_6} V \textbf{x_9} V \textbf{x_10}) (\textbf{x_7} V \textbf{x_8} V \textbf{x_9}) (\textbf{x_7} V \textbf{x_8} V \textbf{x_10}) (\textbf{x_7} V \textbf{x_9} V \textbf{x_10}) (\textbf{x_8} V \textbf{x_9} V \textbf{x_10}) \includegraphics{https://static.e-olymp.com/content/7e/7e838c0f60f64deef9d13ec9a874ce43b20530ea.jpg} In this formula V stands for logical \textbf{or}, and stands for \textit{exclusive or} (\textbf{xor}). Remember that in C++ and Java these two binary operators are denoted as "\textbf{||}" and "\textbf{^}". Given the values of \textbf{x_1},\textbf{ x_2},\textbf{ x_3},\textbf{ x_4},\textbf{ x_5},\textbf{ x_6},\textbf{ x_7},\textbf{ x_8},\textbf{ x_9},\textbf{ x_10}, calculate the value of \textbf{f(x_1, x_2, ..., x_10)}. \InputFile The input file contains \textbf{10} numbers \textbf{x_1},\textbf{ x_2},\textbf{ x_3},\textbf{ x_4},\textbf{ x_5},\textbf{ x_6},\textbf{ x_7},\textbf{ x_8},\textbf{ x_9}, and \textbf{x_10}. Each of them is either \textbf{0} or \textbf{1}. \OutputFile Output a single value - \textbf{f(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10)}.
Time limit 1 second
Memory limit 256 MiB
Input example #1
1 0 0 1 0 0 1 0 0 1
Output example #1
0
Author Mikhail Dvorkin, Georgiy Korneev