
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:
Rowena Ravenclaw's Diadem
Hongcow Builds A Nation
Hongcow Buys a Deck of Cards
Messy
Travel Card
Close Vertices
Edge connectivity / Vertex connectivity
Integration by Simpson's formula
Happy Cactus
Sherlock and the Encrypted Data
Robots on a Grid
Satanic Panic
Deleting from a data structure in $O(T(n)\log n)$
Sherlock and his girlfriend
The Tower is Going Home
Aroma's Search
World Eater Brothers
Two Sets
Submask Enumeration
Permutation Game
Zoning Restrictions
Lowest Common Ancestor - Tarjan's off-line algorithm
Spy Syndrome 2
Three Blocks Palindrome
Kind Anton
Pattern
Hilbert's Hotel
Magnum Opus
Edge Weight Assignment
Startup Funding
Lost Array
Table Compression