
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:
Magic Trick
Degenerate Matrix
Useful Decomposition
Maze
Nastya and Strange Generator
Scaygerboss
Read Time
Merging Two Decks
PolandBall and White-Red graph
Height All the Same
NEKO's Maze Game
Underfail
New Year Book Reading
Vanya and Cubes
Fox And Travelling
Palisection
Finding common tangents to two circles
Fox and Box Accumulation
Newton's method for finding roots
Sum of Nestings
SMSC
Simple Skewness
Weather Tomorrow
Ant colony
Mind Control
Modular Multiplicative Inverse
Yash And Trees
Make It One
New Year and Permutation
New Year and Ancient Prophecy
Uniqueness
Chaotic V.