fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. typedef std::vector<int> DType;
  6. static const int VSize = 8;
  7.  
  8. //汎用性ないなー。Orz C++11 http://i...content-available-to-author-only...e.com/Moj4uK
  9.  
  10. bool FirstCheck(DType A, DType B){
  11. if (A.size() != VSize) return false;
  12. if (B.size() != VSize) return false;
  13.  
  14. if (std::count(A.begin(), A.end(), 0) !=
  15. std::count(B.begin(), B.end(), 0)) return false;
  16.  
  17. return true;
  18. }
  19.  
  20. DType MakeIndex(std::size_t N){
  21.  
  22. DType R;
  23. for (std::size_t i = 0; i < N; i++)R.push_back(i);
  24.  
  25. return R;
  26. }
  27.  
  28. bool RotX(DType &v){
  29. // 23670145
  30. std::swap(v[0], v[4]);//block move1
  31. std::swap(v[1], v[5]);
  32. std::swap(v[0], v[6]);//2
  33. std::swap(v[1], v[7]);
  34. std::swap(v[0], v[2]);//3
  35. std::swap(v[1], v[3]);
  36.  
  37. return 0;
  38.  
  39. }
  40. bool RotY(DType &v){
  41. // 13025746
  42. std::swap(v[0], v[2]);//block move1
  43. std::swap(v[0], v[3]);
  44. std::swap(v[0], v[1]);//2
  45. std::swap(v[4], v[6]);
  46. std::swap(v[4], v[7]);//3
  47. std::swap(v[4], v[5]);
  48.  
  49. return 0;
  50. }
  51. bool RotZ(DType &v){
  52. // 40625173
  53. std::swap(v[0], v[1]);//block move1
  54. std::swap(v[2], v[3]);
  55. std::swap(v[0], v[5]);//2
  56. std::swap(v[2], v[7]);
  57. std::swap(v[0], v[4]);//3
  58. std::swap(v[2], v[6]);
  59.  
  60. return 0;
  61. }
  62.  
  63. bool Comp(DType& A, DType& B, DType& Idx){
  64. for (std::size_t i = 0; i < VSize; i++)
  65. {
  66. if (A[Idx[i]] != B[i]) return false;
  67. }
  68.  
  69. return true;
  70. }
  71.  
  72. bool MakeHoge(DType A, DType B){
  73.  
  74. if (FirstCheck(A, B) == false) return false;
  75.  
  76. auto Idx = MakeIndex(VSize);
  77. for (std::size_t i = 0; i < 4; i++)
  78. {
  79. for (std::size_t j = 0; j < 4; j++)
  80. {
  81. for (std::size_t k = 0; k < 4; k++)
  82. {
  83. if (Comp(A, B, Idx) == true) return true;
  84. RotX(Idx);
  85. }
  86. RotY(Idx);
  87. }
  88. RotZ(Idx);
  89. }
  90. return false;
  91. }
  92.  
  93. bool Show(DType& A, DType& B, bool b){
  94.  
  95. char S[][16] = { "偽", "真" };
  96.  
  97. for (auto& o : A) std::cout << o;
  98. std::cout << ',';
  99. for (auto& o : B) std::cout << o;
  100. std::cout << " -> " << S[b] << std::endl;
  101.  
  102. return true;
  103. }
  104.  
  105.  
  106.  
  107. int main(){
  108.  
  109.  
  110. auto F = [](DType A, DType B)-> bool{
  111. bool b = false;
  112.  
  113. b = MakeHoge(A, B);
  114. Show(A, B, b);
  115. return true;
  116. };
  117.  
  118. // F({ 0, 0, 0, 0, 0, 0, 0, 1, }, { 1, 0, 0, 0, 0, 0, 0, 0, });
  119. // F({ 0, 0, 0, 0, 1, 1, 1, 1, }, { 1, 0, 1, 0, 1, 0, 1, 0, });
  120. /*
  121. F({1,0,0,1,0,0,0,0,},{0,1,0,0,0,0,0,1,});
  122. */
  123. F({0,0,0,0,0,0,0,0,},{0,0,0,0,0,0,0,0,});
  124. F({0,0,0,0,0,0,0,1,},{0,0,0,0,0,0,0,1,});
  125. F({0,0,0,0,0,0,1,0,},{0,0,0,0,0,0,0,1,});
  126. F({0,0,0,0,0,0,1,1,},{0,0,0,0,0,0,1,1,});
  127. F({0,0,0,0,0,1,0,0,},{0,0,0,0,0,0,0,1,});
  128. F({0,0,0,0,0,1,0,1,},{0,0,0,0,0,0,1,1,});
  129. F({0,0,0,0,0,1,1,0,},{0,0,0,0,0,1,1,0,});
  130. F({0,0,0,0,0,1,1,1,},{0,0,0,0,0,1,1,1,});
  131. F({0,0,0,0,1,0,0,0,},{0,0,0,0,0,0,0,1,});
  132. F({0,0,0,0,1,0,0,1,},{0,0,0,0,0,1,1,0,});
  133. F({0,0,0,0,1,0,1,0,},{0,0,0,0,0,0,1,1,});
  134. F({0,0,0,0,1,0,1,1,},{0,0,0,0,0,1,1,1,});
  135. F({0,0,0,0,1,1,0,0,},{0,0,0,0,0,0,1,1,});
  136. F({0,0,0,0,1,1,0,1,},{0,0,0,0,0,1,1,1,});
  137. F({0,0,0,0,1,1,1,0,},{0,0,0,0,0,1,1,1,});
  138. F({0,0,0,0,1,1,1,1,},{0,0,0,0,1,1,1,1,});
  139. F({0,0,0,1,0,0,0,0,},{0,0,0,0,0,0,0,1,});
  140. F({0,0,0,1,0,0,0,1,},{0,0,0,0,0,0,1,1,});
  141. F({0,0,0,1,0,0,1,0,},{0,0,0,0,0,1,1,0,});
  142. F({0,0,0,1,0,0,1,1,},{0,0,0,0,0,1,1,1,});
  143. F({0,0,0,1,0,1,0,0,},{0,0,0,0,0,1,1,0,});
  144. F({0,0,0,1,0,1,0,1,},{0,0,0,0,0,1,1,1,});
  145. F({0,0,0,1,0,1,1,0,},{0,0,0,1,0,1,1,0,});
  146. F({0,0,0,1,0,1,1,1,},{0,0,0,1,0,1,1,1,});
  147. F({0,0,0,1,1,0,0,0,},{0,0,0,1,1,0,0,0,});
  148. F({0,0,0,1,1,0,0,1,},{0,0,0,1,1,0,0,1,});
  149. F({0,0,0,1,1,0,1,0,},{0,0,0,1,1,0,0,1,});
  150. F({0,0,0,1,1,0,1,1,},{0,0,0,1,1,0,1,1,});
  151. F({0,0,0,1,1,1,0,0,},{0,0,0,1,1,0,0,1,});
  152. F({0,0,0,1,1,1,0,1,},{0,0,0,1,1,1,0,1,});
  153. F({0,0,0,1,1,1,1,0,},{0,0,0,1,1,1,1,0,});
  154. F({0,0,0,1,1,1,1,1,},{0,0,0,1,1,1,1,1,});
  155. F({0,0,1,0,0,0,0,0,},{0,0,0,0,0,0,0,1,});
  156. F({0,0,1,0,0,0,0,1,},{0,0,0,0,0,1,1,0,});
  157. F({0,0,1,0,0,0,1,0,},{0,0,0,0,0,0,1,1,});
  158. F({0,0,1,0,0,0,1,1,},{0,0,0,0,0,1,1,1,});
  159. F({0,0,1,0,0,1,0,0,},{0,0,0,1,1,0,0,0,});
  160. F({0,0,1,0,0,1,0,1,},{0,0,0,1,1,0,0,1,});
  161. F({0,0,1,0,0,1,1,0,},{0,0,0,1,1,0,0,1,});
  162. F({0,0,1,0,0,1,1,1,},{0,0,0,1,1,1,0,1,});
  163. F({0,0,1,0,1,0,0,0,},{0,0,0,0,0,1,1,0,});
  164. F({0,0,1,0,1,0,0,1,},{0,0,0,1,0,1,1,0,});
  165. F({0,0,1,0,1,0,1,0,},{0,0,0,0,0,1,1,1,});
  166. F({0,0,1,0,1,0,1,1,},{0,0,0,1,0,1,1,1,});
  167. F({0,0,1,0,1,1,0,0,},{0,0,0,1,1,0,0,1,});
  168. F({0,0,1,0,1,1,0,1,},{0,0,0,1,1,1,1,0,});
  169. F({0,0,1,0,1,1,1,0,},{0,0,0,1,1,0,1,1,});
  170. F({0,0,1,0,1,1,1,1,},{0,0,0,1,1,1,1,1,});
  171. F({0,0,1,1,0,0,0,0,},{0,0,0,0,0,0,1,1,});
  172. F({0,0,1,1,0,0,0,1,},{0,0,0,0,0,1,1,1,});
  173. F({0,0,1,1,0,0,1,0,},{0,0,0,0,0,1,1,1,});
  174. F({0,0,1,1,0,0,1,1,},{0,0,0,0,1,1,1,1,});
  175. F({0,0,1,1,0,1,0,0,},{0,0,0,1,1,0,0,1,});
  176. F({0,0,1,1,0,1,0,1,},{0,0,0,1,1,0,1,1,});
  177. F({0,0,1,1,0,1,1,0,},{0,0,0,1,1,1,1,0,});
  178. F({0,0,1,1,0,1,1,1,},{0,0,0,1,1,1,1,1,});
  179. F({0,0,1,1,1,0,0,0,},{0,0,0,1,1,0,0,1,});
  180. F({0,0,1,1,1,0,0,1,},{0,0,0,1,1,1,1,0,});
  181. F({0,0,1,1,1,0,1,0,},{0,0,0,1,1,1,0,1,});
  182. F({0,0,1,1,1,0,1,1,},{0,0,0,1,1,1,1,1,});
  183. F({0,0,1,1,1,1,0,0,},{0,0,1,1,1,1,0,0,});
  184. F({0,0,1,1,1,1,0,1,},{0,0,1,1,1,1,0,1,});
  185. F({0,0,1,1,1,1,1,0,},{0,0,1,1,1,1,0,1,});
  186. F({0,0,1,1,1,1,1,1,},{0,0,1,1,1,1,1,1,});
  187. F({0,1,0,0,0,0,0,0,},{0,0,0,0,0,0,0,1,});
  188. F({0,1,0,0,0,0,0,1,},{0,0,0,0,0,1,1,0,});
  189. F({0,1,0,0,0,0,1,0,},{0,0,0,1,1,0,0,0,});
  190. F({0,1,0,0,0,0,1,1,},{0,0,0,1,1,0,0,1,});
  191. F({0,1,0,0,0,1,0,0,},{0,0,0,0,0,0,1,1,});
  192. F({0,1,0,0,0,1,0,1,},{0,0,0,0,0,1,1,1,});
  193. F({0,1,0,0,0,1,1,0,},{0,0,0,1,1,0,0,1,});
  194. F({0,1,0,0,0,1,1,1,},{0,0,0,1,1,0,1,1,});
  195. F({0,1,0,0,1,0,0,0,},{0,0,0,0,0,1,1,0,});
  196. F({0,1,0,0,1,0,0,1,},{0,0,0,1,0,1,1,0,});
  197. F({0,1,0,0,1,0,1,0,},{0,0,0,1,1,0,0,1,});
  198. F({0,1,0,0,1,0,1,1,},{0,0,0,1,1,1,1,0,});
  199. F({0,1,0,0,1,1,0,0,},{0,0,0,0,0,1,1,1,});
  200. F({0,1,0,0,1,1,0,1,},{0,0,0,1,0,1,1,1,});
  201. F({0,1,0,0,1,1,1,0,},{0,0,0,1,1,1,0,1,});
  202. F({0,1,0,0,1,1,1,1,},{0,0,0,1,1,1,1,1,});
  203. F({0,1,0,1,0,0,0,0,},{0,0,0,0,0,0,1,1,});
  204. F({0,1,0,1,0,0,0,1,},{0,0,0,0,0,1,1,1,});
  205. F({0,1,0,1,0,0,1,0,},{0,0,0,1,1,0,0,1,});
  206. F({0,1,0,1,0,0,1,1,},{0,0,0,1,1,1,0,1,});
  207. F({0,1,0,1,0,1,0,0,},{0,0,0,0,0,1,1,1,});
  208. F({0,1,0,1,0,1,0,1,},{0,0,0,0,1,1,1,1,});
  209. F({0,1,0,1,0,1,1,0,},{0,0,0,1,1,1,1,0,});
  210. F({0,1,0,1,0,1,1,1,},{0,0,0,1,1,1,1,1,});
  211. F({0,1,0,1,1,0,0,0,},{0,0,0,1,1,0,0,1,});
  212. F({0,1,0,1,1,0,0,1,},{0,0,0,1,1,1,1,0,});
  213. F({0,1,0,1,1,0,1,0,},{0,0,1,1,1,1,0,0,});
  214. F({0,1,0,1,1,0,1,1,},{0,0,1,1,1,1,0,1,});
  215. F({0,1,0,1,1,1,0,0,},{0,0,0,1,1,0,1,1,});
  216. F({0,1,0,1,1,1,0,1,},{0,0,0,1,1,1,1,1,});
  217. F({0,1,0,1,1,1,1,0,},{0,0,1,1,1,1,0,1,});
  218. F({0,1,0,1,1,1,1,1,},{0,0,1,1,1,1,1,1,});
  219. F({0,1,1,0,0,0,0,0,},{0,0,0,0,0,1,1,0,});
  220. F({0,1,1,0,0,0,0,1,},{0,0,0,1,0,1,1,0,});
  221. F({0,1,1,0,0,0,1,0,},{0,0,0,1,1,0,0,1,});
  222. F({0,1,1,0,0,0,1,1,},{0,0,0,1,1,1,1,0,});
  223. F({0,1,1,0,0,1,0,0,},{0,0,0,1,1,0,0,1,});
  224. F({0,1,1,0,0,1,0,1,},{0,0,0,1,1,1,1,0,});
  225. F({0,1,1,0,0,1,1,0,},{0,0,1,1,1,1,0,0,});
  226. F({0,1,1,0,0,1,1,1,},{0,0,1,1,1,1,0,1,});
  227. F({0,1,1,0,1,0,0,0,},{0,0,0,1,0,1,1,0,});
  228. F({0,1,1,0,1,0,0,1,},{0,1,1,0,1,0,0,1,});
  229. F({0,1,1,0,1,0,1,0,},{0,0,0,1,1,1,1,0,});
  230. F({0,1,1,0,1,0,1,1,},{0,1,1,0,1,0,1,1,});
  231. F({0,1,1,0,1,1,0,0,},{0,0,0,1,1,1,1,0,});
  232. F({0,1,1,0,1,1,0,1,},{0,1,1,0,1,0,1,1,});
  233. F({0,1,1,0,1,1,1,0,},{0,0,1,1,1,1,0,1,});
  234. F({0,1,1,0,1,1,1,1,},{0,1,1,0,1,1,1,1,});
  235. F({0,1,1,1,0,0,0,0,},{0,0,0,0,0,1,1,1,});
  236. F({0,1,1,1,0,0,0,1,},{0,0,0,1,0,1,1,1,});
  237. F({0,1,1,1,0,0,1,0,},{0,0,0,1,1,0,1,1,});
  238. F({0,1,1,1,0,0,1,1,},{0,0,0,1,1,1,1,1,});
  239. F({0,1,1,1,0,1,0,0,},{0,0,0,1,1,1,0,1,});
  240. F({0,1,1,1,0,1,0,1,},{0,0,0,1,1,1,1,1,});
  241. F({0,1,1,1,0,1,1,0,},{0,0,1,1,1,1,0,1,});
  242. F({0,1,1,1,0,1,1,1,},{0,0,1,1,1,1,1,1,});
  243. F({0,1,1,1,1,0,0,0,},{0,0,0,1,1,1,1,0,});
  244. F({0,1,1,1,1,0,0,1,},{0,1,1,0,1,0,1,1,});
  245. F({0,1,1,1,1,0,1,0,},{0,0,1,1,1,1,0,1,});
  246. F({0,1,1,1,1,0,1,1,},{0,1,1,0,1,1,1,1,});
  247. F({0,1,1,1,1,1,0,0,},{0,0,1,1,1,1,0,1,});
  248. F({0,1,1,1,1,1,0,1,},{0,1,1,0,1,1,1,1,});
  249. F({0,1,1,1,1,1,1,0,},{0,1,1,1,1,1,1,0,});
  250. F({0,1,1,1,1,1,1,1,},{0,1,1,1,1,1,1,1,});
  251. F({1,0,0,0,0,0,0,0,},{0,0,0,0,0,0,0,1,});
  252. F({1,0,0,0,0,0,0,1,},{0,0,0,1,1,0,0,0,});
  253. F({1,0,0,0,0,0,1,0,},{0,0,0,0,0,1,1,0,});
  254. F({1,0,0,0,0,0,1,1,},{0,0,0,1,1,0,0,1,});
  255. F({1,0,0,0,0,1,0,0,},{0,0,0,0,0,1,1,0,});
  256. F({1,0,0,0,0,1,0,1,},{0,0,0,1,1,0,0,1,});
  257. F({1,0,0,0,0,1,1,0,},{0,0,0,1,0,1,1,0,});
  258. F({1,0,0,0,0,1,1,1,},{0,0,0,1,1,1,1,0,});
  259. F({1,0,0,0,1,0,0,0,},{0,0,0,0,0,0,1,1,});
  260. F({1,0,0,0,1,0,0,1,},{0,0,0,1,1,0,0,1,});
  261. F({1,0,0,0,1,0,1,0,},{0,0,0,0,0,1,1,1,});
  262. F({1,0,0,0,1,0,1,1,},{0,0,0,1,1,1,0,1,});
  263. F({1,0,0,0,1,1,0,0,},{0,0,0,0,0,1,1,1,});
  264. F({1,0,0,0,1,1,0,1,},{0,0,0,1,1,0,1,1,});
  265. F({1,0,0,0,1,1,1,0,},{0,0,0,1,0,1,1,1,});
  266. F({1,0,0,0,1,1,1,1,},{0,0,0,1,1,1,1,1,});
  267. F({1,0,0,1,0,0,0,0,},{0,0,0,0,0,1,1,0,});
  268. F({1,0,0,1,0,0,0,1,},{0,0,0,1,1,0,0,1,});
  269. F({1,0,0,1,0,0,1,0,},{0,0,0,1,0,1,1,0,});
  270. F({1,0,0,1,0,0,1,1,},{0,0,0,1,1,1,1,0,});
  271. F({1,0,0,1,0,1,0,0,},{0,0,0,1,0,1,1,0,});
  272. F({1,0,0,1,0,1,0,1,},{0,0,0,1,1,1,1,0,});
  273. F({1,0,0,1,0,1,1,0,},{0,1,1,0,1,0,0,1,});
  274. F({1,0,0,1,0,1,1,1,},{0,1,1,0,1,0,1,1,});
  275. F({1,0,0,1,1,0,0,0,},{0,0,0,1,1,0,0,1,});
  276. F({1,0,0,1,1,0,0,1,},{0,0,1,1,1,1,0,0,});
  277. F({1,0,0,1,1,0,1,0,},{0,0,0,1,1,1,1,0,});
  278. F({1,0,0,1,1,0,1,1,},{0,0,1,1,1,1,0,1,});
  279. F({1,0,0,1,1,1,0,0,},{0,0,0,1,1,1,1,0,});
  280. F({1,0,0,1,1,1,0,1,},{0,0,1,1,1,1,0,1,});
  281. F({1,0,0,1,1,1,1,0,},{0,1,1,0,1,0,1,1,});
  282. F({1,0,0,1,1,1,1,1,},{0,1,1,0,1,1,1,1,});
  283. F({1,0,1,0,0,0,0,0,},{0,0,0,0,0,0,1,1,});
  284. F({1,0,1,0,0,0,0,1,},{0,0,0,1,1,0,0,1,});
  285. F({1,0,1,0,0,0,1,0,},{0,0,0,0,0,1,1,1,});
  286. F({1,0,1,0,0,0,1,1,},{0,0,0,1,1,0,1,1,});
  287. F({1,0,1,0,0,1,0,0,},{0,0,0,1,1,0,0,1,});
  288. F({1,0,1,0,0,1,0,1,},{0,0,1,1,1,1,0,0,});
  289. F({1,0,1,0,0,1,1,0,},{0,0,0,1,1,1,1,0,});
  290. F({1,0,1,0,0,1,1,1,},{0,0,1,1,1,1,0,1,});
  291. F({1,0,1,0,1,0,0,0,},{0,0,0,0,0,1,1,1,});
  292. F({1,0,1,0,1,0,0,1,},{0,0,0,1,1,1,1,0,});
  293. F({1,0,1,0,1,0,1,0,},{0,0,0,0,1,1,1,1,});
  294. F({1,0,1,0,1,0,1,1,},{0,0,0,1,1,1,1,1,});
  295. F({1,0,1,0,1,1,0,0,},{0,0,0,1,1,1,0,1,});
  296. F({1,0,1,0,1,1,0,1,},{0,0,1,1,1,1,0,1,});
  297. F({1,0,1,0,1,1,1,0,},{0,0,0,1,1,1,1,1,});
  298. F({1,0,1,0,1,1,1,1,},{0,0,1,1,1,1,1,1,});
  299. F({1,0,1,1,0,0,0,0,},{0,0,0,0,0,1,1,1,});
  300. F({1,0,1,1,0,0,0,1,},{0,0,0,1,1,1,0,1,});
  301. F({1,0,1,1,0,0,1,0,},{0,0,0,1,0,1,1,1,});
  302. F({1,0,1,1,0,0,1,1,},{0,0,0,1,1,1,1,1,});
  303. F({1,0,1,1,0,1,0,0,},{0,0,0,1,1,1,1,0,});
  304. F({1,0,1,1,0,1,0,1,},{0,0,1,1,1,1,0,1,});
  305. F({1,0,1,1,0,1,1,0,},{0,1,1,0,1,0,1,1,});
  306. F({1,0,1,1,0,1,1,1,},{0,1,1,0,1,1,1,1,});
  307. F({1,0,1,1,1,0,0,0,},{0,0,0,1,1,0,1,1,});
  308. F({1,0,1,1,1,0,0,1,},{0,0,1,1,1,1,0,1,});
  309. F({1,0,1,1,1,0,1,0,},{0,0,0,1,1,1,1,1,});
  310. F({1,0,1,1,1,0,1,1,},{0,0,1,1,1,1,1,1,});
  311. F({1,0,1,1,1,1,0,0,},{0,0,1,1,1,1,0,1,});
  312. F({1,0,1,1,1,1,0,1,},{0,1,1,1,1,1,1,0,});
  313. F({1,0,1,1,1,1,1,0,},{0,1,1,0,1,1,1,1,});
  314. F({1,0,1,1,1,1,1,1,},{0,1,1,1,1,1,1,1,});
  315. F({1,1,0,0,0,0,0,0,},{0,0,0,0,0,0,1,1,});
  316. F({1,1,0,0,0,0,0,1,},{0,0,0,1,1,0,0,1,});
  317. F({1,1,0,0,0,0,1,0,},{0,0,0,1,1,0,0,1,});
  318. F({1,1,0,0,0,0,1,1,},{0,0,1,1,1,1,0,0,});
  319. F({1,1,0,0,0,1,0,0,},{0,0,0,0,0,1,1,1,});
  320. F({1,1,0,0,0,1,0,1,},{0,0,0,1,1,1,0,1,});
  321. F({1,1,0,0,0,1,1,0,},{0,0,0,1,1,1,1,0,});
  322. F({1,1,0,0,0,1,1,1,},{0,0,1,1,1,1,0,1,});
  323. F({1,1,0,0,1,0,0,0,},{0,0,0,0,0,1,1,1,});
  324. F({1,1,0,0,1,0,0,1,},{0,0,0,1,1,1,1,0,});
  325. F({1,1,0,0,1,0,1,0,},{0,0,0,1,1,0,1,1,});
  326. F({1,1,0,0,1,0,1,1,},{0,0,1,1,1,1,0,1,});
  327. F({1,1,0,0,1,1,0,0,},{0,0,0,0,1,1,1,1,});
  328. F({1,1,0,0,1,1,0,1,},{0,0,0,1,1,1,1,1,});
  329. F({1,1,0,0,1,1,1,0,},{0,0,0,1,1,1,1,1,});
  330. F({1,1,0,0,1,1,1,1,},{0,0,1,1,1,1,1,1,});
  331. F({1,1,0,1,0,0,0,0,},{0,0,0,0,0,1,1,1,});
  332. F({1,1,0,1,0,0,0,1,},{0,0,0,1,1,0,1,1,});
  333. F({1,1,0,1,0,0,1,0,},{0,0,0,1,1,1,1,0,});
  334. F({1,1,0,1,0,0,1,1,},{0,0,1,1,1,1,0,1,});
  335. F({1,1,0,1,0,1,0,0,},{0,0,0,1,0,1,1,1,});
  336. F({1,1,0,1,0,1,0,1,},{0,0,0,1,1,1,1,1,});
  337. F({1,1,0,1,0,1,1,0,},{0,1,1,0,1,0,1,1,});
  338. F({1,1,0,1,0,1,1,1,},{0,1,1,0,1,1,1,1,});
  339. F({1,1,0,1,1,0,0,0,},{0,0,0,1,1,1,0,1,});
  340. F({1,1,0,1,1,0,0,1,},{0,0,1,1,1,1,0,1,});
  341. F({1,1,0,1,1,0,1,0,},{0,0,1,1,1,1,0,1,});
  342. F({1,1,0,1,1,0,1,1,},{0,1,1,1,1,1,1,0,});
  343. F({1,1,0,1,1,1,0,0,},{0,0,0,1,1,1,1,1,});
  344. F({1,1,0,1,1,1,0,1,},{0,0,1,1,1,1,1,1,});
  345. F({1,1,0,1,1,1,1,0,},{0,1,1,0,1,1,1,1,});
  346. F({1,1,0,1,1,1,1,1,},{0,1,1,1,1,1,1,1,});
  347. F({1,1,1,0,0,0,0,0,},{0,0,0,0,0,1,1,1,});
  348. F({1,1,1,0,0,0,0,1,},{0,0,0,1,1,1,1,0,});
  349. F({1,1,1,0,0,0,1,0,},{0,0,0,1,1,1,0,1,});
  350. F({1,1,1,0,0,0,1,1,},{0,0,1,1,1,1,0,1,});
  351. F({1,1,1,0,0,1,0,0,},{0,0,0,1,1,0,1,1,});
  352. F({1,1,1,0,0,1,0,1,},{0,0,1,1,1,1,0,1,});
  353. F({1,1,1,0,0,1,1,0,},{0,0,1,1,1,1,0,1,});
  354. F({1,1,1,0,0,1,1,1,},{0,1,1,1,1,1,1,0,});
  355. F({1,1,1,0,1,0,0,0,},{0,0,0,1,0,1,1,1,});
  356. F({1,1,1,0,1,0,0,1,},{0,1,1,0,1,0,1,1,});
  357. F({1,1,1,0,1,0,1,0,},{0,0,0,1,1,1,1,1,});
  358. F({1,1,1,0,1,0,1,1,},{0,1,1,0,1,1,1,1,});
  359. F({1,1,1,0,1,1,0,0,},{0,0,0,1,1,1,1,1,});
  360. F({1,1,1,0,1,1,0,1,},{0,1,1,0,1,1,1,1,});
  361. F({1,1,1,0,1,1,1,0,},{0,0,1,1,1,1,1,1,});
  362. F({1,1,1,0,1,1,1,1,},{0,1,1,1,1,1,1,1,});
  363. F({1,1,1,1,0,0,0,0,},{0,0,0,0,1,1,1,1,});
  364. F({1,1,1,1,0,0,0,1,},{0,0,0,1,1,1,1,1,});
  365. F({1,1,1,1,0,0,1,0,},{0,0,0,1,1,1,1,1,});
  366. F({1,1,1,1,0,0,1,1,},{0,0,1,1,1,1,1,1,});
  367. F({1,1,1,1,0,1,0,0,},{0,0,0,1,1,1,1,1,});
  368. F({1,1,1,1,0,1,0,1,},{0,0,1,1,1,1,1,1,});
  369. F({1,1,1,1,0,1,1,0,},{0,1,1,0,1,1,1,1,});
  370. F({1,1,1,1,0,1,1,1,},{0,1,1,1,1,1,1,1,});
  371. F({1,1,1,1,1,0,0,0,},{0,0,0,1,1,1,1,1,});
  372. F({1,1,1,1,1,0,0,1,},{0,1,1,0,1,1,1,1,});
  373. F({1,1,1,1,1,0,1,0,},{0,0,1,1,1,1,1,1,});
  374. F({1,1,1,1,1,0,1,1,},{0,1,1,1,1,1,1,1,});
  375. F({1,1,1,1,1,1,0,0,},{0,0,1,1,1,1,1,1,});
  376. F({1,1,1,1,1,1,0,1,},{0,1,1,1,1,1,1,1,});
  377. F({1,1,1,1,1,1,1,0,},{0,1,1,1,1,1,1,1,});
  378. F({1,1,1,1,1,1,1,1,},{1,1,1,1,1,1,1,1,});
  379.  
  380. return 0;
  381.  
  382. }
  383.  
Success #stdin #stdout 0s 3532KB
stdin
Standard input is empty
stdout
00000000,00000000 -> 真
00000001,00000001 -> 真
00000010,00000001 -> 真
00000011,00000011 -> 真
00000100,00000001 -> 真
00000101,00000011 -> 真
00000110,00000110 -> 真
00000111,00000111 -> 真
00001000,00000001 -> 真
00001001,00000110 -> 真
00001010,00000011 -> 真
00001011,00000111 -> 真
00001100,00000011 -> 真
00001101,00000111 -> 真
00001110,00000111 -> 真
00001111,00001111 -> 真
00010000,00000001 -> 真
00010001,00000011 -> 真
00010010,00000110 -> 真
00010011,00000111 -> 真
00010100,00000110 -> 真
00010101,00000111 -> 真
00010110,00010110 -> 真
00010111,00010111 -> 真
00011000,00011000 -> 真
00011001,00011001 -> 真
00011010,00011001 -> 真
00011011,00011011 -> 真
00011100,00011001 -> 真
00011101,00011101 -> 真
00011110,00011110 -> 真
00011111,00011111 -> 真
00100000,00000001 -> 真
00100001,00000110 -> 真
00100010,00000011 -> 真
00100011,00000111 -> 真
00100100,00011000 -> 真
00100101,00011001 -> 真
00100110,00011001 -> 真
00100111,00011101 -> 真
00101000,00000110 -> 真
00101001,00010110 -> 真
00101010,00000111 -> 真
00101011,00010111 -> 真
00101100,00011001 -> 真
00101101,00011110 -> 真
00101110,00011011 -> 真
00101111,00011111 -> 真
00110000,00000011 -> 真
00110001,00000111 -> 真
00110010,00000111 -> 真
00110011,00001111 -> 真
00110100,00011001 -> 真
00110101,00011011 -> 真
00110110,00011110 -> 真
00110111,00011111 -> 真
00111000,00011001 -> 真
00111001,00011110 -> 真
00111010,00011101 -> 真
00111011,00011111 -> 真
00111100,00111100 -> 真
00111101,00111101 -> 真
00111110,00111101 -> 真
00111111,00111111 -> 真
01000000,00000001 -> 真
01000001,00000110 -> 真
01000010,00011000 -> 真
01000011,00011001 -> 真
01000100,00000011 -> 真
01000101,00000111 -> 真
01000110,00011001 -> 真
01000111,00011011 -> 真
01001000,00000110 -> 真
01001001,00010110 -> 真
01001010,00011001 -> 真
01001011,00011110 -> 真
01001100,00000111 -> 真
01001101,00010111 -> 真
01001110,00011101 -> 真
01001111,00011111 -> 真
01010000,00000011 -> 真
01010001,00000111 -> 真
01010010,00011001 -> 真
01010011,00011101 -> 真
01010100,00000111 -> 真
01010101,00001111 -> 真
01010110,00011110 -> 真
01010111,00011111 -> 真
01011000,00011001 -> 真
01011001,00011110 -> 真
01011010,00111100 -> 真
01011011,00111101 -> 真
01011100,00011011 -> 真
01011101,00011111 -> 真
01011110,00111101 -> 真
01011111,00111111 -> 真
01100000,00000110 -> 真
01100001,00010110 -> 真
01100010,00011001 -> 真
01100011,00011110 -> 真
01100100,00011001 -> 真
01100101,00011110 -> 真
01100110,00111100 -> 真
01100111,00111101 -> 真
01101000,00010110 -> 真
01101001,01101001 -> 真
01101010,00011110 -> 真
01101011,01101011 -> 真
01101100,00011110 -> 真
01101101,01101011 -> 真
01101110,00111101 -> 真
01101111,01101111 -> 真
01110000,00000111 -> 真
01110001,00010111 -> 真
01110010,00011011 -> 真
01110011,00011111 -> 真
01110100,00011101 -> 真
01110101,00011111 -> 真
01110110,00111101 -> 真
01110111,00111111 -> 真
01111000,00011110 -> 真
01111001,01101011 -> 真
01111010,00111101 -> 真
01111011,01101111 -> 真
01111100,00111101 -> 真
01111101,01101111 -> 真
01111110,01111110 -> 真
01111111,01111111 -> 真
10000000,00000001 -> 真
10000001,00011000 -> 真
10000010,00000110 -> 真
10000011,00011001 -> 真
10000100,00000110 -> 真
10000101,00011001 -> 真
10000110,00010110 -> 真
10000111,00011110 -> 真
10001000,00000011 -> 真
10001001,00011001 -> 真
10001010,00000111 -> 真
10001011,00011101 -> 真
10001100,00000111 -> 真
10001101,00011011 -> 真
10001110,00010111 -> 真
10001111,00011111 -> 真
10010000,00000110 -> 真
10010001,00011001 -> 真
10010010,00010110 -> 真
10010011,00011110 -> 真
10010100,00010110 -> 真
10010101,00011110 -> 真
10010110,01101001 -> 真
10010111,01101011 -> 真
10011000,00011001 -> 真
10011001,00111100 -> 真
10011010,00011110 -> 真
10011011,00111101 -> 真
10011100,00011110 -> 真
10011101,00111101 -> 真
10011110,01101011 -> 真
10011111,01101111 -> 真
10100000,00000011 -> 真
10100001,00011001 -> 真
10100010,00000111 -> 真
10100011,00011011 -> 真
10100100,00011001 -> 真
10100101,00111100 -> 真
10100110,00011110 -> 真
10100111,00111101 -> 真
10101000,00000111 -> 真
10101001,00011110 -> 真
10101010,00001111 -> 真
10101011,00011111 -> 真
10101100,00011101 -> 真
10101101,00111101 -> 真
10101110,00011111 -> 真
10101111,00111111 -> 真
10110000,00000111 -> 真
10110001,00011101 -> 真
10110010,00010111 -> 真
10110011,00011111 -> 真
10110100,00011110 -> 真
10110101,00111101 -> 真
10110110,01101011 -> 真
10110111,01101111 -> 真
10111000,00011011 -> 真
10111001,00111101 -> 真
10111010,00011111 -> 真
10111011,00111111 -> 真
10111100,00111101 -> 真
10111101,01111110 -> 真
10111110,01101111 -> 真
10111111,01111111 -> 真
11000000,00000011 -> 真
11000001,00011001 -> 真
11000010,00011001 -> 真
11000011,00111100 -> 真
11000100,00000111 -> 真
11000101,00011101 -> 真
11000110,00011110 -> 真
11000111,00111101 -> 真
11001000,00000111 -> 真
11001001,00011110 -> 真
11001010,00011011 -> 真
11001011,00111101 -> 真
11001100,00001111 -> 真
11001101,00011111 -> 真
11001110,00011111 -> 真
11001111,00111111 -> 真
11010000,00000111 -> 真
11010001,00011011 -> 真
11010010,00011110 -> 真
11010011,00111101 -> 真
11010100,00010111 -> 真
11010101,00011111 -> 真
11010110,01101011 -> 真
11010111,01101111 -> 真
11011000,00011101 -> 真
11011001,00111101 -> 真
11011010,00111101 -> 真
11011011,01111110 -> 真
11011100,00011111 -> 真
11011101,00111111 -> 真
11011110,01101111 -> 真
11011111,01111111 -> 真
11100000,00000111 -> 真
11100001,00011110 -> 真
11100010,00011101 -> 真
11100011,00111101 -> 真
11100100,00011011 -> 真
11100101,00111101 -> 真
11100110,00111101 -> 真
11100111,01111110 -> 真
11101000,00010111 -> 真
11101001,01101011 -> 真
11101010,00011111 -> 真
11101011,01101111 -> 真
11101100,00011111 -> 真
11101101,01101111 -> 真
11101110,00111111 -> 真
11101111,01111111 -> 真
11110000,00001111 -> 真
11110001,00011111 -> 真
11110010,00011111 -> 真
11110011,00111111 -> 真
11110100,00011111 -> 真
11110101,00111111 -> 真
11110110,01101111 -> 真
11110111,01111111 -> 真
11111000,00011111 -> 真
11111001,01101111 -> 真
11111010,00111111 -> 真
11111011,01111111 -> 真
11111100,00111111 -> 真
11111101,01111111 -> 真
11111110,01111111 -> 真
11111111,11111111 -> 真