Submission #22247

#TimeUsernameProblemLanguageResultExecution timeMemory
22247버거킹 송죽SK점 우수고객 (#40)August14 Beginner Contest (KRIII5_ABC)C++14
0 / 7
0 ms2264 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pp; typedef pair<ll,ll> pll; void read(int& x){ scanf("%d",&x); } void read(ll& x){ scanf("%lld",&x); } template<typename T,typename... Args> void read(T& a,Args&... b){ read(a); read(b...); } #define all(x) (x).begin(),(x).end() #define pb push_back #define x first #define y second int S[30000]; int US[30000]; int s[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,49,51,52,53,54,55,56,57,58,59,60,62,63,64,65,66,67,69,71,72,73,74,75,76,78,80,81,82,83,84,85,86,88,89,90,92,94,95,97,99,100,102,103,104,105,106,108,109,110,112,114,115,117,119,120,121,124,126,128,129,131,132,135,136,137,138,139,140,141,143,144,145,146,149,150,152,153,155,157,158,159,166,167,168,173,176,177,181,182,184,185,188,189,193,197,198,199,200,201,203,204,205,206,208,209,212,213,215,222,225,229,233,234,235,236,237,238,239,240,241,242,243,246,247,248,251,252,253,254,255,260,261,262,265,267,268,269,270,273,275,279,280,282,283,285,289,291,292,294,296,297,298,300,301,302,303,305,306,309,312,315,316,321,322,323,325,326,328,331,337,339,341,342,343,344,345,347,350,351,354,356,357,358,359,365,371,373,376,377,381,388,389,390,392,394,396,398,399,402,404,405,406,407,408,410,412,413,415,416,417,418,421,422,423,424,427,430,431,432,435,436,437,439,440,441,442,444,446,448,449,450,453,455,456,457,459,462,463,464,469,470,475,476,477,480,484,485,488,491,492,495,500,501,502,504,505,506,507,508,509,510,512,513,515,516,517,519,520,521,522,523,524,526,527,528,529,530,531,535,538,540,541,543,544,545,546,547,548,550,551,554,555,557,560,561,562,563,564,565,566,568,569,570,572,577,581,582,587,588,590,591,592,593,595,598,599,600,603,604,605,607,612,613,614,615,620,622,629,630,633,637,638,639,643,644,645,646,647,652,654,655,656,657,660,662,664,668,669,670,671,672,673,676,677,679,681,684,687,689,690,691,692,695,697,699,701,704,707,708,709,712,713,715,717,718,720,722,725,727,729,730,731,732,735,737,740,743,744,747,748,749,750,752,753,755,756,757,759,761,763,764,766,767,769,773,777,780,781,782,785,786,787,788,789,790,792,793,797,799,801,802,805,806,807,810,812,813,816,817,818,821,822,833,834,835,836,838,843,847,849,850,855,863,865,871,874,889,890,895,898,900,904,908,911,912,913,914,915,916,919,920,922,924,925,926,927,929,930,932,933,934,935,937,939,940,941,942,943,945,946,947,948,949,951,952,953,954,955,956,957,958,959,963,964,965,966,967,969,972,975,976,977,978,980,981,987,989,990,991,992,995,996,999,1002,1003,1004,1005,1007,1008,1010,1011,1012,1014,1015,1018,1022,1023,1024,1033,1034,1036,1037,1038,1040,1042,1043,1045,1052,1056,1057,1063,1066,1069,1072,1073,1075,1078,1079,1082,1086,1087,1088,1089,1090,1092,1096,1097,1098,1099,1103,1104,1108,1109,1110,1112,1115,1117,1118,1123,1124,1126,1128,1133,1135,1136,1138,1141,1142,1143,1150,1153,1154,1155,1156,1157,1159,1160,1161,1162,1163,1164,1166,1167,1168,1169,1170,1171,1175,1176,1178,1180,1183,1184,1185,1186,1188,1190,1192,1193,1194,1195,1196,1197,1200,1201,1205,1206,1207,1208,1210,1211,1212,1216,1217,1218,1220,1224,1225,1226,1228,1229,1230,1231,1232,1233,1234,1237,1239,1240,1242,1243,1246,1247,1248,1250,1252,1253,1257,1258,1259,1261,1262,1266,1268,1270,1272,1277,1281,1285,1290,1291,1292,1293,1294,1295,1296,1300,1301,1302,1303,1304,1305,1309,1312,1313,1315,1316,1320,1322,1327,1331,1336,1338,1342,1344,1346,1349,1352,1355,1357,1358,1364,1366,1369,1370,1373,1376,1381,1385,1388,1392,1394,1395,1399,1401,1405,1407,1410,1413,1415,1417,1418,1419,1420,1421,1422,1423,1424,1426,1428,1431,1433,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1455,1456,1458,1460,1461,1463,1464,1465,1467,1468,1470,1473,1475,1476,1477,1480,1482,1484,1485,1487,1490,1491,1492,1493,1495,1496,1500,1501,1502,1503,1504,1505,1506,1508,1511,1512,1514,1515,1517,1520,1521,1522,1523,1525,1526,1527,1529,1530,1531,1532,1533,1535,1541,1546,1547,1548,1551,1552,1553,1555,1556,1557,1558,1559,1560,1562,1563,1565,1566,1567,1568,1573,1576,1577,1578,1579,1580,1581,1583,1584,1587,1588,1589,1591,1592,1594,1596,1597,1600,1605,1606,1607,1608,1609,1612,1615,1622,1623,1624,1628,1630,1631,1632,1636,1638,1643,1644,1658,1659,1660,1661,1665,1666,1667,1668,1669,1670,1671,1673,1675,1676,1681,1682,1684,1685,1688,1693,1694,1696,1697,1698,1702,1703,1704,1705,1708,1711,1712,1715,1716,1718,1720,1721,1725,1728,1729,1731,1734,1737,1738,1739,1740,1741,1742,1743,1744,1745,1747,1748,1749,1750,1751,1752,1753,1754,1755,1757,1764,1766,1774,1775,1776,1777,1778,1779,1780,1781,1783,1784,1786,1787,1788,1789,1790,1793,1794,1798,1799,1800,1804,1805,1810,1811,1812,1815,1816,1818,1819,1820,1821,1822,1823,1824,1825,1828,1829,1830,1832,1836,1839,1840,1841,1844,1845,1846,1847,1849,1850,1851,1852,1853,1854,1855,1857,1858,1862,1863,1864,1865,1867,1869,1870,1875,1877,1878,1879,1884,1885,1887,1890,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1905,1906,1908,1909,1910,1912,1914,1916,1920,1921,1923,1924,1935,1938,1941,1942,1943,1947,1948,1949,1952,1953,1954,1957,1959,1960,1961,1963,1965,1966,1974,1977,1978,1979,1981,1985,1986,1987,1988,1989,1990,1991,1992,1993,1997,1998,1999,2000,2001,2003,2004,2005,2006,2007,2009,2011,2012,2013,2015,2019,2020,2021,2022,2023,2024,2026,2028,2029,2033,2034,2035,2036,2037,2038,2039,2040,2041,2045,2046,2047,2049,2052,2053,2054,2056,2058,2059,2060,2061,2062,2063,2066,2067,2071,2076,2077,2078,2079,2080,2081,2085,2086,2098,2100,2101,2106,2107,2108,2110,2120,2121,2123,2124,2125,2126,2127,2128,2129,2131,2133,2135,2136,2158,2163,2164,2165,2167,2174,2178,2213,2216,2221,2226,2257,2273,2295,2300,2321,2323,2343,2344,2345,2356,2360,2366,2405,2406,2407,2408,2412,2414,2419,2428,2442,2447,2449,2460,2462,2495,2498,2526,2568,2595,2613,2614,2621,2622,2640,2644,2645,2650,2652,2653,2654,2660,2665,2666,2673,2679,2681,2684,2687,2691,2693,2699,2711,2726,2745,2747,2752,2758,2778,2806,2807,2825,2826,2827,2828,2829,2830,2831,2833,2841,2845,2863,2875,2876,2885,2896,2903,2908,2914,2925,2930,2943,2944,2945,2946,2948,2952,2955,2964,2967,2981,2985,2986,2987,2988,2989,2990,2991,2995,2996,2997,2999,3002,3008,3016,3017,3030,3083,3084,3092,3095,3097,3101,3105,3110,3134,3153,3158,3159,3206,3211,3217,3218,3222,3223,3225,3233,3237,3243,3256,3257,3299,3307,3312,3315,3320,3328,3342,3343,3344,3348,3354,3355,3370,3375,3388,3435,3446,3457,3458,3461,3470,3493,3504,3539,3563,3564,3574,3597,3606,3620,3626,3645,3673,3690,3706,3716,3766,3779,3781,3782,3792,3796,3800,3803,3806,3811,3839,3841,3843,3848,3880,3881,3882,3883,3884,3885,3889,3892,3913,3921,3924,3948,3963,3994,3998,3999,4000,4002,4005,4009,4013,4014,4015,4021,4025,4026,4032,4037,4042,4043,4046,4051,4052,4053,4054,4060,4063,4086,4107,4176,4211,4212,4213,4214,4215,4217,4218,4337,4338,4339,4347,4354,4355,4361,4363,4372,4373,4376,4386,4393,4394,4404,4405,4419,4425,4426,4430,4431,4433,4522,4523,4524,4525,4527,4530,4532,4533,4536,4538,4543,4544,4545,4546,4552,4553,4556,4559,4565,4567,4573,4576,4582,4586,4588,4597,4598,4612,4613,4615,4616,4618,4619,4622,4623,4624,4625,4626,4631,4635,4636,4637,4639,4647,4656,4666,4671,4675,4676,4679,4681,4691,4692,4698,4704,4710,4717,4719,4720,4721,4724,4729,4782,4789,4800,4813,4814,4815,4817,4818,4819,4820,4821,4822,4823,4859,4870,4884,4893,4903,4904,4914,4920,4923,4988,5064,5087,5131,5143,5147,5148,5165,5219,5240,5246,5321,5322,5359,5376,5378,5426,5443,5498,5500,5502,5503,5504,5505,5506,5510,5511,5523,5549,5566,5588,5590,5591,5597,5600,5603,5662,5679,5757,5850,5986,5996,6140,6141,6142,6143,6144,6145,6146,6147,6287,6354,6424,6432,6469,6476,6481,6482,6483,6487,6489,6490,6510,6516,6523,6562,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6578,6579,6611,6627,6662,6685,6722,6723,6737,6770,6771,6774,6785,6787,6795,6806,6812,6868,6869,6881,6889,6894,6967,6975,6976,6977,6982,6983,6984,7004,7320,7322,7330,7393,7394,7462,7467,7477,7478,7595,7741,7872,7877,7882,7891,7892,7893,7895,7901,7902,7903,7907,7911,7916,7922,7925,7926,7932,7933,7944,7949,7958,7974,7975,7976,7977,7978,7979,7981,7984,7986,7992,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,8019,8020,8021,8029,8037,8046,8047,8076,8078,8079,8081,8084,8085,8086,8093,8094,8095,8177,8184,8196,8204,8205,8206,8207,8210,8211,8212,8213,8237,8238,8239,8240,8242,8243,8246,8248,8249,8250,8251,8252,8272,8273,8274,8275,8276,8278,8279,8280,8295,8316,8318,8319,8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8335,8339,8341,8343,8347,8358,8359,8363,8367,8368,8369,8370,8371,8372,8373,8374,8375,8376,8417,8421,8426,8435,8436,8437,8438,8439,8440,8441,8442,8443,8447,8455,8457,8460,8461,8463,8465,8468,8469,8470,8471,8472,8475,8478,8479,8481,8486,8488,8490,8492,8494,8497,8498,8501,8506,8507,8509,8514,8515,8516,8517,8518,8519,8520,8521,8522,8527,8529,8535,8536,8537,8540,8543,8544,8545,8546,8550,8553,8556,8575,8576,8584,8586,8592,8594,8596,8598,8601,8602,8610,8613,8614,8616,8619,8623,8625,8626,8627,8629,8644,8649,8653,8654,8655,8656,8657,8658,8659,8660,8661,8662,8663,8664,8693,8753,8763,8764,8866,8867,8868,8869,8870,8871,8872,8873,8874,8933,8934,8935,8936,8937,8938,8945,8946,8987,8992,8995,8996,8997,8999,9000,9001,9022,9026,9039,9040,9041,9042,9045,9046,9047,9048,9053,9056,9093,9097,9101,9102,9103,9121,9122,9124,9126,9131,9156,9157,9158,9159,9160,9162,9163,9164,9166,9170,9171,9172,9173,9178,9179,9182,9205,9211,9212,9213,9214,9215,9216,9217,9219,9220,9221,9222,9223,9227,9244,9250,9251,9252,9253,9256,9258,9259,9261,9262,9263,9265,9266,9267,9270,9311,9312,9315,9321,9329,9330,9337,9341,9342,9343,9345,9346,9347,9348,9349,9350,9351,9353,9354,9356,9357,9363,9366,9369,9370,9386,9419,9420,9422,9425,9430,9431,9432,9434,9435,9448,9451,9453,9454,9464,9472,9474,9504,9506,9509,9510,9513,9520,9521,9522,9523,9525,9526,9527,9528,9539,9540,9551,9552,9553,9554,9555,9556,9560,9565,9569,9570,9597,9599,9600,9610,9612,9615,9623,9624,9625,9630,9634,9637,9639,9641,9643,9644,9645,9659,9661,9663,9664,9672,9685,9687,9688,9699,9701,9702,9703,9704,9705,9706,9707,9708,9709,9711,9713,9714,9715,9716,9717,9718,9720,9721,9722,9725,9726,9727,9729,9730,9731,9733,9734,9735,9737,9740,9742,9753,9754,9756,9757,9759,9767,9768,9769,9772,9773,9787,9791,9793,9797,9798,9799,9801,9803,9804,9807,9808,9809,9810,9811,9812,9813,9814,9815,9816,9817,9818,9819,9820,9821,9822,9823,9824,9825,9826,9828,9829,9830,9833,9835,9843,9844,9845,9846,9847,9848,9864,9865,9866,9867,9868,9869,9870,9871,9872,9874,9877,9878,9881,9883,9885,9886,9887,9888,9889,9890,9891,9892,9893,9894,9895,9896,9897,9898,9899,9900,9901,9903,9906,9907,9908,9909,9910,9911,9912,9913,9914,9915,9916,9917,9918,9926,9927,9928,9929,9930,9931,9932,9933,9934,9935,9936,9938,9939,9940,9941,9942,9943,9945,9946,9949,9950,9951,9952,9953,9954,9958,9971,9972,9973,9974,9976,9977,9978,9979,9980,9981,9982,9983,9984,9985,9986,9987,9988,9989,9990,9991,9992,9993,9994,9995,9996,9997,9998,10002,10004,10005,10006,10007,10008,10009,10010,10011,10012,10013,10021,10022,10023,10025,10028,10042,10046,10047,10048,10050,10051,10052,10053,10054,10055,10057,10059,10060,10066,10068,10080,10082,10084,10085,10086,10087,10088,10089,10090,10091,10092,10093,10094,10095,10096,10098,10099,10100,10101,10102,10103,10104,10105,10106,10107,10108,10109,10112,10113,10115,10116,10117,10118,10119,10120,10121,10123,10125,10126,10128,10131,10133,10134,10136,10179,10180,10181,10182,10183,10184,10185,10186,10187,10188,10189,10190,10191,10192,10193,10249,10250,10269,10277,10279,10292,10312,10365,10382,10383,10384,10385,10386,10387,10388,10389,10390,10391,10392,10393,10394,10396,10397,10398,10399,10401,10402,10403,10404,10414,10437,10438,10439,10441,10478,10479,10497,10501,10502,10506,10522,10526,10557,10558,10561,10562,10564,10565,10566,10567,10568,10570,10571,10572,10573,10574,10575,10576,10577,10583,10584,10586,10614,10616,10650,10651,10653,10654,10655,10656,10659,10660,10663,10664,10665,10690,10692,10693,10695,10706,10711,10717,10718,10719,10720,10721,10722,10723,10724,10725,10726,10727,10728,10729,10747,10751,10755,10758,10776,10784,10785,10787,10788,10790,10791,10792,10795,10845,10869,10873,10877,10880,10881,10882,10883,10884,10895,10896,10899,10900,10904,10905,10906,10908,10909,10910,10912,10913,10914,10916,10917,10918,10920,10928,10929,10930,10931,10942,10943,10944,10945,10948,10949,10950,10951,10952,10953,10962,10966,10993,11016,11087,11088,11089,11090,11091,11092,11093,11094,11095,11096,11097,11098,11099,11100,11104,11105,11106,11735,11736,11739,11740,11741,11744,11745,11746,11747,11748,11771,11782,11788,11790,11791,11794,11796,11797,11798,11803,11804,11805,11806,11808,11809,11810,11811,11812,11813,11833,11834,11835,11836,11837,11840,11841,11842,11843,11844,11845,11846,11847,11848,11849,11850,11851,11852,11939,12169,12171,12172,12173,12174,12175,12176,12177,12178,12179,12180,12181,12182,12183,12184,12185,12186,12187,12210,12245,12311,12312,12313,12314,12315,12316,12317,12318,12319,12326,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12432,12438,12487,12489,12506,12532,12542,12571,12572,12576,12713,12759,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911,12912,12974,13417,13429,13430,13431,13432,13433,13434,13435,13437,13442,13443,13444,13504}; int us[]={68,98,196,219,232,274,353,387,489,494,511,601,696,783,800,840,884,909,931,1021,1076,1091,1101,1122,1137,1255,1264,1343,1427,1509,1561,1886,1907,2111,2144,2411,2641,2682,2724,2970,3382,3703,4008,4570,4628,4646,4950,5090,5988,6453,6623,6981,7890,8017,8236,8244,8630,9088,9264,9269,9316,9638,9944,9947,10110,10124,10135,10395,10569,10816,10872,12062,12165,12988,}; int f[]={13125, 13132, 14341, 12418}; int uf[]={4373, 8873, 14340, 5892, 11988, 11496, 9499, 13786, 10875, 7503}; int main() { for(int x:s) S[x]=1; for(int x:f) S[x-1000]=1; for(int x:us) US[x]=1; for(int x:uf) US[x-1000]=1; int n; read(n); for(;n--;){ int a; read(a); a-=1000; if(a<0 || a>=30000) puts("VH"); if(S[a]){ puts("E"); } else if(US[a]){ puts("H"); } else puts("VH"); } return 0; }

Compilation message (stderr)

ABC.cpp: In function 'void read(int&)':
ABC.cpp:6:34: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 void read(int& x){ scanf("%d",&x); }
                                  ^
ABC.cpp: In function 'void read(ll&)':
ABC.cpp:7:35: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 void read(ll& x){ scanf("%lld",&x); }
                                   ^
#Verdict Execution timeMemoryGrader output
Fetching results...