Code Evaluation
Collection
Datasets to be used with code evaluation: https://github.com/aip-hd-research/CodeEvaluation • 3 items • Updated
id stringlengths 9 106 | d_with_params stringlengths 426 57.5k |
|---|---|
PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD | 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, false, false];
int [] param0 = [37, 39, 73, 8, 28, 66, 20, 36, 6, 51];
int n_success = 0;
for (int i = 0; i < param0.length; i++)... |
COUNT_SORTED_ROWS_MATRIX | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [3, 0, 0, 0, 9, 0, 6, 0, 0, 0];
int [] [] [] param0 = [[[4, 12, 13, 24, 25, 26, 27, 35, 41, 60, 69, 71, 73, 78, 85, 86, 95, 99], [1, 13, 18, 25, 41, 42, 44, 45, 49, 49, 51, 52, 59, 63, 64, 67, 78... |
FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [95, 3, 3, 10, 82, 1, 77, 11, 23, 61];
int [] param0 = [95, 48, 3, 10, 82, 1, 77, 99, 23, 61];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_fi... |
COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [54, 41, 50, 4, 73, 79, 35, 43, 71, 45];
int [] param0 = [61, 45, 53, 4, 82, 86, 37, 48, 81, 50];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f... |
SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [7, -1, 4, -1, -1, -1, -1, -1, -1, -1];
int [] [] param0 = [[8, 7, 6, 7, 6, 5, 4, 3, 2, 3, 4, 3], [6, 90], [1, 2, 3, 4, 5, 4], [97, 35, 60, 96, 3, 67, 72, 95, 55, 9, 69, 28, 15, 91, 31, 59], [-84... |
DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [9, 9, 33, 2, 6, 64, 53, 53, 71, 9];
int [] param0 = [19, 23, 92, 9, 20, 68, 66, 77, 90, 26];
int [] param1 = [14, 51, 10, 50, 67, 25, 30, 22, 1, 34];
int [] param2 = [34, 5, 24, 34, 20, ... |
DOUBLE_FACTORIAL_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [1, 8, 105, 3840, 135135, 10321920, 654729075];
int [] param0 = [1, 4, 7, 10, 13, 16, 19];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_filled... |
EFFICIENT_SEARCH_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_IS_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [3, 6, 14, 5, -1, -1, -1, -1, 21, -1];
int [] [] param0 = [[5, 4, 5, 6, 5, 4, 3, 2], [5, 4, 5, 6, 5, 4, 3, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,... |
N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [1324, 109, 703, 1333, 28, 55, 406, 46, 118, 523];
int [] param0 = [93, 10, 55, 94, 2, 5, 37, 4, 11, 46];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results... |
SUM_SUBSETS_SET_FORMED_FIRST_N_NATURAL_NUMBERS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
long [] results = [1792, 6, 80, 240, 28160, 11520, 24, 672, 159744, 4608];
int [] param0 = [7, 2, 4, 5, 10, 9, 3, 6, 12, 8];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (resul... |
MAXIMUM_POSSIBLE_SUM_WINDOW_ARRAY_ELEMENTS_WINDOW_ARRAY_UNIQUE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [852, 240, 0, 734, 0, 2, 377, 122, 1, 1024];
int [] [] param0 = [[4, 8, 10, 10, 16, 23, 33, 36, 43, 47, 50, 55, 56, 72, 84, 85, 86, 86, 88, 90, 92, 99], [48, -22, 84, 76, 50, -14, -82, 28, 86, -5... |
DYNAMIC_PROGRAMMING_SET_37_BOOLEAN_PARENTHESIZATION_PROBLEM | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [4, 2, 2, 5, 0, 5, 2, 5, 3, 4];
char [] [] param0 = [['t', 't', 'f', 't'], ['t', 'f', 't'], ['t', 'f', 'f'], ['t', 't', 'f', 't'], ['t', 't', 'f', 't'], ['t', 't', 'f', 't'], ['t', 't', 'f', 't']... |
CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [true, true, false, true, false, false, false, false, false, false];
int [] param0 = [8, 400, 1, 61, 60, 88, 60, 26, 33, 70];
int [] param1 = [4, 1, 400, 40, 49, 10, 79, 88, 65, 57];
int... |
NUMBER_SUBSEQUENCES_FORM_AI_BJ_CK | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [0, 3, 7, 1, 0, 0, 111, 0, 0, 0];
string [] param0 = ["", "abbc", "abcabc", "agsdbkfdc ", "ababab", "aaaaaaa", "aabaaabcc", "19", "1001100", "dtanuqbu"];
int n_success = 0;
for (int i =... |
FIND_REPETITIVE_ELEMENT_1_N_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [287, -575, -115, 1705, -407, -366, 1132, -56, -446, 753];
int [] [] param0 = [[4, 8, 27, 34, 39, 42, 43, 54, 72], [-38, -66, -38, -48, -96, 74, -32, -62, -34, -32, -88, -12, -8, -4], [0, 0, 0, 0... |
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [4, 6, 0, 330, 0, 0, 0, 0, 0, 0];
int [] param0 = [10, 5, 2, 83, 91, 18, 83, 98, 43, 31];
int [] param1 = [4, 2, 8, 7, 0, 53, 41, 53, 37, 20];
int n_success = 0;
for (int i = 0; i <... |
FRIENDS_PAIRING_PROBLEM | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [10349536, 568504, 35696, 764, 76, 4, 1];
int [] param0 = [15, 13, 11, 8, 6, 3, 1];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_filled(param0... |
POSSIBLE_TO_MAKE_A_DIVISIBLE_BY_3_NUMBER_USING_ALL_DIGITS_IN_AN_ARRAY | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [false, false, true, true, true, false, false, false, false, false];
int [] [] param0 = [[2, 4, 9, 11, 12, 15, 16, 19, 21, 21, 23, 23, 24, 30, 31, 31, 32, 34, 37, 41, 41, 43, 45, 46, 47, 54, 58,... |
NUMBER_JUMP_REQUIRED_GIVEN_LENGTH_REACH_POINT_FORM_D_0_ORIGIN_2D_PLANE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [3, 2, 3, 2, 2, 2, 2, 2, 3, 2];
int [] param0 = [35, 85, 22, 8, 12, 58, 65, 10, 23, 5];
int [] param1 = [8, 55, 23, 43, 64, 25, 4, 95, 13, 50];
int [] param2 = [77, 33, 64, 29, 11, 26, 28... |
MULTIPLY_LARGE_INTEGERS_UNDER_LARGE_MODULO | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
long [] results = [48, 6, 58, 1, 43, 1, 19, 19, 34, 25];
long [] param0 = [60, 46, 4, 67, 93, 89, 8, 53, 96, 38];
long [] param1 = [24, 43, 50, 1, 35, 97, 78, 73, 92, 64];
long [] param2 = [58, 29, 71, 66... |
MAXIMUM_SUBARRAY_SUM_USING_PREFIX_SUM | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [633, 114, 8, 999, -24, 7, 811, 204, 0, 1971];
int [] [] param0 = [[8, 9, 11, 17, 18, 19, 23, 24, 27, 30, 31, 31, 35, 44, 46, 47, 49, 51, 55, 58, 59, 61, 65, 67, 71, 71, 71, 71, 78, 78, 82, 91, 9... |
MAXIMUM_SUM_BITONIC_SUBARRAY | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [315, 230, 1, 228, 312, 1, 610, 68, 1, 13];
int [] [] param0 = [[7, 12, 16, 23, 26, 27, 39, 39, 40, 44, 57, 58, 77, 78, 81, 82, 84, 86, 91, 94, 94, 95, 97], [72, 38, -60, 98, -52, -38, -2, 94, 34... |
NEXT_HIGHER_NUMBER_WITH_SAME_NUMBER_OF_SET_BITS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [44, 77, 103, 6, 56, 25, 78, 49, 86, 61];
int [] param0 = [42, 75, 94, 5, 52, 22, 77, 44, 85, 59];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == ... |
PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1 | 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 = [[6, 8, 8, 16, 19, 19, 21, 23, 26, 33, 34, 36, 38, 39, 41, 41, 45, 47, 52, 52, 55, 57, 60, 60, 60, 61, 69, 6... |
NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [47905, 30856, 47905, 34220, 4, 147440, 84, 560, 91881, 105995];
int [] param0 = [67, 58, 67, 60, 4, 97, 9, 16, 83, 87];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
... |
FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [610, 7952, 0, 50904, 31016, 0, 2307, 492, 0, 0];
int [] [] param0 = [[7, 9, 22, 68], [24, 40, 98, 58, -24, 24, 76, 48, -92, -16, -46, -48, -70, 88, 66, 2, 44, 36, 34, 34, 46, 90, -80, -24, -58, ... |
FIND_THE_ELEMENT_THAT_APPEARS_ONCE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [72, -28, 1, 25, 104, 0, 10, 34, 0, 1];
int [] [] param0 = [[7, 26, 26, 48, 59, 62, 66, 70, 72, 75, 76, 81, 97, 98], [-42, -48, -64, -74, 56, -34, 20, 16, 34, -84, 86, 38, 56, -86, 30, -74, -96, ... |
SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [64, 32, 64, 64, 128, 128, 32, 64, 64, 32];
int [] param0 = [60, 20, 33, 34, 68, 79, 20, 41, 36, 17];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] ... |
NUMBER_DIGITS_PRODUCT_TWO_NUMBERS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [4, 4, 4, 4, 4, 3, 3, 4, 3, 4];
int [] param0 = [86, 81, 48, 64, 56, 5, 25, 94, 5, 46];
int [] param1 = [39, 87, 84, 80, 20, 70, 13, 83, 55, 46];
int n_success = 0;
for (int i = 0; ... |
TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [14307150, 715, 24310, 48620, 220, 1307504, 2002, 293930, 11440, 167960];
int [] param0 = [21, 4, 8, 9, 3, 15, 5, 12, 7, 11];
int n_success = 0;
for (int i = 0; i < param0.length; i++) ... |
RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [57, 93, 19, 27, 32, 41, 104, 27, 13, 57];
int [] param0 = [50, 83, 18, 24, 31, 38, 94, 24, 13, 53];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] =... |
PERMUTE_TWO_ARRAYS_SUM_EVERY_PAIR_GREATER_EQUAL_K | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [true, false, false, true, false, false, true, false, false, true];
int [] [] param0 = [[99, 97, 90, 88, 87, 70, 52, 52, 43, 40, 27, 25, 16, 12, 9], [94, 92, 92, 88, 74, 72, 70, 56, 42, 42, 30, ... |
SUM_FIBONACCI_NUMBERS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [88, 12, 33, 2, 4, 609, 232, 143, 20, 7];
int [] param0 = [9, 5, 7, 2, 3, 13, 11, 10, 6, 4];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_fill... |
GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [true, false, true, false, true, false, false, false, false, false];
int [] [] param0 = [[3, 8, 10, 15, 18, 19, 20, 20, 21, 22, 26, 30, 32, 34, 43, 45, 50, 50, 51, 52, 53, 56, 57, 58, 62, 63, 65... |
PRODUCT_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [72, 15, 35, 0, 1, 1, 9, 0, 1, 1];
string [] param0 = ["(0(5(6()())(4()(9()())))(7(1()())(3()())))", "(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))", "(0(5(6()())(4()(9()())))(7(1()())(3()())... |
NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [0, 1, 3, 0, 1, 15, 0, 0, 21, 0];
string [] param0 = ["ogiokjf", "517376", "11", "ze", "8763644247018", "00111010001", "hgwkbkuovu", "652", "101000011110", "kvdpg "];
int n_success = 0;
... |
CHECK_IF_STRING_REMAINS_PALINDROME_AFTER_REMOVING_GIVEN_NUMBER_OF_CHARACTERS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [true, false, false, true, false, true, false, false, false, true];
string [] param0 = ["zcoqhum", "7437725", "11", "buglvr", "9", "101101010110", "yguim", "8198", "11101", "huinqjxndbfp"];
... |
FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [536870912, 67108864, 8388608, 1048576, 131072, 16384, 2048, 256, 32, 4];
int [] param0 = [30, 27, 24, 21, 18, 15, 12, 9, 6, 3];
int n_success = 0;
for (int i = 0; i < param0.length; i+... |
NEXT_POWER_OF_2_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [8, 128, 32, 64, 32, 2, 8, 128, 32, 8];
int [] param0 = [8, 79, 31, 63, 18, 2, 6, 85, 29, 8];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_fil... |
MAXIMUM_DISTANCE_TWO_OCCURRENCES_ELEMENT_ARRAY | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [1, 30, 10, 0, 0, 28, 1, 0, 20, 0];
int [] [] param0 = [[1, 20, 25, 28, 29, 31, 34, 35, 38, 39, 41, 43, 46, 55, 56, 60, 65, 66, 74, 77, 79, 80, 81, 83, 84, 88, 88, 88, 90, 91, 99], [26, 14, 56, 8... |
MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [19, 130, 661, 43, 778, 1096, 28, 479, 413, 51];
int [] [] param0 = [[3, 7, 27, 32, 36, 37, 44, 48, 50, 64, 86], [-22, 6, -20, 60, -74, 98, 52, -22], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... |
COUNT_DIGITS_FACTORIAL_SET_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [93, 4, 74, 44, 112, 14, 15, 149, 102, 139];
int [] param0 = [66, 7, 55, 37, 76, 16, 17, 95, 71, 90];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] ... |
MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [93, -834, 5, 359, -1152, 1, 28, -314, 1, 397];
int [] [] param0 = [[5, 17, 25, 27, 29, 30, 34, 49, 72, 75, 90, 93, 93, 94], [-70, -32, 62, 0, -10, 92, -94, -86, 52, 6, -26, -92, -10, 70, -82, 28... |
STACK_PERMUTATIONS_CHECK_IF_AN_ARRAY_IS_STACK_PERMUTATION_OF_OTHER | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [false, false, false, false, false, false, false, true, false, false];
int [] [] param0 = [[2, 3, 3, 3, 4, 5, 6, 9, 18, 20, 35, 39, 39, 45, 50, 55, 57, 61, 63, 65, 72, 73, 77, 77, 78, 87, 88, 91... |
COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [22, 33, 47, 34, 22, 90, 46, 44, 14, 60];
int [] param0 = [1, 6, 75, 51, 19, 82, 72, 48, 12, 41];
int [] param1 = [44, 61, 20, 17, 25, 98, 21, 41, 17, 80];
int n_success = 0;
for (i... |
COUNT_NUMBER_PAIRS_N_B_N_GCD_B_B | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [52, 326, 170, 231, 267, 74, 52, 300, 66, 103];
int [] param0 = [17, 72, 43, 55, 62, 22, 17, 68, 20, 29];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results... |
ADD_1_TO_A_GIVEN_NUMBER_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [21, 69, 53, 62, 4, 89, 42, 79, 95, 19];
int [] param0 = [20, 68, 52, 61, 3, 88, 41, 78, 94, 18];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f... |
C_PROGRAM_FACTORIAL_NUMBER | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600];
int [] param0 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
int n_success = 0;
for (int i = 0; i < param0.length... |
COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [2, 7, 81, 10609, 181997601];
int [] param0 = [2, 4, 8, 16, 32];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_filled(param0[i])) {
... |
FIND_REPETITIVE_ELEMENT_1_N_1_2 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [52, 46, 1, 28, -32, 16, 25, 103, 21, 9];
int [] [] param0 = [[2, 2, 4, 5, 5, 7, 7, 7, 8, 11, 14, 15, 18, 19, 20, 25, 25, 29, 29, 31, 32, 32, 33, 38, 42, 48, 52, 55, 60, 61, 63, 71, 74, 78, 82, 8... |
LONGEST_REPEATED_SUBSEQUENCE_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
string [] results = ["x", "7733007", "0000111111", "", "", "10", "", "", "0000010", ""];
string [] param0 = ["qnqxjorx", "27473733400077", "000010111111", "tnvwgrwslu", "9537", "1100", "lycoiqfzn", "52", "0010000... |
FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [true, true, true, false, false, true, false, false, true, false];
int [] [] param0 = [[7, 10, 10, 10, 13, 17, 23, 24, 25, 28, 30, 33, 37, 49, 49, 50, 57, 60, 60, 63, 63, 64, 65, 65, 72, 81, 84,... |
NUMBER_N_DIGIT_STEPPING_NUMBERS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
long [] results = [17, 116, 424, 2986, 61, 1556, 32, 5721, 10982, 222];
int [] param0 = [2, 5, 7, 10, 4, 9, 3, 11, 12, 6];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results... |
GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [0, 0, 0, 0, 4, 0, 1, 0, 0, 0];
int [] [] param0 = [[24, 54], [68, -30, -18, -6, 70, -40, 86, 98, -24, -48], [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... |
ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [33, 14, 7, 4, 64, 1, 14, 26, 1, 1];
int [] [] param0 = [[2, 5, 5, 9, 10, 10, 11, 14, 23, 27, 31, 32, 33, 33, 33, 37, 39, 41, 41, 42, 42, 43, 47, 60, 61, 68, 73, 73, 73, 78, 80, 80, 82, 83, 86, 8... |
PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
float [] results = [226045593884.95786, -39040194699.58562, 2931270907.5877957, -15863477478.565292, 340504220608.1437, -23882990818.874195, 45359252560.89365, -7495479637.450533, 610364933.1115178, -92632540179.4211... |
MINIMUM_COST_CUT_BOARD_SQUARES | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [87730, -1800, 119, 21597, -28058, 341, 243, -41332, 7, 4707];
int [] [] param0 = [[98, 97, 93, 90, 90, 87, 87, 87, 83, 77, 75, 73, 70, 70, 69, 67, 67, 61, 60, 59, 58, 58, 56, 53, 52, 46, 46, 44,... |
CHECK_GIVEN_STRING_ROTATION_PALINDROME | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [true, false, true, false, false, false, true, false, false, false];
string [] param0 = ["aadaa", "2674377254", "11", "0011000", "26382426486138", "111010111010", "abccba", "5191", "1110101101",... |
MEDIAN_OF_TWO_SORTED_ARRAYS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [39, 22, 0, 84, -12, 0, 56, 94, 0, 67];
int [] [] param0 = [[2, 6, 18, 21, 23, 27, 44, 44, 69, 72, 78, 88, 90, 98], [90, 54, 24, -10, -84, -74, 58, 96, -28, -92, -18, 90, 70, -60, 72, 78, 10, 42,... |
K_TH_DIGIT_RAISED_POWER_B | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [1, 9, 6, 0, 0, 0, 5, 2, 0, 0];
int [] param0 = [11, 41, 5, 1, 24, 5, 66, 7, 77, 60];
int [] param1 = [2, 3, 4, 2, 1, 2, 5, 10, 2, 2];
int [] param2 = [1, 3, 3, 4, 5, 3, 8, 3, 10, 1];
... |
COUNT_OF_PAIRS_SATISFYING_THE_GIVEN_CONDITION | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [31, 72, 23, 42, 0, 0, 33, 94, 60, 11];
int [] param0 = [31, 72, 23, 42, 13, 93, 33, 94, 60, 11];
int [] param1 = [91, 85, 49, 32, 7, 5, 32, 76, 60, 26];
int n_success = 0;
for (int... |
ADD_TWO_NUMBERS_WITHOUT_USING_ARITHMETIC_OPERATORS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [116, 61, 169, 78, 81, 62, 128, 41, 70, 120];
int [] param0 = [56, 17, 73, 75, 27, 61, 65, 22, 61, 97];
int [] param1 = [60, 44, 96, 3, 54, 1, 63, 19, 9, 23];
int n_success = 0;
for... |
COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [2, 1, 2, 1, 3, 5, 2, 0, 0, 0];
int [] [] param0 = [[16, 18, 24, 27, 34, 36, 41, 43, 43, 52, 59, 76, 86, 87, 90, 91, 94, 96, 98, 98], [64, 66, -36], [0, 0, 0], [9, 85, 34, 43, 70, 96, 44, 7, 27, ... |
SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [12, 7, 6, 17, -1, -1, 12, 7, 15, 13];
int [] param0 = [55, 35, 24, 75, 5, 7, 50, 28, 67, 59];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_fi... |
LONGEST_REPEATING_SUBSEQUENCE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [0, 3, 6, 1, 1, 0, 1, 3, 5, 0];
string [] param0 = ["jxzfz", "7648992235770", "11100000", "crn sgyjpsctj", "434", "1", "jrfziasbrpbz", "03779368305592", "1111000", "bkuluii"];
int n_success... |
REMOVE_ARRAY_END_ELEMENT_MAXIMIZE_SUM_PRODUCT | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [89, 2256, 32, 62, 52, 1, 24, -240, 1, 14];
int [] [] [] param0 = [[[23, 37, 54, 57, 59, 75, 97], [9, 15, 34, 39, 80, 96, 99], [15, 25, 26, 31, 43, 47, 93], [22, 31, 37, 44, 54, 62, 91], [7, 19, ... |
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_2 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [3, 0, 0, 0, 0, 0, 1, 1, 0, 0];
int [] [] param0 = [[5, 5, 7, 10, 14, 14, 17, 21, 32, 34, 37, 40, 40, 40, 46, 46, 50, 50, 51, 55, 57, 62, 65, 67, 67, 69, 70, 70, 72, 73, 76, 77, 77, 78, 84, 85, 8... |
FORM_MINIMUM_NUMBER_FROM_GIVEN_SEQUENCE_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
string [] results = ["21", "12", "321", "123", "21435", "126543", "321654798", "7654321", "21", "7654321"];
string [] param0 = ["d", "i", "dd", "ii", "didi", "iiddd", "ddiddiid", "176297", "1", "xhkhzq"];
in... |
COUNT_POSSIBLE_WAYS_TO_CONSTRUCT_BUILDINGS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [313679521, 45765225, 2550409, 974169, 54289, 20736, 1156, 441, 25, 9];
int [] param0 = [20, 18, 15, 14, 11, 10, 7, 6, 3, 2];
int n_success = 0;
for (int i = 0; i < param0.length; i++) ... |
TEMPLE_OFFERINGS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [78, 92, 17, 15, 0, 50, 106, 16, 19, 64];
int [] param0 = [12, 46, 16, 9, 0, 38, 28, 9, 18, 29];
int [] [] param1 = [[3, 11, 12, 15, 16, 21, 24, 29, 32, 39, 42, 44, 51, 68, 79, 81, 81, 85, 92... |
HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [110592, 5308416, 21233664, 82944, 1811939328, 5, 196608, 150994944, 1024, 84934656];
int [] param0 = [41, 55, 60, 40, 76, 5, 43, 67, 24, 65];
int n_success = 0;
for (int i = 0; i < par... |
CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [true, true, true, true, true, false, false, false, true, true];
string [] param0 = ["gilrzlims", "307471222", "110", "gcab", "113", "011110010", "wcwob", "74571582216153", "100000011", "ryperkz... |
FIND_LARGEST_PRIME_FACTOR_NUMBER | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
long [] results = [7, 2, 13, 13, 11, 5, 5, 37, 13, 5];
long [] param0 = [98, 8, 78, 65, 55, 10, 10, 37, 39, 15];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_f... |
CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
bool [] results = [true, true, false, true, true, true, false, false, false, false];
int [] param0 = [57, 3, 10, 10, 6, 2, 1, 20, 96, 25];
int [] param1 = [1, 9, 101, 10000, 46656, 2048, 40, 79, 98, 5];
... |
SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [23, 55, 29, 9, 22, 42, 26, 51, 1, 44];
int [] param0 = [23, 87, 35, 25, 93, 52, 95, 91, 75, 96];
int [] param1 = [98, 55, 90, 9, 22, 42, 88, 64, 1, 44];
int [] param2 = [25, 94, 29, 41, ... |
C_PROGRAM_FIND_LARGEST_ELEMENT_ARRAY_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [97, 84, 1, 92, 86, 1, 99, 86, 1, 98];
int [] [] param0 = [[10, 12, 14, 16, 17, 17, 20, 24, 26, 28, 37, 38, 41, 45, 49, 50, 59, 61, 63, 65, 65, 66, 69, 70, 70, 73, 73, 74, 81, 81, 83, 87, 94, 97]... |
COUNT_SUBARRAYS_EQUAL_NUMBER_1S_0S_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [0, 2, 14, 0, 0, 32, 0, 6, 7, 0];
int [] [] param0 = [[1, 6, 6, 9, 9, 9, 16, 18, 19, 20, 21, 22, 23, 26, 26, 28, 39, 40, 41, 43, 43, 44, 44, 45, 51, 51, 55, 59, 60, 62, 67, 67, 68, 69, 70, 71, 71... |
DYNAMIC_PROGRAMMING_SET_36_CUT_A_ROPE_TO_MAXIMIZE_PRODUCT_1 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [1162261467, 86093442, 6377292, 531441, 39366, 2916, 243, 18, 1];
int [] param0 = [57, 50, 43, 36, 29, 22, 15, 8, 1];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
... |
AREA_SQUARE_CIRCUMSCRIBED_CIRCLE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [392, 12168, 4050, 8712, 648, 2048, 7200, 512, 19602, 8450];
int [] param0 = [14, 78, 45, 66, 18, 32, 60, 16, 99, 65];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
... |
GOOGLE_CASE_GIVEN_SENTENCE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
string [] results = ["teyndweqza", "01865", "11001100", "czwznjmqet", "318305446", "0000001111110", "yzt", "38630230", "01101", "zoizi"];
string [] param0 = ["teyndweqza", "01865", "11001100", "czwznjmqet", "3183... |
NEXT_POWER_OF_2_2 | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [64, 128, 16, 8, 64, 128, 64, 128, 128, 32];
int [] param0 = [63, 78, 13, 5, 34, 69, 63, 78, 80, 19];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] ... |
DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [2, 4, 1, 3, 10, 2, 2, 6, 0, 9];
string [] param0 = ["ydydv", "4446057", "0111", "keej", "642861576557", "11111000101", "ram", "09773261", "1", "avbekclfdj"];
int n_success = 0;
for (in... |
LENGTH_LONGEST_STRICT_BITONIC_SUBSEQUENCE | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [0, 1, 1, 1, 1, 3, 4, 1, 2, 2];
int [] [] param0 = [[78], [-6, -18, -48, 58, -54, 76, 80, -56, 86, 58, -86, -86, -88, 32, 12, 58, 58, -16, 86, -24, 84, 86, 36, 18, 30, -32, -4, -36, -72, -4, 42, ... |
POSITION_OF_RIGHTMOST_SET_BIT | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [1, 2, 2, 5, 2, 1, 5, 1, 1, 1];
int [] param0 = [45, 26, 74, 80, 46, 67, 16, 87, 27, 17];
int n_success = 0;
for (int i = 0; i < param0.length; i++) {
if (results[i] == f_filled(... |
LOWER_INSERTION_POINT | import std.stdio;
import std.math;
import std.conv;
import std.algorithm;
//TOFILL//
void main(){
int [] results = [8, 14, 8, 0, 19, 12, 8, 2, 3, 0];
int [] [] param0 = [[1, 2, 5, 5, 16, 16, 20, 26, 32, 35, 39, 39, 41, 44, 48, 48, 51, 59, 59, 62, 66, 66, 70, 74, 75, 78, 80, 86, 86, 96], [-76, 80, -6, -2, 50, ... |
No dataset card yet