제출 #128819

#제출 시각아이디문제언어결과실행 시간메모리
128819E869120Binary Subsequences (info1cup17_binary)C++14
30.10 / 100
6 ms376 KiB
#include <iostream> using namespace std; #pragma warning (disable: 4996) int vec1[2002] = { 1073741824,1,2,2,4,3,3,4,4,4,4,4,5,5,5,5,5,5,6,5,6,6,6,6,6,6,7,6,6,6,7,7,6,7,7,7,8,7,7,7,8,7,7,7,7,7,8,7,7,8,8,8,9,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,8,8,8,8,9,9,8,8,8,9,9,9,9,9,9,9,8,10,9,9,9,9,9,10,9,9,9,9,9,10,9,9,9,9,9,9,9,10,9,9,10,10,9,9,9,10,9,10,9,10,9,10,10,10,10,9,9,10,9,10,10,10,10,10,10,10,10,10,10,10,10,9,10,10,10,10,10,11,10,10,10,10,10,11,10,10,10,10,10,11,10,11,10,10,10,10,10,10,10,10,10,11,10,10,10,10,10,11,10,11,10,11,10,10,10,10,11,11,10,10,10,10,11,10,11,11,10,11,11,11,11,11,11,11,10,10,10,11,11,10,11,11,11,12,11,11,11,11,11,11,11,12,11,11,11,12,11,11,11,11,10,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,12,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,12,11,11,11,11,11,12,11,11,11,11,11,12,11,11,12,11,12,11,12,11,12,11,11,11,12,11,12,11,11,12,12,11,11,11,12,12,12,11,12,12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,11,12,11,11,12,12,12,12,11,12,12,12,12,12,12,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,12,12,12,12,12,12,13,13,13,12,12,12,12,12,12,12,12,12,12,12,12,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,12,12,12,12,12,13,13,12,13,13,12,12,12,13,13,12,12,12,12,12,13,12,12,12,13,13,12,13,12,13,12,12,13,12,12,13,13,13,12,13,12,12,12,12,13,13,13,12,12,13,12,12,12,12,12,13,13,13,12,12,13,13,13,12,13,13,13,12,13,13,12,13,12,13,13,12,13,13,12,13,12,13,13,12,12,13,13,13,12,13,12,14,12,13,13,14,13,13,12,13,13,14,13,14,13,13,12,13,13,13,14,13,13,13,13,13,13,14,13,13,13,13,13,13,13,13,13,12,13,13,12,12,12,13,13,13,13,13,13,13,12,13,13,14,13,13,13,13,13,14,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,13,14,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,13,13,13,13,13,13,13,13,13,13,13,13,13,14,13,13,13,13,13,14,13,13,13,13,13,14,13,14,13,13,13,13,13,14,14,13,13,13,13,14,13,13,13,13,13,14,13,13,13,13,13,14,13,14,13,13,13,13,13,13,13,13,13,13,14,13,13,13,14,13,14,14,13,13,13,14,13,14,13,13,13,14,13,14,13,14,13,13,14,13,13,13,13,14,13,14,13,13,13,14,14,14,13,13,13,14,13,13,13,13,13,13,14,14,13,14,13,14,14,14,14,13,13,13,14,14,13,13,14,14,13,14,13,14,13,14,13,14,13,13,14,13,13,14,13,13,14,14,13,14,14,14,14,14,13,14,13,14,14,14,14,14,13,14,14,14,13,14,13,14,13,13,14,14,14,14,13,13,13,14,14,13,13,14,13,14,14,13,14,14,14,13,13,14,13,14,13,14,14,14,14,14,14,13,14,14,13,13,14,13,14,14,14,14,14,14,14,14,14,13,14,14,14,14,14,14,14,14,14,14,14,14,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,13,14,14,14,14,13,13,14,13,14,14,14,14,14,14,14,14,14,14,15,14,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,14,15,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,14,14,14,14,14,14,14,15,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,14,14,14,14,14,15,14,15,14,15,14,15,14,14,14,14,14,14,13,14,14,14,14,14,14,14,14,15,14,15,14,14,14,14,14,14,14,15,14,14,14,14,14,15,14,15,14,14,14,14,14,15,14,14,14,14,14,14,14,14,15,15,14,14,14,14,15,14,14,15,14,14,14,14,14,14,14,15,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,14,14,14,15,15,14,14,15,14,14,14,14,14,14,14,14,14,14,15,14,15,15,14,14,14,14,14,15,14,14,14,14,14,15,14,14,14,15,14,14,15,14,14,15,15,15,15,15,14,14,14,14,15,14,15,15,15,15,14,15,14,14,14,14,14,15,14,15,15,15,14,15,14,14,14,14,14,14,14,15,14,14,15,15,14,15,14,14,15,14,15,14,14,14,15,15,14,15,14,15,14,15,15,15,14,14,14,15,15,15,14,14,14,15,14,14,15,15,15,14,14,15,14,15,15,14,14,15,14,15,15,14,14,15,15,14,15,15,14,15,14,14,15,14,15,14,14,15,15,15,14,14,14,14,14,14,14,15,15,15,15,14,15,16,15,15,15,15,15,15,15,14,15,15,14,15,15,15,15,15,15,15,15,15,14,15,15,15,15,15,15,15,14,15,14,15,14,15,15,15,14,15,14,15,15,14,15,16,14,14,14,15,15,15,15,14,14,15,14,15,15,14,15,15,14,15,15,15,15,15,14,14,15,15,14,15,14,15,15,14,15,15,15,15,15,15,15,15,15,15,14,15,15,15,15,14,14,15,14,15,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,15,15,15,16,15,15,15,15,15,15,15,16,15,15,15,15,15,15,15,16,14,15,15,15,15,16,15,15,14,14,14,15,15,14,15,15,15,15,15,15,15,15,15,15,16,15,15,15,15,16,15,16,15,16,14,15,15,15,15,15,15,15,15,16,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,15,15,15,15,15,15,15,15,16,16,15,15,15,15,15,16,15,15,15,15,15,16,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,15,15,15,16,15,15,15,15,15,15,15,15,16,15,15,16,15,15,15,15,15,15,14,15,15,15,15,15,15,15,15,15,15,15,15,16,15,15,15,15,15,15,15,15,15,15,15,16,15,16,15,15,15,15,15,15,15,15,15,16,15,15,15,16,15,15,15,15,15,16,15,15,15,15,15,16,15,15,15,15,16,15,15,15,15,15,15,15,16,15,15,16,15,15,15,15,16,15,15,16,15,15,15,15,15,16,15,15,15,15,15,15,15,15,16,16,15,16,15,16,15,15,15,15,15,16,15,15,15,15,15,15,15,15,15,16,15,16,16,15,15,16,15,16,15,16,15,16,16,15,16,16,15,16,15,15,15,15,15,16,15,15,15,16,15,16,15,16,16,15,15,15,15,16,15,15,15,15,15,16,15,15,15,16,16,16,16,15,15,15,15,15,15,15,15,16,15,15,15,15,16,16,15,15,16,16,15,16,15,15,15,16,15,15,16,16,15,15,15,16,16,16,15,15,15,15,16,15,15,15,15,16,15,15,15,16,15,15,16,16,16,16,16,16,15,15,16,15,15,16,15,15,15,15,15,16,15,15,15,15,16,16,16,16,16,15,15,15,15,15,16,16,15,16,15,15,15,16,15,16,16,15,16,16,16,16,15,16,15,16,15,16,15,15,15,16,15,16,16,16,16,16,15,16,15,15,15,16,16,15,15,16,16,16,15,16,15,15,15,16,16,16,16,15,15,15,15,16,16,16,16,16,16,16,15,16,15,15,15,16,15,16,16,16,15,16,15,15,16,16,16,16,15,15,15,16,15,16,16,16,16,16,16,16,15,15,15,16,15,16,16,16,15,15,15,16,16,15,15,16,16,16,15,16,16,16,15,16,15,16,16,16,16,16,15,16,16,15,15,16,15,15,15,15,15,16,16,16,16,16,16,16,15,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 }; int vec2[2002] = { -1,0,0,1,0,1,2,1,3,2,6,5,2,4,14,6,5,9,30,10,6,5,12,11,9,13,5,10,18,22,11,9,21,13,29,10,12,34,20,18,33,22,26,54,38,21,27,37,41,20,18,25,125,42,36,26,51,58,21,44,78,38,54,43,81,37,45,41,102,53,68,77,105,89,42,58,44,74,90,86,92,43,50,37,98,45,41,85,57,81,53,75,206,117,225,42,83,102,77,109,54,138,89,84,101,174,74,82,69,90,86,53,93,106,182,150,42,154,273,166,156,85,117,83,462,77,149,165,285,169,141,89,84,230,105,74,147,82,138,197,90,86,170,229,186,179,174,106,761,313,153,146,180,217,107,85,282,172,150,182,89,154,269,178,210,166,438,214,171,202,294,310,86,149,306,173,165,181,209,169,197,293,233,301,213,329,297,148,164,361,309,425,357,453,345,180,290,170,281,217,401,150,305,441,182,298,330,346,374,178,342,166,218,210,237,171,314,214,878,202,149,430,285,334,173,165,186,181,566,169,590,341,458,294,332,310,581,337,428,213,299,402,201,553,434,331,593,469,293,358,360,301,170,565,410,297,329,709,372,697,393,309,689,333,437,429,614,357,554,345,650,589,425,340,165,405,411,181,686,729,713,298,617,701,338,330,809,346,362,466,665,342,420,586,213,594,294,730,867,426,602,694,732,598,306,726,662,170,438,618,854,666,402,331,363,678,1077,434,786,301,341,668,651,365,297,406,339,329,612,410,588,427,309,597,1290,661,677,361,876,710,846,681,357,437,345,565,861,745,980,340,669,653,1101,425,837,941,405,298,741,697,585,619,933,338,330,554,789,346,1113,362,822,589,342,650,723,682,1209,698,1125,746,1098,691,293,363,1067,601,1305,617,426,596,1329,613,873,1114,660,805,717,339,813,692,1494,586,1302,1454,594,658,1326,857,1737,341,1710,602,950,730,684,598,1170,694,605,345,1350,882,437,662,618,1358,620,742,690,874,666,850,714,298,858,842,678,405,587,1301,1946,854,338,683,1242,745,810,1202,653,861,362,1318,716,1190,1686,1238,597,585,1346,619,1446,685,554,661,693,677,1434,725,2153,2205,1514,1382,681,621,674,715,1173,426,2246,723,1197,1126,698,1189,3470,853,746,691,1353,601,1574,1193,617,1321,596,1222,1449,1385,341,2398,1634,1237,851,1333,747,1381,2654,717,588,586,692,1369,665,594,1065,813,1860,658,869,682,845,1162,602,718,809,1314,1298,598,857,684,603,1581,821,694,722,1114,2201,852,1466,618,1194,1210,1721,1322,1386,1370,1337,690,2441,666,1235,3174,2489,1366,1172,1302,1269,678,1589,850,1130,1326,1572,858,842,1177,683,1258,1331,1170,1898,1204,854,1306,1460,1338,1418,810,1874,597,1229,1350,2274,1710,723,1645,2330,1236,1358,685,1196,661,1109,693,677,1174,2630,1206,725,1462,2678,1324,1373,681,1433,2262,1178,2518,1365,1242,1349,1689,1202,1234,1493,1426,1637,1356,1682,2325,1190,1746,594,1318,1238,2629,1334,1708,1941,853,1718,1195,1226,2373,1113,2229,1419,1330,1610,1446,1430,1323,1320,809,2486,1686,1355,1434,1395,2385,1877,1173,1382,2793,618,1690,2354,1197,1622,1389,852,1189,726,682,1205,3409,2261,1461,3254,2517,1325,1363,1193,1492,2789,1353,2918,1114,2870,1253,1305,1321,1445,2454,1740,2470,1368,1237,1385,1449,1227,2458,858,1357,1398,1333,2633,1198,1709,1381,2345,1429,597,2662,1869,1701,1685,1369,810,1130,1611,2602,2921,2794,1494,1705,2357,2485,1364,2409,2381,1258,693,1621,1833,2853,1770,1241,2133,725,2405,2469,2777,2194,681,2761,2393,1229,1722,1194,1674,2905,1350,2649,1638,2665,1236,1362,2453,1109,1322,1354,2805,1386,1370,1174,1710,1450,1206,1388,7086,3029,1332,2713,1428,1366,1578,1324,5157,1178,2361,2346,1452,853,1242,2634,2721,2386,2340,2778,2378,2998,1716,2414,5358,2394,1706,2410,1356,1625,2906,2742,1689,2650,2490,1318,2390,1361,1620,1334,2774,2646,2466,2902,2214,2710,1371,682,2652,2258,2451,2362,2474,1330,3276,3414,2666,1718,2714,1387,2418,2914,2514,2630,2262,1355,1173,1451,2726,1618,3210,3385,2250,1382,1197,2614,1686,1738,3798,1189,2442,1365,1389,1205,2658,2348,1317,4433,2862,1690,2412,1622,5046,1193,1461,1325,2838,1363,2397,1453,3426,2597,1353,1642,2229,3283,2373,2933,2790,1321,1707,5518,2217,1237,1454,2389,2766,2380,2697,1385,2645,2709,1449,2725,2457,1357,3750,1333,2385,6958,2601,2668,5862,1381,1229,5750,2729,1429,2868,2395,6990,2347,1749,1369,2793,1709,2985,2261,5838,1717,3690,2897,2769,3277,1701,1685,3372,1364,2379,4753,1898,2635,2201,2764,4689,2701,2613,1705,5865,4405,5769,2341,2406,2789,2757,1621,2454,6478,1194,2470,1301,2870,2349,2413,5841,2854,2925,2458,1349,3733,2475,3494,6993,2737,1362,2387,4725,1322,3753,1354,2667,2633,1386,1370,3282,3482,3239,5561,2643,1450,2763,2662,1334,5513,1226,2722,3029,1366,1637,2357,6582,2602,4521,2485,2409,2730,5817,2477,5553,2669,2637,3509,4785,5225,2414,2986,3179,5353,3501,2405,2739,5221,2469,5317,1355,4918,2853,2393,4902,4966,2459,2734,1610,2473,4434,2893,3411,2761,5342,1706,4746,3373,2388,3401,4914,2453,2649,1686,2483,2665,4458,2857,6729,1626,4842,2765,2219,2644,3369,3433,2661,3245,2772,5306,1622,2869,3477,2740,3237,5206,3405,3253,4782,3754,2346,2713,3429,5398,3381,4825,4713,4937,4809,2386,1445,3241,2706,2378,4466,1707,2634,4709,2348,4901,1365,6473,6441,2410,2778,4522,3285,4813,2922,2916,5034,2862,3146,2732,4941,2390,2898,5273,2924,5434,2742,2650,4761,2906,2597,4682,4905,2890,2894,5446,4953,4980,2646,2774,3374,1749,2342,2727,1709,2474,5850,2902,4917,1717,5721,2358,2909,2605,2486,2738,1685,6569,3498,2666,5733,2762,2705,2714,3734,2758,3236,2858,4469,3434,3402,4790,5529,3418,4437,3370,7766,2726,5814,1621,2261,5270,3428,5302,5205,7786,5397,2482,4758,4822,3414,3273,9017,4714,3674,2731,1322,6838,2897,1354,13601,4786,5274,3242,1370,6355,3755,4762,6870,4954,3380,4810,4938,1450,4658,2406,5457,5414,5690,6742,4706,1366,5430,4774,2789,5722,3284,2349,4950,2389,5969,3397,5334,3349,2918,5798,2870,5542,5718,2475,5526,2854,2733,4906,2387,2218,2345,2645,5322,2741,2709,2773,6486,2725,3254,3222,5498,2667,2901,2707,1461,4708,11921,3366,4502,4393,3494,2643,5478,4684,3290,2729,4910,2859,2357,4425,4838,2722,4745,3282,2771,4693,2381,2602,1706,2899,2477,2698,5942,5269,5030,4781,6326,5413,2669,2637,5909,4757,2921,4789,2405,3286,4773,3238,2775,3413,4821,5285,5411,2739,2393,4771,5301,5449,5489,5797,13166,4890,5541,2473,5018,4777,3437,2734,6893,3243,2777,5417,5289,2388,5777,5545,6362,5801,2453,4525,5481,2724,11345,1365,5357,2649,3365,5701,5795,2665,4916,4949,5318,2905,7526,2857,6825,5333,2765,5525,2708,5477,3401,2661,4940,4908,3497,2772,5861,9798,4805,5521,5708,2346,3221,4945,2900,5465,4793,5029,6701,3369,3245,2713,5789,2386,4763,5977,4715,9069,2378,3237,5204,3477,4394,3253,4691,2706,2730,2394,6293,2634,5588,2410,5267,3429,5225,3381,7469,5673,2642,3754,5492,2778,10469,4434,1386,4902,2390,4426,6317,2922,4811,3417,2732,5194,4685,2770,9842,4717,4442,2898,3762,2650,9797,5013,2868,4458,5594,4914,2906,7021,11849,5202,8949,2890,6773,2646,9317,4438,2474,4842,2517,4778,4907,7317,9449,2710,3273,5494,4787,5290,5418,5482,6578,8857,5466,5586,5555,5970,2738,5433,5210,5818,2666,4782,5306,4700,2762,5323,2714,5770,7323,5206,2349,4713,5793,5462,2858,4809,4772,5811,5468,4692,5705,8794,4695,3498,2726,11929,4709,5715,3410,9049,10457,4522,4901,10810,9521,4756,3434,3402,6566,5268,6758,3418,6437,3370,9590,4965,9845,2731,5741,5034,6890,8914,4820,4788,5474,5427,10697,7594,6842,5556,4686,4761,6698,3414,4682,9390,5354,5514,5273,4905,5402,6733,6989,5434,5321,4690,3242,7506,9494,5266,9686,2389,5300,6441,10394,5812,4764,5446,8882,9646,7514,4917,6830,11365,8858,3499,5211,9322,6857,13782,6953,4698,1365,5325,4826,5454,6581,2733,7065,4780,9866,10714,2645,5721,13742,4437,2741,2709,6314,2773,4790,2725,9830,6477,5558,5778,9050,5733,6761,9034,11450,2901,9530,5292,2388,5548,9929,6565,6930,5529,9674,5469,5420,4758,2729,4822,5804,3437,5270,4714,2724,5205,5846,5814,6569,5493,4970,5461,10070,5589,6809,4786,10454,5445,4946,7338,9002,9550,5522,4762,4806,5554,9770,5973,10574,4810,11702,5274,10442,4938,8789,5452,2346,6994,10563,5706,11162,12630,5834,6874,5330,4774,5714,5782,4890,9654,5810,11673,4827,5457,5414,4950,11465,6738,7062,8877,6866,5430,11417,9625,6426,8853,3413,5286,9833,4441,8885,4779,5786,5334,6998,4906,10958,4765,14006,9946,5682,9541,9434,5542,6746,4916,5798,5526,3405,5718,5426,6442,13097,9426,5841,5322,5291,10950,8873,11589,6482,5419,6806,4940,2922,5530,11220,6474,4521,6954,5738,5451,10409,9382,11874,6834,10649,6490,10550,9553,6506,6858,11945,4693,10314,5478,10506,2906,10577,6810,3285,6762,2646,11089,7605,11601,7077,2774,4781,9482,4971,6486,11226,5485,10961,9418,4757,9802,4755,4789,11414,5269,4650,4773,6801,2730,6732,5713,9638,4821,13649,9622,5553,9045,9878,5293,5549,5845,5817,9906,13622,10069,5673,2714,6993,4811,5285,5421,10709,4777,9626,11029,9818,5301,5394,11110,5813,5449,12950,4819,7461,9882,13526,5749,5013,5541,5787,5797,9365,11046,14985,5781,10937,4438,4794,5289,5417,9894,5562,9067,5202,11478,10598,5545,9389,5464,10646,11430,4949,5481,18285,10662,5801,10929,5349,9381,9509,3434,3402,9014,10449,7529,13194,9397,5453,3370,13142,10650,11121,6997,5333,12966,5429,10825,4947,9517,5525,6829,5477,6709,10086,9035,5970,5306,5717,9385,6869,6837,9545,8938,3414,6805,5739,10537,6821,8874,7317,6741,9414,13228,5465,6962,11817,3242,7341,9513,5412,11593,5811,11113,5331,10410,11081,10794,21345,10986,14118,7333,10038,11659,5715,6825,6507,9577,9641,9429,2733,4909,9941,5460,4965,2645,8868,13641,8805,10549,11561,9549,2709,6763,4941,2773,6485,9525,11045,9909,14022,5741,4761,5540,9435,4682,5427,9573,5796,13609,9893,9621,2901,9877,4905,6758,5844,10926,9033,10969,11429,4754,4953,8909,9492,10597,10661,10953,9891,9561,10089,6571,17961,11155,8778,5266,14181,9897,4778,11097,11721,10585,4917,6698,15702,11049,11609,10665,10941,5812,10841,11433,4698,7594,10707,10857,6483,4826,9684,5458,6957,9813,8850,4780,4437,5476,5325,5290,10386,10997,5450,5418,9378,5482,5546,12969,10853,5466,7506,5737,5850,10885,6873,6830,5721,5802,7530,11341,5484,5332,14169,5524,11619,10420,20202,5558,11421,6581,17838,11636,5778 }; int main() { int T; scanf("%d", &T); for (int i = 1; i <= T; i++) { int N; scanf("%d", &N); printf("-1\n"); for (int j = 0; j < vec1[i]; j++) { if (j) printf(" "); printf("%d", (vec2[i] / (1 << j)) % 2); } printf("\n"); } return 0; }

컴파일 시 표준 에러 (stderr) 메시지

binary.cpp:3:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning (disable: 4996)
 
binary.cpp: In function 'int main()':
binary.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  int T; scanf("%d", &T);
         ~~~~~^~~~~~~~~~
binary.cpp:11:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int N; scanf("%d", &N);
          ~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...