id
stringlengths
9
106
d_with_params
stringlengths
426
57.5k
NTH_MULTIPLE_NUMBER_FIBONACCI_SERIES
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [4500, 1890, 408, 204, 817, 552, 120, 768, 1176, 3840]; int [] param0 = [50, 52, 42, 2, 37, 48, 31, 9, 78, 64]; int [] param1 = [60, 45, 17, 68, 43, 46, 4, 64, 14, 80]; int n_success = 0...
PROGRAM_OCTAL_DECIMAL_CONVERSION
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [31, 21, 51, 54, 26, 5, 33, 66, 44, 5]; int [] param0 = [37, 25, 63, 66, 32, 5, 41, 82, 54, 5]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f_f...
PROBABILITY_THREE_RANDOMLY_CHOSEN_NUMBERS_AP
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ double [] results = [0.0163062743707905, 0.15151515151515152, 0.017047655947307245, 0.05005561735261402, 0.010417169037858692, 0.4, 0.008721225027887637, 0.04415584415584416, 0.025006946373992776, 0.01785967399007796...
SQUARED_TRIANGULAR_NUMBER_SUM_CUBES
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [-1, 3, -1, -1, -1, -1, -1, -1, -1, -1]; int [] param0 = [15, 36, 39, 43, 75, 49, 56, 14, 62, 97]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == ...
MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [344, 204, 13, 2546, 0, 8, 2218, 206, 15, 0]; int [] [] param0 = [[48, 53, 67, 78, 78, 93, 95], [-70, -32, -2, 18, 30, 32, 52, 70, 72, 88], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
UGLY_NUMBERS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [64, 450, 1250, 1152, 972, 1000, 625, 1000, 90, 1]; int [] param0 = [27, 64, 93, 90, 85, 86, 72, 86, 32, 1]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (resu...
NUMBER_SUBSEQUENCES_AB_STRING_REPEATED_K_TIMES
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [9312, 49, 75, 7260, 0, 861, 3828, 40, 0, 0]; string [] param0 = ["abbc", "abahk", "hugbabab", "abadbc", "nkg9", "jh7dab", "abd", "aabb8yk", "1111", "pfxahr"]; int [] param1 = [96, 7, 5, 60, ...
TURN_OFF_THE_RIGHTMOST_SET_BIT
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [8, 52, 56, 0, 40, 0, 0, 50, 56, 88]; int [] param0 = [9, 54, 60, 32, 41, 64, 4, 51, 57, 92]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f_fil...
FIND_UNIT_DIGIT_X_RAISED_POWER_Y
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [7, 5, 1, 9, 0, 6, 3, 4, 4, 9]; int [] param0 = [33, 95, 21, 3, 40, 64, 17, 58, 44, 27]; int [] param1 = [55, 7, 63, 62, 53, 24, 23, 74, 13, 54]; int n_success = 0; for (int i = 0; ...
COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [821223649, 119814916, 6677056, 974169, 54289, 7921, 441, 64, 4]; int [] param0 = [44, 40, 34, 30, 24, 20, 14, 10, 4]; int n_success = 0; for (int i = 0; i < param0.length; i++) { ...
COMPUTE_MODULUS_DIVISION_BY_A_POWER_OF_2_NUMBER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [50, 3, 0, 9, 2, 0, 93, 32, 37, 15]; int [] param0 = [54, 39, 35, 9, 62, 16, 93, 32, 39, 63]; int [] param1 = [59, 84, 81, 60, 68, 16, 96, 38, 62, 16]; int n_success = 0; for (int i...
CEILING_IN_A_SORTED_ARRAY
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [28, 36, -1, 23, 9, -1, 9, -1, -1, 46]; int [] [] param0 = [[2, 3, 4, 6, 8, 9, 9, 10, 11, 16, 19, 20, 21, 21, 21, 24, 24, 25, 28, 30, 30, 30, 32, 34, 35, 39, 41, 42, 49, 52, 57, 59, 61, 62, 66, 6...
MINIMUM_PRODUCT_SUBSET_ARRAY
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [3, -297032800813056, 0, 7, -128064, 0, 1, -975833006044977561600000, 0, 3]; int [] [] param0 = [[3, 6, 7, 8, 8, 9, 12, 12, 12, 13, 15, 15, 15, 16, 18, 18, 18, 19, 20, 21, 22, 22, 23, 28, 29, 30,...
DICE_THROW_PROBLEM_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ long [] results = [35960, 0, 0, 0, 0, 0, 77384340, 141120525, 1, 25]; int [] param0 = [57, 58, 38, 5, 91, 76, 10, 28, 97, 99]; int [] param1 = [5, 45, 89, 39, 90, 56, 15, 20, 90, 2]; int [] param2 = [33, ...
MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ char [] results = ['e', '3', '1', 'a', '1', '1', 'w', '1', '1', 'a']; string [] param0 = ["geeekk", "3786868", "110", "aaaabbcbbb", "11", "011101", "wohnyjylc", "3141711779", "10111101101", "aabbabababcc"]; ...
SUM_SEQUENCE_2_22_222
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ double [] results = [2459998.2042, 24599997.9828, 245998.42560000002, 24598.647, 23.9112, 245999997.7614, 1.9926, 0.0, 245.0898, 2458.8684]; int [] param0 = [8, 9, 7, 6, 3, 10, 2, 1, 4, 5]; int n_success = 0...
COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 404, 0, 37, 0, 0, 0, 20, 0, 43]; int [] [] param0 = [[4, 75, 89], [84, -66, -52, 34, -28, -6, 20, 22, -78, -26, 14, 24, -92, -18, 32, -94, -64, -38, 56, 4, -10, 58, -66, -58, -10, -8, -62, -6...
DOUBLE_FACTORIAL
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ long [] results = [1, 8, 105, 3840, 135135, 10321920, 654729075]; long [] param0 = [1, 4, 7, 10, 13, 16, 19]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f_fill...
FIND_MINIMUM_SUM_FACTORS_NUMBER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [83, 17, 12, 5, 15, 17, 21, 13, 23, 16]; int [] param0 = [83, 88, 60, 6, 26, 98, 38, 90, 76, 66]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f...
DECIMAL_BINARY_CONVERSION_WITHOUT_USING_ARITHMETIC_OPERATORS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ string [] results = ["100011", "10001", "1000", "1100011", "111001", "100111", "1100011", "1110", "10110", "111"]; int [] param0 = [35, 17, 8, 99, 57, 39, 99, 14, 22, 7]; int n_success = 0; for (int i =...
MINIMUM_XOR_VALUE_PAIR_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, -4, 0, 0, -28, 0, 0, 10, 0, 1]; int [] [] param0 = [[8, 11, 12, 27, 32, 32, 36, 56, 57, 66, 68, 70, 74, 78, 82, 83, 96], [-60, -8, 4, 38, 40, 42, 48, 66], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
COUNT_TRAILING_ZEROES_FACTORIAL_NUMBER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [1, 9, 12, 7, 8, 12, 7, 10, 0, 18]; int [] param0 = [9, 43, 50, 32, 37, 51, 33, 49, 1, 75]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f_fille...
SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [32, 128, 128, 128, 64, 64, 32, 32, 64, 32]; int [] param0 = [31, 89, 92, 66, 38, 34, 17, 24, 54, 20]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i]...
LARGEST_SUBSEQUENCE_GCD_GREATER_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [16, 10, 0, 4, 40, 0, 10, 9, 0, 8]; int [] [] param0 = [[10, 18, 22, 22, 22, 29, 30, 32, 33, 34, 37, 39, 40, 41, 44, 47, 49, 50, 50, 51, 53, 67, 69, 70, 71, 71, 73, 75, 78, 80, 81, 82, 91, 91, 93...
CENTER_ELEMENT_OF_MATRIX_EQUALS_SUMS_OF_HALF_DIAGONALS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [true, true, false, false, false, false, false, false, false, false]; int [] [] [] param0 = [[[2, 9, 1, 4, -2], [6, 7, 2, 11, 4], [4, 2, 9, 2, 4], [1, 9, 2, 4, 4], [0, 2, 4, 2, 5]], [[0, 0, 0, 0...
MINIMUM_INCREMENT_K_OPERATIONS_MAKE_ELEMENTS_EQUAL
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [10, 0, 24, -1, 36, -1, -1, -1, -1, 1365]; int [] [] param0 = [[4, 7, 19, 16], [4, 4, 4, 4, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [2, 24, 5040, 1, 40320, 362880, 6, 120, 720, 39916800]; int [] param0 = [2, 4, 7, 1, 8, 9, 3, 5, 6, 11]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[...
NUMBER_VISIBLE_BOXES_PUTTING_ONE_INSIDE_ANOTHER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [8, 6, 17, 9, 8, 11, 25, 8, 9, 22]; int [] [] param0 = [[2, 3, 17, 17, 18, 28, 28, 29, 34, 43, 44, 52, 54, 80, 84, 84, 91, 92, 97], [-94, -90, -90, -78, -34, -26, -10, 4, 24, 28, 64, 70, 72, 74, ...
CHECK_EXIST_TWO_ELEMENTS_ARRAY_WHOSE_SUM_EQUAL_SUM_REST_ARRAY
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [true, false, true, false, false, false, false, false, true, false]; int [] [] param0 = [[2, 11, 5, 1, 4, 7], [2, 4, 2, 1, 11, 15], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; int [] [] param0 = [[2, 2, 11, 13, 18, 18, 23, 25, 28, 28, 37, 39, 53, 56, 67, 70, 74, 74, 75, 79, 80, 82, 84, 89, 94, 95, 95, 98, 98], [-94, -78, -78, -72, -72, -...
LONGEST_PREFIX_ALSO_SUFFIX_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [4, 0, 1, 2, 0, 3, 2, 0, 2, 0]; string [] param0 = ["aabcdaabc", "1372494598", "110000100001", "abcab", "488938", "011010101011", "aaaa", "3356203205", "1010", "kkxiitzkgeh"]; int n_success ...
SUM_SERIES_12_32_52_2N_12_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [790244, 540274, 1004731, 52394, 62196, 29260, 457310, 455, 18424, 138415]; int [] param0 = [84, 74, 91, 34, 36, 28, 70, 7, 24, 47]; int n_success = 0; for (int i = 0; i < param0.length...
ONE_LINE_FUNCTION_FOR_FACTORIAL_OF_A_NUMBER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [40320, 2, 720, 3628800, 362880, 5040, 24, 120, 720, 1]; int [] param0 = [8, 2, 6, 10, 9, 7, 4, 5, 6, 1]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results...
HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [false, false, false, false, true, true, false, true, true, true]; int [] [] param0 = [[1, 2, 3, 5, 24, 24, 25, 25, 36, 37, 37, 39, 42, 44, 46, 50, 51, 54, 56, 60, 62, 70, 71, 73, 75, 80, 80, 85...
N_TH_TERM_SERIES_2_12_36_80_150
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [737100, 866400, 11132, 25230, 242172, 65600, 143312, 9702, 37026, 1452]; int [] param0 = [90, 95, 22, 29, 62, 40, 52, 21, 33, 11]; int n_success = 0; for (int i = 0; i < param0.length;...
LEXICOGRAPHICAL_MAXIMUM_SUBSTRING_STRING
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ string [] results = ["oaan", "80336005", "1111111110", "qih", "98472796", "10101", "tcgxjs", "9666021", "111101101", "z"]; string [] param0 = ["hcoaefoaan", "80336005", "01111111110", "qih", "4210598472796", "101...
FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 0, 0, 0, 0, 7, 0, 0, 2, 0]; int [] [] param0 = [[4, 10, 11, 24, 27, 33, 34, 36, 36, 40, 42, 43, 52, 58, 67, 69, 77, 86, 86, 88], [40, 54, 14, 58, -64, -60, -98, -64, -52, 30, 0, -42, 74, 46, ...
ZECKENDORFS_THEOREM_NON_NEIGHBOURING_FIBONACCI_REPRESENTATION
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [34, 55, 55, 55, 89, 34, 55, 89, 89, 55]; int [] param0 = [54, 71, 64, 71, 96, 43, 70, 94, 95, 69]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] ==...
CHECK_GIVEN_MATRIX_SPARSE_NOT
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [true, false, true, false, true, false, true, false, true, false]; int [] [] [] param0 = [[[79, 0, 59, 0, 0, 0, 0, 47, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 0, 0, 0, 47, 0], [95, 0, 0, 19, 0...
NTH_NON_FIBONACCI_NUMBER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [85, 101, 71, 74, 93, 66, 85, 11, 6, 96]; int [] param0 = [76, 91, 62, 65, 83, 57, 76, 6, 2, 86]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f...
HARDY_RAMANUJAN_THEOREM
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [2, 2, 2, 1, 2, 2, 1, 2, 2, 1]; int [] param0 = [99, 33, 50, 17, 18, 69, 23, 18, 94, 16]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f_filled(...
COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [1, 0, 0, 0, 0, 16, 0, 0, 61, 3]; int [] [] param0 = [[4, 6, 9, 16, 16, 21, 36, 41, 58, 60, 62, 73, 77, 81, 95], [-86, -72, -26, -34, 18, -62, -66], [1], [16], [-88, -80, -72, -68, -64, -26, 4, 1...
WRITE_A_C_PROGRAM_TO_CALCULATE_POWXN
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [36, 4782969, 0, 1, 6, 1, 117649, 100, 1679616, 1]; int [] param0 = [6, 9, 0, 1, 6, 1, 7, 10, 6, 9]; int [] param1 = [2, 7, 2, 6, 1, 9, 6, 2, 8, 0]; int n_success = 0; for (int i = ...
SUM_FACTORS_NUMBER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [140, 32, 7, 57, 48, 72, 44, 56, 91, 6]; int [] param0 = [76, 21, 4, 49, 35, 55, 43, 39, 36, 5]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f_...
FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [11, 4, 2147483647, 12, 1, 1, 18, 2147483647, 1, 2147483647]; int [] [] param0 = [[4, 7, 7, 8, 11, 14, 16, 25, 34, 35, 36, 36, 38, 40, 41, 43, 45, 47, 57, 60, 64, 72, 73, 74, 75, 82, 83, 83, 84, ...
COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [5, 16, 12, 6, 19, 9, 6, 15, 4, 9]; string [] param0 = ["lzika", "0556979952", "110010", "kgayfd", "413567670657", "01001", "eqpufa", "48848378", "110", "plehnep"]; int n_success = 0; f...
PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [false, false, false, false, false, false, false, false, false, true]; int [] param0 = [15, 90, 38, 65, 91, 16, 48, 74, 14, 47]; int n_success = 0; for (int i = 0; i < param0.length; i...
GOLD_MINE_PROBLEM
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [1221, 238, 21, 45, 888, 17, 210, 2412, 15, 2346]; int [] [] [] param0 = [[[19, 20, 23, 25, 28, 35, 35, 40, 45, 46, 48, 54, 57, 59, 74, 76, 78, 82, 84, 86, 87, 90, 91, 96], [9, 13, 17, 20, 26, 27...
EVEN_FIBONACCI_NUMBERS_SUM
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [44, 44, 10, 44, 44, 10, 44, 10, 10, 44]; int [] param0 = [67, 89, 12, 94, 96, 25, 49, 8, 33, 59]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == ...
COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [83271, 23383, 164359, 389483, 194619, 2073, 340869, 3459, 143848, 157319]; int [] param0 = [55, 36, 69, 92, 73, 16, 88, 19, 66, 68]; int n_success = 0; for (int i = 0; i < param0.lengt...
PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [194, 172, 216, 130, 178, 130, 256, 178, 116, 210]; int [] param0 = [58, 37, 56, 22, 77, 34, 74, 37, 21, 75]; int [] param1 = [39, 49, 52, 43, 12, 31, 54, 52, 37, 30]; int n_success = 0;...
FIND_THE_MISSING_NUMBER_2
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [50, -91, 1, 109, 94, 42, 124, 101, 0, 32]; int [] [] param0 = [[2, 5, 7, 8, 10, 14, 27, 32, 51, 52, 57, 58, 65, 68, 68, 72, 73, 73, 83, 92, 98], [-60, -48, 38, -78, 88, 86, -4, -94, 16, -64, 32,...
FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [-1, -1, 0, -1, -1, 0, -1, -1, 0, -1]; int [] [] param0 = [[8, 16, 21, 26, 27, 29, 34, 35, 35, 37, 38, 40, 48, 52, 58, 59, 60, 61, 63, 63, 65, 66, 69, 75, 79, 83, 86, 88, 91, 91, 96], [22, -70, 3...
EFFICIENT_WAY_TO_MULTIPLY_WITH_7
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [287, 294, 434, 28, 217, 525, 35, 525, 595, 133]; int [] param0 = [41, 42, 62, 4, 31, 75, 5, 75, 85, 19]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results...
PROGRAM_CENSOR_WORD_ASTERISKS_SENTENCE
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ string [] results = ["iggvaxtmj ", "76711241128 ", "010 ", "hikon ", "3680369217 ", "1111 ", "zii ", "06 ", "111 ", "njnnrvu "]; string [] param0 = ["iggvaxtmj", "76711241128", "010", "hikon", "3680369217", "1111...
FORM_SMALLEST_NUMBER_USING_ONE_SWAP_OPERATION
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ string [] results = ["ecyltuhsxnfg", "16625541616459", "0011", "kh", "122462103899", "0001", "sfczh", "29", "0", "v"]; string [] param0 = ["ncyltuhsxefg", "26615541616459", "0101", "hk", "422162103899", "0010", "...
COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [2, 6, 20, 70, 252, 924, 3432, 12870, 48620, 184756, 705432, 2704156, 10400600, 40116600, 155117520, 601080390]; int [] param0 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; int ...
COUNT_NUMBER_OF_WAYS_TO_PARTITION_A_SET_INTO_K_SUBSETS_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [171798901, 9330, 1, 0, 512060978, 78, 1]; int [] param0 = [16, 10, 6, 9, 17, 13, 14]; int [] param1 = [4, 3, 1, 10, 11, 12, 14]; int n_success = 0; for (int i = 0; i < param0.lengt...
COUNT_SET_BITS_IN_AN_INTEGER_3
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [2, 4, 4, 3, 4, 4, 4, 4, 4, 5]; int [] param0 = [6, 58, 90, 69, 15, 54, 60, 51, 46, 91]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f_filled(p...
MAXIMUM_AVERAGE_SUM_PARTITION_ARRAY
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ double [] results = [1742.8333333333333, 856.9, 11.0, 2092.5, 1052.5185185185185, 10.0, 1996.1875, 358.0, 22.0, 1060.0]; int [] [] param0 = [[4, 11, 14, 27, 32, 37, 39, 49, 52, 53, 57, 62, 67, 67, 68, 69, 76, 77,...
LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [18, 1, 1, 5, 1, 2, 5, 1, 2, 3]; int [] [] param0 = [[7, 8, 9, 16, 16, 27, 32, 33, 35, 35, 39, 39, 41, 42, 44, 47, 48, 50, 56, 59, 66, 69, 70, 73, 74, 76, 78, 87, 87, 89, 94, 96, 96, 98, 98], [40...
WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [false, true, false, false, false, false, true, true, true, true]; int [] param0 = [3, 64, 85, 36, 20, 63, 42, 19, 62, 97]; int n_success = 0; for (int i = 0; i < param0.length; i++) {...
CHECK_NUMBER_IS_PERFECT_SQUARE_USING_ADDITIONSUBTRACTION
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [true, true, true, true, true, false, true, false, false, false]; int [] param0 = [1, 4, 9, 25, 36, 3, 121, 14, 17, 80]; int n_success = 0; for (int i = 0; i < param0.length; i++) { ...
FIND_A_TRIPLET_THAT_SUM_TO_A_GIVEN_VALUE
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [false, true, false, true, false, false, false, true, false, false]; int [] [] param0 = [[15, 18, 38, 47, 75, 88], [28, -2, 62, 38, 86, -86, 56, 58, 96, 6, -28, 8, 68, -16, -80, -4, 98, -92, 4, ...
COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 2, 56, 0, 4, 0, 2, 2, 211, 0]; int [] [] param0 = [[5, 11, 18, 22, 40, 46, 50, 51, 53, 55, 64, 67, 73, 78, 86], [14, -98, 98, 58, -82, 90, -80, -56, -30, -36, -56, -30, -58, 68, 72, -76, 38, ...
ELEMENTS_TO_BE_ADDED_SO_THAT_ALL_ELEMENTS_OF_A_RANGE_ARE_PRESENT_IN_ARRAY_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [31, 141, 0, 60, 111, 0, 21, 174, 0, 73]; int [] [] param0 = [[1, 4, 5, 5, 11, 11, 12, 14, 16, 20, 23, 23, 25, 27, 29, 33, 33, 35, 37, 39, 39, 44, 44, 45, 47, 51, 51, 53, 55, 65, 73, 73, 75, 78, ...
NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [4, 4, 4, 4, 4, 4, 4, 4, 3, 4]; int [] param0 = [97, 52, 95, 35, 40, 18, 92, 73, 10, 82]; int [] param1 = [91, 49, 34, 40, 85, 97, 15, 98, 62, 22]; int n_success = 0; for (int i = 0...
SUM_FAI_AJ_PAIRS_ARRAY_N_INTEGERS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [3278, -112, 0, 2551, 16640, 0, 12408, -6856, 0, 542]; int [] [] param0 = [[2, 8, 12, 19, 23, 23, 26, 39, 54, 56, 57, 57, 73, 78, 83, 83, 89, 91], [62, -34, 10, -28, -42, -12, 4, 20, -20, -84, -7...
DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [2, 1, 0, 1, 0, 0, -1, 0, 0, 1]; int [] [] param0 = [[5, 15, 19, 22, 28, 29, 39, 46, 46, 49, 51, 55, 62, 69, 72, 72, 72, 74, 79, 92, 92, 93, 95, 96], [-92, -92, -78, -74, -70, -66, -60, -54, -50,...
LEXICOGRAPHICALLY_NEXT_STRING
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ string [] results = ["amkirzpiqltiz", "69", "101", "g", "802205376", "0112", "grjryivywgub", "813991000680:", "100102", "rx"]; string [] param0 = ["amkirzpiqltiy", "68", "100", "f", "802205375", "0111", "grjryivy...
NTH_PENTAGONAL_NUMBER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [13776, 12927, 330, 92, 651, 287, 176, 9322, 852, 13207]; int [] param0 = [96, 93, 15, 8, 21, 14, 11, 79, 24, 94]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if...
MAXIMUM_NUMBER_CHOCOLATES_DISTRIBUTED_EQUALLY_AMONG_K_STUDENTS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [29, 0, 0, 48, 2, 0, 36, 5, 0, 31]; int [] [] param0 = [[2, 3, 8, 8, 12, 14, 23, 25, 25, 27, 27, 29, 40, 42, 49, 52, 52, 54, 56, 57, 61, 68, 74, 77, 81, 82, 83, 84, 85, 85, 85, 87, 87, 88, 88, 90...
EULERIAN_NUMBER_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [1505621508, 66318474, 455192, 1191, 57, 26, 1, 0]; int [] param0 = [13, 12, 10, 7, 6, 5, 4, 5]; int [] param1 = [7, 7, 6, 4, 4, 3, 3, 6]; int n_success = 0; for (int i = 0; i < par...
MAXIMUM_PRODUCT_INCREASING_SUBSEQUENCE
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [45000, 21780000, 0, 24, 140, 1, 13234752, 1, 4320]; int [] [] param0 = [[3, 100, 4, 5, 150, 6], [10, 22, 9, 33, 21, 50, 41, 60], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1...
FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 0, 14, 0, 3, 6, 0, 0, 9, 0]; int [] [] param0 = [[7, 18, 19, 25, 26, 27, 31, 39, 44, 46, 59, 60, 66, 72, 78, 83, 84, 92, 94], [-14, -56, 92, -90, 96, -84, 64, -38, -20, 84, 56, 92, 18, -78, 9...
NUMBER_SUBSTRINGS_STRING
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [78, 21, 45, 66, 105, 15, 105, 45, 45, 91]; string [] param0 = ["gzfgzshcimlf", "505357", "011011101", "ovfwp osauz", "92132238746026", "01100", "raowyqrfiwksyc", "861330202", "001100010", "uvpkl...
MAXIMUM_GAMES_PLAYED_WINNER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [8, 6, 6, 6, 8, 6, 7, 7, 7, 9]; int [] param0 = [73, 28, 33, 23, 84, 31, 48, 46, 45, 90]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (results[i] == f_filled(...
COUNT_NUMBERS_CAN_CONSTRUCTED_USING_TWO_NUMBERS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [1, 9, 30, 1, 0, 2, 0, 4, 13, 1]; int [] param0 = [23, 56, 30, 51, 21, 69, 12, 44, 99, 46]; int [] param1 = [16, 95, 63, 89, 99, 63, 69, 52, 65, 58]; int [] param2 = [16, 6, 1, 46, 38, 50...
PRIME_NUMBERS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [true, false, false, false, false, false, false, false, true, false]; int [] param0 = [2, 74, 46, 38, 51, 48, 6, 14, 31, 10]; int n_success = 0; for (int i = 0; i < param0.length; i++)...
FIND_MAXIMUM_PRODUCT_OF_A_TRIPLET_IN_ARRAY_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [921888, 691488, 1, 931095, 522928, 1, 238464, 847872, 1, 893564]; int [] [] param0 = [[5, 8, 14, 15, 18, 21, 21, 21, 27, 29, 30, 33, 34, 34, 35, 37, 40, 41, 44, 44, 46, 49, 54, 58, 60, 61, 61, 6...
K_TH_PRIME_FACTOR_GIVEN_NUMBER
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [-1, 3, 2, 3, 3, -1, -1, -1, -1, -1]; int [] param0 = [94, 99, 64, 27, 24, 84, 69, 69, 22, 39]; int [] param1 = [0, 1, 3, 3, 4, 6, 98, 39, 60, 57]; int n_success = 0; for (int i = 0...
NEXT_POWER_OF_2
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [128, 128, 128, 128, 128, 32, 128, 128, 64, 64]; int [] param0 = [74, 70, 85, 78, 71, 32, 97, 90, 64, 48]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if (result...
MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [34, 146, 1, 84, 82, 1, 77, 108, 0, 39]; int [] [] param0 = [[1, 1, 4, 18, 21, 35, 37, 39, 76, 81, 86, 92, 96], [-94, -86, -48, -48, -38, -8, -6, 0, 2, 24, 34, 52, 62], [0, 0, 0, 0, 0, 0, 0, 0, 0...
MINIMIZE_SUM_PRODUCT_TWO_ARRAYS_PERMUTATIONS_ALLOWED
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [2553, -40912, 2, 13337, -134772, 0, 27121, -12260, 0, 47383]; int [] [] param0 = [[31, 85], [-74, -14, -10, -6, 6, 22, 22, 28, 68, 70, 84, 84, 90], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],...
COUNT_BINARY_STRINGS_K_TIMES_APPEARING_ADJACENT_TWO_SET_BITS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 72495581, 0, 0, 0, 4221018, 0, 0, 0, 0]; int [] param0 = [29, 40, 77, 9, 29, 94, 51, 46, 18, 86]; int [] param1 = [85, 25, 96, 91, 80, 85, 87, 62, 96, 86]; int n_success = 0; fo...
SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 0, 1, 19, 207, 120, 85, 2, 220, 92]; int [] [] param0 = [[14, 35, 56, 70, 88], [-50, -92, 16, -68, -36], [0, 0, 0, 1, 1, 1], [76, 43, 22, 41, 49, 99, 25, 40, 3, 45, 60, 16, 83, 62, 26, 93, 64...
STRING_CONTAINING_FIRST_LETTER_EVERY_WORD_GIVEN_STRING_SPACES
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ string [] results = ["ta", "77267", "011", "kcoi", "2", "01", "ysw", "586", "0100", "q"]; string [] param0 = ["t a", "77 78 2 600 7", "011 10 10", "kv co o ir", "2", "0 11", "y st wghec", "58 824 6", "00 100 001 ...
BINARY_SEARCH
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [-1, -1, 1, -1, -1, -1, -1, -1, -1, -1]; int [] [] param0 = [[3, 4, 4, 8, 9, 13, 13, 15, 18, 27, 30, 32, 42, 48, 50, 52, 56, 66, 69, 69, 77, 84, 84, 93], [52, -58, -22, -80, 44, -52, -34, 94, -34...
PROGRAM_FIND_SLOPE_LINE
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ float [] results = [-0.6486899453998202, -0.12115078452752318, 0.617204628531244, -0.8320918116165706, -38.51013687881985, -0.6052307962095809, -0.7142746798007333, 0.9387777514963889, -4.2964732392719505, 2.85002783...
AREA_OF_A_HEXAGON
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ double [] results = [8163986.207300422, 934487.9989101035, 2997804.1448343466, 3632345.696441302, 169746524.38794258, 97513471.98905805, 74922068.46663411, 125386010.4299519, 11572495.990484647, 108379966.88267714]; ...
NUMBER_NON_NEGATIVE_INTEGRAL_SOLUTIONS_B_C_N_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [903, 2701, 1540, 2926, 3916, 903, 3160, 3321, 1128, 55]; int [] param0 = [41, 72, 54, 75, 87, 41, 78, 80, 46, 9]; int n_success = 0; for (int i = 0; i < param0.length; i++) { if...
RECURSIVE_C_PROGRAM_LINEARLY_SEARCH_ELEMENT_GIVEN_ARRAY
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [-1, 3, -1, -1, 7, 0, 2, -1, -1, 2]; int [] [] param0 = [[10, 74, 5], [-90, 72, 36, 96, 42, 0, -66, 5], [0, 5], [99, 70, 67, 5], [-98, -98, -26, -26, -24, -18, -16, 80, 5], [1, 1, 1, 1, 0, 1, 5],...
PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [26, 0, 1, 22, 3, 61, 45, 29, 30, 9]; int [] param0 = [80, 63, 1, 22, 66, 61, 45, 29, 95, 9]; int [] param1 = [54, 21, 56, 39, 7, 67, 63, 44, 65, 68]; int n_success = 0; for (int i ...
CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ bool [] results = [false, false, false, true, false, false, false, true, true, true]; int [] param0 = [57, 73, 79, 36, 71, 23, 41, 66, 46, 50]; int n_success = 0; for (int i = 0; i < param0.length; i++)...
MAXIMUM_DIFFERENCE_SUM_ELEMENTS_TWO_ROWS_MATRIX
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [518, 1378, 3, 416, 284, 2, 267, -30, 4, 488]; int [] [] [] param0 = [[[1, 5, 5, 6, 6, 7, 7, 11, 12, 15, 17, 24, 25, 27, 30, 33, 35, 36, 38, 41, 42, 44, 44, 46, 50, 53, 53, 56, 58, 67, 71, 71, 77...
FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_1
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [6, 0, 29, 24, 31, 0, 0, 0, 0, 0]; int [] [] param0 = [[4, 16, 38, 39, 48, 74, 79], [-46, 72, 72, -66, 96, 92, 40, 8, 94, -84, 6, -90, 38, -6, 48, -20, -86, -76, 88, -50, -44, -14, 54, -6, -2, 72...
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 0, 0, 0, 484, 0, 0, 0, 0, 0]; int [] param0 = [38, 39, 24, 90, 44, 49, 58, 97, 99, 19]; int [] param1 = [34, 29, 99, 23, 2, 70, 84, 34, 72, 67]; int n_success = 0; for (int i = ...
ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [0, 0, 6, 1, 0, 22, 0, 0, 3, 0]; int [] [] [] param0 = [[[62]], [[-56, -6, -12, 64, 36, 12, -40, -38, 14, 68, 62, -46, -30], [56, 30, -18, -92, -10, 76, 6, 64, 14, -94, 34, 6, 12], [-80, 90, -40,...
COUNT_CHARACTERS_STRING_DISTANCE_ENGLISH_ALPHABETS
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [2, 3, 0, 0, 7, 1, 3, 1, 1, 2]; string [] param0 = ["smnkl", "270083", "0", "kczdsz", "483544224", "000011", "wysgcirmwkbzp", "3366", "110", "nlamkpcjugg"]; int n_success = 0; for (int ...
FAST_MULTIPLICATION_METHOD_WITHOUT_USING_MULTIPLICATION_OPERATOR_RUSSIAN_PEASANTS_ALGORITHM
import std.stdio; import std.math; import std.conv; import std.algorithm; //TOFILL// void main(){ int [] results = [132, 2412, 3380, 2035, 2660, 6762, 5208, 400, 540, 5628]; int [] param0 = [4, 36, 65, 55, 35, 69, 84, 5, 15, 67]; int [] param1 = [33, 67, 52, 37, 76, 98, 62, 80, 36, 84]; int n_success...