Submission #110529

# Submission time Handle Problem Language Result Execution time Memory
110529 2019-05-11T06:17:07 Z Mahdi_Jfri Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
//#include "grader.h"
using namespace std;

#define ll long long
#define pb push_back
#define bit(a , b) (((a)>>(b))&1)

const int maxn = 1e6 + 20;

int arr[] = {1, 2, 7, 11, 14, 19, 22, 26, 31, 35, 38, 42, 47, 50, 55, 59, 62, 67, 70, 74, 79, 82, 87, 91, 94, 98, 103, 107, 110, 115, 118, 122, 127, 131, 134, 138, 143, 146, 151, 155, 158, 162, 167, 171, 174, 179, 182, 186, 191, 194, 199, 203, 206, 211, 214, 218, 223, 227, 230, 234, 239, 242, 247, 251, 254, 259, 262, 266, 271, 274, 279, 283, 286, 290, 295, 299, 302, 307, 310, 314, 319, 322, 327, 331, 334, 339, 342, 346, 351, 355, 358, 362, 367, 370, 375, 379, 382, 386, 391, 395, 398, 403, 406, 410, 415, 419, 422, 426, 431, 434, 439, 443, 446, 451, 454, 458, 463, 466, 471, 475, 478, 482, 487, 491, 494, 499, 502, 506, 511, 515, 518, 522, 527, 530, 535, 539, 542, 546, 551, 555, 558, 563, 566, 570, 575, 578, 583, 587, 590, 595, 598, 602, 607, 611, 614, 618, 623, 626, 631, 635, 638, 642, 647, 651, 654, 659, 662, 666, 671, 675, 678, 682, 687, 690, 695, 699, 702, 707, 710, 714, 719, 722, 727, 731, 734, 738, 743, 747, 750, 755, 758, 762, 767, 770, 775, 779, 782, 787, 790, 794, 799, 803, 806, 810, 815, 818, 823, 827, 830, 835, 838, 842, 847, 850, 855, 859, 862, 866, 871, 875, 878, 883, 886, 890, 895, 899, 902, 906, 911, 914, 919, 923, 926, 930, 935, 939, 942, 947, 950, 954, 959, 962, 967, 971, 974, 979, 982, 986, 991, 995, 998, 1002, 1007, 1010, 1015, 1019, 1022, 1027, 1030, 1034, 1039, 1042, 1047, 1051, 1054, 1058, 1063, 1067, 1070, 1075, 1078, 1082, 1087, 1090, 1095, 1099, 1102, 1107, 1110, 1114, 1119, 1123, 1126, 1130, 1135, 1138, 1143, 1147, 1150, 1154, 1159, 1163, 1166, 1171, 1174, 1178, 1183, 1187, 1190, 1194, 1199, 1202, 1207, 1211, 1214, 1219, 1222, 1226, 1231, 1234, 1239, 1243, 1246, 1250, 1255, 1259, 1262, 1267, 1270, 1274, 1279, 1282, 1287, 1291, 1294, 1299, 1302, 1306, 1311, 1315, 1318, 1322, 1327, 1330, 1335, 1339, 1342, 1347, 1350, 1354, 1359, 1362, 1367, 1371, 1374, 1378, 1383, 1387, 1390, 1395, 1398, 1402, 1407, 1411, 1414, 1418, 1423, 1426, 1431, 1435, 1438, 1442, 1447, 1451, 1454, 1459, 1462, 1466, 1471, 1474, 1479, 1483, 1486, 1491, 1494, 1498, 1503, 1507, 1510, 1514, 1519, 1522, 1527, 1531, 1534, 1538, 1543, 1547, 1550, 1555, 1558, 1562, 1567, 1571, 1574, 1578, 1583, 1586, 1591, 1595, 1598, 1603, 1606, 1610, 1615, 1618, 1623, 1627, 1630, 1634, 1639, 1643, 1646, 1651, 1654, 1658, 1663, 1667, 1670, 1674, 1679, 1682, 1687, 1691, 1694, 1698, 1703, 1707, 1710, 1715, 1718, 1722, 1727, 1730, 1735, 1739, 1742, 1747, 1750, 1754, 1759, 1763, 1766, 1770, 1775, 1778, 1783, 1787, 1790, 1795, 1798, 1802, 1807, 1810, 1815, 1819, 1822, 1826, 1831, 1835, 1838, 1843, 1846, 1850, 1855, 1858, 1863, 1867, 1870, 1875, 1878, 1882, 1887, 1891, 1894, 1898, 1903, 1906, 1911, 1915, 1918, 1922, 1927, 1931, 1934, 1939, 1942, 1946, 1951, 1955, 1958, 1962, 1967, 1970, 1975, 1979, 1982, 1987, 1990, 1994, 1999, 2002, 2007, 2011, 2014, 2018, 2023, 2027, 2030, 2035, 2038, 2042, 2047, 2051, 2054, 2058, 2063, 2066, 2071, 2075, 2078, 2082, 2087, 2091, 2094, 2099, 2102, 2106, 2111, 2114, 2119, 2123, 2126, 2131, 2134, 2138, 2143, 2147, 2150, 2154, 2159, 2162, 2167, 2171, 2174, 2178, 2183, 2187, 2190, 2195, 2198, 2202, 2207, 2211, 2214, 2218, 2223, 2226, 2231, 2235, 2238, 2243, 2246, 2250, 2255, 2258, 2263, 2267, 2270, 2274, 2279, 2283, 2286, 2291, 2294, 2298, 2303, 2306, 2311, 2315, 2318, 2323, 2326, 2330, 2335, 2339, 2342, 2346, 2351, 2354, 2359, 2363, 2366, 2371, 2374, 2378, 2383, 2386, 2391, 2395, 2398, 2402, 2407, 2411, 2414, 2419, 2422, 2426, 2431, 2435, 2438, 2442, 2447, 2450, 2455, 2459, 2462, 2466, 2471, 2475, 2478, 2483, 2486, 2490, 2495, 2498, 2503, 2507, 2510, 2515, 2518, 2522, 2527, 2531, 2534, 2538, 2543, 2546, 2551, 2555, 2558, 2562, 2567, 2571, 2574, 2579, 2582, 2586, 2591, 2595, 2598, 2602, 2607, 2610, 2615, 2619, 2622, 2627, 2630, 2634, 2639, 2642, 2647, 2651, 2654, 2658, 2663, 2667, 2670, 2675, 2678, 2682, 2687, 2691, 2694, 2698, 2703, 2706, 2711, 2715, 2718, 2722, 2727, 2731, 2734, 2739, 2742, 2746, 2751, 2754, 2759, 2763, 2766, 2771, 2774, 2778, 2783, 2787, 2790, 2794, 2799, 2802, 2807, 2811, 2814, 2819, 2822, 2826, 2831, 2834, 2839, 2843, 2846, 2850, 2855, 2859, 2862, 2867, 2870, 2874, 2879, 2882, 2887, 2891, 2894, 2899, 2902, 2906, 2911, 2915, 2918, 2922, 2927, 2930, 2935, 2939, 2942, 2946, 2951, 2955, 2958, 2963, 2966, 2970, 2975, 2979, 2982, 2986, 2991, 2994, 2999, 3003, 3006, 3011, 3014, 3018, 3023, 3026, 3031, 3035, 3038, 3042, 3047, 3051, 3054, 3059, 3062, 3066, 3071, 3074, 3079, 3083, 3086, 3091, 3094, 3098, 3103, 3107, 3110, 3114, 3119, 3122, 3127, 3131, 3134, 3139, 3142, 3146, 3151, 3154, 3159, 3163, 3166, 3170, 3175, 3179, 3182, 3187, 3190, 3194, 3199, 3203, 3206, 3210, 3215, 3218, 3223, 3227, 3230, 3234, 3239, 3243, 3246, 3251, 3254, 3258, 3263, 3266, 3271, 3275, 3278, 3283, 3286, 3290, 3295, 3299, 3302, 3306, 3311, 3314, 3319, 3323, 3326, 3331, 3334, 3338, 3343, 3346, 3351, 3355, 3358, 3362, 3367, 3371, 3374, 3379, 3382, 3386, 3391, 3394, 3399, 3403, 3406, 3411, 3414, 3418, 3423, 3427, 3430, 3434, 3439, 3442, 3447, 3451, 3454, 3458, 3463, 3467, 3470, 3475, 3478, 3482, 3487, 3491, 3494, 3498, 3503, 3506, 3511, 3515, 3518, 3523, 3526, 3530, 3535, 3538, 3543, 3547, 3550, 3554, 3559, 3563, 3566, 3571, 3574, 3578, 3583, 3587, 3590, 3594, 3599, 3602, 3607, 3611, 3614, 3618, 3623, 3627, 3630, 3635, 3638, 3642, 3647, 3650, 3655, 3659, 3662, 3667, 3670, 3674, 3679, 3683, 3686, 3690, 3695, 3698, 3703, 3707, 3710, 3714, 3719, 3723, 3726, 3731, 3734, 3738, 3743, 3747, 3750, 3754, 3759, 3762, 3767, 3771, 3774, 3779, 3782, 3786, 3791, 3794, 3799, 3803, 3806, 3810, 3815, 3819, 3822, 3827, 3830, 3834, 3839, 3842, 3847, 3851, 3854, 3859, 3862, 3866, 3871, 3875, 3878, 3882, 3887, 3890, 3895, 3899, 3902, 3907, 3910, 3914, 3919, 3922, 3927, 3931, 3934, 3938, 3943, 3947, 3950, 3955, 3958, 3962, 3967, 3971, 3974, 3978, 3983, 3986, 3991, 3995, 3998, 4002, 4007, 4011, 4014, 4019, 4022, 4026, 4031, 4034, 4039, 4043, 4046, 4051, 4054, 4058, 4063, 4067, 4070, 4074, 4079, 4082, 4087, 4091, 4094};

int encode(int n , int x , int y)
{
	x-- , y--;

	for(int i = 0; i < 12; i++)
		if(bit(arr[x] , i) && !bit(arr[y] , i))
			return i + 1;
}






















    

Compilation message

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

/tmp/ccrsz2cw.o: In function `main':
grader_decode.c:(.text.startup+0x19f): undefined reference to `decode(int, int, int)'
collect2: error: ld returned 1 exit status