Submission #1214433

#TimeUsernameProblemLanguageResultExecution timeMemory
1214433madamadam3Question (Grader is different from the original contest) (CEOI14_question_grader)C++20
100 / 100
665 ms39744 KiB
#include <bits/stdc++.h> using namespace std; constexpr std::array<uint32_t, 921> ROWS = { 0x0, 0x38b, 0xc2b, 0xe61, 0xe43, 0xd25, 0x517, 0x3c3, 0x762, 0x23b, 0x599, 0x365, 0xc71, 0xd68, 0xda2, 0x8b6, 0xc2d, 0xf05, 0xa96, 0x639, 0xed0, 0x32e, 0xc65, 0x3ca, 0x336, 0xbc8, 0xd94, 0xa3a, 0x173, 0xc72, 0x197, 0x8b9, 0xe58, 0xad4, 0xa3c, 0x731, 0x6e4, 0x378, 0x60f, 0x98e, 0x3d1, 0x61e, 0xfa, 0x1ec, 0x7c1, 0x74c, 0xb19, 0x723, 0x565, 0x36c, 0x89e, 0x8e9, 0xbc2, 0xae4, 0x3d8, 0x467, 0x587, 0xad2, 0x2bc, 0x41f, 0x70e, 0x399, 0xe62, 0xcb4, 0x3c6, 0xd8a, 0xd49, 0xd91, 0xaaa, 0x13d, 0x275, 0x8ad, 0xa59, 0x6a5, 0x2da, 0x3ac, 0xf18, 0xb4c, 0x963, 0x59a, 0x4e3, 0xa27, 0xee0, 0xea4, 0x535, 0x51d, 0x791, 0x2d5, 0x5aa, 0xa53, 0x68b, 0x27a, 0x786, 0xdc1, 0x372, 0xd31, 0xf5, 0xb0e, 0x52b, 0x5e2, 0x35a, 0x30f, 0xcac, 0x2e5, 0x719, 0xc95, 0xdd, 0x1ad, 0x666, 0x6b1, 0x596, 0x2ba, 0x595, 0x353, 0x696, 0x5d1, 0xfa0, 0x633, 0xaa3, 0x6cc, 0x95c, 0x672, 0x6e2, 0x974, 0x31e, 0xb68, 0x8f8, 0xa9a, 0xc3c, 0x5e1, 0xc1b, 0x1b9, 0x656, 0x86d, 0x536, 0x49d, 0x9c9, 0xeb, 0x857, 0x4ba, 0xec8, 0xe2c, 0x9a3, 0xd0b, 0x50f, 0x6d2, 0x559, 0x2b6, 0xc5c, 0xf14, 0x9ca, 0xc4e, 0xb64, 0x9e2, 0xd98, 0xd70, 0x91e, 0x84f, 0x9aa, 0x7a2, 0x761, 0x42f, 0x734, 0xda8, 0xd54, 0x935, 0x533, 0xa5c, 0x752, 0x475, 0x237, 0x8ec, 0x98d, 0x55c, 0x5b4, 0x4a7, 0x2ec, 0xd19, 0xc0f, 0x4b6, 0x267, 0x23e, 0x3f, 0x4cb, 0x9a5, 0x8c7, 0x2d6, 0x327, 0x713, 0xe83, 0xb31, 0xcca, 0xe51, 0x7c4, 0xe49, 0x547, 0x566, 0xb07, 0x5e4, 0x4d9, 0x4da, 0xec4, 0xea2, 0x995, 0xd29, 0xba8, 0x927, 0x867, 0xb29, 0x1e3, 0x5c6, 0x5cc, 0xd61, 0x4e5, 0x3b1, 0x78a, 0x53c, 0xe15, 0x4cd, 0x6a6, 0x71c, 0x4d6, 0xc47, 0x671, 0x34d, 0xc99, 0x6c5, 0x5b1, 0xde0, 0xcc6, 0x47c, 0x387, 0x745, 0x1cb, 0x58d, 0xe34, 0x479, 0x49e, 0xe0b, 0x635, 0x3e4, 0x5c3, 0xb34, 0x99a, 0xa65, 0x335, 0x8d9, 0x54b, 0xbd0, 0x4b9, 0xce4, 0x86b, 0x65a, 0x369, 0x7e, 0x393, 0x6e8, 0xb8a, 0x45b, 0x4c7, 0xe31, 0x81f, 0xc9c, 0xe1c, 0x6f, 0x956, 0xe8a, 0x82f, 0x1e9, 0xd46, 0x297, 0x317, 0xaa9, 0x1bc, 0xcf0, 0xe89, 0xe32, 0xca9, 0xe52, 0x1dc, 0xf48, 0x2b5, 0x87c, 0x48f, 0x395, 0x69a, 0x93c, 0x4ab, 0x1cd, 0x8f4, 0xa55, 0x875, 0xaac, 0x3d4, 0x663, 0xf3, 0x1f2, 0x555, 0x693, 0x6c6, 0x63c, 0xaf0, 0xcd1, 0xf0c, 0xc17, 0x19b, 0x3e8, 0xb13, 0x91b, 0xb49, 0x17c, 0x396, 0xe13, 0xd51, 0xc8e, 0x2a7, 0x978, 0xb85, 0x3a6, 0x91d, 0x85d, 0xc96, 0x6b2, 0x1d9, 0x578, 0xe23, 0x5c5, 0xb32, 0x25b, 0x58e, 0xad8, 0xce2, 0xe85, 0xd16, 0xa17, 0x39c, 0x85e, 0x18f, 0x2d9, 0x966, 0xa63, 0x947, 0xd58, 0xaa6, 0xbe, 0x55a, 0x15d, 0xe45, 0x8d5, 0x1a7, 0x6d8, 0x19e, 0x61b, 0xcb2, 0x4f4, 0x8e6, 0x1d6, 0x8f2, 0xd26, 0x88f, 0x98b, 0x556, 0x24f, 0x5a6, 0x6d4, 0x83b, 0x3a5, 0x729, 0xb2a, 0xd8c, 0x4dc, 0xde, 0xc66, 0xc4d, 0xae1, 0x2e3, 0xc5a, 0xba2, 0x5d2, 0x659, 0xba1, 0x9d1, 0xa36, 0x6aa, 0x72c, 0x695, 0xea8, 0x933, 0xd32, 0xce8, 0x955, 0xc2e, 0x167, 0x29d, 0xa69, 0x572, 0x52d, 0xe86, 0xcc5, 0x9d8, 0xac3, 0x768, 0x64b, 0x732, 0x7d, 0x51e, 0x972, 0x36a, 0x8ae, 0x46d, 0x993, 0x70b, 0x77, 0x92d, 0xa4e, 0xcb1, 0x56a, 0xd34, 0x38d, 0x3a3, 0xa4d, 0xc39, 0xd43, 0x569, 0xd45, 0xa72, 0x69c, 0x3aa, 0x27c, 0x917, 0x51b, 0xaca, 0xf03, 0xb61, 0x89b, 0xe26, 0xb54, 0x34e, 0x4f8, 0x7d0, 0x8ab, 0x593, 0x5d8, 0xe29, 0xacc, 0xd4a, 0x1ce, 0x655, 0x8bc, 0x7b0, 0xbc4, 0xd07, 0x2c7, 0x936, 0x4ce, 0x716, 0x26b, 0x45e, 0x66a, 0x38e, 0x5f, 0x26e, 0x7a1, 0x54d, 0x1b5, 0x43d, 0xa87, 0x743, 0xb45, 0x4ea, 0x333, 0x175, 0xa1b, 0x437, 0x1f4, 0xd2c, 0x279, 0x783, 0x64e, 0x2e9, 0xca3, 0xf90, 0xc74, 0xf06, 0x4d3, 0x939, 0x3e2, 0x68e, 0xd7, 0x25d, 0xbb0, 0xf81, 0x66c, 0x99c, 0xb7, 0xa8b, 0x8ce, 0xe91, 0x16b, 0xb70, 0x179, 0xf24, 0x4f2, 0x617, 0x674, 0x92b, 0x4ad, 0xdb0, 0x647, 0x63a, 0x2cb, 0xe54, 0x31d, 0xd85, 0xd86, 0x89d, 0x86e, 0xc1d, 0x32b, 0xa93, 0xee, 0x5b8, 0x359, 0x59c, 0x873, 0xe68, 0x16d, 0xa39, 0xb38, 0xb83, 0xc4b, 0x6f0, 0xa33, 0x9c6, 0x473, 0x374, 0x83e, 0xa1d, 0x1e5, 0x738, 0x7c8, 0x74a, 0x6c3, 0x8d6, 0x366, 0xcd2, 0xb58, 0xc55, 0x8dc, 0x45d, 0x4e6, 0xa6c, 0x356, 0x3cc, 0xc3a, 0xad1, 0x83d, 0xe70, 0x355, 0xe8c, 0xf11, 0x13e, 0xb8c, 0xc8b, 0x176, 0xe25, 0xa95, 0xca6, 0x6b4, 0xf12, 0x6a9, 0xd83, 0x8ba, 0xda1, 0xf21, 0xc69, 0xb2c, 0xd62, 0x3a9, 0x8ea, 0x5b2, 0x58b, 0x2f4, 0x34b, 0xb98, 0x726, 0x5a5, 0x754, 0x68d, 0x7b, 0xb16, 0xb23, 0xf9, 0x3d2, 0xdb, 0xd2a, 0x70d, 0xa47, 0xaa5, 0xb15, 0x276, 0x9e8, 0xa56, 0xdc2, 0x678, 0x49b, 0x4ae, 0xe46, 0xba4, 0xd1a, 0x2ab, 0x44f, 0xe4c, 0x8e3, 0xcb8, 0x789, 0xe2a, 0xd15, 0x95a, 0xdc4, 0x9b2, 0xfc, 0x64d, 0x9f, 0x25e, 0xb4a, 0xe7, 0x5c9, 0x23d, 0x1ae, 0x764, 0xd0d, 0x539, 0x9cc, 0xf09, 0x6b8, 0x92e, 0xcf, 0xe1a, 0xc36, 0xc6a, 0x1d3, 0x699, 0x33c, 0x553, 0x9ac, 0xc33, 0x8f1, 0xc53, 0xf44, 0x14f, 0x371, 0x52e, 0x7a4, 0x953, 0x94b, 0xa2e, 0xec1, 0x1b6, 0x6d1, 0xfc0, 0xa9c, 0x4bc, 0x715, 0xc1e, 0xe92, 0x3b4, 0x87a, 0x62d, 0x9b1, 0xac5, 0x47a, 0xf22, 0x93a, 0x8cd, 0xac6, 0xf42, 0xc63, 0x157, 0xab1, 0x5ca, 0xa66, 0x16e, 0xda4, 0x665, 0xc8d, 0x62e, 0xe98, 0x785, 0x2f8, 0xb1a, 0x78c, 0xa5a, 0xcd4, 0xec2, 0x29e, 0xc56, 0x85b, 0xcc3, 0xd64, 0x46e, 0xe0d, 0x1c7, 0xa8d, 0x627, 0x71a, 0x653, 0x837, 0x4e9, 0xbc1, 0x725, 0x15b, 0xa74, 0x758, 0x879, 0x2b3, 0x6ac, 0x2f1, 0xab4, 0xc9a, 0x62b, 0xc6c, 0x1e6, 0x2ce, 0xe16, 0x339, 0x35c, 0x770, 0x7e0, 0x9b4, 0x1ba, 0xab2, 0x9e1, 0xd4c, 0xaf, 0xb51, 0x7c2, 0xc59, 0xf41, 0x3b8, 0xb52, 0xc78, 0x996, 0xd1c, 0x15e, 0x636, 0x257, 0x43e, 0xb62, 0xab8, 0xa0f, 0x1ab, 0x4b5, 0x571, 0x96c, 0x9a6, 0x8b3, 0xbe0, 0x53a, 0xe38, 0x3e1, 0xb89, 0x43b, 0x971, 0x7a8, 0xae2, 0xf82, 0x3b2, 0x61d, 0x6a3, 0x19d, 0x2dc, 0x2e6, 0xa35, 0xcd8, 0x9d2, 0xe64, 0xd52, 0x2ad, 0xd23, 0xf30, 0x72a, 0x65c, 0xb91, 0x969, 0x1da, 0x273, 0x687, 0xd13, 0xb0d, 0x999, 0xac9, 0xd92, 0xa4b, 0xccc, 0xf88, 0x4ec, 0x3c9, 0x563, 0xc35, 0x707, 0x749, 0x792, 0xce1, 0x5a9, 0xa78, 0xe4a, 0x3f0, 0x5a3, 0xb26, 0x8a7, 0x137, 0x1b3, 0x94d, 0xca5, 0xe94, 0xb86, 0x798, 0x2f2, 0x11f, 0xb92, 0x46b, 0x29b, 0xa2d, 0x1f8, 0xf60, 0x497, 0xeb0, 0xb43, 0x8b5, 0x8d3, 0x751, 0x746, 0x9c5, 0x1ea, 0xe07, 0x6ca, 0x9e4, 0x13b, 0x5f0, 0x31b, 0x965, 0xa1e, 0x9c3, 0xa6a, 0x347, 0xdc8, 0x2ea, 0x17a, 0x876, 0x4d5, 0xcc9, 0x959, 0x22f, 0xcaa, 0x3c5, 0x2d3, 0x476, 0x794, 0x9a9, 0xe19, 0x33a, 0xae8, 0xa71, 0xa2b, 0xdd0, 0x5d4, 0x987, 0x4b3, 0x39a, 0xa99, 0x2ae, 0x26d, 0x96a, 0x9d4, 0xd0e, 0xed, 0x54e, 0x574, 0x5e8, 0xb1c, 0x94e, 0x4f1, 0x9b8, 0x28f, 0x8e5, 0x8da, 0xc27, 0xea1, 0xf28, 0x897, 0x363, 0xc93, 0x56c, 0xd89, 0x90f, 0xb25, 0x2cd, 0x8cb, 0x6e1, 0xbb, 0x21f, 0xb46, 0x32d, 0xf6, 0xf84, 0x9f0, 0x2b9, 0xbd, 0xe0e, 0xa8e, 0x1d5, 0xf0a, 0x457, 0x669, 0xd38, 0xf50, 0x527, 0xb94, 0x6c9, 0x1f1 }; int encode(int N, int x, int y) { return 1 + __builtin_ctz(ROWS[x] & ~ROWS[y]); } int decode(int N, int q, int h) { bool is_x = (ROWS[q] >> (h-1)) & 1; return is_x ? 1 : 0; }
#include <bits/stdc++.h> using namespace std; constexpr std::array<uint32_t, 921> ROWS = { 0x0, 0x38b, 0xc2b, 0xe61, 0xe43, 0xd25, 0x517, 0x3c3, 0x762, 0x23b, 0x599, 0x365, 0xc71, 0xd68, 0xda2, 0x8b6, 0xc2d, 0xf05, 0xa96, 0x639, 0xed0, 0x32e, 0xc65, 0x3ca, 0x336, 0xbc8, 0xd94, 0xa3a, 0x173, 0xc72, 0x197, 0x8b9, 0xe58, 0xad4, 0xa3c, 0x731, 0x6e4, 0x378, 0x60f, 0x98e, 0x3d1, 0x61e, 0xfa, 0x1ec, 0x7c1, 0x74c, 0xb19, 0x723, 0x565, 0x36c, 0x89e, 0x8e9, 0xbc2, 0xae4, 0x3d8, 0x467, 0x587, 0xad2, 0x2bc, 0x41f, 0x70e, 0x399, 0xe62, 0xcb4, 0x3c6, 0xd8a, 0xd49, 0xd91, 0xaaa, 0x13d, 0x275, 0x8ad, 0xa59, 0x6a5, 0x2da, 0x3ac, 0xf18, 0xb4c, 0x963, 0x59a, 0x4e3, 0xa27, 0xee0, 0xea4, 0x535, 0x51d, 0x791, 0x2d5, 0x5aa, 0xa53, 0x68b, 0x27a, 0x786, 0xdc1, 0x372, 0xd31, 0xf5, 0xb0e, 0x52b, 0x5e2, 0x35a, 0x30f, 0xcac, 0x2e5, 0x719, 0xc95, 0xdd, 0x1ad, 0x666, 0x6b1, 0x596, 0x2ba, 0x595, 0x353, 0x696, 0x5d1, 0xfa0, 0x633, 0xaa3, 0x6cc, 0x95c, 0x672, 0x6e2, 0x974, 0x31e, 0xb68, 0x8f8, 0xa9a, 0xc3c, 0x5e1, 0xc1b, 0x1b9, 0x656, 0x86d, 0x536, 0x49d, 0x9c9, 0xeb, 0x857, 0x4ba, 0xec8, 0xe2c, 0x9a3, 0xd0b, 0x50f, 0x6d2, 0x559, 0x2b6, 0xc5c, 0xf14, 0x9ca, 0xc4e, 0xb64, 0x9e2, 0xd98, 0xd70, 0x91e, 0x84f, 0x9aa, 0x7a2, 0x761, 0x42f, 0x734, 0xda8, 0xd54, 0x935, 0x533, 0xa5c, 0x752, 0x475, 0x237, 0x8ec, 0x98d, 0x55c, 0x5b4, 0x4a7, 0x2ec, 0xd19, 0xc0f, 0x4b6, 0x267, 0x23e, 0x3f, 0x4cb, 0x9a5, 0x8c7, 0x2d6, 0x327, 0x713, 0xe83, 0xb31, 0xcca, 0xe51, 0x7c4, 0xe49, 0x547, 0x566, 0xb07, 0x5e4, 0x4d9, 0x4da, 0xec4, 0xea2, 0x995, 0xd29, 0xba8, 0x927, 0x867, 0xb29, 0x1e3, 0x5c6, 0x5cc, 0xd61, 0x4e5, 0x3b1, 0x78a, 0x53c, 0xe15, 0x4cd, 0x6a6, 0x71c, 0x4d6, 0xc47, 0x671, 0x34d, 0xc99, 0x6c5, 0x5b1, 0xde0, 0xcc6, 0x47c, 0x387, 0x745, 0x1cb, 0x58d, 0xe34, 0x479, 0x49e, 0xe0b, 0x635, 0x3e4, 0x5c3, 0xb34, 0x99a, 0xa65, 0x335, 0x8d9, 0x54b, 0xbd0, 0x4b9, 0xce4, 0x86b, 0x65a, 0x369, 0x7e, 0x393, 0x6e8, 0xb8a, 0x45b, 0x4c7, 0xe31, 0x81f, 0xc9c, 0xe1c, 0x6f, 0x956, 0xe8a, 0x82f, 0x1e9, 0xd46, 0x297, 0x317, 0xaa9, 0x1bc, 0xcf0, 0xe89, 0xe32, 0xca9, 0xe52, 0x1dc, 0xf48, 0x2b5, 0x87c, 0x48f, 0x395, 0x69a, 0x93c, 0x4ab, 0x1cd, 0x8f4, 0xa55, 0x875, 0xaac, 0x3d4, 0x663, 0xf3, 0x1f2, 0x555, 0x693, 0x6c6, 0x63c, 0xaf0, 0xcd1, 0xf0c, 0xc17, 0x19b, 0x3e8, 0xb13, 0x91b, 0xb49, 0x17c, 0x396, 0xe13, 0xd51, 0xc8e, 0x2a7, 0x978, 0xb85, 0x3a6, 0x91d, 0x85d, 0xc96, 0x6b2, 0x1d9, 0x578, 0xe23, 0x5c5, 0xb32, 0x25b, 0x58e, 0xad8, 0xce2, 0xe85, 0xd16, 0xa17, 0x39c, 0x85e, 0x18f, 0x2d9, 0x966, 0xa63, 0x947, 0xd58, 0xaa6, 0xbe, 0x55a, 0x15d, 0xe45, 0x8d5, 0x1a7, 0x6d8, 0x19e, 0x61b, 0xcb2, 0x4f4, 0x8e6, 0x1d6, 0x8f2, 0xd26, 0x88f, 0x98b, 0x556, 0x24f, 0x5a6, 0x6d4, 0x83b, 0x3a5, 0x729, 0xb2a, 0xd8c, 0x4dc, 0xde, 0xc66, 0xc4d, 0xae1, 0x2e3, 0xc5a, 0xba2, 0x5d2, 0x659, 0xba1, 0x9d1, 0xa36, 0x6aa, 0x72c, 0x695, 0xea8, 0x933, 0xd32, 0xce8, 0x955, 0xc2e, 0x167, 0x29d, 0xa69, 0x572, 0x52d, 0xe86, 0xcc5, 0x9d8, 0xac3, 0x768, 0x64b, 0x732, 0x7d, 0x51e, 0x972, 0x36a, 0x8ae, 0x46d, 0x993, 0x70b, 0x77, 0x92d, 0xa4e, 0xcb1, 0x56a, 0xd34, 0x38d, 0x3a3, 0xa4d, 0xc39, 0xd43, 0x569, 0xd45, 0xa72, 0x69c, 0x3aa, 0x27c, 0x917, 0x51b, 0xaca, 0xf03, 0xb61, 0x89b, 0xe26, 0xb54, 0x34e, 0x4f8, 0x7d0, 0x8ab, 0x593, 0x5d8, 0xe29, 0xacc, 0xd4a, 0x1ce, 0x655, 0x8bc, 0x7b0, 0xbc4, 0xd07, 0x2c7, 0x936, 0x4ce, 0x716, 0x26b, 0x45e, 0x66a, 0x38e, 0x5f, 0x26e, 0x7a1, 0x54d, 0x1b5, 0x43d, 0xa87, 0x743, 0xb45, 0x4ea, 0x333, 0x175, 0xa1b, 0x437, 0x1f4, 0xd2c, 0x279, 0x783, 0x64e, 0x2e9, 0xca3, 0xf90, 0xc74, 0xf06, 0x4d3, 0x939, 0x3e2, 0x68e, 0xd7, 0x25d, 0xbb0, 0xf81, 0x66c, 0x99c, 0xb7, 0xa8b, 0x8ce, 0xe91, 0x16b, 0xb70, 0x179, 0xf24, 0x4f2, 0x617, 0x674, 0x92b, 0x4ad, 0xdb0, 0x647, 0x63a, 0x2cb, 0xe54, 0x31d, 0xd85, 0xd86, 0x89d, 0x86e, 0xc1d, 0x32b, 0xa93, 0xee, 0x5b8, 0x359, 0x59c, 0x873, 0xe68, 0x16d, 0xa39, 0xb38, 0xb83, 0xc4b, 0x6f0, 0xa33, 0x9c6, 0x473, 0x374, 0x83e, 0xa1d, 0x1e5, 0x738, 0x7c8, 0x74a, 0x6c3, 0x8d6, 0x366, 0xcd2, 0xb58, 0xc55, 0x8dc, 0x45d, 0x4e6, 0xa6c, 0x356, 0x3cc, 0xc3a, 0xad1, 0x83d, 0xe70, 0x355, 0xe8c, 0xf11, 0x13e, 0xb8c, 0xc8b, 0x176, 0xe25, 0xa95, 0xca6, 0x6b4, 0xf12, 0x6a9, 0xd83, 0x8ba, 0xda1, 0xf21, 0xc69, 0xb2c, 0xd62, 0x3a9, 0x8ea, 0x5b2, 0x58b, 0x2f4, 0x34b, 0xb98, 0x726, 0x5a5, 0x754, 0x68d, 0x7b, 0xb16, 0xb23, 0xf9, 0x3d2, 0xdb, 0xd2a, 0x70d, 0xa47, 0xaa5, 0xb15, 0x276, 0x9e8, 0xa56, 0xdc2, 0x678, 0x49b, 0x4ae, 0xe46, 0xba4, 0xd1a, 0x2ab, 0x44f, 0xe4c, 0x8e3, 0xcb8, 0x789, 0xe2a, 0xd15, 0x95a, 0xdc4, 0x9b2, 0xfc, 0x64d, 0x9f, 0x25e, 0xb4a, 0xe7, 0x5c9, 0x23d, 0x1ae, 0x764, 0xd0d, 0x539, 0x9cc, 0xf09, 0x6b8, 0x92e, 0xcf, 0xe1a, 0xc36, 0xc6a, 0x1d3, 0x699, 0x33c, 0x553, 0x9ac, 0xc33, 0x8f1, 0xc53, 0xf44, 0x14f, 0x371, 0x52e, 0x7a4, 0x953, 0x94b, 0xa2e, 0xec1, 0x1b6, 0x6d1, 0xfc0, 0xa9c, 0x4bc, 0x715, 0xc1e, 0xe92, 0x3b4, 0x87a, 0x62d, 0x9b1, 0xac5, 0x47a, 0xf22, 0x93a, 0x8cd, 0xac6, 0xf42, 0xc63, 0x157, 0xab1, 0x5ca, 0xa66, 0x16e, 0xda4, 0x665, 0xc8d, 0x62e, 0xe98, 0x785, 0x2f8, 0xb1a, 0x78c, 0xa5a, 0xcd4, 0xec2, 0x29e, 0xc56, 0x85b, 0xcc3, 0xd64, 0x46e, 0xe0d, 0x1c7, 0xa8d, 0x627, 0x71a, 0x653, 0x837, 0x4e9, 0xbc1, 0x725, 0x15b, 0xa74, 0x758, 0x879, 0x2b3, 0x6ac, 0x2f1, 0xab4, 0xc9a, 0x62b, 0xc6c, 0x1e6, 0x2ce, 0xe16, 0x339, 0x35c, 0x770, 0x7e0, 0x9b4, 0x1ba, 0xab2, 0x9e1, 0xd4c, 0xaf, 0xb51, 0x7c2, 0xc59, 0xf41, 0x3b8, 0xb52, 0xc78, 0x996, 0xd1c, 0x15e, 0x636, 0x257, 0x43e, 0xb62, 0xab8, 0xa0f, 0x1ab, 0x4b5, 0x571, 0x96c, 0x9a6, 0x8b3, 0xbe0, 0x53a, 0xe38, 0x3e1, 0xb89, 0x43b, 0x971, 0x7a8, 0xae2, 0xf82, 0x3b2, 0x61d, 0x6a3, 0x19d, 0x2dc, 0x2e6, 0xa35, 0xcd8, 0x9d2, 0xe64, 0xd52, 0x2ad, 0xd23, 0xf30, 0x72a, 0x65c, 0xb91, 0x969, 0x1da, 0x273, 0x687, 0xd13, 0xb0d, 0x999, 0xac9, 0xd92, 0xa4b, 0xccc, 0xf88, 0x4ec, 0x3c9, 0x563, 0xc35, 0x707, 0x749, 0x792, 0xce1, 0x5a9, 0xa78, 0xe4a, 0x3f0, 0x5a3, 0xb26, 0x8a7, 0x137, 0x1b3, 0x94d, 0xca5, 0xe94, 0xb86, 0x798, 0x2f2, 0x11f, 0xb92, 0x46b, 0x29b, 0xa2d, 0x1f8, 0xf60, 0x497, 0xeb0, 0xb43, 0x8b5, 0x8d3, 0x751, 0x746, 0x9c5, 0x1ea, 0xe07, 0x6ca, 0x9e4, 0x13b, 0x5f0, 0x31b, 0x965, 0xa1e, 0x9c3, 0xa6a, 0x347, 0xdc8, 0x2ea, 0x17a, 0x876, 0x4d5, 0xcc9, 0x959, 0x22f, 0xcaa, 0x3c5, 0x2d3, 0x476, 0x794, 0x9a9, 0xe19, 0x33a, 0xae8, 0xa71, 0xa2b, 0xdd0, 0x5d4, 0x987, 0x4b3, 0x39a, 0xa99, 0x2ae, 0x26d, 0x96a, 0x9d4, 0xd0e, 0xed, 0x54e, 0x574, 0x5e8, 0xb1c, 0x94e, 0x4f1, 0x9b8, 0x28f, 0x8e5, 0x8da, 0xc27, 0xea1, 0xf28, 0x897, 0x363, 0xc93, 0x56c, 0xd89, 0x90f, 0xb25, 0x2cd, 0x8cb, 0x6e1, 0xbb, 0x21f, 0xb46, 0x32d, 0xf6, 0xf84, 0x9f0, 0x2b9, 0xbd, 0xe0e, 0xa8e, 0x1d5, 0xf0a, 0x457, 0x669, 0xd38, 0xf50, 0x527, 0xb94, 0x6c9, 0x1f1 }; int encode(int N, int x, int y) { return 1 + __builtin_ctz(ROWS[x] & ~ROWS[y]); } int decode(int N, int q, int h) { bool is_x = (ROWS[q] >> (h-1)) & 1; return is_x ? 1 : 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...