
Input
The input contains two integers $row$, $col$ ($0 \le row, col \le 63$), separated by a single space.Output
Output “IN” or “OUT”.Examplesinput
0 0
output
OUT
input
27 0
output
IN
input
0 27
output
OUT
input
27 27
output
IN
Solution:
#include <bits/stdc++.h> using namespace std; vector<string> s = { " # # ###### # ", " # ### # # # # ##### ", " ### # # ## # # # ", " #### # # ##### #### # ### # ", " ## # # #### # # # ## ", " # ## ##### ### ### # # ## # # # ", " ### # # # # #### ## ## ## ## ", " ###### ## ## ### ### ### ## # # ### ", " ############ # # # ## ## ## # ### ", " #################### ####### #### ########## ", " ################################################ ", " ################################################## ", " ################################################## ", " #################################################### ", " ###################################################### ", " ###################################################### ", " ######################################################## ", " ########################################################## ", " ######################################################## ", " ############ # ############## # # ############# ", " ## ######### # ############### # ######## ", " #### ##### ## # ############### ## ## # ## ## ", " ####### # ### ### ########### # # ## ###### ", " ######### # # ## ## ######### ## ##### # ######### ", " ############ ## ### ### ####### # # ### ########### ", " ######### # ### ### ######## # ##### # # # ######## ", "############ ### # # # # ###### # # ## ### #########", "########### # # ## ### ### #### # ### #### ### # #########", "########### ###### #### # # # # # # #### ### #########", "########### # # ### ### # # ## ## # # # # #########", "############ ## #### ## ### # ### #### # ###### ##########", "########### ### # # ### # ### #### # ### # #########", "############# ## ### ## ### ## # ## ## # # #########", "############## ## # # # # # # # ## # ## ## ############", "############ #### # # # # #### ## # # ### ### ###########", "############# # # ### #### # ## # ## #############", "################ ### # ## ## ## ## # ### # # ############", "################## # ###### ####### # ################", " ################ # ##### # ########### # ############## ", " ############################## ############################ ", " ########################### # # ############################# ", " ######################### # ################################ ", " ######################## # ############################# ", " ####### ################### ############################### ", " ####### # ################ ##################### ####### ", " ####### # ########### # ########### ##### # ###### ", " ####### # # # # # ## # ## # # # ## ## # ####### ", " ######## ## # ## ## # # ### ######## ", " ####### # #### #### ### ### ### ##### # ######### ", " ########## # # # # #### ### ## # # ######### ", " ######## ## ## # # # # ### # ########## ", " ######### ## ##### ## # # # ## ############# ", " ######### ### # # ### # ### # ########### ", " ######### #### ### ## #### #### ############ ", " ######### ## # # # # ############## ", " ############ # #### ## ## # ## ############ ", " ############# #### # ############ ", " #################### ################# ", " #################################### ", " ################################ ", " ############################## ", " ######################## ", " #################### ", " ############ "}; int main() { ios::sync_with_stdio(false); cin.tie(0); int r, c; cin >> r >> c; cout << (s[r] == '#' ? "IN" : "OUT") << '\n'; return 0; }
Related posts:
Exercising Walk
Simple Skewness
Travel Cards
Extended Euclidean Algorithm
Challenging Balloons
Egg Roulette
Square Difference
Divide Points
The Stern-Brocot tree and Farey sequences
PolandBall and Gifts
Primality tests
Nested Rubber Bands
Second best Minimum Spanning Tree - Using Kruskal and Lowest Common Ancestor
Learning and Improving Algorithm through contests - Antti Laaksonen
Restore Cube
Euler's totient function
Orac and Game of Life
Big Data
Maximum Distance
Giving Awards
Unsolvable
Suffix Array
Another One Bites The Dust
Chinese Remainder Theorem
Image Preview
Wilbur and Trees
Into Blocks (easy version)
Exploration plan
New Year and the Acquaintance Estimation
Little Artem and 2-SAT
Discrete Logarithm
Vanya and Cubes