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:
Marvolo Gaunt's Ring
Perfect Encoding
Dome
Mergesort Strikes Back
Boredom
Watchmen
Parallel Programming
Bingo!
MP3
Alternating Current
Dima and Game
Diverse Matrix
Group Projects
Two Teams Composing
Work Group
New Year and Naming
Amr and Music
Double Permutation Inc
AND Segments
Levels and Regions
Merging Two Decks
Book of Evil
Paint it really, really dark gray
Prefix function. Knuth–Morris–Pratt algorithm
Middle Class
Voting for Photos
Prefix Enlightenment
Distinct Paths
Point location in O(log n)
Beautiful League
Little Artem and Grasshopper
Rusty String