
Input
The input contains two integers row, col (0≤row,col≤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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | #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:
Design Tutorial: Make It Nondeterministic
Hongcow's Game
Spyke Talks
Spaceship Solitaire
Vanya and Lanterns
K-Complete Word
Old Peykan
New Year Permutation
Eugene and an array
Integer factorization
LRU
Cube Problem
New Year and Domino
Bacterial Melee
Mischievous Mess Makers
Dice Tower
Tree Diameter
Wrong Answer on Test 233 (Hard Version)
Cycles
Linova and Kingdom
Satanic Panic
Palindrome
R3D3’s Summer Adventure
D´Esopo-Pape algorithm
Little Artem and Dance
Number of paths of fixed length / Shortest paths of fixed length
Exploration plan
Egor and an RPG game
Binary Exponentiation
Encoding
Depth First Search
Strange Function