結果
問題 | No.217 魔方陣を作ろう |
ユーザー | koyumeishi |
提出日時 | 2015-05-27 01:12:52 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 8,250 bytes |
コンパイル時間 | 577 ms |
コンパイル使用メモリ | 66,616 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 10:33:19 |
合計ジャッジ時間 | 1,268 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | AC | 2 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 2 ms
5,376 KB |
testcase_08 | AC | 2 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | AC | 1 ms
5,376 KB |
testcase_11 | AC | 1 ms
5,376 KB |
testcase_12 | AC | 1 ms
5,376 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
ソースコード
#include <iostream> #include <vector> #include <cstdio> using namespace std; vector<vector<unsigned long long>> pack = {{0x100e05018180208,0x409},{0x1c0c0c020381e01,0xc1a05058281009,0x2002},{0x142e0f040043011,0x501a06020401c07,0x2c0615098301416,0x48083212},{0x782a18008103a20,0x2418170b00c041f,0x48160a0c8702811,0x8448100686c3413,0x184622078381005,0x7},{0x70260a008c04e1e,0x7436120481c5e26,0x94461a088200c2e,0xb448220c8401c05,0x10582a108601e0d,0x30062b148802e15,0x501602188a03e16,0x0},{0xe87605020f87e01,0x386835058287008,0xb05a13090c0620f,0x704c270c8a42e16,0x783e2110088461d,0xa830280d06c4a24,0x40222f170502a2b,0x246e36060346632,0x8063d1e0180e39,0x40},{0x5c180128114742f,0x2c124f220e45a22,0x209c43170b04216,0x1347036158802a0a,0xdc6a2a0f8502407,0xd0521e098440c42,0xa03a1b08130823f,0x703405259007c33,0x3c084a240f46427,0xc92471e0c44c24,0x1448c3b18094320e,0x118601a02},{0x8002042e9808244,0x17cbc43210e4781d,0x170763a0f8780602,0xd470190e0442859,0x6826122d9687a40,0x34203f1f0dc6c1b,0x1609a501a0c42a18,0xcc64170b03c1c55,0xb450252b9589e4e,0x301254289249830,0x148964a178b84e26,0x1208a2c1482c1453,0xac482104014c861,0x180e62319188e2a,0x4423},{0x38027835978a244,0x1a8ba50210d4501b,0x10468270d0341677,0x64180a3b1a4b843,0x1d4d04f269006626,0x1307e32128602c09,0x902e15041d0b64e,0x1cce5a2c12c7c31,0x15c943d1808c4214,0xbc4420099cccc59,0x18e46531958923c,0x188aa481d8b8581f,0xe85a2b09014e264,0x44087037184a847,0x1b4c053230e46e1e,0x114702a0e840066f,0x701e023c9b0be52,0x6c29},{0x2291605022391e01,0x39080c4321c1208,0x1f0fa1309201020f,0x1d4361a3c1e42e16,0x8c44703887c3c74,0x19c5228351ac4a6d,0xc46062318b45866,0xe0b45b1a8d0bc5f,0xfc7c541e158ae39,0x118984d21908a051,0x1108a4b251209247,0xf4a652201049e4e,0xd86e592c0e87655,0xbcc260190ccba5c,0x1a4d02a15994c82e,0x84de6e121b04c27,0x1dcec1c0e9cce420,0x1f828153d9e83019,0x2141a8341040227f,0x2300c0744a20140b,0x48008068d},{0x55099451ecd85d,0x1acb64c1e8b83e10,0x781e0d53a61127a,0x220f25c2d12c782d,0xec581d070314c97,0x2952c87351a0b24a,0x160923a15870340b,0x6414a44a9e0d267,0x1d4cc57240e4541b,0xa44e1804a8d0c77,0x214ec74329588e38,0x1186e281305c1094,0x2892684411ccc855,0x18ca8451b0d04a16,0x900ea14920d0272,0x200e262299106a33,0x104641503281228f,0x2411c7f38184a443,0x1448440118500a9f,0x113c9c469f8de60,0x1b8be50270c44413,0x8424034ea6d187d,0x22cf86d2f13c7e30,0xf85e2008809529a,0x4d},{0x117ac04ca70ea78,0x1b4e049260945001,0x97ebe4da68ee76,0x1bcdc4b2509c4c03,0x90321c5caf12a98,0x1c4e869361149021,0x88361a5dae92e96,0x1cce46b3511c8c23,0x1103a200a8616ab8,0x245288946194d041,0x1083e1e0b8596eb6,0x24d248b4519ccc43,0x1847a401a8e02214,0x2c5688d482151064,0x1887e3e1b8d82612,0x2cd648f4721d0c63,0x210c05d1e0e46831,0x401ab056aa14a81,0x208be5e1d8e86632,0x3c1caf5729d4c83,0x285007d2e164a851,0xc05a0c04ab152a4,0x28cfc7f2d16ca453,0xb85e0a05aa956a2,0x305409d3e1e4b055,0x1409a2c148200ac4,0x30d3c9f3d1ecac57,0x1389e2a158180ec2,0x0},{0x3819ebe56a71167a,0x19cac451a08c2401,0x37d9cbd5626d1478,0x198aa4419888220f,0x3799abc55a68f277,0x194a84319084200e,0x37598bb552250e76,0x190a642188803c0d,0x37196ba4ca210c75,0x18ca4411807c3a0c,0x36d94a94c2590a74,0x188a240178b4380b,0x36972a84ba550873,0x184a03f170b0360a,0x32570a752a510672,0x1809e3e1e0ac3409,0x3216ea65224d0471,0x17c9c3d1d8a832d9,0x31d6cb451a490270,0x1789a4b1d0a410d8,0x3196ab351245006f,0x174984a1c8600ed7,0x31586b250a40fe6e,0x170b4491405c0cd6,0x31184b15023cfc6d,0x16cb238138580ad5,0x34982b04fa38fa6c,0x1a490371305408d4,0x34580af4f234f86b,0x1608e361285006d3,0x3417eae4ea30f66a,0x15c8c351204c04e1,0x68},{0x3e9f605023f9fe01,0x3cc1a0c7b3dc1208,0x3b1da13093c020f2,0x394361a743a42e16,0x8c44e07087c3ce4,0xa9b0d913899b8dd,0xc5a22f17351aa2b,0xe194cb1a8d19ccf,0x309863d1e3198e39,0x2ec8a445f2fc8240,0x13498b65b92490ba,0x2b4a6525814164b3,0x16cb4a85495cacac,0x18940a12f97948a5,0x2613267332713a63,0x244de6e4a254d66a,0x22916753a2391e71,0x20cfa7c4321cf278,0x215087e3fa050082,0x230ec7744a20f47b,0x24d2470481c8e68d,0x268d0694ba58d86d,0x180c29f4f190ca9b,0x1654ea62e17546a2,0x2bd5c542aaad5458,0x12d6ab42713d6251,0x2f5784623ae5704a,0x3107c3f60b008443,0xd86ec9640e876c5,0x34860d0190cd9acc,0xa052d76b0b05ad3,0x85bede12095b6da,0x39dcc1c0eb8dc420,0x3b8281575ba83019,0x3d5e80e07bc422ef,0x3f00c077cbe0140b,0x8000806fd},{0x435f4e76a3055c9b,0x1809a3a138500320,0x399a6c056a650c73,0xe44c1308c7e18f9,0x2fd3498429c8be4c,0x48211e85be1cad2,0x25d08712f12c7025,0x47614f77234558aa,0x1c0ba4a1b890440f,0x3d9c6be55aa52c83,0x1246c231083a3909,0x2f576a84aa08de5c,0xcc400d8dc21ead0,0x29d28813716c9035,0x3235077133d78ba,0x200da5a238d0641f,0x3d1c2ce662e54c93,0x1648c44188781719,0x33596b852a48fe6c,0x10c601d05419e6e0,0x2dd48913f1acb045,0x7231057937dbaca,0x240fa6a2b954842f,0x411e2de6e3256ca3,0x1a4ac54208b81317,0x3b9b6c85aa891e7c,0x14c801b0445a06f0,0x31d68a1471ecd066,0x680f15813bddada,0x2811a7a33994a42d,0x45202ff763658cb3,0x1e4ee641f8b03206,0x3f9d6d862ac93e8c,0x1447c2b0c0162700,0x35d88b14f22cf076,0xa82e0489441faea,0x2c13a8a4418ca03d,0xe230f7e3a5acc3,0x224ea62278f05216,0x439f6e86ab095e9c,0x1849c3b140540521,0x10e74},{0x502231472ba172bc,0x164b82d18004093d,0x39976ba58ad10a88,0xc053f9f44e24e7,0x2c90e862d9685e2e,0x4e6790d88385c8b3,0x210aa58148b04224,0x38dc4b55c2b56081,0xa846229dcea1f0e,0x2bd5c834115cac2b,0x826b3884c316eb6,0x1f500512a094501d,0x429bae06ab6152ac,0x9c4c1f0f4de6d0b,0x35956aa3f9f8a652,0x6439319a37dbcd7,0x2a0f27c269408a48,0x41610d96e345a8a5,0x1388e460d86a6732,0x34da4a7531ecf44f,0x1102a1883c19b6da,0x29142753c1249841,0x4c203047cbf19ad0,0x12c94432105c2d2d,0x3e99ece51a88ee76,0x1007b2f9740e04fb,0x331409d3a1c4d869,0x4b253007ebe1eac9,0x1c8d66a1f8f82811,0x3ddeccb6527d3c73,0x194261295ca9fefe,0x3218a9c4c9c0da68,0x36512590475e8f1,0x1b8de66338f07210,0x47de4f36331d349b,0xe8760e07c9a4f1e,0x3b588c14c255208d,0x30132490c7232f0,0x25d1c8f321847035,0x46a36ee77b098696,0x18c6c370502e4523,0x3b1d2c05ea512262,0xc41005a25063115,0x249268c44980ba34,0x50e2d17753ad7cbf,0x178be32198180f42,0x1148b},{0x4fa53147fba9aac0,0x154802b0b006d153,0x3a5a8be54a50fe6a,0x4ecf529eca226fe,0x24cfc692a0fc5415,0x49e24fd742fd7aa8,0xf852140959aa33c,0x34578a7491f4d053,0x596a13b93445f8d3,0x1f0ce521e8a04c11,0x441ced2682ed4c91,0x9c4a10b253e7525,0x2e94a903d998a23c,0x53a73247db99c8cf,0x194a03b1c8901f63,0x395c6ce5ca911e7a,0x8c1d62a6ce21efa,0x28d1c793213c7438,0x48e1cf97bb899ab8,0x138983711036c34c,0x38598b751234f063,0x32c13791435f0f6,0x230ee622692c6c21,0x43214f57032d6ca1,0x1286a2005d2e6d21,0x3296aa0459d8c25f,0x52a6b2085c25e8df,0x1d4c05e248d03f5f,0x421e6de64ad13e8a,0xcc155ea4cd23f1d,0x2cd3c893a1c8ba48,0x4ce3d1c83bc9bac8,0x1c4b8470f026bb48,0x3c5b8c7592751073,0x22b947994c23706,0x2710e853816c641d,0x4be35057836d8cb1,0x118621c03d6e8d31,0x3698ab04da19086f,0x56a8b439746608ef,0x261065a228c03606,0x46206ee6cb115e9a,0xbc3405acd12852d,0x30d5c994b9b8b244,0x55a832c8bc09dad8,0x1b4b043170640958,0x405d8d7612b55682,0x600757aad025716,0x2b12c813615c842d,0x4fe5515803adacc1,0x158822c0b80ad354,0x55255006b},{0x62b16050263b1e01,0x60c1a0cc361c1208,0x5f0297ebf8442182,0x5d4361abc5e42e16,0x8c4570b887c3d74,0xaad1691389ad96d,0x582c22f17592ca2b,0x5646e36ae5746632,0x54aa63daa8ec7558,0x52c8a44a753c8240,0x1349946a3924914a,0x1527d3f289428543,0x4da6e592c4ea7655,0x4bcc260994ccba5c,0x4a25267334b0c92e,0x484de6e92494d66a,0x1dced1c8e9cce520,0x1fa29153d9ea3119,0x4321a8341442227f,0x415168a844250e86,0x3f9fe914840a068d,0x3dd32987d3ed2a94,0x28540f279a7538f6,0x2a1d4eb52a91dcef,0x389c6ad56399cea9,0x2d9b8b46f37d62b0,0x351aabb5d361b2b7,0x33586c2683457ebe,0x32d94c864b1d8ccc,0x34980c167b3988c5,0x2e172d76b2f17ad3,0x38164b36ead5b6da,0x2a956e5722b95ee1,0x28ddaec5329dd2e8,0x3d5e89e4fbc5e0a2,0x3f12c977cbe1349b,0x2391f018024926fd,0x429108983c191904,0x201030f872110b0b,0x1e62f163e1f62712,0x47e3c743ac6e3478,0x498d86d91c88e071,0x4b4cb2b951a0d327,0x4d0bc5f98cc0c463,0x158af399c168b735,0x13e83402914e7b3c,0x526904a25d16884e,0x5408443a6d308c47,0x55eac3caa0f87f51,0x5786835add687039,0xb05b63b10c0635f,0x96d76a140a6cf66,0x5cee42010dbedc24,0x5e83019bbdd8381d,0x607001209df42b7b,0x620140bc2e101c0f,0x8078dc60180f89,0x190}}; vector<int> unpack(vector<unsigned long long>& v){ unsigned long long mask = 0xff; vector<int> ret(v.size()*7); for(int i=0; i<v.size(); i++){ for(int j=0; j<7; j++){ ret[i*7+j] = (v[i] >> (j*9)) & mask; } } return ret; } int main(){ int n; cin >> n; auto v = unpack(pack[n-3]); for(int i=0; i<n; i++){ for(int j=0; j<n; j++){ cout << v[i*n+j] << " "; }cout << endl; } return 0; }