Dataset Viewer
Auto-converted to Parquet
type
stringclasses
4 values
content_without_mask
stringlengths
610
1.37M
content_masked
stringlengths
609
1.37M
label
stringclasses
362 values
options
sequencelengths
5
5
correct
stringclasses
5 values
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char str [] ) { int result = 0; int n = strlen(str); for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( abs ( str [ i ] - str [ j ] ) == abs ( i - j ) ) result ++; return result; } int f_filled ( char str [] ) {} r); for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( abs ( str [ i ] - str [ j ] ) == abs ( i - j ) ) result ++; return result; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"smnKL","270083","0","kcZdsz","483544224","000011","WysGCirMwKBzP","3366","110","NlaMkpCjUgg"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) [MASK] return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char str [] ) { int result = 0; int n = strlen(str); for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( abs ( str [ i ] - str [ j ] ) == abs ( i - j ) ) result ++; return result; } int f_filled ( char str [] ) {}r); for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( abs ( str [ i ] - str [ j ] ) == abs ( i - j ) ) result ++; return result; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"smnKL","270083","0","kcZdsz","483544224","000011","WysGCirMwKBzP","3366","110","NlaMkpCjUgg"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{
[ "a) {", "b) int", "c) res", "d) ,", "e) )" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int k ) { int cur = ( k * ( k - 1 ) ) + 1; int sum = 0; while ( k -- ) { sum += cur; cur += 2; } return sum; } int f_filled ( int k ) {} n, sizeof(int), cmpfunc);} int f_gold ( int k ) { int cur = ( k * ( k - 1 ) ) + 1; int sum = 0; while ( k -- ) { sum += cur; cur += 2; } return sum; } int f_filled ( int k ) {} int main(void) { int n_success = 0; int param0[] = {91,52,78,51,65,39,42,12,56,98}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include [MASK] #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int k ) { int cur = ( k * ( k - 1 ) ) + 1; int sum = 0; while ( k -- ) { sum += cur; cur += 2; } return sum; } int f_filled ( int k ) {}n, sizeof(int), cmpfunc);} int f_gold ( int k ) { int cur = ( k * ( k - 1 ) ) + 1; int sum = 0; while ( k -- ) { sum += cur; cur += 2; } return sum; } int f_filled ( int k ) {} int main(void) { int n_success = 0; int param0[] = {91,52,78,51,65,39,42,12,56,98}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
<math.h>
[ "a) <cstdlib>", "b) <math.h>", "c) hash", "d) n", "e) A" ]
b
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} float f_gold ( int a ) { float area = ( M_PI * a * a ) / 4.0; return area; } float f_filled ( int a ) {} f (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} float f_gold ( int a ) { float area = ( M_PI * a * a ) / 4.0; return area; } float f_filled ( int a ) {} int main(void) { int n_success = 0; int param0[] = {77,18,83,39,68,28,71,14,21,73}; for(int i = 0; i < len(param0); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} float f_gold ( int a ) { float area = ( M_PI * a * a [MASK] / 4.0; return area; } float f_filled ( int a ) {}f (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} float f_gold ( int a ) { float area = ( M_PI * a * a ) / 4.0; return area; } float f_filled ( int a ) {} int main(void) { int n_success = 0; int param0[] = {77,18,83,39,68,28,71,14,21,73}; for(int i = 0; i < len(param0); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
)
[ "a) )", "b) n", "c) (x1", "d) ans", "e) [" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr1 [ ], int arr2 [ ], int n ) { for ( int i = 0; i < n; i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return i; return n; } int f_filled ( int arr1 [ ], int arr2 [ ], int n ) {} t f_gold ( int arr1 [ ], int arr2 [ ], int n ) { for ( int i = 0; i < n; i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return i; return n; } int f_filled ( int arr1 [ ], int arr2 [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,6,7,10,11,12,12,16,17,29,32,33,35,35,45,49,52,56,57,58,61,62,63,64,68,71,71,77,79,79,81,82,82,83,83,89,89,93,94,94}; int param0_1[] = {-48,-92,96,-18,10,-24,-4,96,-16,-78,4,-80,-96,-28,-78,68,2,-60,0}; int param0_2[] = {1}; int param0_3[] = {68,98,21,29,71,49}; int param0_4[] = {-80,-76,-76,-76,-68,-66,-56,-44,-38,-28,-24,-10,8,14,16,18,24,26,30,32,50,64,76,80,90,94,94,94}; int param0_5[] = {0,0,1,0,1,0,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,1,0,1,0,1,1,1,0,1}; int param0_6[] = {3,7,16,17,20,22,29,32,34,34,35,40,40,40,41,46,49,58,60,62,63,64,64,68,70,73,76,79,83,86,90,92,99}; int param0_7[] = {18,-68,-6,-32,-76,-86,-8,76,-46,20,-80,54,-88,-58,-48,-66,-66,18,-28,-74,-72,-26,-92,-78,24,-22,-80,-80,82,-2,-72,-88,-54,-84,-8}; int param0_8[] = {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,1,1,1,1,1,1}; int param0_9[] = {74,75,52,58,34,53,51,45,34,28,53,94,10,20,23,12,95,78,48,11}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1_0[] = {3,12,13,14,15,17,18,19,22,24,28,29,33,37,41,42,44,49,51,51,52,53,56,56,59,60,64,64,67,70,71,78,83,88,88,90,92,93,93,95}; int param1_1[] = {-38,-40,-50,50,-26,-80,64,54,74,-44,-40,-92,-16,4,-60,-42,-60,-74,38}; int param1_2[] = {0}; int param1_3[] = {97,90,25,89,57,41}; int param1_4[] = {-90,-88,-66,-60,-48,-48,-46,-42,-40,-36,-26,-4,2,4,4,8,16,18,34,50,52,56,64,80,86,90,92,96}; int param1_5[] = {0,0,0,0,0,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,1}; int param1_6[] = {4,4,7,13,23,23,25,25,26,34,38,39,39,45,48,50,52,54,58,59,60,65,72,76,80,80,80,84,87,90,92,94,96}; int param1_7[] = {-30,96,92,-12,-14,-68,-16,20,74,-42,36,84,-82,66,44,70,-92,-56,-28,-68,-4,10,-4,90,72,84,68,14,32,60,40,60,-34,58,-56}; int param1_8[] = {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,1,1,1,1,1,1}; int param1_9[] = {62,56,17,1,11,30,59,18,99,21,86,49,24,85,25,56,21,66,23,96}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {36,16,0,3,14,22,26,17,24,17}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ [MASK] int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr1 [ ], int arr2 [ ], int n ) { for ( int i = 0; i < n; i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return i; return n; } int f_filled ( int arr1 [ ], int arr2 [ ], int n ) {}t f_gold ( int arr1 [ ], int arr2 [ ], int n ) { for ( int i = 0; i < n; i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return i; return n; } int f_filled ( int arr1 [ ], int arr2 [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,6,7,10,11,12,12,16,17,29,32,33,35,35,45,49,52,56,57,58,61,62,63,64,68,71,71,77,79,79,81,82,82,83,83,89,89,93,94,94}; int param0_1[] = {-48,-92,96,-18,10,-24,-4,96,-16,-78,4,-80,-96,-28,-78,68,2,-60,0}; int param0_2[] = {1}; int param0_3[] = {68,98,21,29,71,49}; int param0_4[] = {-80,-76,-76,-76,-68,-66,-56,-44,-38,-28,-24,-10,8,14,16,18,24,26,30,32,50,64,76,80,90,94,94,94}; int param0_5[] = {0,0,1,0,1,0,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,1,0,1,0,1,1,1,0,1}; int param0_6[] = {3,7,16,17,20,22,29,32,34,34,35,40,40,40,41,46,49,58,60,62,63,64,64,68,70,73,76,79,83,86,90,92,99}; int param0_7[] = {18,-68,-6,-32,-76,-86,-8,76,-46,20,-80,54,-88,-58,-48,-66,-66,18,-28,-74,-72,-26,-92,-78,24,-22,-80,-80,82,-2,-72,-88,-54,-84,-8}; int param0_8[] = {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,1,1,1,1,1,1}; int param0_9[] = {74,75,52,58,34,53,51,45,34,28,53,94,10,20,23,12,95,78,48,11}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1_0[] = {3,12,13,14,15,17,18,19,22,24,28,29,33,37,41,42,44,49,51,51,52,53,56,56,59,60,64,64,67,70,71,78,83,88,88,90,92,93,93,95}; int param1_1[] = {-38,-40,-50,50,-26,-80,64,54,74,-44,-40,-92,-16,4,-60,-42,-60,-74,38}; int param1_2[] = {0}; int param1_3[] = {97,90,25,89,57,41}; int param1_4[] = {-90,-88,-66,-60,-48,-48,-46,-42,-40,-36,-26,-4,2,4,4,8,16,18,34,50,52,56,64,80,86,90,92,96}; int param1_5[] = {0,0,0,0,0,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,1}; int param1_6[] = {4,4,7,13,23,23,25,25,26,34,38,39,39,45,48,50,52,54,58,59,60,65,72,76,80,80,80,84,87,90,92,94,96}; int param1_7[] = {-30,96,92,-12,-14,-68,-16,20,74,-42,36,84,-82,66,44,70,-92,-56,-28,-68,-4,10,-4,90,72,84,68,14,32,60,40,60,-34,58,-56}; int param1_8[] = {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,1,1,1,1,1,1}; int param1_9[] = {62,56,17,1,11,30,59,18,99,21,86,49,24,85,25,56,21,66,23,96}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {36,16,0,3,14,22,26,17,24,17}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
],
[ "a) =", "b) ==", "c) {}", "d) table", "e) ]," ]
e
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int size ) { int max_so_far = a [ 0 ]; int curr_max = a [ 0 ]; for ( int i = 1; i < size; i ++ ) { curr_max = max ( a [ i ], curr_max + a [ i ] ); max_so_far = max ( max_so_far, curr_max ); } return max_so_far; } int f_filled ( int a [ ], int size ) {} i = 1; i < size; i ++ ) { curr_max = max ( a [ i ], curr_max + a [ i ] ); max_so_far = max ( max_so_far, curr_max ); } return max_so_far; } int f_filled ( int a [ ], int size ) {} int main(void) { int n_success = 0; int param0_0[] = {1,3,4,7,8,8,10,12,16,19,19,20,20,21,21,22,26,27,29,34,36,38,38,39,41,43,44,47,47,49,57,57,60,62,63,65,75,77,77,78,81,82,82,83,83,84,85,98,99}; int param0_1[] = {-40,14,2,-70,86,-90,-50,-54,-2,90,30}; int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {60,69,41,7,77,36,36,26,35,30,64,75,3,35,60,71,29,47,15,29,43,88,56,22,9,45,40,50,52}; int param0_4[] = {-96,-88,-80,-72,-64,-64,-60,-60,-60,-58,-56,-54,-54,-50,-50,-26,-26,-24,-20,-8,-2,0,4,4,12,14,18,18,24,32,42,44,44,44,48,50,50,56,60,60,70,80,88,88,90,98}; int param0_5[] = {0,1,1,0,0,1,1,1,0,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,1,1,0,0,0,1,1,1,0}; int param0_6[] = {2,4,4,5,6,7,11,12,14,18,23,24,27,28,33,36,37,38,39,40,41,41,48,48,52,61,64,66,66,77,79,82,85,88,91,94,99}; int param0_7[] = {-56,0,16,12,20,36,32,-52,-68,-36,-96,-46,-34,56,2,78,6,30,-68,-48,2,44,-26,-36,-30,-20,-90,-66,4,94,8,4,-4,-32,-24}; int param0_8[] = {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,1}; int param0_9[] = {39,87,27,89,26,25,80,82,21,25,55,27,20,81,47,79,26,72,10,11,90,89}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {38,10,18,25,35,22,34,20,22,21}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) [MASK] sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int size ) { int max_so_far = a [ 0 ]; int curr_max = a [ 0 ]; for ( int i = 1; i < size; i ++ ) { curr_max = max ( a [ i ], curr_max + a [ i ] ); max_so_far = max ( max_so_far, curr_max ); } return max_so_far; } int f_filled ( int a [ ], int size ) {}i = 1; i < size; i ++ ) { curr_max = max ( a [ i ], curr_max + a [ i ] ); max_so_far = max ( max_so_far, curr_max ); } return max_so_far; } int f_filled ( int a [ ], int size ) {} int main(void) { int n_success = 0; int param0_0[] = {1,3,4,7,8,8,10,12,16,19,19,20,20,21,21,22,26,27,29,34,36,38,38,39,41,43,44,47,47,49,57,57,60,62,63,65,75,77,77,78,81,82,82,83,83,84,85,98,99}; int param0_1[] = {-40,14,2,-70,86,-90,-50,-54,-2,90,30}; int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {60,69,41,7,77,36,36,26,35,30,64,75,3,35,60,71,29,47,15,29,43,88,56,22,9,45,40,50,52}; int param0_4[] = {-96,-88,-80,-72,-64,-64,-60,-60,-60,-58,-56,-54,-54,-50,-50,-26,-26,-24,-20,-8,-2,0,4,4,12,14,18,18,24,32,42,44,44,44,48,50,50,56,60,60,70,80,88,88,90,98}; int param0_5[] = {0,1,1,0,0,1,1,1,0,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,1,1,0,0,0,1,1,1,0}; int param0_6[] = {2,4,4,5,6,7,11,12,14,18,23,24,27,28,33,36,37,38,39,40,41,41,48,48,52,61,64,66,66,77,79,82,85,88,91,94,99}; int param0_7[] = {-56,0,16,12,20,36,32,-52,-68,-36,-96,-46,-34,56,2,78,6,30,-68,-48,2,44,-26,-36,-30,-20,-90,-66,4,94,8,4,-4,-32,-24}; int param0_8[] = {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,1}; int param0_9[] = {39,87,27,89,26,25,80,82,21,25,55,27,20,81,47,79,26,72,10,11,90,89}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {38,10,18,25,35,22,34,20,22,21}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
/
[ "a) /", "b) )", "c) return", "d) n,", "e) class" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( unsigned int n ) { bool parity = 0; while ( n ) { parity = ! parity; n = n & ( n - 1 ); } return parity; } bool f_filled ( unsigned int n ) {} zeof(int), cmpfunc);} bool f_gold ( unsigned int n ) { bool parity = 0; while ( n ) { parity = ! parity; n = n & ( n - 1 ); } return parity; } bool f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {63,64,85,36,20,63,42,19,62,97}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) [MASK] return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( unsigned int n ) { bool parity = 0; while ( n ) { parity = ! parity; n = n & ( n - 1 ); } return parity; } bool f_filled ( unsigned int n ) {}zeof(int), cmpfunc);} bool f_gold ( unsigned int n ) { bool parity = 0; while ( n ) { parity = ! parity; n = n & ( n - 1 ); } return parity; } bool f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {63,64,85,36,20,63,42,19,62,97}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{
[ "a) ]", "b) <", "c) {", "d) int", "e) 1" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_set < int > us; int even_count = 0; for ( int i = 0; i < n; i ++ ) if ( arr [ i ] % 2 == 0 ) us . insert ( arr [ i ] ); unordered_set < int > :: iterator itr; for ( itr = us . begin ( ); itr != us . end ( ); itr ++ ) even_count ++; return ( pow ( 2, even_count ) - 1 ); } int f_filled ( int arr [ ], int n ) {} rdered_set < int > :: iterator itr; for ( itr = us . begin ( ); itr != us . end ( ); itr ++ ) even_count ++; return ( pow ( 2, even_count ) - 1 ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,8,14,22,24,24,26,32,33,46,50,51,51,52,53,71,76,93}; int param0_1[] = {-62,30,12,30,22,6,-42,80,-62,34,32,-72,-6,-16,42,82,-78,-20,-96,44,-24,-50,-50,-94,72,-90,38,84,-86,-24,-62,86,94,6,90,12,-36,0,44,4,-78,-86,-12,-18,26,32,90,76}; int param0_2[] = {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,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {70,55,67,9,78,57,31,25}; int param0_4[] = {-98,-90,-80,-80,-68,-68,-50,-44,-38,-34,-18,-16,-10,-8,14,14,16,24,26,28,30,40,44,46,52,54,58,66,74,74,74,76,80,86,94,96}; int param0_5[] = {0,1,1,0,1,0,0,1,0,0,1,1,1,1,0,0,0,0,0,1}; int param0_6[] = {7,10,11,13,14,16,20,26,30,31,33,33,35,39,42,50,51,52,55,57,58,59,62,63,63,65,67,67,68,69,69,71,73,73,74,76,82,86,87,87,87,88,94,99}; int param0_7[] = {-6,8,-14,2,-36,-44,-50,-4,-4,-22,94,-94,-62,4,-84,-82,88,84,28,76,-84,-72,14,-28,96,18,-56,-96,2,-66,62,-78,88,34,0,-48,-76,-84,-2,-98,58,38,56}; int param0_8[] = {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,1,1,1,1,1,1}; int param0_9[] = {75,92,42,5,53,78,42,97,99,56,23,16,90,1,79,49,63,95,12,21,82,31,10,35,34,80,22,73,68,68,48,11,15,60,24,57,74,18,30,57,66,97,78,65,79}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {16,47,32,6,30,11,39,23,17,29}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; [MASK] int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_set < int > us; int even_count = 0; for ( int i = 0; i < n; i ++ ) if ( arr [ i ] % 2 == 0 ) us . insert ( arr [ i ] ); unordered_set < int > :: iterator itr; for ( itr = us . begin ( ); itr != us . end ( ); itr ++ ) even_count ++; return ( pow ( 2, even_count ) - 1 ); } int f_filled ( int arr [ ], int n ) {}rdered_set < int > :: iterator itr; for ( itr = us . begin ( ); itr != us . end ( ); itr ++ ) even_count ++; return ( pow ( 2, even_count ) - 1 ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,8,14,22,24,24,26,32,33,46,50,51,51,52,53,71,76,93}; int param0_1[] = {-62,30,12,30,22,6,-42,80,-62,34,32,-72,-6,-16,42,82,-78,-20,-96,44,-24,-50,-50,-94,72,-90,38,84,-86,-24,-62,86,94,6,90,12,-36,0,44,4,-78,-86,-12,-18,26,32,90,76}; int param0_2[] = {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,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {70,55,67,9,78,57,31,25}; int param0_4[] = {-98,-90,-80,-80,-68,-68,-50,-44,-38,-34,-18,-16,-10,-8,14,14,16,24,26,28,30,40,44,46,52,54,58,66,74,74,74,76,80,86,94,96}; int param0_5[] = {0,1,1,0,1,0,0,1,0,0,1,1,1,1,0,0,0,0,0,1}; int param0_6[] = {7,10,11,13,14,16,20,26,30,31,33,33,35,39,42,50,51,52,55,57,58,59,62,63,63,65,67,67,68,69,69,71,73,73,74,76,82,86,87,87,87,88,94,99}; int param0_7[] = {-6,8,-14,2,-36,-44,-50,-4,-4,-22,94,-94,-62,4,-84,-82,88,84,28,76,-84,-72,14,-28,96,18,-56,-96,2,-66,62,-78,88,34,0,-48,-76,-84,-2,-98,58,38,56}; int param0_8[] = {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,1,1,1,1,1,1}; int param0_9[] = {75,92,42,5,53,78,42,97,99,56,23,16,90,1,79,49,63,95,12,21,82,31,10,35,34,80,22,73,68,68,48,11,15,60,24,57,74,18,30,57,66,97,78,65,79}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {16,47,32,6,30,11,39,23,17,29}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
}
[ "a) ;", "b) (", "c) -", "d) <stdio.h>", "e) }" ]
e
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int nCr = 1, res = 1; for ( int r = 1; r <= n; r ++ ) { nCr = ( nCr * ( n + 1 - r ) ) / r; res += nCr * nCr; } return res; } int f_filled ( int n ) {} int f_gold ( int n ) { int nCr = 1, res = 1; for ( int r = 1; r <= n; r ++ ) { nCr = ( nCr * ( n + 1 - r ) ) / r; res += nCr * nCr; } return res; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {52,75,25,80,18,17,33,8,99,8}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, [MASK] y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int nCr = 1, res = 1; for ( int r = 1; r <= n; r ++ ) { nCr = ( nCr * ( n + 1 - r ) ) / r; res += nCr * nCr; } return res; } int f_filled ( int n ) {} int f_gold ( int n ) { int nCr = 1, res = 1; for ( int r = 1; r <= n; r ++ ) { nCr = ( nCr * ( n + 1 - r ) ) / r; res += nCr * nCr; } return res; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {52,75,25,80,18,17,33,8,99,8}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) ]", "b) :", "c) int", "d) std;", "e) ]" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int num ) { if ( num < 0 ) return false; int c = ( - 2 * num ); int b = 1, a = 1; int d = ( b * b ) - ( 4 * a * c ); if ( d < 0 ) return false; float root1 = ( - b + sqrt ( d ) ) / ( 2 * a ); float root2 = ( - b - sqrt ( d ) ) / ( 2 * a ); if ( root1 > 0 && floor ( root1 ) == root1 ) return true; if ( root2 > 0 && floor ( root2 ) == root2 ) return true; return false; } bool f_filled ( int num ) {} - sqrt ( d ) ) / ( 2 * a ); if ( root1 > 0 && floor ( root1 ) == root1 ) return true; if ( root2 > 0 && floor ( root2 ) == root2 ) return true; return false; } bool f_filled ( int num ) {} int main(void) { int n_success = 0; int param0[] = {1,3,6,10,55,48,63,72,16,85}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int num ) { if ( num < 0 ) return false; int c = ( - 2 * num ); int b = 1, a = 1; int d = ( b * b ) - ( 4 * a * c ); if ( d < 0 ) return false; float root1 = ( - b + sqrt ( d ) ) / ( 2 * a ); float root2 = ( - b - sqrt ( d ) ) / ( 2 * a ); if ( root1 > [MASK] && floor ( root1 ) == root1 ) return true; if ( root2 > 0 && floor ( root2 ) == root2 ) return true; return false; } bool f_filled ( int num ) {} - sqrt ( d ) ) / ( 2 * a ); if ( root1 > 0 && floor ( root1 ) == root1 ) return true; if ( root2 > 0 && floor ( root2 ) == root2 ) return true; return false; } bool f_filled ( int num ) {} int main(void) { int n_success = 0; int param0[] = {1,3,6,10,55,48,63,72,16,85}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
0
[ "a) ++", "b) x", "c) 0", "d) int", "e) 2" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int l, int r, int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2; if ( arr [ mid ] == x ) return mid; if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 1, x ); return f_gold ( arr, mid + 1, r, x ); } return - 1; } int f_filled ( int arr [ ], int l, int r, int x ) {} x ) return mid; if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 1, x ); return f_gold ( arr, mid + 1, r, x ); } return - 1; } int f_filled ( int arr [ ], int l, int r, int x ) {} int main(void) { int n_success = 0; int param0_0[] = {3,4,4,8,9,13,13,15,18,27,30,32,42,48,50,52,56,66,69,69,77,84,84,93}; int param0_1[] = {52,-58,-22,-80,44,-52,-34,94,-34,-74,42,60,-62,70,98,32,10,94,26,56,-48,-50,42,2,46,28,-68,-16,-96,-12,66,-46,74,-60,-52,28,-92,-78,32,28,16,34,30,-60,-14}; int param0_2[] = {0,1}; int param0_3[] = {28,84,40,81}; int param0_4[] = {-66,-62,-60,-56,-56,-2,40,44,50,74,82,94}; int param0_5[] = {1,0,0,0,0,1,0,1,0,1,1}; int param0_6[] = {15,26,31,36,36,61,68,72,75,79,82,98}; int param0_7[] = {0,-82,-94,48,48,-96,14,66,76,-30,86,28,-28,-66,-64,92,-94,-66,86,26,8,94,-82,-80,4,-26,76,-46,72,88,-6,8,-30,40,-88,2,-40,-98,-22,-20,4,-12,54,-20,-36,12}; int param0_8[] = {0,0,0,0,0,0,0,1,1,1,1,1,1}; int param0_9[] = {81,47}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {19,40,1,2,8,7,6,38,12,1}; int param2[] = {12,35,1,2,6,7,7,33,10,1}; int param3[] = {22,44,1,2,8,10,8,39,6,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int l, int r, int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2; if ( arr [ mid ] == x ) return mid; if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - [MASK] x ); return f_gold ( arr, mid + 1, r, x ); } return - 1; } int f_filled ( int arr [ ], int l, int r, int x ) {}x ) return mid; if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 1, x ); return f_gold ( arr, mid + 1, r, x ); } return - 1; } int f_filled ( int arr [ ], int l, int r, int x ) {} int main(void) { int n_success = 0; int param0_0[] = {3,4,4,8,9,13,13,15,18,27,30,32,42,48,50,52,56,66,69,69,77,84,84,93}; int param0_1[] = {52,-58,-22,-80,44,-52,-34,94,-34,-74,42,60,-62,70,98,32,10,94,26,56,-48,-50,42,2,46,28,-68,-16,-96,-12,66,-46,74,-60,-52,28,-92,-78,32,28,16,34,30,-60,-14}; int param0_2[] = {0,1}; int param0_3[] = {28,84,40,81}; int param0_4[] = {-66,-62,-60,-56,-56,-2,40,44,50,74,82,94}; int param0_5[] = {1,0,0,0,0,1,0,1,0,1,1}; int param0_6[] = {15,26,31,36,36,61,68,72,75,79,82,98}; int param0_7[] = {0,-82,-94,48,48,-96,14,66,76,-30,86,28,-28,-66,-64,92,-94,-66,86,26,8,94,-82,-80,4,-26,76,-46,72,88,-6,8,-30,40,-88,2,-40,-98,-22,-20,4,-12,54,-20,-36,12}; int param0_8[] = {0,0,0,0,0,0,0,1,1,1,1,1,1}; int param0_9[] = {81,47}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {19,40,1,2,8,7,6,38,12,1}; int param2[] = {12,35,1,2,6,7,7,33,10,1}; int param3[] = {22,44,1,2,8,10,8,39,6,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
1,
[ "a) 1,", "b) import", "c) class", "d) sort", "e) sum" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int x, int y, int z ) { if ( ! ( y / x ) ) return ( ! ( y / z ) ) ? y : z; return ( ! ( x / z ) ) ? x : z; } int f_filled ( int x, int y, int z ) {} , n, sizeof(int), cmpfunc);} int f_gold ( int x, int y, int z ) { if ( ! ( y / x ) ) return ( ! ( y / z ) ) ? y : z; return ( ! ( x / z ) ) ? x : z; } int f_filled ( int x, int y, int z ) {} int main(void) { int n_success = 0; int param0[] = {48,11,50,21,94,22,3,67,59,50}; int param1[] = {63,55,89,71,39,44,41,62,2,11}; int param2[] = {56,84,96,74,42,86,68,94,83,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; [MASK] int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int x, int y, int z ) { if ( ! ( y / x ) ) return ( ! ( y / z ) ) ? y : z; return ( ! ( x / z ) ) ? x : z; } int f_filled ( int x, int y, int z ) {}, n, sizeof(int), cmpfunc);} int f_gold ( int x, int y, int z ) { if ( ! ( y / x ) ) return ( ! ( y / z ) ) ? y : z; return ( ! ( x / z ) ) ? x : z; } int f_filled ( int x, int y, int z ) {} int main(void) { int n_success = 0; int param0[] = {48,11,50,21,94,22,3,67,59,50}; int param1[] = {63,55,89,71,39,44,41,62,2,11}; int param2[] = {56,84,96,74,42,86,68,94,83,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
}
[ "a) (", "b) f_gold", "c) (", "d) }", "e) std;" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_map < int, int > mp; for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; for ( int i = 0; i < n; i ++ ) if ( mp [ arr [ i ] ] == 1 ) return arr [ i ]; return - 1; } int f_filled ( int arr [ ], int n ) {} for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; for ( int i = 0; i < n; i ++ ) if ( mp [ arr [ i ] ] == 1 ) return arr [ i ]; return - 1; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {6,7,14,18,18,18,21,25,28,38,40,42,42,45,48,50,50,50,53,54,58,59,62,65,65,66,67,68,69,73,74,76,77,83,84,85,87}; int param0_1[] = {24,-84,86,-50,60,-36,92,70,84,40,-8,74,-24,-38,98,40,-78,-36,38,-22,-98,82,-22,80,-80,-62,16,-46,18,64,16,2,24,-92,-46,42,38,8,72,8,14,-68,18,16,-82,8,58,-2}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_3[] = {59,77,13,49,90}; int param0_4[] = {-80,-76,-66,-60,-44,-42,-38,-36,-32,-30,-24,-18,-6,2,4,14,32,42,54,70,92,98}; int param0_5[] = {0,0,0,0,1,0,1,0,0,1,0,0,0,1,0,1,1,1,0,1,0,1,0,1,1,0,0,1,1,1,1,0,0,0,0,0,0,0}; int param0_6[] = {6,22,24,27,29,30,35,42,57,59,59,63,71,73,76,98}; int param0_7[] = {-82,-48,36}; int param0_8[] = {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,1,1,1,1}; int param0_9[] = {88,49,13,64,30,60,26,55,55,97,98,69,72,72,79,59,46,87,76,61,87,12,91,8,34,15,93,64,83,33,69,58,32,14,72,67,25,7,55,21,12,78,63}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {33,25,16,2,12,33,13,1,35,24}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_map < int, int > mp; for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; for ( int i = 0; i < n; i ++ ) if ( mp [ arr [ i ] ] == 1 ) return arr [ i ]; return - 1; } int f_filled ( [MASK] arr [ ], int n ) {} for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; for ( int i = 0; i < n; i ++ ) if ( mp [ arr [ i ] ] == 1 ) return arr [ i ]; return - 1; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {6,7,14,18,18,18,21,25,28,38,40,42,42,45,48,50,50,50,53,54,58,59,62,65,65,66,67,68,69,73,74,76,77,83,84,85,87}; int param0_1[] = {24,-84,86,-50,60,-36,92,70,84,40,-8,74,-24,-38,98,40,-78,-36,38,-22,-98,82,-22,80,-80,-62,16,-46,18,64,16,2,24,-92,-46,42,38,8,72,8,14,-68,18,16,-82,8,58,-2}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_3[] = {59,77,13,49,90}; int param0_4[] = {-80,-76,-66,-60,-44,-42,-38,-36,-32,-30,-24,-18,-6,2,4,14,32,42,54,70,92,98}; int param0_5[] = {0,0,0,0,1,0,1,0,0,1,0,0,0,1,0,1,1,1,0,1,0,1,0,1,1,0,0,1,1,1,1,0,0,0,0,0,0,0}; int param0_6[] = {6,22,24,27,29,30,35,42,57,59,59,63,71,73,76,98}; int param0_7[] = {-82,-48,36}; int param0_8[] = {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,1,1,1,1}; int param0_9[] = {88,49,13,64,30,60,26,55,55,97,98,69,72,72,79,59,46,87,76,61,87,12,91,8,34,15,93,64,83,33,69,58,32,14,72,67,25,7,55,21,12,78,63}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {33,25,16,2,12,33,13,1,35,24}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) import", "b) <", "c) int", "d) (", "e) HashMap" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int sum = 0; int maxsize = - 1, startindex; for ( int i = 0; i < n - 1; i ++ ) { sum = ( arr [ i ] == 0 ) ? - 1 : 1; for ( int j = i + 1; j < n; j ++ ) { ( arr [ j ] == 0 ) ? ( sum += - 1 ) : ( sum += 1 ); if ( sum == 0 && maxsize < j - i + 1 ) { maxsize = j - i + 1; startindex = i; } } } if ( maxsize == - 1 ) printf("No such subarray"); else printf("No such subarray"); return maxsize; } int f_filled ( int arr [ ], int n ) {} i + 1; startindex = i; } } } if ( maxsize == - 1 ) printf("No such subarray"); else printf("No such subarray"); return maxsize; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {56,8,67,35,19,82,81,66,10,24,82,2,42,48,18,63,48,74,60,64,64,95,95,20,95,55,63,96,54}; int param0_1[] = {78,67,1,78,48,83,17,19,21,44,99,68,16,54,9}; int param0_2[] = {3,69,97,21,12,67,45,53,77,70,26,43}; int param0_3[] = {21,80,29,22,77,64,42,4,71,75,62,27,30,36,66,37,49,97}; int param0_4[] = {18,66,9,90,21,95,74,48,44,9,43,17}; int param0_5[] = {42,41,87,3,64,25,96,55,99,57,32,64,10,75,69,95,11,36,15,2,78,70,14,54,11,28,55,47,27,85,47,62,97,68,44,70,12,27,36,85,76,91,17,75,83,34,32,89,55}; int param0_6[] = {44}; int param0_7[] = {1,43,28,17,30,46,89,51,15,70,96,79,65,55,8}; int param0_8[] = {25,91,68,4,35,49,33}; int param0_9[] = {14,86,22,42,94,54,28,41,48,8,82,84,99,92,33,75,38,31,59,86,21,6,77,89,79,83,57,26,89,45,60,55,60,76,76,6,40,57,38,44,7,98,64,65,88,73,88,99}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {26,8,9,10,10,41,0,9,4,26}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("No such subarray"); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int sum = 0; int maxsize = - 1, startindex; for ( int i = 0; i < n [MASK] 1; i ++ ) { sum = ( arr [ i ] == 0 ) ? - 1 : 1; for ( int j = i + 1; j < n; j ++ ) { ( arr [ j ] == 0 ) ? ( sum += - 1 ) : ( sum += 1 ); if ( sum == 0 && maxsize < j - i + 1 ) { maxsize = j - i + 1; startindex = i; } } } if ( maxsize == - 1 ) printf("No such subarray"); else printf("No such subarray"); return maxsize; } int f_filled ( int arr [ ], int n ) {} i + 1; startindex = i; } } } if ( maxsize == - 1 ) printf("No such subarray"); else printf("No such subarray"); return maxsize; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {56,8,67,35,19,82,81,66,10,24,82,2,42,48,18,63,48,74,60,64,64,95,95,20,95,55,63,96,54}; int param0_1[] = {78,67,1,78,48,83,17,19,21,44,99,68,16,54,9}; int param0_2[] = {3,69,97,21,12,67,45,53,77,70,26,43}; int param0_3[] = {21,80,29,22,77,64,42,4,71,75,62,27,30,36,66,37,49,97}; int param0_4[] = {18,66,9,90,21,95,74,48,44,9,43,17}; int param0_5[] = {42,41,87,3,64,25,96,55,99,57,32,64,10,75,69,95,11,36,15,2,78,70,14,54,11,28,55,47,27,85,47,62,97,68,44,70,12,27,36,85,76,91,17,75,83,34,32,89,55}; int param0_6[] = {44}; int param0_7[] = {1,43,28,17,30,46,89,51,15,70,96,79,65,55,8}; int param0_8[] = {25,91,68,4,35,49,33}; int param0_9[] = {14,86,22,42,94,54,28,41,48,8,82,84,99,92,33,75,38,31,59,86,21,6,77,89,79,83,57,26,89,45,60,55,60,76,76,6,40,57,38,44,7,98,64,65,88,73,88,99}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {26,8,9,10,10,41,0,9,4,26}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("No such subarray"); return 0; }
-
[ "a) i", "b) ]", "c) len", "d) -", "e) 1" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int m ) { int dp [ n + 1 ] [ m + 1 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 1; i <= n; i ++ ) { for ( int j = 0; j <= m; j ++ ) { if ( i > j ) { if ( j == 0 ) dp [ i ] [ j ] = 1; else dp [ i ] [ j ] = ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ); } } } return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {} [ j ] = 1; else dp [ i ] [ j ] = ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ); } } } return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {} int main(void) { int n_success = 0; int param0[] = {27,77,35,26,6,66,44,26,74,65}; int param1[] = {7,34,22,20,10,47,29,33,86,97}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> [MASK] <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int m ) { int dp [ n + 1 ] [ m + 1 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 1; i <= n; i ++ ) { for ( int j = 0; j <= m; j ++ ) { if ( i > j ) { if ( j == 0 ) dp [ i ] [ j ] = 1; else dp [ i ] [ j ] = ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ); } } } return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {}[ j ] = 1; else dp [ i ] [ j ] = ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ); } } } return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {} int main(void) { int n_success = 0; int param0[] = {27,77,35,26,6,66,44,26,74,65}; int param1[] = {7,34,22,20,10,47,29,33,86,97}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include
[ "a) ;", "b) #include", "c) mod", "d) -", "e) Str" ]
b
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char num [] ) { int series [ ] = { 1, 3, 2, - 1, - 3, - 2 }; int series_index = 0; int result = 0; for ( int i = len(num) - 1; i >= 0; i -- ) { int digit = num [ i ] - '0'; result += digit * series [ series_index ]; series_index = ( series_index + 1 ) % 6; result %= 7; } if ( result < 0 ) result = ( result + 7 ) % 7; return result; } int f_filled ( char num [] ) {} series_index ]; series_index = ( series_index + 1 ) % 6; result %= 7; } if ( result < 0 ) result = ( result + 7 ) % 7; return result; } int f_filled ( char num [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"K","850076","00111","X","1","10010001100"," pgPeLz","53212456821275","101","V"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include [MASK] #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char num [] ) { int series [ ] = { 1, 3, 2, - 1, - 3, - 2 }; int series_index = 0; int result = 0; for ( int i = len(num) - 1; i >= 0; i -- ) { int digit = num [ i ] - '0'; result += digit * series [ series_index ]; series_index = ( series_index + 1 ) % 6; result %= 7; } if ( result < 0 ) result = ( result + 7 ) % 7; return result; } int f_filled ( char num [] ) {}series_index ]; series_index = ( series_index + 1 ) % 6; result %= 7; } if ( result < 0 ) result = ( result + 7 ) % 7; return result; } int f_filled ( char num [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"K","850076","00111","X","1","10010001100"," pgPeLz","53212456821275","101","V"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
<limits.h>
[ "a) (", "b) *", "c) x,", "d) ]", "e) <limits.h>" ]
e
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long f_gold ( long long n ) { long long maxPrime = - 1; while ( n % 2 == 0 ) { maxPrime = 2; n >>= 1; } for ( int i = 3; i <= sqrt ( n ); i += 2 ) { while ( n % i == 0 ) { maxPrime = i; n = n / i; } } if ( n > 2 ) maxPrime = n; return maxPrime; } long long f_filled ( long long n ) {} ; i <= sqrt ( n ); i += 2 ) { while ( n % i == 0 ) { maxPrime = i; n = n / i; } } if ( n > 2 ) maxPrime = n; return maxPrime; } long long f_filled ( long long n ) {} int main(void) { int n_success = 0; long param0[] = {98,8,78,65,55,10,10,37,39,15}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } [MASK] max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long f_gold ( long long n ) { long long maxPrime = - 1; while ( n % 2 == 0 ) { maxPrime = 2; n >>= 1; } for ( int i = 3; i <= sqrt ( n ); i += 2 ) { while ( n % i == 0 ) { maxPrime = i; n = n / i; } } if ( n > 2 ) maxPrime = n; return maxPrime; } long long f_filled ( long long n ) {}; i <= sqrt ( n ); i += 2 ) { while ( n % i == 0 ) { maxPrime = i; n = n / i; } } if ( n > 2 ) maxPrime = n; return maxPrime; } long long f_filled ( long long n ) {} int main(void) { int n_success = 0; long param0[] = {98,8,78,65,55,10,10,37,39,15}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) x:", "b) int", "c) for", "d) j", "e) #include" ]
b
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { if ( n == 1 || n == 0 ) return 1; if ( arr [ n - 1 ] < arr [ n - 2 ] ) return 0; return f_gold ( arr, n - 1 ); } int f_filled ( int arr [ ], int n ) {} int f_gold ( int arr [ ], int n ) { if ( n == 1 || n == 0 ) return 1; if ( arr [ n - 1 ] < arr [ n - 2 ] ) return 0; return f_gold ( arr, n - 1 ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,4,19,21,28,32,35,44,51,55,62,80,80,83,90,93,93}; int param0_1[] = {84,-28,-42,38,-94,-70,34,54,38,-58,-54,-6,72,-32,-18,80,-6,-38,-30,-86,-10,14,92,-56,40,-58,-2,-6,-46,-80,72,-12,2,-64,36,98,-24}; int param0_2[] = {0,1,1,1}; int param0_3[] = {74,75,9,13,57,82,57,37,47,11,28,6,33,14,47,29,15,56,69,86,31,19,18,58,70,73,30,95,35,17,16,97,68,95,33,36,11,60,4,63,5,64,85,77,4}; int param0_4[] = {-96,-92,-84,-78,-74,-68,-66,-64,-62,-50,-48,-48,-46,-38,-28,-28,-26,-24,-24,-20,-14,-12,-4,16,18,28,32,48,50,62,70,72,78,90,92}; int param0_5[] = {0,1,0,1,0,0,0,1,1,1,1,1,0,1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,0,0,1,0,1,1,1,0,0}; int param0_6[] = {6,8,11,21,29,31,41,50,56,56,69,69,74,79,86,88,93,95,99}; int param0_7[] = {10,-12,-36,72,-42,-94,38,-78,-4,6,12,6,-48}; int param0_8[] = {0,0,0,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,1,1,1,1,1,1,1,1}; int param0_9[] = {97,58,88,20,63,1,23,33,57,81,54,66,95,31,54,16,37,7,1,94,18,42,39,26,75,65,57,69,86,77,17,7,71,12,38,87,48,55,54,72,15,30,55}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {8,21,2,31,31,38,10,6,35,29}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int [MASK] [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { if ( n == 1 || n == 0 ) return 1; if ( arr [ n - 1 ] < arr [ n - 2 ] ) return 0; return f_gold ( arr, n - 1 ); } int f_filled ( int arr [ ], int n ) {} int f_gold ( int arr [ ], int n ) { if ( n == 1 || n == 0 ) return 1; if ( arr [ n - 1 ] < arr [ n - 2 ] ) return 0; return f_gold ( arr, n - 1 ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,4,19,21,28,32,35,44,51,55,62,80,80,83,90,93,93}; int param0_1[] = {84,-28,-42,38,-94,-70,34,54,38,-58,-54,-6,72,-32,-18,80,-6,-38,-30,-86,-10,14,92,-56,40,-58,-2,-6,-46,-80,72,-12,2,-64,36,98,-24}; int param0_2[] = {0,1,1,1}; int param0_3[] = {74,75,9,13,57,82,57,37,47,11,28,6,33,14,47,29,15,56,69,86,31,19,18,58,70,73,30,95,35,17,16,97,68,95,33,36,11,60,4,63,5,64,85,77,4}; int param0_4[] = {-96,-92,-84,-78,-74,-68,-66,-64,-62,-50,-48,-48,-46,-38,-28,-28,-26,-24,-24,-20,-14,-12,-4,16,18,28,32,48,50,62,70,72,78,90,92}; int param0_5[] = {0,1,0,1,0,0,0,1,1,1,1,1,0,1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,0,0,1,0,1,1,1,0,0}; int param0_6[] = {6,8,11,21,29,31,41,50,56,56,69,69,74,79,86,88,93,95,99}; int param0_7[] = {10,-12,-36,72,-42,-94,38,-78,-4,6,12,6,-48}; int param0_8[] = {0,0,0,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,1,1,1,1,1,1,1,1}; int param0_9[] = {97,58,88,20,63,1,23,33,57,81,54,66,95,31,54,16,37,7,1,94,18,42,39,26,75,65,57,69,86,77,17,7,71,12,38,87,48,55,54,72,15,30,55}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {8,21,2,31,31,38,10,6,35,29}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
arr
[ "a) arr", "b) ],", "c) import", "d) (", "e) =" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int p [ ], int i, int j ) { if ( i == j ) return 0; int k; int min = INT_MAX; int count; for ( k = i; k < j; k ++ ) { count = f_gold ( p, i, k ) + f_gold ( p, k + 1, j ) + p [ i - 1 ] * p [ k ] * p [ j ]; if ( count < min ) min = count; } return min; } int f_filled ( int p [ ], int i, int j ) {} ) { count = f_gold ( p, i, k ) + f_gold ( p, k + 1, j ) + p [ i - 1 ] * p [ k ] * p [ j ]; if ( count < min ) min = count; } return min; } int f_filled ( int p [ ], int i, int j ) {} int main(void) { int n_success = 0; int param0_0[] = {6,12,16,30,31,31,33,34,45,48,57,63,81,83}; int param0_1[] = {30,-78,42,-6,42,56,-38,28,-96,-96,84,-18,0,20,-56,-40,-58,-74,64,62,-22,78,10,-22,16,-48,2,14,82,-92,-64,-18,42,24,22,-50,12,-76,38,-30,-86,-58,-6,-4,10,28}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_3[] = {54,46}; int param0_4[] = {-80,-76,-68,-66,-54,-12,-10,-6,6,8,20,20,22,60,66,78,78,82,98}; int param0_5[] = {0,0,1,0,0,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0}; int param0_6[] = {14,21,29,31,37,50,51,54,57,62,64,72,85,98}; int param0_7[] = {-86,98,90,-20,90,68,70,-24,-10,-80,70,-42,14,56,-26,-42,2,-62,24,10,-46,-66,-82,-98,-84,-2,-52,-50,0,-18,90,-32,98,86}; int param0_8[] = {0,0,1,1,1,1}; int param0_9[] = {52,15,61,73,45,5,15,54,69,90,5,56,13,54,27,72,58,21,35,2,59,55,64,92,54,63,50,95,38,53,38,53,73,27,86,86,99,42,85,80,43,32,80,57,78}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {10,30,7,1,13,20,7,23,5,26}; int param2[] = {9,27,7,1,10,17,11,26,4,42}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return [MASK] (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int p [ ], int i, int j ) { if ( i == j ) return 0; int k; int min = INT_MAX; int count; for ( k = i; k < j; k ++ ) { count = f_gold ( p, i, k ) + f_gold ( p, k + 1, j ) + p [ i - 1 ] * p [ k ] * p [ j ]; if ( count < min ) min = count; } return min; } int f_filled ( int p [ ], int i, int j ) {} ) { count = f_gold ( p, i, k ) + f_gold ( p, k + 1, j ) + p [ i - 1 ] * p [ k ] * p [ j ]; if ( count < min ) min = count; } return min; } int f_filled ( int p [ ], int i, int j ) {} int main(void) { int n_success = 0; int param0_0[] = {6,12,16,30,31,31,33,34,45,48,57,63,81,83}; int param0_1[] = {30,-78,42,-6,42,56,-38,28,-96,-96,84,-18,0,20,-56,-40,-58,-74,64,62,-22,78,10,-22,16,-48,2,14,82,-92,-64,-18,42,24,22,-50,12,-76,38,-30,-86,-58,-6,-4,10,28}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_3[] = {54,46}; int param0_4[] = {-80,-76,-68,-66,-54,-12,-10,-6,6,8,20,20,22,60,66,78,78,82,98}; int param0_5[] = {0,0,1,0,0,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0}; int param0_6[] = {14,21,29,31,37,50,51,54,57,62,64,72,85,98}; int param0_7[] = {-86,98,90,-20,90,68,70,-24,-10,-80,70,-42,14,56,-26,-42,2,-62,24,10,-46,-66,-82,-98,-84,-2,-52,-50,0,-18,90,-32,98,86}; int param0_8[] = {0,0,1,1,1,1}; int param0_9[] = {52,15,61,73,45,5,15,54,69,90,5,56,13,54,27,72,58,21,35,2,59,55,64,92,54,63,50,95,38,53,38,53,73,27,86,86,99,42,85,80,43,32,80,57,78}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {10,30,7,1,13,20,7,23,5,26}; int param2[] = {9,27,7,1,10,17,11,26,4,42}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
((int)
[ "a) javafx.util.Pair;", "b) if", "c) [", "d) for", "e) ((int)" ]
e
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long int f_gold ( int n ) { long long int sum = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = i; j <= n; j ++ ) sum = sum + i * j; return sum; } long long int f_filled ( int n ) {} ng int f_gold ( int n ) { long long int sum = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = i; j <= n; j ++ ) sum = sum + i * j; return sum; } long long int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {21,32,16,38,9,3,5,46,45,87}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long int f_gold ( int n ) { long long int sum = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = i; j <= n; j ++ ) sum = sum + i * j; return sum; } long long [MASK] f_filled ( int n ) {}ng int f_gold ( int n ) { long long int sum = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = i; j <= n; j ++ ) sum = sum + i * j; return sum; } long long int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {21,32,16,38,9,3,5,46,45,87}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) result", "b) int", "c) n", "d) public", "e) )" ]
b
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int LIS [ n ], len = 0; for ( int i = 0; i < n; i ++ ) LIS [ i ] = 1; for ( int i = 1; i < n; i ++ ) { for ( int j = 0; j < i; j ++ ) { if ( arr [ i ] > arr [ j ] && ( i - j ) <= ( arr [ i ] - arr [ j ] ) ) { LIS [ i ] = max ( LIS [ i ], LIS [ j ] + 1 ); } } len = max ( len, LIS [ i ] ); } return n - len; } int f_filled ( int arr [ ], int n ) {} ( arr [ i ] - arr [ j ] ) ) { LIS [ i ] = max ( LIS [ i ], LIS [ j ] + 1 ); } } len = max ( len, LIS [ i ] ); } return n - len; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,4,12,14,15,18,20,24,25,25,27,33,34,42,46,48,49,50,50,52,55,56,57,58,64,65,66,69,72,75,78,80,84,90,92,95,99}; int param0_1[] = {-56,6,-74,-30,34,40,-76,-10,-12,-86,-76,36,-72,82,38,68,28,84,98,-84,6,16,-46,8,2,-18,-50,4,-96,88,-84,-38,-82,-54}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {68,79,87,44,3,99,80,6,46,67,72,40,11,18,73,48,18,72,10,38,3,39,26,76,47,15,85,69}; int param0_4[] = {-96,-94,-94,-74,-68,-60,-58,-56,-56,-52,-52,-50,-44,-40,-26,-24,-10,-8,-6,-2,2,2,12,14,20,24,26,30,38,40,52,52,62,62,68,70,74,76,80,82,90,92}; int param0_5[] = {1,1,1,0,1}; int param0_6[] = {1,5,11,20,24,28,29,31,54,58,63,65,66,71,77,80,83,92,93,93}; int param0_7[] = {-50,-46,-44,-90,2,-38,88,-26,60}; int param0_8[] = {1,1}; int param0_9[] = {2,1,19,26,65,47,3,65,9,12,84,59,74,59,30,83,73,67,13,5,64,83,81,92,80,14,58,84,92}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {21,22,6,15,31,3,12,7,1,16}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int LIS [ n ], len = 0; for ( int i = 0; i < n; i ++ ) LIS [ i ] = 1; for ( int i = 1; i < n; i ++ ) { for ( int j = 0; j < i; j ++ ) { if ( arr [ i ] > arr [ j ] && ( [MASK] - j ) <= ( arr [ i ] - arr [ j ] ) ) { LIS [ i ] = max ( LIS [ i ], LIS [ j ] + 1 ); } } len = max ( len, LIS [ i ] ); } return n - len; } int f_filled ( int arr [ ], int n ) {} ( arr [ i ] - arr [ j ] ) ) { LIS [ i ] = max ( LIS [ i ], LIS [ j ] + 1 ); } } len = max ( len, LIS [ i ] ); } return n - len; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,4,12,14,15,18,20,24,25,25,27,33,34,42,46,48,49,50,50,52,55,56,57,58,64,65,66,69,72,75,78,80,84,90,92,95,99}; int param0_1[] = {-56,6,-74,-30,34,40,-76,-10,-12,-86,-76,36,-72,82,38,68,28,84,98,-84,6,16,-46,8,2,-18,-50,4,-96,88,-84,-38,-82,-54}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {68,79,87,44,3,99,80,6,46,67,72,40,11,18,73,48,18,72,10,38,3,39,26,76,47,15,85,69}; int param0_4[] = {-96,-94,-94,-74,-68,-60,-58,-56,-56,-52,-52,-50,-44,-40,-26,-24,-10,-8,-6,-2,2,2,12,14,20,24,26,30,38,40,52,52,62,62,68,70,74,76,80,82,90,92}; int param0_5[] = {1,1,1,0,1}; int param0_6[] = {1,5,11,20,24,28,29,31,54,58,63,65,66,71,77,80,83,92,93,93}; int param0_7[] = {-50,-46,-44,-90,2,-38,88,-26,60}; int param0_8[] = {1,1}; int param0_9[] = {2,1,19,26,65,47,3,65,9,12,84,59,74,59,30,83,73,67,13,5,64,83,81,92,80,14,58,84,92}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {21,22,6,15,31,3,12,7,1,16}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
i
[ "a) i", "b) arr", "c) for", "d) int", "e) )" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int num ) { if ( num / 10 == 0 ) return true; while ( num != 0 ) { if ( num / 10 == 0 ) return true; int digit1 = num % 10; int digit2 = ( num / 10 ) % 10; if ( abs ( digit2 - digit1 ) > 1 ) return false; num = num / 10; } return true; } bool f_filled ( int num ) {} urn true; int digit1 = num % 10; int digit2 = ( num / 10 ) % 10; if ( abs ( digit2 - digit1 ) > 1 ) return false; num = num / 10; } return true; } bool f_filled ( int num ) {} int main(void) { int n_success = 0; int param0[] = {67,77,35,79,45,22,68,17,5,85}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> [MASK] <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int num ) { if ( num / 10 == 0 ) return true; while ( num != 0 ) { if ( num / 10 == 0 ) return true; int digit1 = num % 10; int digit2 = ( num / 10 ) % 10; if ( abs ( digit2 - digit1 ) > 1 ) return false; num = num / 10; } return true; } bool f_filled ( int num ) {}urn true; int digit1 = num % 10; int digit2 = ( num / 10 ) % 10; if ( abs ( digit2 - digit1 ) > 1 ) return false; num = num / 10; } return true; } bool f_filled ( int num ) {} int main(void) { int n_success = 0; int param0[] = {67,77,35,79,45,22,68,17,5,85}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include
[ "a) #include", "b) using", "c) (int", "d) return", "e) (" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int m ) { int dp [ m + 1 ] [ n + 1 ]; for ( int i = 0; i <= m; i ++ ) dp [ i ] [ 0 ] = 1; for ( int i = 0; i <= m; i ++ ) dp [ 0 ] [ i ] = 1; for ( int i = 1; i <= m; i ++ ) for ( int j = 1; j <= n; j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i - 1 ] [ j - 1 ] + dp [ i ] [ j - 1 ]; return dp [ m ] [ n ]; } int f_filled ( int n, int m ) {} i <= m; i ++ ) for ( int j = 1; j <= n; j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i - 1 ] [ j - 1 ] + dp [ i ] [ j - 1 ]; return dp [ m ] [ n ]; } int f_filled ( int n, int m ) {} int main(void) { int n_success = 0; int param0[] = {22,80,33,31,34,3,11,70,67,91}; int param1[] = {52,66,49,64,63,1,58,69,61,72}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int m ) { int dp [ m + 1 ] [ n + 1 ]; for ( int i = 0; i <= m; i ++ ) dp [ i ] [ 0 ] = 1; for ( int i = 0; i <= m; i ++ ) dp [ 0 ] [ i ] = 1; for ( [MASK] i = 1; i <= m; i ++ ) for ( int j = 1; j <= n; j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i - 1 ] [ j - 1 ] + dp [ i ] [ j - 1 ]; return dp [ m ] [ n ]; } int f_filled ( int n, int m ) {}i <= m; i ++ ) for ( int j = 1; j <= n; j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i - 1 ] [ j - 1 ] + dp [ i ] [ j - 1 ]; return dp [ m ] [ n ]; } int f_filled ( int n, int m ) {} int main(void) { int n_success = 0; int param0[] = {22,80,33,31,34,3,11,70,67,91}; int param1[] = {52,66,49,64,63,1,58,69,61,72}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) *(int*)a", "b) )", "c) f_gold", "d) int", "e) arr" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} char f_gold [] ( char s [] ) { int n = strlen(s); for ( int i = 1; i < n; i ++ ) { if ( s [ i ] == s [ i - 1 ] ) { s [ i ] = 'a'; while ( s [ i ] == s [ i - 1 ] || ( i + 1 < n && s [ i ] == s [ i + 1 ] ) ) s [ i ] ++; i ++; } } return s; } char f_filled [] ( char s [] ) {} - 1 ] ) { s [ i ] = 'a'; while ( s [ i ] == s [ i - 1 ] || ( i + 1 < n && s [ i ] == s [ i + 1 ] ) ) s [ i ] ++; i ++; } } return s; } char f_filled [] ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"cHcZCdkbIMGUYe","2292016725711","10110111100010","wHso xGbBY","21884","0","I","716213436","101","HXdDbjcyPc"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - [MASK] );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} char f_gold [] ( char s [] ) { int n = strlen(s); for ( int i = 1; i < n; i ++ ) { if ( s [ i ] == s [ i - 1 ] ) { s [ i ] = 'a'; while ( s [ i ] == s [ i - 1 ] || ( i + 1 < n && s [ i ] == s [ i + 1 ] ) ) s [ i ] ++; i ++; } } return s; } char f_filled [] ( char s [] ) {} - 1 ] ) { s [ i ] = 'a'; while ( s [ i ] == s [ i - 1 ] || ( i + 1 < n && s [ i ] == s [ i + 1 ] ) ) s [ i ] ++; i ++; } } return s; } char f_filled [] ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"cHcZCdkbIMGUYe","2292016725711","10110111100010","wHso xGbBY","21884","0","I","716213436","101","HXdDbjcyPc"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
*(int*)b
[ "a) *(int*)b", "b) maxB", "c) cmpfunc", "d) <string>", "e) )" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n ) { unordered_set < int > s ( a, a + n ); int arr_sum = accumulate ( a, a + n, 0 ); int set_sum = accumulate ( s . begin ( ), s . end ( ), 0 ); return ( 3 * set_sum - arr_sum ) / 2; } int f_filled ( int a [ ], int n ) {} , a + n ); int arr_sum = accumulate ( a, a + n, 0 ); int set_sum = accumulate ( s . begin ( ), s . end ( ), 0 ); return ( 3 * set_sum - arr_sum ) / 2; } int f_filled ( int a [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,3,3,12,16,28,31,44,48,57,59,60,68,69,70,70,72,73,76,78,78,79,84,86,93,96}; int param0_1[] = {-2,-62,8,-96,-50,-70,-48,-20,76,-54,-62,8,30,-68,-64,-94,-10,-78,-68,-98,0,30,62,-40,-36,90,-46,38,28,-86,-20,12,56,-50,82,-18,-28,-62,88,-58}; int param0_2[] = {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,1,1,1,1}; int param0_3[] = {85,33,83,92,40,53,18,39,17,71,15,85,44,12,56,77,54,87,11,74,11,9,73,72,64,98,18,13,74,64,59,44,95,56,6,96,47,36,35,51,30,39,91,74,68}; int param0_4[] = {-94,-90,-82,-80,-74,-40,-40,-38,-36,-28,-26,-20,-16,-14,-14,-10,-8,-8,10,14,18,22,22,28,28,30,74,82}; int param0_5[] = {1,1,1,1,1,0,1,0,1,1,0,0,0,0,1,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1}; int param0_6[] = {2,6,6,12,13,13,15,16,24,25,29,36,42,44,47,47,47,48,51,51,55,55,55,58,58,60,61,62,62,64,66,70,70,75,76,77,78,78,79,80,80,82,83,83,84,85,90,99}; int param0_7[] = {-94,50,-86,-94,92,-50,74,-54,54,-20,-28,-44,-94,-80,-12,-38,64,-22,38,70,-4,62,66,88,-94,72,88,32,-80,60,-70,-74,-66,82,82}; int param0_8[] = {0,0,0,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {62,29,76,58,16,7,83,45,17,67,88,78,6,36,33,99,39,59,77,64,32,20,10,92,3,20,7,14,11,28}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {14,26,18,35,27,35,42,34,7,26}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n ) { unordered_set < int > s ( a, a + n ); int arr_sum = accumulate ( a, a + n, 0 ); int set_sum = accumulate ( s . begin ( ), s . end ( ), 0 ); return ( 3 * set_sum - arr_sum ) / 2; } [MASK] f_filled ( int a [ ], int n ) {}, a + n ); int arr_sum = accumulate ( a, a + n, 0 ); int set_sum = accumulate ( s . begin ( ), s . end ( ), 0 ); return ( 3 * set_sum - arr_sum ) / 2; } int f_filled ( int a [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,3,3,12,16,28,31,44,48,57,59,60,68,69,70,70,72,73,76,78,78,79,84,86,93,96}; int param0_1[] = {-2,-62,8,-96,-50,-70,-48,-20,76,-54,-62,8,30,-68,-64,-94,-10,-78,-68,-98,0,30,62,-40,-36,90,-46,38,28,-86,-20,12,56,-50,82,-18,-28,-62,88,-58}; int param0_2[] = {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,1,1,1,1}; int param0_3[] = {85,33,83,92,40,53,18,39,17,71,15,85,44,12,56,77,54,87,11,74,11,9,73,72,64,98,18,13,74,64,59,44,95,56,6,96,47,36,35,51,30,39,91,74,68}; int param0_4[] = {-94,-90,-82,-80,-74,-40,-40,-38,-36,-28,-26,-20,-16,-14,-14,-10,-8,-8,10,14,18,22,22,28,28,30,74,82}; int param0_5[] = {1,1,1,1,1,0,1,0,1,1,0,0,0,0,1,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1}; int param0_6[] = {2,6,6,12,13,13,15,16,24,25,29,36,42,44,47,47,47,48,51,51,55,55,55,58,58,60,61,62,62,64,66,70,70,75,76,77,78,78,79,80,80,82,83,83,84,85,90,99}; int param0_7[] = {-94,50,-86,-94,92,-50,74,-54,54,-20,-28,-44,-94,-80,-12,-38,64,-22,38,70,-4,62,66,88,-94,72,88,32,-80,60,-70,-74,-66,82,82}; int param0_8[] = {0,0,0,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {62,29,76,58,16,7,83,45,17,67,88,78,6,36,33,99,39,59,77,64,32,20,10,92,3,20,7,14,11,28}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {14,26,18,35,27,35,42,34,7,26}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) :", "b) return", "c) java.util.stream.*;", "d) int", "e) *" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int num, int divisor ) { while ( num >= divisor ) num -= divisor; return num; } int f_filled ( int num, int divisor ) {} arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int num, int divisor ) { while ( num >= divisor ) num -= divisor; return num; } int f_filled ( int num, int divisor ) {} int main(void) { int n_success = 0; int param0[] = {70,77,77,88,96,6,79,44,26,82}; int param1[] = {13,3,73,54,39,10,95,32,86,91}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int [MASK] (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int num, int divisor ) { while ( num >= divisor ) num -= divisor; return num; } int f_filled ( int num, int divisor ) {} arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int num, int divisor ) { while ( num >= divisor ) num -= divisor; return num; } int f_filled ( int num, int divisor ) {} int main(void) { int n_success = 0; int param0[] = {70,77,77,88,96,6,79,44,26,82}; int param1[] = {13,3,73,54,39,10,95,32,86,91}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
len
[ "a) len", "b) (arr)[0]));}", "c) )", "d) =", "e) //" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( char str [ ] ) { int len = strlen ( str ); if ( str [ 0 ] < 'A' || str [ 0 ] > 'Z' ) return false; if ( str [ len - 1 ] != '.' ) return false; int prev_state = 0, curr_state = 0; int index = 1; while ( str [ index ] ) { if ( str [ index ] >= 'A' && str [ index ] <= 'Z' ) curr_state = 0; else if ( str [ index ] == ' ' ) curr_state = 1; else if ( str [ index ] >= 'a' && str [ index ] <= 'z' ) curr_state = 2; else if ( str [ index ] == '.' ) curr_state = 3; if ( prev_state == curr_state && curr_state != 2 ) return false; if ( prev_state == 2 && curr_state == 0 ) return false; if ( curr_state == 3 && prev_state != 1 ) return ( str [ index + 1 ] == '\0' ); index ++; prev_state = curr_state; } return false; } bool f_filled ( char str [ ] ) {} eturn false; if ( curr_state == 3 && prev_state != 1 ) return ( str [ index + 1 ] == '\0' ); index ++; prev_state = curr_state; } return false; } bool f_filled ( char str [ ] ) {} int main(void) { int n_success = 0; char param0[][100] = { "I love cinema.", "The vertex is S.", "I am single.", "My name is KG.", "I lovE cinema.", "GeeksQuiz. is a quiz site.", "I love Geeksquiz and Geeksforgeeks.", " You are my friend.", "I love cinema", "Hello world !" }; for(int i = 0; i < len(param0); ++i) { if(f_filled(&param0[i].front()) == f_gold(&param0[i].front())) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( char str [ ] ) { int len = strlen ( str ); if ( str [ 0 ] < 'A' || str [ 0 ] > 'Z' ) return false; [MASK] ( str [ len - 1 ] != '.' ) return false; int prev_state = 0, curr_state = 0; int index = 1; while ( str [ index ] ) { if ( str [ index ] >= 'A' && str [ index ] <= 'Z' ) curr_state = 0; else if ( str [ index ] == ' ' ) curr_state = 1; else if ( str [ index ] >= 'a' && str [ index ] <= 'z' ) curr_state = 2; else if ( str [ index ] == '.' ) curr_state = 3; if ( prev_state == curr_state && curr_state != 2 ) return false; if ( prev_state == 2 && curr_state == 0 ) return false; if ( curr_state == 3 && prev_state != 1 ) return ( str [ index + 1 ] == '\0' ); index ++; prev_state = curr_state; } return false; } bool f_filled ( char str [ ] ) {}eturn false; if ( curr_state == 3 && prev_state != 1 ) return ( str [ index + 1 ] == '\0' ); index ++; prev_state = curr_state; } return false; } bool f_filled ( char str [ ] ) {} int main(void) { int n_success = 0; char param0[][100] = { "I love cinema.", "The vertex is S.", "I am single.", "My name is KG.", "I lovE cinema.", "GeeksQuiz. is a quiz site.", "I love Geeksquiz and Geeksforgeeks.", " You are my friend.", "I love cinema", "Hello world !" }; for(int i = 0; i < len(param0); ++i) { if(f_filled(&param0[i].front()) == f_gold(&param0[i].front())) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
if
[ "a) y", "b) [", "c) [", "d) if", "e) ;" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int sum = 0; for ( int i = 1; i <= n; i ++ ) sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 ); return sum; } int f_filled ( int n ) {} (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int sum = 0; for ( int i = 1; i <= n; i ++ ) sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 ); return sum; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {14,61,37,86,47,98,70,24,76,24}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int sum = 0; for ( int i = 1; i <= n; i ++ ) sum = sum + ( 2 * i - 1 ) * ( [MASK] * i - 1 ); return sum; } int f_filled ( int n ) {} (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int sum = 0; for ( int i = 1; i <= n; i ++ ) sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 ); return sum; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {14,61,37,86,47,98,70,24,76,24}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
2
[ "a) return", "b) 2", "c) int", "d) #include", "e) <string>" ]
b
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( char s [] ) { for ( int i = 0; i < strlen(s); i ++ ) if ( isdigit ( s [ i ] ) == false ) return false; return true; } bool f_filled ( char s [] ) {} sizeof(int), cmpfunc);} bool f_gold ( char s [] ) { for ( int i = 0; i < strlen(s); i ++ ) if ( isdigit ( s [ i ] ) == false ) return false; return true; } bool f_filled ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"MgTOyHo NT","033675175","011001","XLlccG","8223900094410","000","aupp","90202721499","110000100011","MhYHsMQeLhG"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, [MASK] sizeof(int), cmpfunc);} bool f_gold ( char s [] ) { for ( int i = 0; i < strlen(s); i ++ ) if ( isdigit ( s [ i ] ) == false ) return false; return true; } bool f_filled ( char s [] ) {}sizeof(int), cmpfunc);} bool f_gold ( char s [] ) { for ( int i = 0; i < strlen(s); i ++ ) if ( isdigit ( s [ i ] ) == false ) return false; return true; } bool f_filled ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"MgTOyHo NT","033675175","011001","XLlccG","8223900094410","000","aupp","90202721499","110000100011","MhYHsMQeLhG"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
n,
[ "a) n,", "b) ,", "c) (arr)[0]));}", "d) =", "e) 2" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { queue < int > q; sort ( arr, arr + n ); q . push ( arr [ 0 ] ); for ( int i = 1; i < n; i ++ ) { int now = q . front ( ); if ( arr [ i ] >= 2 * now ) q . pop ( ); q . push ( arr [ i ] ); } return len(q); } int f_filled ( int arr [ ], int n ) {} int i = 1; i < n; i ++ ) { int now = q . front ( ); if ( arr [ i ] >= 2 * now ) q . pop ( ); q . push ( arr [ i ] ); } return len(q); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,3,17,17,18,28,28,29,34,43,44,52,54,80,84,84,91,92,97}; int param0_1[] = {-34,70,-90,-10,-26,64,4,28,24,-90,-78,72,74,80,82,-94}; int param0_2[] = {0,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,1,1,1,1,1,1,1,1}; int param0_3[] = {20,87,5,62,12,81,30,83,96,16,2,76,3,8,37,53,55,88}; int param0_4[] = {-94,-92,-60,-58,-54,-42,-36,-12,-8,-2,8,14,18,20,26,32,38,56,58,60,70,78,80,86,98}; int param0_5[] = {0,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0}; int param0_6[] = {1,1,2,3,3,11,16,18,19,21,21,22,22,24,27,28,29,43,43,52,55,57,60,62,62,63,65,66,70,70,73,77,78,79,79,80,85,85,86,88,89,90,97,98}; int param0_7[] = {88,12,-22,-60,30,-30,-14,80,-58,-80,-10,86,-94,-14,4,-18,-18,54,-82,-8,-68,-6,-44,-44,50,88,-78,-42,12,52,44,14,6,48,18,-30,4}; int param0_8[] = {0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {82,62,43,39,5,90,75,50,16,83,52,69,71,3,89,10,51,69,32,96,5,43,83,12,31,81,22,59,52,47,86,49,56,90,31,59}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {12,10,40,9,18,9,30,21,7,28}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], [MASK] n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { queue < int > q; sort ( arr, arr + n ); q . push ( arr [ 0 ] ); for ( int i = 1; i < n; i ++ ) { int now = q . front ( ); if ( arr [ i ] >= 2 * now ) q . pop ( ); q . push ( arr [ i ] ); } return len(q); } int f_filled ( int arr [ ], int n ) {} int i = 1; i < n; i ++ ) { int now = q . front ( ); if ( arr [ i ] >= 2 * now ) q . pop ( ); q . push ( arr [ i ] ); } return len(q); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,3,17,17,18,28,28,29,34,43,44,52,54,80,84,84,91,92,97}; int param0_1[] = {-34,70,-90,-10,-26,64,4,28,24,-90,-78,72,74,80,82,-94}; int param0_2[] = {0,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,1,1,1,1,1,1,1,1}; int param0_3[] = {20,87,5,62,12,81,30,83,96,16,2,76,3,8,37,53,55,88}; int param0_4[] = {-94,-92,-60,-58,-54,-42,-36,-12,-8,-2,8,14,18,20,26,32,38,56,58,60,70,78,80,86,98}; int param0_5[] = {0,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0}; int param0_6[] = {1,1,2,3,3,11,16,18,19,21,21,22,22,24,27,28,29,43,43,52,55,57,60,62,62,63,65,66,70,70,73,77,78,79,79,80,85,85,86,88,89,90,97,98}; int param0_7[] = {88,12,-22,-60,30,-30,-14,80,-58,-80,-10,86,-94,-14,4,-18,-18,54,-82,-8,-68,-6,-44,-44,50,88,-78,-42,12,52,44,14,6,48,18,-30,4}; int param0_8[] = {0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {82,62,43,39,5,90,75,50,16,83,52,69,71,3,89,10,51,69,32,96,5,43,83,12,31,81,22,59,52,47,86,49,56,90,31,59}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {12,10,40,9,18,9,30,21,7,28}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) (", "b) <string>", "c) in", "d) ];", "e) int" ]
e
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long f_gold ( long long a, long long b, long long mod ) { long long res = 0; a %= mod; while ( b ) { if ( b & 1 ) res = ( res + a ) % mod; a = ( 2 * a ) % mod; b >>= 1; } return res; } long long f_filled ( long long a, long long b, long long mod ) {} ; a %= mod; while ( b ) { if ( b & 1 ) res = ( res + a ) % mod; a = ( 2 * a ) % mod; b >>= 1; } return res; } long long f_filled ( long long a, long long b, long long mod ) {} int main(void) { int n_success = 0; 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,73,8,55,22,83,83}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include [MASK] #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long f_gold ( long long a, long long b, long long mod ) { long long res = 0; a %= mod; while ( b ) { if ( b & 1 ) res = ( res + a ) % mod; a = ( 2 * a ) % mod; b >>= 1; } return res; } long long f_filled ( long long a, long long b, long long mod ) {}; a %= mod; while ( b ) { if ( b & 1 ) res = ( res + a ) % mod; a = ( 2 * a ) % mod; b >>= 1; } return res; } long long f_filled ( long long a, long long b, long long mod ) {} int main(void) { int n_success = 0; 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,73,8,55,22,83,83}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
<stdio.h>
[ "a) max(int", "b) <stdio.h>", "c) {", "d) arr", "e) n," ]
b
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int x [ ], int y [ ], int n ) { int sum = 0; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) sum += ( abs ( x [ i ] - x [ j ] ) + abs ( y [ i ] - y [ j ] ) ); return sum; } int f_filled ( int x [ ], int y [ ], int n ) {} t i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) sum += ( abs ( x [ i ] - x [ j ] ) + abs ( y [ i ] - y [ j ] ) ); return sum; } int f_filled ( int x [ ], int y [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,4,6,6,8,11,12,13,14,19,20,22,24,28,29,30,32,35,37,44,48,49,51,51,56,59,59,62,65,68,68,68,72,75,77,78,89,89,91,93,95,99}; int param0_1[] = {16,76,2,42,-24,-82,68,-2,98,-42,-72,28,-22,-52,28,-38,36,66,84,64,-28,86,52,84,-98,-30}; int param0_2[] = {0,0,0,0,0,1,1,1,1,1}; int param0_3[] = {61,37,57,99,22,72,38,85,23,85,15,4,49,9,15,25,7,63,79,6,85,30,12,34,38,6,59,62,59,34,72,97,70,44,95,58,99}; int param0_4[] = {-96,-86,-82,-72,-72,-64,-62,-60,-56,-56,-56,-54,-52,-40,-36,-30,-10,10,18,26,28,56,56,56,64,90,92,94}; int param0_5[] = {1,0,1,1,1,0,1}; int param0_6[] = {6,10,24,25,31,41,43,45,47,65,67,90}; int param0_7[] = {-74,92,34,56,-54,-98,-76,-34,16,32,-4,-16,22,90,-52,-90,-60,70,-40,78,96,-68,78,-56,-94}; int param0_8[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {20,32}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1_0[] = {6,19,19,22,25,27,31,33,34,35,37,38,38,44,46,50,51,55,58,58,64,64,64,64,65,66,66,66,67,70,75,78,79,81,81,81,82,84,84,86,94,96}; int param1_1[] = {-34,92,-24,-62,28,72,-10,10,8,90,-72,-24,50,-46,52,58,68,-62,-64,-78,-12,24,62,-30,62,-60}; int param1_2[] = {0,0,0,0,1,1,1,1,1,1}; int param1_3[] = {72,41,77,62,78,36,75,28,91,39,32,56,60,64,21,15,80,85,28,22,53,58,69,62,60,48,66,91,38,66,54,5,24,1,49,71,49}; int param1_4[] = {-98,-98,-96,-96,-82,-80,-80,-68,-62,-60,-46,-38,-26,-26,-20,-18,16,22,24,26,34,46,52,52,74,76,90,92}; int param1_5[] = {1,0,1,0,0,1,1}; int param1_6[] = {4,7,11,19,21,39,57,80,84,93,94,97}; int param1_7[] = {14,20,24,-92,58,12,78,78,-90,96,-44,36,30,-46,-30,-80,26,-2,26,28,-16,-50,-2,-36,-8}; int param1_8[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param1_9[] = {23,50}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {37,24,5,26,26,3,10,21,23,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void [MASK] a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int x [ ], int y [ ], int n ) { int sum = 0; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) sum += ( abs ( x [ i ] - x [ j ] ) + abs ( y [ i ] - y [ j ] ) ); return sum; } int f_filled ( int x [ ], int y [ ], int n ) {}t i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) sum += ( abs ( x [ i ] - x [ j ] ) + abs ( y [ i ] - y [ j ] ) ); return sum; } int f_filled ( int x [ ], int y [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,4,6,6,8,11,12,13,14,19,20,22,24,28,29,30,32,35,37,44,48,49,51,51,56,59,59,62,65,68,68,68,72,75,77,78,89,89,91,93,95,99}; int param0_1[] = {16,76,2,42,-24,-82,68,-2,98,-42,-72,28,-22,-52,28,-38,36,66,84,64,-28,86,52,84,-98,-30}; int param0_2[] = {0,0,0,0,0,1,1,1,1,1}; int param0_3[] = {61,37,57,99,22,72,38,85,23,85,15,4,49,9,15,25,7,63,79,6,85,30,12,34,38,6,59,62,59,34,72,97,70,44,95,58,99}; int param0_4[] = {-96,-86,-82,-72,-72,-64,-62,-60,-56,-56,-56,-54,-52,-40,-36,-30,-10,10,18,26,28,56,56,56,64,90,92,94}; int param0_5[] = {1,0,1,1,1,0,1}; int param0_6[] = {6,10,24,25,31,41,43,45,47,65,67,90}; int param0_7[] = {-74,92,34,56,-54,-98,-76,-34,16,32,-4,-16,22,90,-52,-90,-60,70,-40,78,96,-68,78,-56,-94}; int param0_8[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {20,32}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1_0[] = {6,19,19,22,25,27,31,33,34,35,37,38,38,44,46,50,51,55,58,58,64,64,64,64,65,66,66,66,67,70,75,78,79,81,81,81,82,84,84,86,94,96}; int param1_1[] = {-34,92,-24,-62,28,72,-10,10,8,90,-72,-24,50,-46,52,58,68,-62,-64,-78,-12,24,62,-30,62,-60}; int param1_2[] = {0,0,0,0,1,1,1,1,1,1}; int param1_3[] = {72,41,77,62,78,36,75,28,91,39,32,56,60,64,21,15,80,85,28,22,53,58,69,62,60,48,66,91,38,66,54,5,24,1,49,71,49}; int param1_4[] = {-98,-98,-96,-96,-82,-80,-80,-68,-62,-60,-46,-38,-26,-26,-20,-18,16,22,24,26,34,46,52,52,74,76,90,92}; int param1_5[] = {1,0,1,0,0,1,1}; int param1_6[] = {4,7,11,19,21,39,57,80,84,93,94,97}; int param1_7[] = {14,20,24,-92,58,12,78,78,-90,96,-44,36,30,-46,-30,-80,26,-2,26,28,-16,-50,-2,-36,-8}; int param1_8[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param1_9[] = {23,50}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {37,24,5,26,26,3,10,21,23,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
*
[ "a) (", "b) int", "c) *", "d) )", "e) )" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int a, int b, int c ) { if ( a + b <= c || a + c <= b || b + c <= a ) return false; else return true; } bool f_filled ( int a, int b, int c ) {} arr, n, sizeof(int), cmpfunc);} bool f_gold ( int a, int b, int c ) { if ( a + b <= c || a + c <= b || b + c <= a ) return false; else return true; } bool f_filled ( int a, int b, int c ) {} int main(void) { int n_success = 0; int param0[] = {29,83,48,59,56,68,63,95,2,11}; int param1[] = {19,34,14,12,39,85,36,34,90,16}; int param2[] = {52,49,65,94,22,9,41,37,27,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int a, int b, int c ) { [MASK] ( a + b <= c || a + c <= b || b + c <= a ) return false; else return true; } bool f_filled ( int a, int b, int c ) {}arr, n, sizeof(int), cmpfunc);} bool f_gold ( int a, int b, int c ) { if ( a + b <= c || a + c <= b || b + c <= a ) return false; else return true; } bool f_filled ( int a, int b, int c ) {} int main(void) { int n_success = 0; int param0[] = {29,83,48,59,56,68,63,95,2,11}; int param1[] = {19,34,14,12,39,85,36,34,90,16}; int param2[] = {52,49,65,94,22,9,41,37,27,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
if
[ "a) {", "b) a,", "c) {", "d) if", "e) (" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int p ) { int ans = 0; int temp = p; while ( temp <= n ) { ans += n / temp; temp = temp * p; } return ans; } int f_filled ( int n, int p ) {} t), cmpfunc);} int f_gold ( int n, int p ) { int ans = 0; int temp = p; while ( temp <= n ) { ans += n / temp; temp = temp * p; } return ans; } int f_filled ( int n, int p ) {} int main(void) { int n_success = 0; int param0[] = {49,80,10,81,11,45,86,27,80,97}; int param1[] = {30,25,9,57,4,34,90,78,60,31}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len [MASK] arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int p ) { int ans = 0; int temp = p; while ( temp <= n ) { ans += n / temp; temp = temp * p; } return ans; } int f_filled ( int n, int p ) {}t), cmpfunc);} int f_gold ( int n, int p ) { int ans = 0; int temp = p; while ( temp <= n ) { ans += n / temp; temp = temp * p; } return ans; } int f_filled ( int n, int p ) {} int main(void) { int n_success = 0; int param0[] = {49,80,10,81,11,45,86,27,80,97}; int param1[] = {30,25,9,57,4,34,90,78,60,31}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
(int
[ "a) (int", "b) &", "c) <iomanip>", "d) import", "e) <vector>" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int result = 0; for ( int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n - i; j ++ ) for ( int k = 0; k <= ( n - i - j ); k ++ ) if ( i + j + k == n ) result ++; return result; } int f_filled ( int n ) {} int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n - i; j ++ ) for ( int k = 0; k <= ( n - i - j ); k ++ ) if ( i + j + k == n ) result ++; return result; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {62,44,37,81,14,20,76,72,96,52}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int result [MASK] 0; for ( int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n - i; j ++ ) for ( int k = 0; k <= ( n - i - j ); k ++ ) if ( i + j + k == n ) result ++; return result; } int f_filled ( int n ) {}int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n - i; j ++ ) for ( int k = 0; k <= ( n - i - j ); k ++ ) if ( i + j + k == n ) result ++; return result; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {62,44,37,81,14,20,76,72,96,52}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
=
[ "a) (", "b) =", "c) +", "d) >=", "e) int" ]
b
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_map < int, int > hm; for ( int i = 0; i < n; i ++ ) hm [ arr [ i ] ] ++; int max_count = 0, min_count = n; for ( auto x : hm ) { max_count = max ( max_count, x . second ); min_count = min ( min_count, x . second ); } return ( max_count - min_count ); } int f_filled ( int arr [ ], int n ) {} or ( auto x : hm ) { max_count = max ( max_count, x . second ); min_count = min ( min_count, x . second ); } return ( max_count - min_count ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,3,23,24,39,53,55,57,59,60,68,87}; int param0_1[] = {-76,46,50,90,-98,98,8,-14,24,-70,-86,-44,-88,-60,76,-16,-24,24,52,-94,-44,-76,60,-12,-70,10,90,70,64,-4,-88,28,62,74,-30,64,-78,-54,14,62,40,76,-26,26}; int param0_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,1}; int param0_3[] = {61,48,24,48,26,49,90,88,55,4,49}; int param0_4[] = {-94,-80,-76,-72,-66,-62,-62,-60,-58,-48,-46,-42,-30,-20,-12,0,8,22,30,36,52,58,64,64,66,66,70,74,78,84,84,92,94,96}; int param0_5[] = {1,1,0,1,1,1,0,0,0,0,1,0,0,1,1,1,0,1,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,1}; int param0_6[] = {4,9,20,22,24,29,30,34,51,54,55,60,76,94,99}; int param0_7[] = {2,46,72,0,60,32,24,-12,-54,86,-78,8,10,22,98,4,-56,-94,52,30,16,-14,80,96,22,86,6,-34,92,-50,0,-6,16,32,58,-74,-16,-70,-88,70,-16}; int param0_8[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {76,63,32,60,35,16,36,56,30,32,79,21,56,40,93,54,30,89,20,74,95,1,74,18,57,59,13}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {7,37,19,6,30,33,11,22,33,26}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], [MASK] n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_map < int, int > hm; for ( int i = 0; i < n; i ++ ) hm [ arr [ i ] ] ++; int max_count = 0, min_count = n; for ( auto x : hm ) { max_count = max ( max_count, x . second ); min_count = min ( min_count, x . second ); } return ( max_count - min_count ); } int f_filled ( int arr [ ], int n ) {}or ( auto x : hm ) { max_count = max ( max_count, x . second ); min_count = min ( min_count, x . second ); } return ( max_count - min_count ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,3,23,24,39,53,55,57,59,60,68,87}; int param0_1[] = {-76,46,50,90,-98,98,8,-14,24,-70,-86,-44,-88,-60,76,-16,-24,24,52,-94,-44,-76,60,-12,-70,10,90,70,64,-4,-88,28,62,74,-30,64,-78,-54,14,62,40,76,-26,26}; int param0_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,1}; int param0_3[] = {61,48,24,48,26,49,90,88,55,4,49}; int param0_4[] = {-94,-80,-76,-72,-66,-62,-62,-60,-58,-48,-46,-42,-30,-20,-12,0,8,22,30,36,52,58,64,64,66,66,70,74,78,84,84,92,94,96}; int param0_5[] = {1,1,0,1,1,1,0,0,0,0,1,0,0,1,1,1,0,1,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,1}; int param0_6[] = {4,9,20,22,24,29,30,34,51,54,55,60,76,94,99}; int param0_7[] = {2,46,72,0,60,32,24,-12,-54,86,-78,8,10,22,98,4,-56,-94,52,30,16,-14,80,96,22,86,6,-34,92,-50,0,-6,16,32,58,-74,-16,-70,-88,70,-16}; int param0_8[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {76,63,32,60,35,16,36,56,30,32,79,21,56,40,93,54,30,89,20,74,95,1,74,18,57,59,13}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {7,37,19,6,30,33,11,22,33,26}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) +", "b) &", "c) *", "d) int", "e) (x" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int res = 1; for ( int i = 0; i < n && arr [ i ] <= res; i ++ ) res = res + arr [ i ]; return res; } int f_filled ( int arr [ ], int n ) {} pfunc);} int f_gold ( int arr [ ], int n ) { int res = 1; for ( int i = 0; i < n && arr [ i ] <= res; i ++ ) res = res + arr [ i ]; return res; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {16,23,24,41,48,58,72,75}; int param0_1[] = {-14,-82,12,-14,-38,12,40,12,-74,42,-36,64}; int param0_2[] = {0,0,1,1,1,1}; int param0_3[] = {17,89,44}; int param0_4[] = {-94,-92,-84,-82,-72,-58,-56,-40,-34,-34,-24,-22,-8,-8,12,14,16,16,22,22,34,46,54,58,68,72,74,78,88,96}; int param0_5[] = {0,0,0,0,0,1,0,0,1,0,1,0}; int param0_6[] = {2,12,13,13,13,16,28,32,34,41,41,47,49,49,50,52,58,61,63,65,67,68,68,74,80,80,84,84,89,93,94,98,99,99}; int param0_7[] = {-54}; int param0_8[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {42,50,76,45,6,63,46,73,65,70,87,5,41,63,96,75,38,76,27,7,71,9,65,44,76,37,94,52,55,3,38,68,45,15,35,90,36,46,13,92,32,22,49,35,83}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {4,8,5,2,25,8,23,0,33,35}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const [MASK] * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int res = 1; for ( int i = 0; i < n && arr [ i ] <= res; i ++ ) res = res + arr [ i ]; return res; } int f_filled ( int arr [ ], int n ) {}pfunc);} int f_gold ( int arr [ ], int n ) { int res = 1; for ( int i = 0; i < n && arr [ i ] <= res; i ++ ) res = res + arr [ i ]; return res; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {16,23,24,41,48,58,72,75}; int param0_1[] = {-14,-82,12,-14,-38,12,40,12,-74,42,-36,64}; int param0_2[] = {0,0,1,1,1,1}; int param0_3[] = {17,89,44}; int param0_4[] = {-94,-92,-84,-82,-72,-58,-56,-40,-34,-34,-24,-22,-8,-8,12,14,16,16,22,22,34,46,54,58,68,72,74,78,88,96}; int param0_5[] = {0,0,0,0,0,1,0,0,1,0,1,0}; int param0_6[] = {2,12,13,13,13,16,28,32,34,41,41,47,49,49,50,52,58,61,63,65,67,68,68,74,80,80,84,84,89,93,94,98,99,99}; int param0_7[] = {-54}; int param0_8[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {42,50,76,45,6,63,46,73,65,70,87,5,41,63,96,75,38,76,27,7,71,9,65,44,76,37,94,52,55,3,38,68,45,15,35,90,36,46,13,92,32,22,49,35,83}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {4,8,5,2,25,8,23,0,33,35}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
void
[ "a) min", "b) (", "c) }", "d) void", "e) str" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char a [], char b [] ) { int m = strlen(a); int n = strlen(b); int lookup [ m + 1 ] [ n + 1 ] = { { 0 } }; for ( int i = 0; i <= n; ++ i ) lookup [ 0 ] [ i ] = 0; for ( int i = 0; i <= m; ++ i ) lookup [ i ] [ 0 ] = 1; for ( int i = 1; i <= m; i ++ ) { for ( int j = 1; j <= n; j ++ ) { if ( a [ i - 1 ] == b [ j - 1 ] ) lookup [ i ] [ j ] = lookup [ i - 1 ] [ j - 1 ] + lookup [ i - 1 ] [ j ]; else lookup [ i ] [ j ] = lookup [ i - 1 ] [ j ]; } } return lookup [ m ] [ n ]; } int f_filled ( char a [], char b [] ) {} [ i - 1 ] [ j - 1 ] + lookup [ i - 1 ] [ j ]; else lookup [ i ] [ j ] = lookup [ i - 1 ] [ j ]; } } return lookup [ m ] [ n ]; } int f_filled ( char a [], char b [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"fZOKCdZ Lav","2","1000001110","IAOyBzgIWHo","211806","1","CVaQTG","6265187228","10111101101000","vEi"}; char param1[][100] = {"fKA","187012","0","oA","10","001011100","CT","628","01111","bigsvkQG"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char a [], char b [] ) { int m = strlen(a); int n = strlen(b); int lookup [ m + 1 ] [ n + 1 ] = [MASK] { 0 } }; for ( int i = 0; i <= n; ++ i ) lookup [ 0 ] [ i ] = 0; for ( int i = 0; i <= m; ++ i ) lookup [ i ] [ 0 ] = 1; for ( int i = 1; i <= m; i ++ ) { for ( int j = 1; j <= n; j ++ ) { if ( a [ i - 1 ] == b [ j - 1 ] ) lookup [ i ] [ j ] = lookup [ i - 1 ] [ j - 1 ] + lookup [ i - 1 ] [ j ]; else lookup [ i ] [ j ] = lookup [ i - 1 ] [ j ]; } } return lookup [ m ] [ n ]; } int f_filled ( char a [], char b [] ) {}[ i - 1 ] [ j - 1 ] + lookup [ i - 1 ] [ j ]; else lookup [ i ] [ j ] = lookup [ i - 1 ] [ j ]; } } return lookup [ m ] [ n ]; } int f_filled ( char a [], char b [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"fZOKCdZ Lav","2","1000001110","IAOyBzgIWHo","211806","1","CVaQTG","6265187228","10111101101000","vEi"}; char param1[][100] = {"fKA","187012","0","oA","10","001011100","CT","628","01111","bigsvkQG"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{
[ "a) public", "b) :", "c) return", "d) )", "e) {" ]
e
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char arr [ ], int n, int k ) { int res = 0; vector < int > thi; vector < int > pol; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] == 'P' ) pol . push_back ( i ); else if ( arr [ i ] == 'T' ) thi . push_back ( i ); } int l = 0, r = 0; while ( l < len(thi) && r < len(pol) ) { if ( abs ( thi [ l ] - pol [ r ] ) <= k ) { res ++; l ++; r ++; } else if ( thi [ l ] < pol [ r ] ) l ++; else r ++; } return res; } int f_filled ( char arr [ ], int n, int k ) {} ] - pol [ r ] ) <= k ) { res ++; l ++; r ++; } else if ( thi [ l ] < pol [ r ] ) l ++; else r ++; } return res; } int f_filled ( char arr [ ], int n, int k ) {} int main(void) { int n_success = 0; char param0_0[] = {'A','B','B','D','E','E','F','G','G','G','I','J','O','P','Q','Q','Q','Q','R','R','S','U','X','Y','Y','c','d','h','i','i','i','i','k','k','l','l','l','l','m','p','r','r','s','t','t','u','x','z'}; char param0_1[] = {'7','6','0','1','0','1'}; char param0_2[] = {'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}; char param0_3[] = {'y','k','S','i','s','r','i','z','y','f','E','U','y','G','f','f','s','v','v','D','v','V','S','D','K','S','f','V','g','I','J','p','j','k','R','n','m','O','L','X','y','U','y','k','w'}; char param0_4[] = {'1','1','5','8','8'}; char param0_5[] = {'0','1','0','0','1','1','1','0','0','0','1','0','1','0','1','0','0','0','0','0','1','0','0','0','0','1','1','1','0','0','0','0','0','0'}; char param0_6[] = {'A','I','K','Q','Q','X','Z','f','g'}; char param0_7[] = {'7','0','6','9','7','5','1','3','9','8','0','0','1','3','9','2','5','5','2','7','9','3','3','9','3','8','5','5','0','4','6','2','7','4','0','4','6','4','2','3'}; char param0_8[] = {'0','0','0','1','1','1','1','1','1','1','1'}; char param0_9[] = {'D','C','P','H','G','o','u','P','T','G','E','U','n','E','U'}; char *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {33,3,9,24,2,23,5,35,8,11}; int param2[] = {45,3,10,44,2,18,8,28,10,12}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char arr [ ], int n, int k ) { int res = 0; vector < int > thi; vector < int > pol; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] == 'P' ) pol . push_back ( i ); else if ( arr [ i ] == 'T' ) thi . push_back ( i ); } int l = 0, r = 0; while ( l < len(thi) && r < len(pol) ) { if ( abs ( thi [ l ] - pol [ r ] ) <= k ) { res ++; l ++; r ++; } else if [MASK] thi [ l ] < pol [ r ] ) l ++; else r ++; } return res; } int f_filled ( char arr [ ], int n, int k ) {} ] - pol [ r ] ) <= k ) { res ++; l ++; r ++; } else if ( thi [ l ] < pol [ r ] ) l ++; else r ++; } return res; } int f_filled ( char arr [ ], int n, int k ) {} int main(void) { int n_success = 0; char param0_0[] = {'A','B','B','D','E','E','F','G','G','G','I','J','O','P','Q','Q','Q','Q','R','R','S','U','X','Y','Y','c','d','h','i','i','i','i','k','k','l','l','l','l','m','p','r','r','s','t','t','u','x','z'}; char param0_1[] = {'7','6','0','1','0','1'}; char param0_2[] = {'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}; char param0_3[] = {'y','k','S','i','s','r','i','z','y','f','E','U','y','G','f','f','s','v','v','D','v','V','S','D','K','S','f','V','g','I','J','p','j','k','R','n','m','O','L','X','y','U','y','k','w'}; char param0_4[] = {'1','1','5','8','8'}; char param0_5[] = {'0','1','0','0','1','1','1','0','0','0','1','0','1','0','1','0','0','0','0','0','1','0','0','0','0','1','1','1','0','0','0','0','0','0'}; char param0_6[] = {'A','I','K','Q','Q','X','Z','f','g'}; char param0_7[] = {'7','0','6','9','7','5','1','3','9','8','0','0','1','3','9','2','5','5','2','7','9','3','3','9','3','8','5','5','0','4','6','2','7','4','0','4','6','4','2','3'}; char param0_8[] = {'0','0','0','1','1','1','1','1','1','1','1'}; char param0_9[] = {'D','C','P','H','G','o','u','P','T','G','E','U','n','E','U'}; char *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {33,3,9,24,2,23,5,35,8,11}; int param2[] = {45,3,10,44,2,18,8,28,10,12}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
(
[ "a) -", "b) -", "c) (x1", "d) (", "e) <=" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n ) { int x1 = a [ 0 ]; int x2 = 1; for ( int i = 1; i < n; i ++ ) x1 = x1 ^ a [ i ]; for ( int i = 2; i <= n + 1; i ++ ) x2 = x2 ^ i; return ( x1 ^ x2 ); } int f_filled ( int a [ ], int n ) {} a [ 0 ]; int x2 = 1; for ( int i = 1; i < n; i ++ ) x1 = x1 ^ a [ i ]; for ( int i = 2; i <= n + 1; i ++ ) x2 = x2 ^ i; return ( x1 ^ x2 ); } int f_filled ( int a [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,5,7,8,10,14,27,32,51,52,57,58,65,68,68,72,73,73,83,92,98}; int param0_1[] = {-60,-48,38,-78,88,86,-4,-94,16,-64,32,88,58,-78,-16,48,38,30,66,-60,20,40,-28,-64,-48,-86,-80,-8,-58,52,80,-32,46,-4,-70,76,-4,78,-64,38,-40}; int param0_2[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {69,59,22,33,69,28,11,34,72,88,16,30,69,89,43,4,65,85,27}; int param0_4[] = {-98,-98,-92,-88,-88,-82,-74,-70,-68,-60,-60,-48,-38,-34,-34,-24,14,38,50,58,62,64,64,68,76,78,78,86,88,90,92,98,98}; int param0_5[] = {0,1,0,1,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,1,0,0,0,0,1,1,0,0,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0}; int param0_6[] = {1,9,12,12,24,25,33,33,36,39,46,48,48,52,52,53,57,69,71,72,75,76,78,80,82,86,89,91,94,95,96,97,98,99}; int param0_7[] = {62,-66,60,-92,46,6,-52,48,72,-64,34,20,50,70,-34,20,-70,14,-44,66,-70}; int param0_8[] = {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,1,1,1,1,1,1,1,1}; int param0_9[] = {33,10,6,71,18,22,15,57,56,63,35,93,31,43,98,99,62,39,44,86,78,95,6,76,71}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {12,28,38,13,23,41,30,17,30,12}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int [MASK] ) { int x1 = a [ 0 ]; int x2 = 1; for ( int i = 1; i < n; i ++ ) x1 = x1 ^ a [ i ]; for ( int i = 2; i <= n + 1; i ++ ) x2 = x2 ^ i; return ( x1 ^ x2 ); } int f_filled ( int a [ ], int n ) {} a [ 0 ]; int x2 = 1; for ( int i = 1; i < n; i ++ ) x1 = x1 ^ a [ i ]; for ( int i = 2; i <= n + 1; i ++ ) x2 = x2 ^ i; return ( x1 ^ x2 ); } int f_filled ( int a [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,5,7,8,10,14,27,32,51,52,57,58,65,68,68,72,73,73,83,92,98}; int param0_1[] = {-60,-48,38,-78,88,86,-4,-94,16,-64,32,88,58,-78,-16,48,38,30,66,-60,20,40,-28,-64,-48,-86,-80,-8,-58,52,80,-32,46,-4,-70,76,-4,78,-64,38,-40}; int param0_2[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {69,59,22,33,69,28,11,34,72,88,16,30,69,89,43,4,65,85,27}; int param0_4[] = {-98,-98,-92,-88,-88,-82,-74,-70,-68,-60,-60,-48,-38,-34,-34,-24,14,38,50,58,62,64,64,68,76,78,78,86,88,90,92,98,98}; int param0_5[] = {0,1,0,1,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,1,0,0,0,0,1,1,0,0,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0}; int param0_6[] = {1,9,12,12,24,25,33,33,36,39,46,48,48,52,52,53,57,69,71,72,75,76,78,80,82,86,89,91,94,95,96,97,98,99}; int param0_7[] = {62,-66,60,-92,46,6,-52,48,72,-64,34,20,50,70,-34,20,-70,14,-44,66,-70}; int param0_8[] = {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,1,1,1,1,1,1,1,1}; int param0_9[] = {33,10,6,71,18,22,15,57,56,63,35,93,31,43,98,99,62,39,44,86,78,95,6,76,71}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {12,28,38,13,23,41,30,17,30,12}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
n
[ "a) =", "b) pow", "c) :", "d) ==", "e) n" ]
e
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int low, int high ) { if ( low > high ) return - 1; int mid = ( low + high ) / 2; if ( arr [ mid ] != mid + 1 ) { if ( mid > 0 && arr [ mid ] == arr [ mid - 1 ] ) return mid; return f_gold ( arr, low, mid - 1 ); } return f_gold ( arr, mid + 1, high ); } int f_filled ( int arr [ ], int low, int high ) {} ( mid > 0 && arr [ mid ] == arr [ mid - 1 ] ) return mid; return f_gold ( arr, low, mid - 1 ); } return f_gold ( arr, mid + 1, high ); } int f_filled ( int arr [ ], int low, int high ) {} int main(void) { int n_success = 0; int param0_0[] = {15,21,32,42,42,44,57,68,75,80,83,84}; int param0_1[] = {-60,-90,-88,-80,-86,18,54,56,84,42,-60,-90,52,-44,-62,-56,-16,28,22,-24,-36,-56,80,68,-16}; int param0_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,1,1,1,1,1,1,1}; int param0_3[] = {87,43,74}; int param0_4[] = {-82,-66,-66,-62,-56,-52,-44,-42,-28,-22,-12,-6,-4,-2,18,26,26,28,42,42,56,58,78,90,92,94,96,96}; int param0_5[] = {0,1,1,1,1,1,0,1,1,1,1,0,0,1,0,0,1,0,1,1,1}; int param0_6[] = {6,9,14,17,22,31,32,33,36,39,42,43,46,46,46,47,49,53,60,61,67,68,72,75,77,77,84,84,85,89,94,94,95}; int param0_7[] = {-88,82,-10,-10,68,-86,70,92,-54,-10,-56}; int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1}; int param0_9[] = {35,66,47,42,95,10,84,80,23,35,21,71,39,9,38,40,22,65}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {6,23,33,2,20,19,23,7,8,14}; int param2[] = {11,12,32,2,21,19,19,10,8,16}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, [MASK] y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int low, int high ) { if ( low > high ) return - 1; int mid = ( low + high ) / 2; if ( arr [ mid ] != mid + 1 ) { if ( mid > 0 && arr [ mid ] == arr [ mid - 1 ] ) return mid; return f_gold ( arr, low, mid - 1 ); } return f_gold ( arr, mid + 1, high ); } int f_filled ( int arr [ ], int low, int high ) {}( mid > 0 && arr [ mid ] == arr [ mid - 1 ] ) return mid; return f_gold ( arr, low, mid - 1 ); } return f_gold ( arr, mid + 1, high ); } int f_filled ( int arr [ ], int low, int high ) {} int main(void) { int n_success = 0; int param0_0[] = {15,21,32,42,42,44,57,68,75,80,83,84}; int param0_1[] = {-60,-90,-88,-80,-86,18,54,56,84,42,-60,-90,52,-44,-62,-56,-16,28,22,-24,-36,-56,80,68,-16}; int param0_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,1,1,1,1,1,1,1}; int param0_3[] = {87,43,74}; int param0_4[] = {-82,-66,-66,-62,-56,-52,-44,-42,-28,-22,-12,-6,-4,-2,18,26,26,28,42,42,56,58,78,90,92,94,96,96}; int param0_5[] = {0,1,1,1,1,1,0,1,1,1,1,0,0,1,0,0,1,0,1,1,1}; int param0_6[] = {6,9,14,17,22,31,32,33,36,39,42,43,46,46,46,47,49,53,60,61,67,68,72,75,77,77,84,84,85,89,94,94,95}; int param0_7[] = {-88,82,-10,-10,68,-86,70,92,-54,-10,-56}; int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1}; int param0_9[] = {35,66,47,42,95,10,84,80,23,35,21,71,39,9,38,40,22,65}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {6,23,33,2,20,19,23,7,8,14}; int param2[] = {11,12,32,2,21,19,19,10,8,16}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) return", "b) {", "c) }", "d) int", "e) x:" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { if ( n % 2 != 0 ) return 0; int res = 1; for ( int i = 2; i <= sqrt ( n ); i ++ ) { int count = 0, curr_sum = 1, curr_term = 1; while ( n % i == 0 ) { count ++; n = n / i; if ( i == 2 && count == 1 ) curr_sum = 0; curr_term *= i; curr_sum += curr_term; } res *= curr_sum; } if ( n >= 2 ) res *= ( 1 + n ); return res; } int f_filled ( int n ) {} i == 2 && count == 1 ) curr_sum = 0; curr_term *= i; curr_sum += curr_term; } res *= curr_sum; } if ( n >= 2 ) res *= ( 1 + n ); return res; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {71,78,39,36,49,17,53,66,92,71}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } [MASK] max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { if ( n % 2 != 0 ) return 0; int res = 1; for ( int i = 2; i <= sqrt ( n ); i ++ ) { int count = 0, curr_sum = 1, curr_term = 1; while ( n % i == 0 ) { count ++; n = n / i; if ( i == 2 && count == 1 ) curr_sum = 0; curr_term *= i; curr_sum += curr_term; } res *= curr_sum; } if ( n >= 2 ) res *= ( 1 + n ); return res; } int f_filled ( int n ) {} i == 2 && count == 1 ) curr_sum = 0; curr_term *= i; curr_sum += curr_term; } res *= curr_sum; } if ( n >= 2 ) res *= ( 1 + n ); return res; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {71,78,39,36,49,17,53,66,92,71}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
int
[ "a) 1", "b) int", "c) )", "d) else", "e) =" ]
b
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int limit ) { if ( limit < 2 ) return 0; long long int ef1 = 0, ef2 = 2; long long int sum = ef1 + ef2; while ( ef2 <= limit ) { long long int ef3 = 4 * ef2 + ef1; if ( ef3 > limit ) break; ef1 = ef2; ef2 = ef3; sum += ef2; } return sum; } int f_filled ( int limit ) {} f2; while ( ef2 <= limit ) { long long int ef3 = 4 * ef2 + ef1; if ( ef3 > limit ) break; ef1 = ef2; ef2 = ef3; sum += ef2; } return sum; } int f_filled ( int limit ) {} int main(void) { int n_success = 0; int param0[] = {67,89,12,94,96,25,49,8,33,59}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int limit ) { if ( limit < 2 ) return 0; long long int ef1 [MASK] 0, ef2 = 2; long long int sum = ef1 + ef2; while ( ef2 <= limit ) { long long int ef3 = 4 * ef2 + ef1; if ( ef3 > limit ) break; ef1 = ef2; ef2 = ef3; sum += ef2; } return sum; } int f_filled ( int limit ) {}f2; while ( ef2 <= limit ) { long long int ef3 = 4 * ef2 + ef1; if ( ef3 > limit ) break; ef1 = ef2; ef2 = ef3; sum += ef2; } return sum; } int f_filled ( int limit ) {} int main(void) { int n_success = 0; int param0[] = {67,89,12,94,96,25,49,8,33,59}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
=
[ "a) =", "b) int", "c) cmpfunc);}", "d) #include", "e) *" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n, int k ) { int max_so_far = INT_MIN, max_ending_here = 0; for ( int i = 0; i < n * k; i ++ ) { max_ending_here = max_ending_here + a [ i % n ]; if ( max_so_far < max_ending_here ) max_so_far = max_ending_here; if ( max_ending_here < 0 ) max_ending_here = 0; } return max_so_far; } int f_filled ( int a [ ], int n, int k ) {} ]; if ( max_so_far < max_ending_here ) max_so_far = max_ending_here; if ( max_ending_here < 0 ) max_ending_here = 0; } return max_so_far; } int f_filled ( int a [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {5,6,12,20,23,28,33,37,47,51,53,56,63,65,65,68,69,76,76,78,83}; int param0_1[] = {68,10,52,-44,34,-4,-34,2,50,-60,50,94,-98,-98,-44,-36,-4,-62,-2,-92,-70,-48,-78,-10,94}; int param0_2[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {71,59,21,82,73,29,30,25,21,10,85,22,60,43,49,20,34,39,69,6,44,27,50,33,57,29,65,18,68,56,50,28}; int param0_4[] = {-84,-74,-74,-56,-54,-48,-48,-46,-42,-34,-32,-30,-18,-16,-16,6,12,20,24,26,30,32,34,42,42,42,44,46,46,50,50,62,72,78,90}; int param0_5[] = {0,1,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,1,1,0,0,0,1,1,1,0}; int param0_6[] = {3,7,11,11,26,60,68,71,77,91,95}; int param0_7[] = {28,48,-86,-52,6,4,30,18,-32,60,-2,16,-88,-36}; int param0_8[] = {1}; int param0_9[] = {76}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {18,22,34,23,17,16,8,8,0,0}; int param2[] = {20,22,29,30,23,25,10,11,0,0}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int [MASK] x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n, int k ) { int max_so_far = INT_MIN, max_ending_here = 0; for ( int i = 0; i < n * k; i ++ ) { max_ending_here = max_ending_here + a [ i % n ]; if ( max_so_far < max_ending_here ) max_so_far = max_ending_here; if ( max_ending_here < 0 ) max_ending_here = 0; } return max_so_far; } int f_filled ( int a [ ], int n, int k ) {}]; if ( max_so_far < max_ending_here ) max_so_far = max_ending_here; if ( max_ending_here < 0 ) max_ending_here = 0; } return max_so_far; } int f_filled ( int a [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {5,6,12,20,23,28,33,37,47,51,53,56,63,65,65,68,69,76,76,78,83}; int param0_1[] = {68,10,52,-44,34,-4,-34,2,50,-60,50,94,-98,-98,-44,-36,-4,-62,-2,-92,-70,-48,-78,-10,94}; int param0_2[] = {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,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {71,59,21,82,73,29,30,25,21,10,85,22,60,43,49,20,34,39,69,6,44,27,50,33,57,29,65,18,68,56,50,28}; int param0_4[] = {-84,-74,-74,-56,-54,-48,-48,-46,-42,-34,-32,-30,-18,-16,-16,6,12,20,24,26,30,32,34,42,42,42,44,46,46,50,50,62,72,78,90}; int param0_5[] = {0,1,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,1,1,0,0,0,1,1,1,0}; int param0_6[] = {3,7,11,11,26,60,68,71,77,91,95}; int param0_7[] = {28,48,-86,-52,6,4,30,18,-32,60,-2,16,-88,-36}; int param0_8[] = {1}; int param0_9[] = {76}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {18,22,34,23,17,16,8,8,0,0}; int param2[] = {20,22,29,30,23,25,10,11,0,0}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
max(int
[ "a) max(int", "b) \"0\"", "c) ;", "d) dp", "e) =" ]
a
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} char f_gold [] ( char seq [] ) { int n = strlen(seq); if ( n >= 9 ) return "-1"; char result [] ( n + 1, ' ' ); int count = 1; for ( int i = 0; i <= n; i ++ ) { if ( i == n || seq [ i ] == 'I' ) { for ( int j = i - 1; j >= - 1; j -- ) { result [ j + 1 ] = '0' + count ++; if ( j >= 0 && seq [ j ] == 'I' ) break; } } } return result; } char f_filled [] ( char seq [] ) {} j >= - 1; j -- ) { result [ j + 1 ] = '0' + count ++; if ( j >= 0 && seq [ j ] == 'I' ) break; } } } return result; } char f_filled [] ( char seq [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"D","I","DD","II","DIDI","IIDDD","DDIDDIID","176297","1","XHkhZq"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} char f_gold [] ( char seq [] ) { int n = strlen(seq); [MASK] ( n >= 9 ) return "-1"; char result [] ( n + 1, ' ' ); int count = 1; for ( int i = 0; i <= n; i ++ ) { if ( i == n || seq [ i ] == 'I' ) { for ( int j = i - 1; j >= - 1; j -- ) { result [ j + 1 ] = '0' + count ++; if ( j >= 0 && seq [ j ] == 'I' ) break; } } } return result; } char f_filled [] ( char seq [] ) {} j >= - 1; j -- ) { result [ j + 1 ] = '0' + count ++; if ( j >= 0 && seq [ j ] == 'I' ) break; } } } return result; } char f_filled [] ( char seq [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"D","I","DD","II","DIDI","IIDDD","DDIDDIID","176297","1","XHkhZq"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
if
[ "a) (", "b) (int", "c) if", "d) ;", "e) val" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int x, int y, int z ) { int c = 0; while ( x && y && z ) { x --; y --; z --; c ++; } return c; } int f_filled ( int x, int y, int z ) {} eof(int), cmpfunc);} int f_gold ( int x, int y, int z ) { int c = 0; while ( x && y && z ) { x --; y --; z --; c ++; } return c; } int f_filled ( int x, int y, int z ) {} int main(void) { int n_success = 0; 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,39,96,26,51,6,76}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int x, int y, int z ) { int c = 0; while ( x && y && z ) { x --; y --; z --; [MASK] ++; } return c; } int f_filled ( int x, int y, int z ) {}eof(int), cmpfunc);} int f_gold ( int x, int y, int z ) { int c = 0; while ( x && y && z ) { x --; y --; z --; c ++; } return c; } int f_filled ( int x, int y, int z ) {} int main(void) { int n_success = 0; 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,39,96,26,51,6,76}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
c
[ "a) <math.h>", "b) (", "c) 1", "d) c", "e) i" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} char f_gold [] ( char num1 [], char num2 [] ) { int len1 = len(num1); int len2 = len(num2); if ( len1 == 0 || len2 == 0 ) return "0"; vector < int > result ( len1 + len2, 0 ); int i_n1 = 0; int i_n2 = 0; for ( int i = len1 - 1; i >= 0; i -- ) { int carry = 0; int n1 = num1 [ i ] - '0'; i_n2 = 0; for ( int j = len2 - 1; j >= 0; j -- ) { int n2 = num2 [ j ] - '0'; int sum = n1 * n2 + result [ i_n1 + i_n2 ] + carry; carry = sum / 10; result [ i_n1 + i_n2 ] = sum % 10; i_n2 ++; } if ( carry > 0 ) result [ i_n1 + i_n2 ] += carry; i_n1 ++; } int i = len(result) - 1; while ( i >= 0 && result [ i ] == 0 ) i --; if ( i == - 1 ) return "0"; char s [] = ""; while ( i >= 0 ) s += std :: to_string ( result [ i -- ] ); return s; } char f_filled [] ( char num1 [], char num2 [] ) {} t [ i ] == 0 ) i --; if ( i == - 1 ) return "0"; char s [] = ""; while ( i >= 0 ) s += std :: to_string ( result [ i -- ] ); return s; } char f_filled [] ( char num1 [], char num2 [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"OaITtzE","88111031","1100111","eiWPbMrFx","43701248","100001111110","jVgOapMp","68337672","00110101","JqSh"}; char param1[][100] = {"RnYlJUqzk","558471","11111110111101","tBAJaI","4027","11","Xm","56939","1","iAfjQRwuVyost"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} char f_gold [] ( char num1 [], char num2 [] ) { int len1 = len(num1); int len2 = len(num2); if ( len1 == 0 || len2 == 0 ) return "0"; vector < int > result ( len1 + len2, 0 ); int i_n1 = 0; int i_n2 = 0; for ( int i = len1 - 1; i >= 0; i -- ) { int carry = 0; int n1 = num1 [ i ] - '0'; i_n2 = 0; for ( int j = len2 - 1; j >= 0; j -- ) { int [MASK] = num2 [ j ] - '0'; int sum = n1 * n2 + result [ i_n1 + i_n2 ] + carry; carry = sum / 10; result [ i_n1 + i_n2 ] = sum % 10; i_n2 ++; } if ( carry > 0 ) result [ i_n1 + i_n2 ] += carry; i_n1 ++; } int i = len(result) - 1; while ( i >= 0 && result [ i ] == 0 ) i --; if ( i == - 1 ) return "0"; char s [] = ""; while ( i >= 0 ) s += std :: to_string ( result [ i -- ] ); return s; } char f_filled [] ( char num1 [], char num2 [] ) {}t [ i ] == 0 ) i --; if ( i == - 1 ) return "0"; char s [] = ""; while ( i >= 0 ) s += std :: to_string ( result [ i -- ] ); return s; } char f_filled [] ( char num1 [], char num2 [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"OaITtzE","88111031","1100111","eiWPbMrFx","43701248","100001111110","jVgOapMp","68337672","00110101","JqSh"}; char param1[][100] = {"RnYlJUqzk","558471","11111110111101","tBAJaI","4027","11","Xm","56939","1","iAfjQRwuVyost"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
n2
[ "a) <iostream>", "b) return", "c) f_gold", "d) n2", "e) j" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int ip [ ], int op [ ], int n ) { queue < int > input; for ( int i = 0; i < n; i ++ ) input . push ( ip [ i ] ); queue < int > output; for ( int i = 0; i < n; i ++ ) output . push ( op [ i ] ); stack < int > tempStack; while ( ! input . empty ( ) ) { int ele = input . front ( ); input . pop ( ); if ( ele == output . front ( ) ) { output . pop ( ); while ( ! tempStack . empty ( ) ) { if ( tempStack . top ( ) == output . front ( ) ) { tempStack . pop ( ); output . pop ( ); } else break; } } else tempStack . push ( ele ); } return ( input . empty ( ) && tempStack . empty ( ) ); } bool f_filled ( int ip [ ], int op [ ], int n ) {} ); } else break; } } else tempStack . push ( ele ); } return ( input . empty ( ) && tempStack . empty ( ) ); } bool f_filled ( int ip [ ], int op [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {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,93,95,98}; int param0_1[] = {-86,10,-8,8,-24,-2,-84,-86,-54,50,56,-22,-8,-62,0,-50,-32}; int param0_2[] = {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,1,1,1,1,1,1,1,1,1}; int param0_3[] = {3,42,88,89,41,71,67,5,84,20,75,36,34,20,31,16,86,89,53,47,57,27,47,93,59,66,40,18,69,36,98,99,81}; int param0_4[] = {-98,-94,-94,-90,-88,-82,-80,-78,-78,-68,-58,-58,-52,-36,-30,-14,-12,-6,-2,-2,2,4,10,14,22,24,26,38,38,46,46,48,50,54,58,60,64,64,66,70,74,74,86,88,96,96}; int param0_5[] = {1,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1}; int param0_6[] = {19,37,44,65,72,87}; int param0_7[] = {88}; int param0_8[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; int param0_9[] = {5,8,53,60,85,94,77,53,81,54,67,48,56,49,16,1,85,6,55,98,62,36,4,7,64}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1_0[] = {2,5,7,13,16,23,24,25,27,31,31,33,34,35,38,46,49,49,51,52,58,61,62,66,68,71,73,78,91,94,98}; int param1_1[] = {-8,-46,22,-66,-94,-96,70,58,-4,-70,-96,34,-80,-26,-52,52,-76}; int param1_2[] = {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,1,1,1,1,1,1,1,1}; int param1_3[] = {16,61,39,99,71,73,35,47,62,80,1,49,54,35,39,55,7,6,85,84,11,51,38,4,72,10,33,65,64,32,16,99,9}; int param1_4[] = {-92,-92,-80,-72,-72,-72,-70,-68,-64,-56,-40,-38,-34,-24,-10,-8,-8,-2,0,2,4,6,14,14,18,20,34,36,36,38,38,42,48,56,64,70,72,76,76,76,76,78,84,90,94,96}; int param1_5[] = {0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0,0,0}; int param1_6[] = {17,31,39,46,56,88}; int param1_7[] = {-30}; int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}; int param1_9[] = {69,37,32,5,84,14,25,9,86,85,30,82,99,92,32,43,79,58,75,90,49,54,95,76,80}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {23,16,21,19,27,19,4,0,13,12}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int ip [ ], int op [ ], int n ) { queue < int > input; for ( int i = 0; i < n; i ++ ) input . push ( ip [ i ] ); queue < int > output; for ( int i = 0; i < n; i ++ [MASK] output . push ( op [ i ] ); stack < int > tempStack; while ( ! input . empty ( ) ) { int ele = input . front ( ); input . pop ( ); if ( ele == output . front ( ) ) { output . pop ( ); while ( ! tempStack . empty ( ) ) { if ( tempStack . top ( ) == output . front ( ) ) { tempStack . pop ( ); output . pop ( ); } else break; } } else tempStack . push ( ele ); } return ( input . empty ( ) && tempStack . empty ( ) ); } bool f_filled ( int ip [ ], int op [ ], int n ) {}); } else break; } } else tempStack . push ( ele ); } return ( input . empty ( ) && tempStack . empty ( ) ); } bool f_filled ( int ip [ ], int op [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {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,93,95,98}; int param0_1[] = {-86,10,-8,8,-24,-2,-84,-86,-54,50,56,-22,-8,-62,0,-50,-32}; int param0_2[] = {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,1,1,1,1,1,1,1,1,1}; int param0_3[] = {3,42,88,89,41,71,67,5,84,20,75,36,34,20,31,16,86,89,53,47,57,27,47,93,59,66,40,18,69,36,98,99,81}; int param0_4[] = {-98,-94,-94,-90,-88,-82,-80,-78,-78,-68,-58,-58,-52,-36,-30,-14,-12,-6,-2,-2,2,4,10,14,22,24,26,38,38,46,46,48,50,54,58,60,64,64,66,70,74,74,86,88,96,96}; int param0_5[] = {1,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1}; int param0_6[] = {19,37,44,65,72,87}; int param0_7[] = {88}; int param0_8[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; int param0_9[] = {5,8,53,60,85,94,77,53,81,54,67,48,56,49,16,1,85,6,55,98,62,36,4,7,64}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1_0[] = {2,5,7,13,16,23,24,25,27,31,31,33,34,35,38,46,49,49,51,52,58,61,62,66,68,71,73,78,91,94,98}; int param1_1[] = {-8,-46,22,-66,-94,-96,70,58,-4,-70,-96,34,-80,-26,-52,52,-76}; int param1_2[] = {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,1,1,1,1,1,1,1,1}; int param1_3[] = {16,61,39,99,71,73,35,47,62,80,1,49,54,35,39,55,7,6,85,84,11,51,38,4,72,10,33,65,64,32,16,99,9}; int param1_4[] = {-92,-92,-80,-72,-72,-72,-70,-68,-64,-56,-40,-38,-34,-24,-10,-8,-8,-2,0,2,4,6,14,14,18,20,34,36,36,38,38,42,48,56,64,70,72,76,76,76,76,78,84,90,94,96}; int param1_5[] = {0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0,0,0}; int param1_6[] = {17,31,39,46,56,88}; int param1_7[] = {-30}; int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}; int param1_9[] = {69,37,32,5,84,14,25,9,86,85,30,82,99,92,32,43,79,58,75,90,49,54,95,76,80}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {23,16,21,19,27,19,4,0,13,12}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
)
[ "a) <string>", "b) arr", "c) ]", "d) )", "e) ]" ]
d
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ); } int f_filled ( int n ) {} f (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ); } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {66,93,39,93,68,20,37,52,52,19}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n [MASK] 1 ); } int f_filled ( int n ) {}f (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ); } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {66,93,39,93,68,20,37,52,52,19}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
-
[ "a) ;", "b) res", "c) -", "d) [", "e) ;" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n, int key, int capacity ) { if ( n >= capacity ) return n; int i; for ( i = n - 1; ( i >= 0 && arr [ i ] > key ); i -- ) arr [ i + 1 ] = arr [ i ]; arr [ i + 1 ] = key; return ( n + 1 ); } int f_filled ( int arr [ ], int n, int key, int capacity ) {} for ( i = n - 1; ( i >= 0 && arr [ i ] > key ); i -- ) arr [ i + 1 ] = arr [ i ]; arr [ i + 1 ] = key; return ( n + 1 ); } int f_filled ( int arr [ ], int n, int key, int capacity ) {} int main(void) { int n_success = 0; int param0_0[] = {69}; int param0_1[] = {-34,-38,-72,90,-84,-40,-40,-52,-12,80,-4,-58}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_3[] = {96,34,11,1,36,79,64,75,75,96,32,18,25,79,63,80,90,75,44,71,48,1,62,53,17,98}; int param0_4[] = {-98,-92,-92,-84,-82,-80,-80,-74,-70,-60,-48,-42,-36,-34,-34,-34,-30,-28,-16,-6,-2,-2,2,12,14,20,24,40,46,50,60,66,70,72,78,82,88,92,94,94,96}; int param0_5[] = {1,0,1,1,0,0,1,0,0,0,1,1,0}; int param0_6[] = {10,12,12,19,20,21,24,27,37,47,50,54,55,58,61,63,63,68,73,75,87,90,90,92,92}; int param0_7[] = {-74,62,74,92,-38,-28,-26,4,88,-68,-76,-20,-4,12,72,6,42,36,88,-96,-80,90,80,-26,-36,-72,-62,38,-20,40,-10,-22,-20,38,82,-84,8,-60,86,-26,44,-72,-70,-16,-22,18,-16,76,-50}; int param0_8[] = {1,1,1,1,1}; int param0_9[] = {64,80,47,58,41,3,85,96,51,4,22,89,67,54,88,15,83,31,19,28,40,67,37,13,63,38,27,14,7,68}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {0,6,13,21,30,12,12,37,3,23}; int param2[] = {0,6,19,20,32,9,13,26,4,24}; int param3[] = {0,9,11,13,28,10,21,42,2,25}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int [MASK] x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n, int key, int capacity ) { if ( n >= capacity ) return n; int i; for ( i = n - 1; ( i >= 0 && arr [ i ] > key ); i -- ) arr [ i + 1 ] = arr [ i ]; arr [ i + 1 ] = key; return ( n + 1 ); } int f_filled ( int arr [ ], int n, int key, int capacity ) {} for ( i = n - 1; ( i >= 0 && arr [ i ] > key ); i -- ) arr [ i + 1 ] = arr [ i ]; arr [ i + 1 ] = key; return ( n + 1 ); } int f_filled ( int arr [ ], int n, int key, int capacity ) {} int main(void) { int n_success = 0; int param0_0[] = {69}; int param0_1[] = {-34,-38,-72,90,-84,-40,-40,-52,-12,80,-4,-58}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_3[] = {96,34,11,1,36,79,64,75,75,96,32,18,25,79,63,80,90,75,44,71,48,1,62,53,17,98}; int param0_4[] = {-98,-92,-92,-84,-82,-80,-80,-74,-70,-60,-48,-42,-36,-34,-34,-34,-30,-28,-16,-6,-2,-2,2,12,14,20,24,40,46,50,60,66,70,72,78,82,88,92,94,94,96}; int param0_5[] = {1,0,1,1,0,0,1,0,0,0,1,1,0}; int param0_6[] = {10,12,12,19,20,21,24,27,37,47,50,54,55,58,61,63,63,68,73,75,87,90,90,92,92}; int param0_7[] = {-74,62,74,92,-38,-28,-26,4,88,-68,-76,-20,-4,12,72,6,42,36,88,-96,-80,90,80,-26,-36,-72,-62,38,-20,40,-10,-22,-20,38,82,-84,8,-60,86,-26,44,-72,-70,-16,-22,18,-16,76,-50}; int param0_8[] = {1,1,1,1,1}; int param0_9[] = {64,80,47,58,41,3,85,96,51,4,22,89,67,54,88,15,83,31,19,28,40,67,37,13,63,38,27,14,7,68}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {0,6,13,21,30,12,12,37,3,23}; int param2[] = {0,6,19,20,32,9,13,26,4,24}; int param3[] = {0,9,11,13,28,10,21,42,2,25}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
min(int
[ "a) [", "b) int", "c) min(int", "d) int", "e) =" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( char str1 [ ], char str2 [ ], int m, int n ) { int j = 0; for ( int i = 0; i < n && j < m; i ++ ) if ( str1 [ j ] == str2 [ i ] ) j ++; return ( j == m ); } bool f_filled ( char str1 [ ], char str2 [ ], int m, int n ) {} , int n ) { int j = 0; for ( int i = 0; i < n && j < m; i ++ ) if ( str1 [ j ] == str2 [ i ] ) j ++; return ( j == m ); } bool f_filled ( char str1 [ ], char str2 [ ], int m, int n ) {} int main(void) { int n_success = 0; char param0[][100] = {"AXY","AXY","1100","t","034","01111010110","SjOXhD","455","001","MkK"}; char param1[][100] = {"ADXCPY","YADXCP","001011001111","Isv","376083","10110110","PWkZDupqagB","4553","11100","qfjWaMdMYkqcK"}; int param2[] = {3,4,4,1,3,8,6,3,3,3}; int param3[] = {6,6,12,3,6,8,9,4,5,13}; for(int i = 0; i < len(param0); ++i) { if(f_filled(&param0[i].front(),&param1[i].front(),param2[i],param3[i]) == f_gold(&param0[i].front(),&param1[i].front(),param2[i],param3[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( char str1 [ ], char str2 [ ], int m, int n ) { int j = 0; for ( int i = 0; i < n && j < m; i ++ ) if ( [MASK] [ j ] == str2 [ i ] ) j ++; return ( j == m ); } bool f_filled ( char str1 [ ], char str2 [ ], int m, int n ) {}, int n ) { int j = 0; for ( int i = 0; i < n && j < m; i ++ ) if ( str1 [ j ] == str2 [ i ] ) j ++; return ( j == m ); } bool f_filled ( char str1 [ ], char str2 [ ], int m, int n ) {} int main(void) { int n_success = 0; char param0[][100] = {"AXY","AXY","1100","t","034","01111010110","SjOXhD","455","001","MkK"}; char param1[][100] = {"ADXCPY","YADXCP","001011001111","Isv","376083","10110110","PWkZDupqagB","4553","11100","qfjWaMdMYkqcK"}; int param2[] = {3,4,4,1,3,8,6,3,3,3}; int param3[] = {6,6,12,3,6,8,9,4,5,13}; for(int i = 0; i < len(param0); ++i) { if(f_filled(&param0[i].front(),&param1[i].front(),param2[i],param3[i]) == f_gold(&param0[i].front(),&param1[i].front(),param2[i],param3[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
str1
[ "a) ;", "b) b)", "c) str1", "d) return", "e) 16" ]
c
c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( char str [], char corner [] ) { int n = strlen(str); int cl = strlen(corner); if ( n < cl ) return false; return ( str . substr ( 0, cl ) . compare ( corner ) == 0 && str . substr ( n - cl, cl ) . compare ( corner ) == 0 ); } bool f_filled ( char str [], char corner [] ) {} ( n < cl ) return false; return ( str . substr ( 0, cl ) . compare ( corner ) == 0 && str . substr ( n - cl, cl ) . compare ( corner ) == 0 ); } bool f_filled ( char str [], char corner [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"geeksmanishgeeks","shreyadhatwalia","10000100","abaa","30645530","0000011011001","dkqEd","48694119324654","1101010010","Ks"}; char param1[][100] = {"geeks","abc","100","a","30","001","d","654","11","KsFLmngGGOmHKs"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( char str [], char corner [] ) { int n = strlen(str); int cl = strlen(corner); if ( n < cl ) return false; return ( str . substr ( 0, cl ) . compare ( corner ) == 0 && str . substr ( n - cl, cl ) . compare ( corner ) == [MASK] ); } bool f_filled ( char str [], char corner [] ) {}( n < cl ) return false; return ( str . substr ( 0, cl ) . compare ( corner ) == 0 && str . substr ( n - cl, cl ) . compare ( corner ) == 0 ); } bool f_filled ( char str [], char corner [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"geeksmanishgeeks","shreyadhatwalia","10000100","abaa","30645530","0000011011001","dkqEd","48694119324654","1101010010","Ks"}; char param1[][100] = {"geeks","abc","100","a","30","001","d","654","11","KsFLmngGGOmHKs"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
0
[ "a) x:", "b) range", "c) )", "d) 0", "e) ]" ]
d
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
16