結果

問題 No.217 魔方陣を作ろう
ユーザー koyumeishikoyumeishi
提出日時 2015-05-27 01:02:04
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 8,394 bytes
コンパイル時間 591 ms
コンパイル使用メモリ 67,452 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 10:32:48
合計ジャッジ時間 1,224 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cstdio>
using namespace std;
vector<vector<unsigned int>> pack = {{0x3060108,0x9040705,0x2},{0x40e0f01,0x907060c,0x50b0a08,0x1002030d,0x0},{0x8011811,0x705170f,0x604100e,0xa16140d,0x315130c,0x219120b,0x9},{0x1041d20,0x1f1e1518,0x17160302,0x1411090c,0xb0a191c,0x1b1a1312,0x2124100d,0xf0e0805,0x7062322,0x0},{0x130271e,0x261c130a,0x1209072f,0x62e1d1b,0x231a1108,0x100e0525,0x2d242219,0x21180f0d,0x15042c2a,0x2b292017,0x1f160c03,0xb023128,0x14},{0x43e3f01,0x83a3b05,0x350b0a38,0x310f0e34,0x2d131230,0x2917162c,0x1c262719,0x2022231d,0x241e1f21,0x281a1b25,0x152b2a18,0x112f2e14,0xd333210,0x937360c,0x3c060739,0x4002033d,0x0},{0x50453a2f,0x22170c01,0x4f44392d,0x21160b09,0x4e432e2c,0x20150a08,0x4d38362b,0x1f141207,0x4237352a,0x1e131106,0x413f3429,0x1d1b104c,0x403e3328,0x1c1a054b,0x483d3227,0x240f044a,0x473c3126,0x190e0349,0x463b3025,0x180d0251,0x23},{0x5d604144,0x1d200104,0x4342393c,0x3025f5e,0x3b3a1f1e,0x1114595c,0x3538191c,0x5b5a3d40,0x1b1a1312,0x3f3e3736,0x15180d10,0x4d503431,0xf0e5558,0x33321716,0x57564f4e,0x302d2825,0x5451494c,0x27260c09,0x4b4a2f2e,0xb0a5352,0x48452c29,0x8056461,0x2a2b2421,0x62634647,0x22230607,0x0},{0x6b5e5144,0x1b0e0178,0x50423528,0xb776a5d,0x34271a0d,0x695c4341,0x190c0a76,0x4d403326,0x975684f,0x32251816,0x5b4e4c3f,0x17150874,0x4b3e3124,0x7675a58,0x30232114,0x59574a3d,0x20137366,0x493c2f22,0x72656356,0x2e2c1f06,0x6255483b,0x12057164,0x473a2d2b,0x706e6154,0x371e1104,0x60534639,0x10036f6d,0x45382a1d,0x796c5f52,0x291c0f02,0x36},{0x48e8f01,0x88a8b05,0xc868709,0x810f0e84,0x7d131280,0x7917167c,0x751b1a78,0x711f1e74,0x6d232270,0x286a6b25,0x2c666729,0x3062632d,0x345e5f31,0x385a5b35,0x3c565739,0x513f3e54,0x4d434250,0x4947464c,0x454b4a48,0x414f4e44,0x3d535240,0x583a3b55,0x5c363759,0x6032335d,0x642e2f61,0x682a2b65,0x6c262769,0x216f6e24,0x1d737220,0x1977761c,0x157b7a18,0x117f7e14,0xd838210,0x880a0b85,0x8c060789,0x9002038d,0x0},{0x8a7b6c5d,0x1001a899,0x4c3d2e1f,0x897a6b5b,0xf0da798,0x4b3c2d1e,0x88795c5a,0xe0ca697,0x4a3b2c1d,0x876a6859,0x1a0ba596,0x493a2b1c,0x78696758,0x190aa495,0x48392a1b,0x77756657,0x1809a386,0x47382927,0x76746556,0x17089485,0x46372826,0x82736455,0x16a29384,0x45363425,0x81726354,0x7a19283,0x44353324,0x80716253,0x6a0918f,0x43413215,0x7f706152,0x59f908e,0x42402314,0x7e6f6051,0x49e9c8d,0x4e312213,0x7d6e5f50,0x39d9b8c,0x3f302112,0x7c6d5e4f,0x2a99a8b,0x3e2f2011,0x4d},{0x999c7578,0x104bdc0,0x494c2528,0x77766d70,0xbfbe9b9a,0x27260302,0x6f6e4b4a,0xb9bc9598,0x2124191c,0x696c4548,0x97967174,0x1b1abbba,0x47462322,0x73726b6a,0x1518b5b8,0x41441d20,0x898c6568,0xb7b69194,0x1f1e1716,0x67664342,0x93928b8a,0x35381114,0x64613d40,0x8d908588,0x1312b1b4,0x3f3e3736,0x87866362,0xb3b28f8e,0x3c393431,0x8184605d,0xb0ada8a5,0x3332100d,0x5f5e3b3a,0xa7a68382,0xf0eafae,0x5c595451,0xa4a1807d,0xc09aca9,0x5253302d,0x7e7f5a5b,0xaaaba2a3,0x2e2f0a0b,0x7c795855,0xc4c1a09d,0x2c290805,0x5657504d,0x9e9f7a7b,0x607c2c3,0x4e4f2a2b,0x0},{0xad9c8b7a,0x1e0cfbe,0x45342312,0x8a786756,0xcebdac9b,0x22110fdf,0x66554433,0xab9a7977,0xedecdbc,0x43322110,0x87766554,0xccbbaa89,0x201e0ddd,0x64534231,0x99888675,0xcdccbba,0x41301f1d,0x85746352,0xcaa99896,0x2d1c0bdb,0x6251402f,0x97958473,0xadab9a8,0x3f2e2c1b,0x83726150,0xb8a7a594,0x2b1a09c9,0x604f3e3c,0xa4938271,0xd9c8b7a6,0x3d3b2a19,0x81705f4e,0xb6b4a392,0x2908d8c7,0x5e4d4b3a,0xa291806f,0xd7c6b5b3,0x4a391807,0x7f6e5d4c,0xc3b2a190,0x1706d6c5,0x5c5a4928,0xa08f7e6d,0xd5c4c2b1,0x38271605,0x7d6c5b59,0xc1b09f8e,0x1504d4d2,0x69483726,0x9e8d7c6b,0xd3d1c0af,0x36251403,0x7b6a5847,0xbfae9d8c,0x1302e1d0,0x57463524,0x68},{0x4feff01,0x8fafb05,0xcf6f709,0x10f2f30d,0xed1312f0,0xe91716ec,0xe51b1ae8,0xe11f1ee4,0xdd2322e0,0xd92726dc,0xd52b2ad8,0xd12f2ed4,0x34cecf31,0x38cacb35,0x3cc6c739,0x40c2c33d,0x44bebf41,0x48babb45,0x4cb6b749,0x50b2b34d,0xad5352b0,0xa95756ac,0xa55b5aa8,0xa15f5ea4,0x9d6362a0,0x9967669c,0x956b6a98,0x916f6e94,0x748e8f71,0x788a8b75,0x7c868779,0x8082837d,0x847e7f81,0x887a7b85,0x8c767789,0x9072738d,0x6d939270,0x6997966c,0x659b9a68,0x619f9e64,0x5da3a260,0x59a7a65c,0x55abaa58,0x51afae54,0xb44e4fb1,0xb84a4bb5,0xbc4647b9,0xc04243bd,0xc43e3fc1,0xc83a3bc5,0xcc3637c9,0xd03233cd,0x2dd3d230,0x29d7d62c,0x25dbda28,0x21dfde24,0x1de3e220,0x19e7e61c,0x15ebea18,0x11efee14,0xf40e0ff1,0xf80a0bf5,0xfc0607f9,0x203fd,0x0},{0xd4c1ae9b,0x210dfae7,0x3a271401,0x8673604d,0xd3c0ad99,0x1f0cf9e6,0x39261311,0x85725f4c,0xd2bf9a98,0x1f0bf8e5,0x38251210,0x84715e4b,0xd1acaa97,0x1d0af7e4,0x3724220f,0x83705d4a,0xbeaba996,0x1d09f6e3,0x3623210e,0x826f5c49,0xbdbba895,0x1b08f5d0,0x3533200d,0x816e5b48,0xbcbaa794,0x1b07e2cf,0x34321f0c,0x806d5a47,0xccb9a693,0x19f4e1ce,0x44311e0b,0x7f6c5946,0xcbb8a592,0x6f3e0cd,0x43301d0a,0x7e6b5845,0xcab7a491,0x5f2dfdd,0x422f1d18,0x7d6a5755,0xc9b6a390,0x4f1dedc,0x412e0917,0x7c695654,0xc8b5a28f,0x3f0eedb,0x401b0916,0x7b686653,0xc7b4a18e,0x2efedda,0x2d1a0715,0x7a676552,0xc6b3a08d,0x1ffecd9,0x2c190714,0x7977643f,0xc5b29f8c,0xfeebd8,0x2b180513,0x7876513e,0xc4b19e8b,0x10fdead7,0x2a170512,0x8863503d,0xc3b09d8a,0xffce9d6,0x29160311,0x75624f3c,0xc2af9c89,0xefbe8d5,0x28150321,0x74614e3b,0x87},{0xe5e8b9bc,0x3d411114,0x2d300104,0x8588595c,0xbbbab1b4,0x1312e7e6,0x3033f3e,0x5b5a2f2e,0xb3b28786,0xd10e1e4,0x2125393c,0x5558292c,0xadb08184,0xe3e2b5b8,0x3b3b0f0e,0x2b2a2322,0x83825756,0xb7b6afae,0x3539090c,0x25281d20,0x7d805154,0xd5d8a9ac,0xb0adde0,0x1f1f3736,0x53522726,0xabaa7f7e,0xdfded7d6,0x191d3134,0x4d504548,0xa5a8797c,0xd9dcd1d4,0x33330508,0x47461b1a,0x7b7a4f4e,0xd3d2a7a6,0x706dbda,0x41441518,0x7578494c,0xcdd0a4a1,0x104f9fc,0x17172d30,0x4b4a4342,0xa3a27776,0xfbfacfce,0x2f2f0302,0x6c69403d,0xa09d7471,0xf8f5c9cc,0x2d2900fd,0x3f3e1411,0x73726b6a,0xcbca9f9e,0xfffef7f6,0x13132b2a,0x706d6865,0xc8c59c99,0x211df4f1,0x100d2925,0x66673c39,0x9a9b6e6f,0xf2f3c6c7,0x27271f1f,0x3a3b0e0f,0x9895908d,0xf0edc4c1,0x25211d19,0x38350c09,0x8e8f6461,0xc2c39697,0x1b1beeef,0xa0b2323,0x62633637,0xc0bd9491,0x1915ece9,0x8054541,0x605d3431,0x92938c89,0xeaebbebf,0x43431717,0x32330607,0x8a8b5e5f,0x0},{0xffead5c0,0x533f2914,0x2b160168,0x7f6a5540,0xd4bea994,0x2913fee9,0x1367533d,0x543f2a15,0xa8937e69,0xfde8bfbd,0x513d2712,0x29141366,0x7d68533e,0xd1bca792,0x2711fcd3,0x1165513b,0x523d2826,0xa6917c67,0xe7d2d0bb,0x4f3b2510,0x27251164,0x7b66513c,0xcfbaa590,0x24fbe6e4,0xf634f39,0x503b3924,0xa48f7a65,0xe5e3ceb9,0x4d390ffa,0x38230f62,0x79644f3a,0xcdb8a38e,0xef9f7e2,0xd614d23,0x4e4c3722,0xa28d7863,0xf6e1ccb7,0x37230df8,0x36210d60,0x77624d4b,0xcbb6a18c,0xd0af5e0,0xb4b3721,0x5f4a3520,0xa08b7661,0xf4dfcab5,0x35210b09,0x341f5f4a,0x75605e49,0xc9b49f8a,0x1d08f3de,0x5f49351f,0x5d48330a,0x9e897472,0xf2ddc8b3,0x331f1d07,0x1e095d48,0x73715c47,0xc7b29d88,0x1b06f1dc,0x5d473330,0x5b321d08,0x9c878570,0xf0dbc6b1,0x312f1b05,0x1c075b46,0x846f4631,0xc5b09b86,0x1904efda,0x5b45432e,0x45301b06,0x9a98835a,0xeed9c4af,0x432d1903,0x1a055944,0x6e59442f,0xc3ae9997,0x1702edd8,0x5957412c,0x432e1904,0xab826d58,0xecd7c2ad,0x412b1701,0x18035755,0x6c57422d,0xc1ac9681,0x1500ebd6,0x69553f2a,0x412c1702,0x95806b56,0xaa},{0x58f8f01,0x98b8b05,0xd878709,0x1183830d,0x157f7f11,0x7917177c,0x751b1b78,0x711f1f74,0x6d232370,0x6927276c,0x652b2b68,0x612f2f64,0x5d333360,0x5937375c,0x553b3b58,0x4153533d,0x454f4f41,0x494b4b45,0x4d474749,0x5143434d,0x553f3f51,0x593b3b55,0x5d373759,0x6133335d,0x652f2f61,0x2967672c,0x256b6b28,0x216f6f24,0x1d737320,0x1977771c,0x157b7b18,0x117f7f14,0xd838310,0x987870c,0x58b8b08,0x9103038d,0x94feff91,0x98fafb95,0x9cf6f799,0xa0f2f39d,0xa4eeefa1,0xa8eaeba5,0xace6e7a9,0xb0e2e3ad,0xb4dedfb1,0xd9b7b6dc,0xd5bbbad8,0xd1bfbed4,0xcdc3c2d0,0xc9c7c6cc,0xc5cbcac8,0xc1cfcec4,0xbdd3d2c0,0xb9d7d6bc,0xb5dbdab8,0xe0b2b3dd,0xe4aeafe1,0xe8aaabe5,0xeca6a7e9,0xf0a2a3ed,0xf49e9ff1,0xf89a9bf5,0xfc9697f9,0x9293fd,0x48e8f01,0x8907068c,0x850b0a88,0x810f0e84,0x7d131280,0x7917167c,0x751b1a78,0x711f1e74,0x6d232270,0x6927266c,0x652b2a68,0x3062632d,0x345e5f31,0x385a5b35,0x3c565739,0x4052533d,0x444e4f41,0x484a4b45,0x4c464749,0x5042434d,0x543e3f51,0x3957563c,0x355b5a38,0x315f5e34,0x2d636230,0x2967662c,0x256b6a28,0x216f6e24,0x1d737220,0x1977761c,0x157b7a18,0x8012137d,0x840e0f81,0x880a0b85,0x8c060789,0x9002038d,0x0}};

vector<int> unpack(vector<unsigned int>& v){
	unsigned int mask = 0xff;
	vector<int> ret(v.size()*4);
	for(int i=0; i<v.size(); i++){
		for(int j=0; j<4; j++){
			ret[i*4+j] = (v[i] >> (j*8)) & 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;
}
0