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:
Dima and Figure
Xenon's Attack on the Gangs
Diverse Permutation
Hate "A"
Irreducible Anagrams
Board Game
Montgomery Multiplication
Robots protection
Chicken or Fish?
Balanced Ternary
Elementary
New Year and Cleaning
Permutation Game
Chip Game
Preorder Test
Salazar Slytherin's Locket
Dividing Kingdom II
Earth Wind and Fire
Break Up
Table Compression
Breadth-first search
New Year Santa Network
New Year Candles
Beautiful fountains rows
Football
Banana
World Eater Brothers
Almost Same Distance
Lowest Common Ancestor
PolandBall and Polygon
Product transformation
Casinos and travel