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
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 A [ n + 1 ], B [ n + 1 ]; A [ 0 ] = 1, A [ 1 ] = 0, B [ 0 ] = 0, B [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) { A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ]; B [ i ] = A [ i - 1 ] + B [ i - 2 ]; } return A [ n ]; } int f_filled ( int n ) {} ] = 0, B [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) { A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ]; B [ i ] = A [ i - 1 ] + B [ i - 2 ]; } return A [ n ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {29,13,25,65,27,42,19,50,59,13}; 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 [MASK] 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 A [ n + 1 ], B [ n + 1 ]; A [ 0 ] = 1, A [ 1 ] = 0, B [ 0 ] = 0, B [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) { A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ]; B [ i ] = A [ i - 1 ] + B [ i - 2 ]; } return A [ n ]; } int f_filled ( int n ) {}] = 0, B [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) { A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ]; B [ i ] = A [ i - 1 ] + B [ i - 2 ]; } return A [ n ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {29,13,25,65,27,42,19,50,59,13}; 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) 1", "b) >", "c) :", "d) 1;", "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 a, int b, int c ) { if ( a > b ) { if ( b > c ) return b; else if ( a > c ) return c; else return a; } else { if ( a > c ) return a; else if ( b > c ) return c; else return b; } } int f_filled ( int a, int b, int c ) {} turn b; else if ( a > c ) return c; else return a; } else { if ( a > c ) return a; else if ( b > c ) return c; else return b; } } int f_filled ( int a, int b, int c ) {} int main(void) { int n_success = 0; int param0[] = {43,76,57,10,59,92,49,16,33,66}; int param1[] = {24,54,5,13,47,14,62,95,41,63}; int param2[] = {7,66,40,4,56,50,65,12,90,46}; 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 a, int b, int c ) { if ( a > b ) { [MASK] ( b > c ) return b; else if ( a > c ) return c; else return a; } else { if ( a > c ) return a; else if ( b > c ) return c; else return b; } } int f_filled ( int a, int b, int c ) {}turn b; else if ( a > c ) return c; else return a; } else { if ( a > c ) return a; else if ( b > c ) return c; else return b; } } int f_filled ( int a, int b, int c ) {} int main(void) { int n_success = 0; int param0[] = {43,76,57,10,59,92,49,16,33,66}; int param1[] = {24,54,5,13,47,14,62,95,41,63}; int param2[] = {7,66,40,4,56,50,65,12,90,46}; 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) pow", "b) 1", "c) if", "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);} int f_gold ( int a [ ], int n ) { vector < int > finalSequence; sort ( a, a + n ); for ( int i = 0; i < n / 2; ++ i ) { finalSequence . push_back ( a [ i ] ); finalSequence . push_back ( a [ n - i - 1 ] ); } int MaximumSum = 0; for ( int i = 0; i < n - 1; ++ i ) { MaximumSum = MaximumSum + abs ( finalSequence [ i ] - finalSequence [ i + 1 ] ); } MaximumSum = MaximumSum + abs ( finalSequence [ n - 1 ] - finalSequence [ 0 ] ); return MaximumSum; } int f_filled ( int a [ ], int n ) {} finalSequence [ i ] - finalSequence [ i + 1 ] ); } MaximumSum = MaximumSum + abs ( finalSequence [ n - 1 ] - finalSequence [ 0 ] ); return MaximumSum; } int f_filled ( int a [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,5,7,7,7,9,11,13,18,20,24,24,24,31,35,35,37,41,45,46,48,48,49,51,51,58,59,61,66,71,72,77,77,80,81,82,84,85,85,87,88,89,90,91,96,97,97,98}; int param0_1[] = {16,-26,-78,-88,78,-2,-44,-74,-26,24,52,-78,10,38,82,18,-70,88,-16,74,28,-10,-64,-98,-80,-70,-62,-44,-20}; int param0_2[] = {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[] = {61,45,96,48,19,34,64,32,88,86,97,53,45,1,83,8,23,17,87,78,80,87,16,67,33,36}; int param0_4[] = {-96,-96,-94,-92,-86,-86,-56,-48,-42,-38,-38,-28,-24,-22,-14,-6,12,20,20,24,36,38,40,50,54,66,86,88,88,96}; int param0_5[] = {0,0,0,0,1,1,1,0,1}; int param0_6[] = {2,10,10,12,13,14,15,19,20,20,21,24,27,29,33,34,37,38,40,42,42,44,49,55,62,63,64,65,66,68,70,74,78,79,79,83,83,84,91,93,99}; int param0_7[] = {68,-66,74,12,46,-10,-88,30,-4,-98,-14,62,-78,-58,88,-68,46,72,-92,-74,-6,-78,-56,-94}; int param0_8[] = {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_9[] = {4,63,31,56,51,53,2,26,57,20,24,45,51,45,81,66,65,62,66,14,71,76,48,58,77,25,95,31,68,11,50,38,2,66,61,46}; 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,17,23,19,29,4,35,23,26,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)? [MASK] 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 ) { vector < int > finalSequence; sort ( a, a + n ); for ( int i = 0; i < n / 2; ++ i ) { finalSequence . push_back ( a [ i ] ); finalSequence . push_back ( a [ n - i - 1 ] ); } int MaximumSum = 0; for ( int i = 0; i < n - 1; ++ i ) { MaximumSum = MaximumSum + abs ( finalSequence [ i ] - finalSequence [ i + 1 ] ); } MaximumSum = MaximumSum + abs ( finalSequence [ n - 1 ] - finalSequence [ 0 ] ); return MaximumSum; } int f_filled ( int a [ ], int n ) {}finalSequence [ i ] - finalSequence [ i + 1 ] ); } MaximumSum = MaximumSum + abs ( finalSequence [ n - 1 ] - finalSequence [ 0 ] ); return MaximumSum; } int f_filled ( int a [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,5,7,7,7,9,11,13,18,20,24,24,24,31,35,35,37,41,45,46,48,48,49,51,51,58,59,61,66,71,72,77,77,80,81,82,84,85,85,87,88,89,90,91,96,97,97,98}; int param0_1[] = {16,-26,-78,-88,78,-2,-44,-74,-26,24,52,-78,10,38,82,18,-70,88,-16,74,28,-10,-64,-98,-80,-70,-62,-44,-20}; int param0_2[] = {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[] = {61,45,96,48,19,34,64,32,88,86,97,53,45,1,83,8,23,17,87,78,80,87,16,67,33,36}; int param0_4[] = {-96,-96,-94,-92,-86,-86,-56,-48,-42,-38,-38,-28,-24,-22,-14,-6,12,20,20,24,36,38,40,50,54,66,86,88,88,96}; int param0_5[] = {0,0,0,0,1,1,1,0,1}; int param0_6[] = {2,10,10,12,13,14,15,19,20,20,21,24,27,29,33,34,37,38,40,42,42,44,49,55,62,63,64,65,66,68,70,74,78,79,79,83,83,84,91,93,99}; int param0_7[] = {68,-66,74,12,46,-10,-88,30,-4,-98,-14,62,-78,-58,88,-68,46,72,-92,-74,-6,-78,-56,-94}; int param0_8[] = {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_9[] = {4,63,31,56,51,53,2,26,57,20,24,45,51,45,81,66,65,62,66,14,71,76,48,58,77,25,95,31,68,11,50,38,2,66,61,46}; 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,17,23,19,29,4,35,23,26,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; }
x:
[ "a) )", "b) (", "c) (", "d) x:", "e) (rowSum[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);} int f_gold ( int arr [ ], int n ) { if ( n < 3 ) return - 1; sort ( arr, arr + n ); return max ( arr [ 0 ] * arr [ 1 ] * arr [ n - 1 ], arr [ n - 1 ] * arr [ n - 2 ] * arr [ n - 3 ] ); } int f_filled ( int arr [ ], int n ) {} if ( n < 3 ) return - 1; sort ( arr, arr + n ); return max ( arr [ 0 ] * arr [ 1 ] * arr [ n - 1 ], arr [ n - 1 ] * arr [ n - 2 ] * arr [ n - 3 ] ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {5,8,14,15,18,21,21,21,27,29,30,33,34,34,35,37,40,41,44,44,46,49,54,58,60,61,61,63,66,69,69,70,81,82,82,90,90,90,91,92,92,96,97,99}; int param0_1[] = {72,-32,-2,-76,-56,70,-52,12,-50,32,-98,48,-32,-90,-66,-98,56,-58,-88,50,-22,18,-60,68,70,28}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {38,69,18,72,99,49,17,76,86,53,6,94,66,5,2,62,99,5,31,81,63,91,95,74,76,18,77}; int param0_4[] = {-92,-58,-8,20,24,24,42,98}; int param0_5[] = {0,1,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,1,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0}; int param0_6[] = {46,64,81}; int param0_7[] = {4,-26,20,34,-4,-40,76,94,-14,-80,42,60,92,-96,44,58,34,68,96,-8,-18,-92}; int param0_8[] = {0,0,0,1,1,1,1,1}; int param0_9[] = {61,17,28,18,52,58,41,75,98,79,1,97,73,17,79,4,46,70,6,83,23,94,1}; 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[] = {39,18,17,21,4,38,1,17,7,19}; 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 ) { if ( n < 3 ) return - 1; sort ( arr, arr + n ); return max ( arr [ 0 ] * arr [ 1 ] * arr [ n - 1 ], arr [ n - 1 ] * arr [ n - 2 ] * arr [ n [MASK] 3 ] ); } int f_filled ( int arr [ ], int n ) {} if ( n < 3 ) return - 1; sort ( arr, arr + n ); return max ( arr [ 0 ] * arr [ 1 ] * arr [ n - 1 ], arr [ n - 1 ] * arr [ n - 2 ] * arr [ n - 3 ] ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {5,8,14,15,18,21,21,21,27,29,30,33,34,34,35,37,40,41,44,44,46,49,54,58,60,61,61,63,66,69,69,70,81,82,82,90,90,90,91,92,92,96,97,99}; int param0_1[] = {72,-32,-2,-76,-56,70,-52,12,-50,32,-98,48,-32,-90,-66,-98,56,-58,-88,50,-22,18,-60,68,70,28}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {38,69,18,72,99,49,17,76,86,53,6,94,66,5,2,62,99,5,31,81,63,91,95,74,76,18,77}; int param0_4[] = {-92,-58,-8,20,24,24,42,98}; int param0_5[] = {0,1,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,1,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0}; int param0_6[] = {46,64,81}; int param0_7[] = {4,-26,20,34,-4,-40,76,94,-14,-80,42,60,92,-96,44,58,34,68,96,-8,-18,-92}; int param0_8[] = {0,0,0,1,1,1,1,1}; int param0_9[] = {61,17,28,18,52,58,41,75,98,79,1,97,73,17,79,4,46,70,6,83,23,94,1}; 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[] = {39,18,17,21,4,38,1,17,7,19}; 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) for", "c) j", "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 ( int b, int m ) { return ( b / m - 1 ) * ( b / m ) / 2; } int f_filled ( int b, int m ) {} izeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int b, int m ) { return ( b / m - 1 ) * ( b / m ) / 2; } int f_filled ( int b, int m ) {} int main(void) { int n_success = 0; int param0[] = {40,38,47,52,21,50,8,56,93,21}; int param1[] = {74,35,71,29,9,33,82,80,5,90}; 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 [MASK] (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 b, int m ) { return ( b / m - 1 ) * ( b / m ) / 2; } int f_filled ( int b, int m ) {}izeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int b, int m ) { return ( b / m - 1 ) * ( b / m ) / 2; } int f_filled ( int b, int m ) {} int main(void) { int n_success = 0; int param0[] = {40,38,47,52,21,50,8,56,93,21}; int param1[] = {74,35,71,29,9,33,82,80,5,90}; 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; }
cmpfunc
[ "a) )", "b) class", "c) checkNumber;", "d) ]", "e) cmpfunc" ]
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);} unsigned int f_gold ( unsigned int n ) { int res = 1; for ( int i = n; i >= 0; i = i - 2 ) { if ( i == 0 || i == 1 ) return res; else res *= i; } } unsigned int f_filled ( unsigned int n ) {} _gold ( unsigned int n ) { int res = 1; for ( int i = n; i >= 0; i = i - 2 ) { if ( i == 0 || i == 1 ) return res; else res *= i; } } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {88,24,3,22,53,2,88,30,38,2}; 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);} unsigned int f_gold ( unsigned int n ) { int res = 1; for [MASK] int i = n; i >= 0; i = i - 2 ) { if ( i == 0 || i == 1 ) return res; else res *= i; } } unsigned int f_filled ( unsigned int n ) {}_gold ( unsigned int n ) { int res = 1; for ( int i = n; i >= 0; i = i - 2 ) { if ( i == 0 || i == 1 ) return res; else res *= i; } } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {88,24,3,22,53,2,88,30,38,2}; 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) {}", "d) str1", "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 str [] ) { int one_count = 0, zero_count = 0; int n = strlen(str); for ( int i = 0; i < n; i ++ ) if ( str [ i ] == '1' ) one_count ++; else zero_count ++; if ( one_count % 2 == 0 ) return zero_count; return one_count; } int f_filled ( char str [] ) {} for ( int i = 0; i < n; i ++ ) if ( str [ i ] == '1' ) one_count ++; else zero_count ++; if ( one_count % 2 == 0 ) return zero_count; return one_count; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"KfcTJNP","05312505872","100111","tDEEhKxrQ","50824233019","10001110010","T SEZaNm MYQ","838415739","01110100","WYQiAey H"}; 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*)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 one_count = 0, zero_count = 0; int n = strlen(str); for ( int i = 0; i < n; i ++ ) if ( str [ i ] == '1' ) one_count ++; else zero_count ++; if ( one_count % 2 == 0 ) return zero_count; return one_count; } int f_filled ( char str [] ) {}for ( int i = 0; i < n; i ++ ) if ( str [ i ] == '1' ) one_count ++; else zero_count ++; if ( one_count % 2 == 0 ) return zero_count; return one_count; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"KfcTJNP","05312505872","100111","tDEEhKxrQ","50824233019","10001110010","T SEZaNm MYQ","838415739","01110100","WYQiAey H"}; 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) jumps", "b) )", "c) );", "d) -", "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);} bool f_gold ( int arr1 [ ], int arr2 [ ], int m, int n ) { int i = 0; int j = 0; for ( i = 0; i < n; i ++ ) { for ( j = 0; j < m; j ++ ) { if ( arr2 [ i ] == arr1 [ j ] ) break; } if ( j == m ) return 0; } return 1; } bool f_filled ( int arr1 [ ], int arr2 [ ], int m, int n ) {} for ( j = 0; j < m; j ++ ) { if ( arr2 [ i ] == arr1 [ j ] ) break; } if ( j == m ) return 0; } return 1; } bool f_filled ( int arr1 [ ], int arr2 [ ], int m, int n ) {} int main(void) { int n_success = 0; int param0_0[] = {7,10,10,10,13,17,23,24,25,28,30,33,37,49,49,50,57,60,60,63,63,64,65,65,72,81,84,85,85,94,96}; int param0_1[] = {12,30,-94,-92,-62,-18,-56,44,-50,-92,6,2,56,-90,0,0,18,86,-58,58,-54,62,-94,94,0,8,82,-68,-88,-18,8,-80,-42,18,62,-8,56,-76,-42,56,44,-2,-20,62,-14,74,-86,-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,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[] = {94,26,32,20,46,55,9,51,57,80,45,38,68,12,90,10,80,65,12,52,51,86,64,57,93,19,30,92,85,82,24,26,36,56}; int param0_4[] = {-98,-90,-86,-86,-84,-84,-82,-80,-78,-72,-70,-68,-66,-64,-52,-52,-50,-38,-28,-26,-24,-14,-8,16,26,26,28,34,36,40,42,44,44,46,50,60,68,78,80,86,90,92,98}; int param0_5[] = {1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1}; int param0_6[] = {6,8,11,13,14,26,26,41,48,70,82,83,84,88,96}; int param0_7[] = {-88,80,62,76,48,92,18,-94,-62,98,-46,-50,70,32,68,-54,26,16,94,0,-84,2,-16,88,26,-38,18,64,90,80,76,2,14,-90,50,4,76,30}; int param0_8[] = {0,0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {54,44,97,92,13,54,27,8,43,70,77,84,55,64,5,59,27,19,65,68,66,26,33,38,7}; 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[] = {44}; int param1_1[] = {0,0,0}; int param1_2[] = {80,58,32,2}; int param1_3[] = {-99,-90,-90,-86}; int param1_4[] = {0,0,1,1}; int param1_5[] = {1,9,12,16}; int param1_6[] = {-76,-54,4,78}; int param1_7[] = {0,1,0,1}; int param1_8[] = {93,5,9,13}; int *param1[9] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8}; int param2[] = {29,46,34,17,23,10,10,27,10,19}; int param3[] = {4,3,3,4,4,4,4,4,4,4}; 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 [MASK] < 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 arr1 [ ], int arr2 [ ], int m, int n ) { int i = 0; int j = 0; for ( i = 0; i < n; i ++ ) { for ( j = 0; j < m; j ++ ) { if ( arr2 [ i ] == arr1 [ j ] ) break; } if ( j == m ) return 0; } return 1; } bool f_filled ( int arr1 [ ], int arr2 [ ], int m, int n ) {}for ( j = 0; j < m; j ++ ) { if ( arr2 [ i ] == arr1 [ j ] ) break; } if ( j == m ) return 0; } return 1; } bool f_filled ( int arr1 [ ], int arr2 [ ], int m, int n ) {} int main(void) { int n_success = 0; int param0_0[] = {7,10,10,10,13,17,23,24,25,28,30,33,37,49,49,50,57,60,60,63,63,64,65,65,72,81,84,85,85,94,96}; int param0_1[] = {12,30,-94,-92,-62,-18,-56,44,-50,-92,6,2,56,-90,0,0,18,86,-58,58,-54,62,-94,94,0,8,82,-68,-88,-18,8,-80,-42,18,62,-8,56,-76,-42,56,44,-2,-20,62,-14,74,-86,-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,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[] = {94,26,32,20,46,55,9,51,57,80,45,38,68,12,90,10,80,65,12,52,51,86,64,57,93,19,30,92,85,82,24,26,36,56}; int param0_4[] = {-98,-90,-86,-86,-84,-84,-82,-80,-78,-72,-70,-68,-66,-64,-52,-52,-50,-38,-28,-26,-24,-14,-8,16,26,26,28,34,36,40,42,44,44,46,50,60,68,78,80,86,90,92,98}; int param0_5[] = {1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1}; int param0_6[] = {6,8,11,13,14,26,26,41,48,70,82,83,84,88,96}; int param0_7[] = {-88,80,62,76,48,92,18,-94,-62,98,-46,-50,70,32,68,-54,26,16,94,0,-84,2,-16,88,26,-38,18,64,90,80,76,2,14,-90,50,4,76,30}; int param0_8[] = {0,0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {54,44,97,92,13,54,27,8,43,70,77,84,55,64,5,59,27,19,65,68,66,26,33,38,7}; 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[] = {44}; int param1_1[] = {0,0,0}; int param1_2[] = {80,58,32,2}; int param1_3[] = {-99,-90,-90,-86}; int param1_4[] = {0,0,1,1}; int param1_5[] = {1,9,12,16}; int param1_6[] = {-76,-54,4,78}; int param1_7[] = {0,1,0,1}; int param1_8[] = {93,5,9,13}; int *param1[9] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8}; int param2[] = {29,46,34,17,23,10,10,27,10,19}; int param3[] = {4,3,3,4,4,4,4,4,4,4}; 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; }
(x
[ "a) ]", "b) (x", "c) l1", "d) clock_rot", "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);} bool f_gold ( int n ) { if ( n <= 1 ) return false; for ( int i = 2; i < n; i ++ ) if ( n % i == 0 ) return false; return true; } bool f_filled ( int n ) {} n, sizeof(int), cmpfunc);} bool f_gold ( int n ) { if ( n <= 1 ) return false; for ( int i = 2; i < n; i ++ ) if ( n % i == 0 ) return false; return true; } bool f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {2,74,46,38,51,48,6,14,31,10}; 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 [MASK] #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 n ) { if ( n <= 1 ) return false; for ( int i = 2; i < n; i ++ ) if ( n % i == 0 ) return false; return true; } bool f_filled ( int n ) {} n, sizeof(int), cmpfunc);} bool f_gold ( int n ) { if ( n <= 1 ) return false; for ( int i = 2; i < n; i ++ ) if ( n % i == 0 ) return false; return true; } bool f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {2,74,46,38,51,48,6,14,31,10}; 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; }
<stdlib.h>
[ "a) <stdlib.h>", "b) for", "c) f_gold", "d) return", "e) for" ]
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 arr [ ], int n, int m ) { if ( n > m ) return true; bool DP [ m ]; memset ( DP, false, m ); for ( int i = 0; i < n; i ++ ) { if ( DP [ 0 ] ) return true; bool temp [ m ]; memset ( temp, false, m ); for ( int j = 0; j < m; j ++ ) { if ( DP [ j ] == true ) { if ( DP [ ( j + arr [ i ] ) % m ] == false ) temp [ ( j + arr [ i ] ) % m ] = true; } } for ( int j = 0; j < m; j ++ ) if ( temp [ j ] ) DP [ j ] = true; DP [ arr [ i ] % m ] = true; } return DP [ 0 ]; } bool f_filled ( int arr [ ], int n, int m ) {} } } for ( int j = 0; j < m; j ++ ) if ( temp [ j ] ) DP [ j ] = true; DP [ arr [ i ] % m ] = true; } return DP [ 0 ]; } bool f_filled ( int arr [ ], int n, int m ) {} int main(void) { int n_success = 0; int param0_0[] = {6}; int param0_1[] = {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,1,1}; int param0_2[] = {50,20,79,42,85,24,20,76,36,88,40,5,24,85,7,19,43,51,94,13,53,93,92,43,97,38,80,48,52,47,77,56,41,80,32,34,77,14,70,3}; int param0_3[] = {-96,-94,-72,-58,-48,-36,-28,-26,-10,-10,-8,-8,-6,2,14,30,30,54,58,60,64,68,78,84,96,98}; int param0_4[] = {1,0,1,1,0,0,1,1,1,0,0}; int param0_5[] = {2,7,8,15,18,23,24,25,27,35,40,42,43,46,48,50,53,64,66,69,70,71,72,77,78,80,81,81,81,82,82,82,84,87,97,98}; int param0_6[] = {46,54,24,-10}; int param0_7[] = {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}; int param0_8[] = {39,21,38,6,38,44,96,1,16,1,28,4,55,8}; int *param0[9] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8}; int param1[] = {36,2,32,29,16,7,23,3,21,12}; int param2[] = {3540,5,101,27,18,8,33,37,34,228}; 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 arr [ ], int n, int m ) { if ( n > m ) return true; bool DP [ m ]; memset ( DP, false, m ); for ( int i = 0; [MASK] < n; i ++ ) { if ( DP [ 0 ] ) return true; bool temp [ m ]; memset ( temp, false, m ); for ( int j = 0; j < m; j ++ ) { if ( DP [ j ] == true ) { if ( DP [ ( j + arr [ i ] ) % m ] == false ) temp [ ( j + arr [ i ] ) % m ] = true; } } for ( int j = 0; j < m; j ++ ) if ( temp [ j ] ) DP [ j ] = true; DP [ arr [ i ] % m ] = true; } return DP [ 0 ]; } bool f_filled ( int arr [ ], int n, int m ) {} } } for ( int j = 0; j < m; j ++ ) if ( temp [ j ] ) DP [ j ] = true; DP [ arr [ i ] % m ] = true; } return DP [ 0 ]; } bool f_filled ( int arr [ ], int n, int m ) {} int main(void) { int n_success = 0; int param0_0[] = {6}; int param0_1[] = {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,1,1}; int param0_2[] = {50,20,79,42,85,24,20,76,36,88,40,5,24,85,7,19,43,51,94,13,53,93,92,43,97,38,80,48,52,47,77,56,41,80,32,34,77,14,70,3}; int param0_3[] = {-96,-94,-72,-58,-48,-36,-28,-26,-10,-10,-8,-8,-6,2,14,30,30,54,58,60,64,68,78,84,96,98}; int param0_4[] = {1,0,1,1,0,0,1,1,1,0,0}; int param0_5[] = {2,7,8,15,18,23,24,25,27,35,40,42,43,46,48,50,53,64,66,69,70,71,72,77,78,80,81,81,81,82,82,82,84,87,97,98}; int param0_6[] = {46,54,24,-10}; int param0_7[] = {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}; int param0_8[] = {39,21,38,6,38,44,96,1,16,1,28,4,55,8}; int *param0[9] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8}; int param1[] = {36,2,32,29,16,7,23,3,21,12}; int param2[] = {3540,5,101,27,18,8,33,37,34,228}; 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; }
i
[ "a) i", "b) javafx.util.Pair;", "c) j", "d) 0xAAAAAAAA", "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 arr [ ], int n ) { unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) != s . end ( ) ) return arr [ i ]; s . insert ( arr [ i ] ); } return - 1; } int f_filled ( int arr [ ], int n ) {} for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) != s . end ( ) ) return arr [ i ]; s . insert ( arr [ i ] ); } return - 1; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {9,10,14,17,30,37,39,42,49,56,68,74,85,85,92}; int param0_1[] = {62,-18,78,-32,38,90}; int param0_2[] = {0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {56,1,96,81,49,18,39,87,97}; int param0_4[] = {-98,-94,-80,-76,-60,-56,-56,-54,-48,-28,-14,-10,26,30,40,58,64,74,78,82,86,92,96,98}; int param0_5[] = {1,1,1,0,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,1,1,1,0}; int param0_6[] = {5,7,19,20,22,29,33,35,35,36,37,40,44,49,50,53,60,60,61,62,68,68,69,72,72,81,81,83,85,85,90,91,92,97,98}; int param0_7[] = {14}; int param0_8[] = {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_9[] = {29,29,14,91,42,70,79,75,9,86,48,47,37,48,69,81,49,37,33,23,42,45,10,33,47,39,96,45,94,48,44,4,6,73,91}; 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,4,7,5,16,11,26,0,18,33}; 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 [MASK] n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) != s . end ( ) ) return arr [ i ]; s . insert ( arr [ i ] ); } return - 1; } int f_filled ( int arr [ ], int n ) {} for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) != s . end ( ) ) return arr [ i ]; s . insert ( arr [ i ] ); } return - 1; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {9,10,14,17,30,37,39,42,49,56,68,74,85,85,92}; int param0_1[] = {62,-18,78,-32,38,90}; int param0_2[] = {0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {56,1,96,81,49,18,39,87,97}; int param0_4[] = {-98,-94,-80,-76,-60,-56,-56,-54,-48,-28,-14,-10,26,30,40,58,64,74,78,82,86,92,96,98}; int param0_5[] = {1,1,1,0,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,1,1,1,0}; int param0_6[] = {5,7,19,20,22,29,33,35,35,36,37,40,44,49,50,53,60,60,61,62,68,68,69,72,72,81,81,83,85,85,90,91,92,97,98}; int param0_7[] = {14}; int param0_8[] = {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_9[] = {29,29,14,91,42,70,79,75,9,86,48,47,37,48,69,81,49,37,33,23,42,45,10,33,47,39,96,45,94,48,44,4,6,73,91}; 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,4,7,5,16,11,26,0,18,33}; 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) y)?", "d) l", "e) import" ]
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 x1, int y1, int x2, int y2, int r1, int r2 ) { int distSq = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ); int radSumSq = ( r1 + r2 ) * ( r1 + r2 ); if ( distSq == radSumSq ) return 1; else if ( distSq > radSumSq ) return - 1; else return 0; } int f_filled ( int x1, int y1, int x2, int y2, int r1, int r2 ) {} ( r1 + r2 ) * ( r1 + r2 ); if ( distSq == radSumSq ) return 1; else if ( distSq > radSumSq ) return - 1; else return 0; } int f_filled ( int x1, int y1, int x2, int y2, int r1, int r2 ) {} int main(void) { int n_success = 0; int param0[] = {11,87,51,89,64,57,65,32,73,3}; int param1[] = {36,1,1,67,10,86,90,23,61,99}; int param2[] = {62,62,47,9,79,99,42,28,63,6}; int param3[] = {64,64,90,52,45,43,82,26,77,19}; int param4[] = {50,54,14,94,67,83,77,60,92,21}; int param5[] = {4,41,71,21,78,63,32,45,76,28}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i],param5[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)? [MASK] 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 x1, int y1, int x2, int y2, int r1, int r2 ) { int distSq = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ); int radSumSq = ( r1 + r2 ) * ( r1 + r2 ); if ( distSq == radSumSq ) return 1; else if ( distSq > radSumSq ) return - 1; else return 0; } int f_filled ( int x1, int y1, int x2, int y2, int r1, int r2 ) {} ( r1 + r2 ) * ( r1 + r2 ); if ( distSq == radSumSq ) return 1; else if ( distSq > radSumSq ) return - 1; else return 0; } int f_filled ( int x1, int y1, int x2, int y2, int r1, int r2 ) {} int main(void) { int n_success = 0; int param0[] = {11,87,51,89,64,57,65,32,73,3}; int param1[] = {36,1,1,67,10,86,90,23,61,99}; int param2[] = {62,62,47,9,79,99,42,28,63,6}; int param3[] = {64,64,90,52,45,43,82,26,77,19}; int param4[] = {50,54,14,94,67,83,77,60,92,21}; int param5[] = {4,41,71,21,78,63,32,45,76,28}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
x:
[ "a) <bits/stdc++.h>", "b) ]", "c) ]", "d) false", "e) x:" ]
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);} char f_gold [] ( char str1 [], char str2 [] ) { if ( strlen(str1) > strlen(str2) ) swap ( str1, str2 ); char str [] = ""; int n1 = strlen(str1), n2 = strlen(str2); int diff = n2 - n1; int carry = 0; for ( int i = n1 - 1; i >= 0; i -- ) { int sum = ( ( str1 [ i ] - '0' ) + ( str2 [ i + diff ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } for ( int i = n2 - n1 - 1; i >= 0; i -- ) { int sum = ( ( str2 [ i ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } if ( carry ) str . push_back ( carry + '0' ); reverse ( str . begin ( ), str . end ( ) ); return str; } char f_filled [] ( char str1 [], char str2 [] ) {} + '0' ); carry = sum / 10; } if ( carry ) str . push_back ( carry + '0' ); reverse ( str . begin ( ), str . end ( ) ); return str; } char f_filled [] ( char str1 [], char str2 [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"G","48578","010","KkGp","48928969618416","0101011010","X","10073867","01110000000","k "}; char param1[][100] = {"FcAiuKhw","5117561223135","00000","nSE","88497275","11","MomtbuxLRR","28","0110","aSSlhOYp"}; 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 str1 [], char str2 [] ) { if ( strlen(str1) > strlen(str2) ) swap ( str1, str2 ); char str [] = ""; int n1 = strlen(str1), n2 = strlen(str2); int diff = n2 - n1; [MASK] carry = 0; for ( int i = n1 - 1; i >= 0; i -- ) { int sum = ( ( str1 [ i ] - '0' ) + ( str2 [ i + diff ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } for ( int i = n2 - n1 - 1; i >= 0; i -- ) { int sum = ( ( str2 [ i ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } if ( carry ) str . push_back ( carry + '0' ); reverse ( str . begin ( ), str . end ( ) ); return str; } char f_filled [] ( char str1 [], char str2 [] ) {}+ '0' ); carry = sum / 10; } if ( carry ) str . push_back ( carry + '0' ); reverse ( str . begin ( ), str . end ( ) ); return str; } char f_filled [] ( char str1 [], char str2 [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"G","48578","010","KkGp","48928969618416","0101011010","X","10073867","01110000000","k "}; char param1[][100] = {"FcAiuKhw","5117561223135","00000","nSE","88497275","11","MomtbuxLRR","28","0110","aSSlhOYp"}; 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) <fstream>", "b) )", "c) 1", "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);} unsigned int f_gold ( unsigned int n ) { if ( n == 0 || n == 1 ) return 1; return n * f_gold ( n - 2 ); } unsigned int f_filled ( unsigned int n ) {} {qsort (arr, n, sizeof(int), cmpfunc);} unsigned int f_gold ( unsigned int n ) { if ( n == 0 || n == 1 ) return 1; return n * f_gold ( n - 2 ); } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; long param0[] = {52,93,15,72,61,21,83,87,75,75}; 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);} unsigned int f_gold ( unsigned int n ) { if ( n == 0 || n == 1 ) return 1; return n * f_gold ( n - 2 ); } unsigned [MASK] f_filled ( unsigned int n ) {} {qsort (arr, n, sizeof(int), cmpfunc);} unsigned int f_gold ( unsigned int n ) { if ( n == 0 || n == 1 ) return 1; return n * f_gold ( n - 2 ); } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; long param0[] = {52,93,15,72,61,21,83,87,75,75}; 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) int", "b) <cstdlib>", "c) n", "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 A ) { int n = 2 * A; int dpArray [ n + 1 ] = { 0 }; dpArray [ 0 ] = 1; dpArray [ 2 ] = 1; for ( int i = 4; i <= n; i += 2 ) { for ( int j = 0; j < i - 1; j += 2 ) { dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] ); } } return dpArray [ n ]; } int f_filled ( int A ) {} for ( int j = 0; j < i - 1; j += 2 ) { dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] ); } } return dpArray [ n ]; } int f_filled ( int A ) {} int main(void) { int n_success = 0; int param0[] = {32,52,52,32,73,31,29,75,39,49}; 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 [MASK] 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 = 2 * A; int dpArray [ n + 1 ] = { 0 }; dpArray [ 0 ] = 1; dpArray [ 2 ] = 1; for ( int i = 4; i <= n; i += 2 ) { for ( int j = 0; j < i - 1; j += 2 ) { dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] ); } } return dpArray [ n ]; } int f_filled ( int A ) {} for ( int j = 0; j < i - 1; j += 2 ) { dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] ); } } return dpArray [ n ]; } int f_filled ( int A ) {} int main(void) { int n_success = 0; int param0[] = {32,52,52,32,73,31,29,75,39,49}; 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; }
x,
[ "a) f_gold", "b) 11", "c) <", "d) x,", "e) return" ]
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);} void f_gold ( int a [ ], int size ) { int positive = 0, negative = 1; while ( true ) { while ( positive < size && a [ positive ] >= 0 ) positive += 2; while ( negative < size && a [ negative ] <= 0 ) negative += 2; if ( positive < size && negative < size ) swap ( a [ positive ], a [ negative ] ); else break; } } void f_filled ( int a [ ], int size ) {} size && a [ negative ] <= 0 ) negative += 2; if ( positive < size && negative < size ) swap ( a [ positive ], a [ negative ] ); else break; } } void f_filled ( int a [ ], int size ) {} int main(void) { int n_success = 0; int param0_0[] = {8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93}; int param0_1[] = {0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97}; 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}; int param0_3[] = {28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94}; int param0_4[] = {-98,-94,-7,-3,1,11,11,83,88}; int param0_5[] = {0,0,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0}; int param0_6[] = {8,35,37,38,39,46,49,54}; int param0_7[] = {-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54}; int param0_8[] = {0,0,0,0,0,0,0,0,1,1}; int param0_9[] = {62,36,39,53,90,78,56,1,56,4,30}; 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[] = {15,15,40,10,7,35,6,21,5,8}; int filled_function_param0_0[] = {8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93}; int filled_function_param0_1[] = {0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97}; int filled_function_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}; int filled_function_param0_3[] = {28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94}; int filled_function_param0_4[] = {-98,-94,-7,-3,1,11,11,83,88}; int filled_function_param0_5[] = {0,0,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0}; int filled_function_param0_6[] = {8,35,37,38,39,46,49,54}; int filled_function_param0_7[] = {-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54}; int filled_function_param0_8[] = {0,0,0,0,0,0,0,0,1,1}; int filled_function_param0_9[] = {62,36,39,53,90,78,56,1,56,4,30}; int *filled_function_param0[10] = {filled_function_param0_0,filled_function_param0_1,filled_function_param0_2,filled_function_param0_3,filled_function_param0_4,filled_function_param0_5,filled_function_param0_6,filled_function_param0_7,filled_function_param0_8,filled_function_param0_9}; int filled_function_param1[] = {15,15,40,10,7,35,6,21,5,8}; for(int i = 0; i < len(param0); ++i) { f_filled(filled_function_param0[i],filled_function_param1[i]); f_gold(param0[i],param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_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);} void f_gold ( int a [ ], int size ) { int positive = 0, negative = 1; while [MASK] true ) { while ( positive < size && a [ positive ] >= 0 ) positive += 2; while ( negative < size && a [ negative ] <= 0 ) negative += 2; if ( positive < size && negative < size ) swap ( a [ positive ], a [ negative ] ); else break; } } void f_filled ( int a [ ], int size ) {} size && a [ negative ] <= 0 ) negative += 2; if ( positive < size && negative < size ) swap ( a [ positive ], a [ negative ] ); else break; } } void f_filled ( int a [ ], int size ) {} int main(void) { int n_success = 0; int param0_0[] = {8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93}; int param0_1[] = {0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97}; 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}; int param0_3[] = {28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94}; int param0_4[] = {-98,-94,-7,-3,1,11,11,83,88}; int param0_5[] = {0,0,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0}; int param0_6[] = {8,35,37,38,39,46,49,54}; int param0_7[] = {-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54}; int param0_8[] = {0,0,0,0,0,0,0,0,1,1}; int param0_9[] = {62,36,39,53,90,78,56,1,56,4,30}; 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[] = {15,15,40,10,7,35,6,21,5,8}; int filled_function_param0_0[] = {8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93}; int filled_function_param0_1[] = {0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97}; int filled_function_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}; int filled_function_param0_3[] = {28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94}; int filled_function_param0_4[] = {-98,-94,-7,-3,1,11,11,83,88}; int filled_function_param0_5[] = {0,0,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0}; int filled_function_param0_6[] = {8,35,37,38,39,46,49,54}; int filled_function_param0_7[] = {-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54}; int filled_function_param0_8[] = {0,0,0,0,0,0,0,0,1,1}; int filled_function_param0_9[] = {62,36,39,53,90,78,56,1,56,4,30}; int *filled_function_param0[10] = {filled_function_param0_0,filled_function_param0_1,filled_function_param0_2,filled_function_param0_3,filled_function_param0_4,filled_function_param0_5,filled_function_param0_6,filled_function_param0_7,filled_function_param0_8,filled_function_param0_9}; int filled_function_param1[] = {15,15,40,10,7,35,6,21,5,8}; for(int i = 0; i < len(param0); ++i) { f_filled(filled_function_param0[i],filled_function_param1[i]); f_gold(param0[i],param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
(
[ "a) i", "b) import", "c) i", "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);} bool f_gold ( int x ) { int temp = x; int n = 0; while ( x != 0 ) { x /= 10; n ++; } x = temp; int sum = 0; while ( x != 0 ) { sum += pow ( x % 10, n ); x /= 10; } return ( sum == temp ); } bool f_filled ( int x ) {} while ( x != 0 ) { x /= 10; n ++; } x = temp; int sum = 0; while ( x != 0 ) { sum += pow ( x % 10, n ); x /= 10; } return ( sum == temp ); } bool f_filled ( int x ) {} int main(void) { int n_success = 0; int param0[] = {371,9474,85,35,54,17,97,63,12,43}; 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 [ ], [MASK] n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int x ) { int temp = x; int n = 0; while ( x != 0 ) { x /= 10; n ++; } x = temp; int sum = 0; while ( x != 0 ) { sum += pow ( x % 10, n ); x /= 10; } return ( sum == temp ); } bool f_filled ( int x ) {}while ( x != 0 ) { x /= 10; n ++; } x = temp; int sum = 0; while ( x != 0 ) { sum += pow ( x % 10, n ); x /= 10; } return ( sum == temp ); } bool f_filled ( int x ) {} int main(void) { int n_success = 0; int param0[] = {371,9474,85,35,54,17,97,63,12,43}; 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) int", "b) )", "c) (", "d) 1", "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 result = 0; for ( int i = 2; i <= sqrt ( n ); i ++ ) { if ( n % i == 0 ) { if ( i == ( n / i ) ) result += i; else result += ( i + n / i ); } } return ( result + n + 1 ); } int f_filled ( int n ) {} i <= sqrt ( n ); i ++ ) { if ( n % i == 0 ) { if ( i == ( n / i ) ) result += i; else result += ( i + n / i ); } } return ( result + n + 1 ); } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {76,21,4,49,35,55,43,39,36,5}; 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 = 0; for ( int i = 2; i <= sqrt ( n ); i ++ ) { if ( n % i == 0 ) { if ( [MASK] == ( n / i ) ) result += i; else result += ( i + n / i ); } } return ( result + n + 1 ); } int f_filled ( int n ) {}i <= sqrt ( n ); i ++ ) { if ( n % i == 0 ) { if ( i == ( n / i ) ) result += i; else result += ( i + n / i ); } } return ( result + n + 1 ); } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {76,21,4,49,35,55,43,39,36,5}; 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; }
i
[ "a) )", "b) #include", "c) ]", "d) b", "e) i" ]
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 n ) { int result = 0; sort ( arr, arr + n ); for ( int i = 0; i < n - 1; i ++ ) { if ( arr [ i ] != arr [ i + 1 ] ) result += abs ( arr [ i ] ); else i ++; } if ( arr [ n - 2 ] != arr [ n - 1 ] ) result += abs ( arr [ n - 1 ] ); return result; } int f_filled ( int arr [ ], int n ) {} arr [ i + 1 ] ) result += abs ( arr [ i ] ); else i ++; } if ( arr [ n - 2 ] != arr [ n - 1 ] ) result += abs ( arr [ n - 1 ] ); return result; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {19,20,22,23,25,28,33,33,35,35,36,44,44,52,54,54,56,57,57,63,78,78,79,81,89,93,93,93,93,93,93,97}; int param0_1[] = {-20,96,-32,-8,4,14,-26,-58,-68,-68,42,-12,-28,-68,-72,88,-94,-84,20,-58,-50,-78,-4,-22,-54,90,78,2,40,-78,98,52,-48,40,12,6,54,28,-96,-88,98,-34,-66,42,-18,4,-20,-34}; int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {21,50,15,2,59,79,52,55,78,55,73,9,1,58,48,13,71,1}; int param0_4[] = {-98,-74,-68,-60,-58,-56,-42,-36,-36,-34,-30,-28,-18,-16,-16,-10,-8,-6,-4,0,2,2,10,16,18,30,34,34,36,38,42,46,60,60,62,76,78,88,96}; int param0_5[] = {1}; int param0_6[] = {6,6,6,9,10,11,14,19,19,21,23,23,24,29,30,43,45,46,55,55,63,69,71,78,80,81,85,86,87,97,98}; int param0_7[] = {86,-14,-64,88,28,40,30,92,-2,-52,-14,-96,-30,-54,-88,-8,-48,32,-60,-68,-62,52,52,-28,58,82,68,30,-24,52,74,-20,-62,-98,26,58,-30,76,48,-14,88,58,-40,-20,-50,-70,-92,-84}; 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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {36,12,61,15,31,7,76,79,27,60,81,2,3,83,96,29,23,30,78,86,86,25,89,96,67,38,24,58,80,13,51,30,45,65,85,48,51,44,16,87,17,28,66,97,16}; 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[] = {23,47,13,16,37,0,19,32,29,36}; 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 result = 0; sort ( arr, arr + n ); for ( int i = 0; i < n - 1; i ++ ) { if ( arr [ i ] != arr [ i + 1 ] ) result += abs ( arr [ i ] ); else i ++; } if ( arr [ n - 2 ] != arr [ n - 1 ] ) result += abs ( [MASK] [ n - 1 ] ); return result; } int f_filled ( int arr [ ], int n ) {} arr [ i + 1 ] ) result += abs ( arr [ i ] ); else i ++; } if ( arr [ n - 2 ] != arr [ n - 1 ] ) result += abs ( arr [ n - 1 ] ); return result; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {19,20,22,23,25,28,33,33,35,35,36,44,44,52,54,54,56,57,57,63,78,78,79,81,89,93,93,93,93,93,93,97}; int param0_1[] = {-20,96,-32,-8,4,14,-26,-58,-68,-68,42,-12,-28,-68,-72,88,-94,-84,20,-58,-50,-78,-4,-22,-54,90,78,2,40,-78,98,52,-48,40,12,6,54,28,-96,-88,98,-34,-66,42,-18,4,-20,-34}; int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {21,50,15,2,59,79,52,55,78,55,73,9,1,58,48,13,71,1}; int param0_4[] = {-98,-74,-68,-60,-58,-56,-42,-36,-36,-34,-30,-28,-18,-16,-16,-10,-8,-6,-4,0,2,2,10,16,18,30,34,34,36,38,42,46,60,60,62,76,78,88,96}; int param0_5[] = {1}; int param0_6[] = {6,6,6,9,10,11,14,19,19,21,23,23,24,29,30,43,45,46,55,55,63,69,71,78,80,81,85,86,87,97,98}; int param0_7[] = {86,-14,-64,88,28,40,30,92,-2,-52,-14,-96,-30,-54,-88,-8,-48,32,-60,-68,-62,52,52,-28,58,82,68,30,-24,52,74,-20,-62,-98,26,58,-30,76,48,-14,88,58,-40,-20,-50,-70,-92,-84}; 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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {36,12,61,15,31,7,76,79,27,60,81,2,3,83,96,29,23,30,78,86,86,25,89,96,67,38,24,58,80,13,51,30,45,65,85,48,51,44,16,87,17,28,66,97,16}; 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[] = {23,47,13,16,37,0,19,32,29,36}; 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) (", "b) )", "c) arr", "d) ;", "e) import" ]
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 ( char num [] ) { int n = strlen(num); int sum = accumulate ( begin ( num ), end ( num ), 0 ) - '0' * 1; if ( sum % 3 == 0 ) return 0; if ( n == 1 ) return - 1; for ( int i = 0; i < n; i ++ ) if ( sum % 3 == ( num [ i ] - '0' ) % 3 ) return 1; if ( n == 2 ) return - 1; return 2; } int f_filled ( char num [] ) {} n 0; if ( n == 1 ) return - 1; for ( int i = 0; i < n; i ++ ) if ( sum % 3 == ( num [ i ] - '0' ) % 3 ) return 1; if ( n == 2 ) return - 1; return 2; } int f_filled ( char num [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"wVVe","850390909067","1110","NRSAazejUS","297975","1","ThYMuVOm","1874418087476","11011001001","YJ"}; 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 ( char num [] ) { int n = strlen(num); int sum = [MASK] ( begin ( num ), end ( num ), 0 ) - '0' * 1; if ( sum % 3 == 0 ) return 0; if ( n == 1 ) return - 1; for ( int i = 0; i < n; i ++ ) if ( sum % 3 == ( num [ i ] - '0' ) % 3 ) return 1; if ( n == 2 ) return - 1; return 2; } int f_filled ( char num [] ) {}n 0; if ( n == 1 ) return - 1; for ( int i = 0; i < n; i ++ ) if ( sum % 3 == ( num [ i ] - '0' ) % 3 ) return 1; if ( n == 2 ) return - 1; return 2; } int f_filled ( char num [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"wVVe","850390909067","1110","NRSAazejUS","297975","1","ThYMuVOm","1874418087476","11011001001","YJ"}; 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; }
accumulate
[ "a) jumps", "b) ],", "c) divisor", "d) accumulate", "e) int" ]
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 str [], int n ) { int len = strlen(str); int dp [ len ] [ n ]; memset ( dp, 0, sizeof ( dp ) ); dp [ 0 ] [ ( str [ 0 ] - '0' ) % n ] ++; for ( int i = 1; i < len; i ++ ) { dp [ i ] [ ( str [ i ] - '0' ) % n ] ++; for ( int j = 0; j < n; j ++ ) { dp [ i ] [ j ] += dp [ i - 1 ] [ j ]; dp [ i ] [ ( j * 10 + ( str [ i ] - '0' ) ) % n ] += dp [ i - 1 ] [ j ]; } } return dp [ len - 1 ] [ 0 ]; } int f_filled ( char str [], int n ) {} [ i ] [ j ] += dp [ i - 1 ] [ j ]; dp [ i ] [ ( j * 10 + ( str [ i ] - '0' ) ) % n ] += dp [ i - 1 ] [ j ]; } } return dp [ len - 1 ] [ 0 ]; } int f_filled ( char str [], int n ) {} int main(void) { int n_success = 0; char param0[][100] = {"fYqkPLSWBgFy","151587","111111110","JQJHaUkkTrt","736592575580","10","L","3476601","0110001001","YimayLFU"}; int param1[] = {55,84,9,97,68,3,74,2,53,45}; 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 * [MASK] 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 n ) { int len = strlen(str); int dp [ len ] [ n ]; memset ( dp, 0, sizeof ( dp ) ); dp [ 0 ] [ ( str [ 0 ] - '0' ) % n ] ++; for ( int i = 1; i < len; i ++ ) { dp [ i ] [ ( str [ i ] - '0' ) % n ] ++; for ( int j = 0; j < n; j ++ ) { dp [ i ] [ j ] += dp [ i - 1 ] [ j ]; dp [ i ] [ ( j * 10 + ( str [ i ] - '0' ) ) % n ] += dp [ i - 1 ] [ j ]; } } return dp [ len - 1 ] [ 0 ]; } int f_filled ( char str [], int n ) {}[ i ] [ j ] += dp [ i - 1 ] [ j ]; dp [ i ] [ ( j * 10 + ( str [ i ] - '0' ) ) % n ] += dp [ i - 1 ] [ j ]; } } return dp [ len - 1 ] [ 0 ]; } int f_filled ( char str [], int n ) {} int main(void) { int n_success = 0; char param0[][100] = {"fYqkPLSWBgFy","151587","111111110","JQJHaUkkTrt","736592575580","10","L","3476601","0110001001","YimayLFU"}; int param1[] = {55,84,9,97,68,3,74,2,53,45}; 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,
[ "a) ;", "b) *;", "c) <", "d) a,", "e) res" ]
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 = INT_MIN; for ( int i = 0; i < n; i ++ ) { int prefix_sum = arr [ i ]; for ( int j = 0; j < i; j ++ ) prefix_sum += arr [ j ]; int suffix_sum = arr [ i ]; for ( int j = n - 1; j > i; j -- ) suffix_sum += arr [ j ]; if ( prefix_sum == suffix_sum ) res = max ( res, prefix_sum ); } return res; } int f_filled ( int arr [ ], int n ) {} for ( int j = n - 1; j > i; j -- ) suffix_sum += arr [ j ]; if ( prefix_sum == suffix_sum ) res = max ( res, prefix_sum ); } return res; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {3,3,9,19,22,27,32,41,45,63,66,67,81,91}; int param0_1[] = {-64,-2,68,-48,22,-14,-98}; int param0_2[] = {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[] = {86,79,23,55,4,22,37,1,72,22,82,62,96,47}; int param0_4[] = {-96,-96,-96,-96,-92,-82,-72,-72,-62,-58,-52,-48,-44,-44,-40,-34,-28,-26,-26,0,0,2,4,4,12,12,18,34,36,40,48,48,54,60,66,66,72,76,78,82,82,96,98}; int param0_5[] = {0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1,0}; int param0_6[] = {2,3,7,13,20,24,39,49,53,58,72,80,90,99}; int param0_7[] = {-48,44,60,-30,8,20,70,-50,80,-2,-28,-14}; int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {64,13,18,3,22,29,51,45,21,13,47,15,17,34,60,99,30,54,16,47,13,49,60,66,28,57,85,66,65,7,62,29,9}; 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[] = {13,4,19,8,33,38,11,11,16,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) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int res = INT_MIN; for [MASK] int i = 0; i < n; i ++ ) { int prefix_sum = arr [ i ]; for ( int j = 0; j < i; j ++ ) prefix_sum += arr [ j ]; int suffix_sum = arr [ i ]; for ( int j = n - 1; j > i; j -- ) suffix_sum += arr [ j ]; if ( prefix_sum == suffix_sum ) res = max ( res, prefix_sum ); } return res; } int f_filled ( int arr [ ], int n ) {} for ( int j = n - 1; j > i; j -- ) suffix_sum += arr [ j ]; if ( prefix_sum == suffix_sum ) res = max ( res, prefix_sum ); } return res; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {3,3,9,19,22,27,32,41,45,63,66,67,81,91}; int param0_1[] = {-64,-2,68,-48,22,-14,-98}; int param0_2[] = {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[] = {86,79,23,55,4,22,37,1,72,22,82,62,96,47}; int param0_4[] = {-96,-96,-96,-96,-92,-82,-72,-72,-62,-58,-52,-48,-44,-44,-40,-34,-28,-26,-26,0,0,2,4,4,12,12,18,34,36,40,48,48,54,60,66,66,72,76,78,82,82,96,98}; int param0_5[] = {0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1,0}; int param0_6[] = {2,3,7,13,20,24,39,49,53,58,72,80,90,99}; int param0_7[] = {-48,44,60,-30,8,20,70,-50,80,-2,-28,-14}; int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {64,13,18,3,22,29,51,45,21,13,47,15,17,34,60,99,30,54,16,47,13,49,60,66,28,57,85,66,65,7,62,29,9}; 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[] = {13,4,19,8,33,38,11,11,16,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) return", "b) (", "c) invcount;", "d) arr", "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);} bool f_gold ( int A [ ], int arr_size, int sum ) { for ( int i = 0; i < arr_size - 2; i ++ ) { unordered_set < int > s; int curr_sum = sum - A [ i ]; for ( int j = i + 1; j < arr_size; j ++ ) { if ( s . find ( curr_sum - A [ j ] ) != s . end ( ) ) { printf ( "Triplet is %d, %d, %d", A [ i ], A [ j ], curr_sum - A [ j ] ); return true; } s . insert ( A [ j ] ); } } return false; } bool f_filled ( int A [ ], int arr_size, int sum ) {} s %d, %d, %d", A [ i ], A [ j ], curr_sum - A [ j ] ); return true; } s . insert ( A [ j ] ); } } return false; } bool f_filled ( int A [ ], int arr_size, int sum ) {} int main(void) { int n_success = 0; int param0_0[] = {1,6,8,8,9,11,13,13,15,17,21,24,38,38,42,43,46,46,47,54,55,56,57,58,60,60,60,62,63,63,65,66,67,67,69,81,84,84,85,86,95,99}; int param0_1[] = {20,-86,-24,38,-32,-64,-72,72,68,94,18,-60,-4,-18,-18,-70,6,-86,46,-16,46,-28}; int param0_2[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_3[] = {13,96,31,39,23,39,50,10,21,64,41,54,44,97,24,91,79,86,38,49,77,71,8,98,85,36,37,65,42,48}; int param0_4[] = {-86,-68,-58,-56,-54,-54,-48,-40,-36,-32,-26,-16,-14,-12,-12,-4,-4,-4,0,10,22,22,30,54,62,68,88,88}; int param0_5[] = {0,1,1,1,1,0,0}; int param0_6[] = {8,8,9,13,20,24,29,52,53,96}; int param0_7[] = {18,-92,-10,26,58,-48,38,66,-98,-72,4,76,-52,20,60,-56,96,60,-10,-26,-64,-66,-22,-86,74,82,2,-14,76,82,40,70,-40,-2,-46,-38,22,98,58}; int param0_8[] = {1,1,1,1}; int param0_9[] = {72}; 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[] = {27,21,17,17,21,5,9,30,2,0}; int param2[] = {24,20,13,18,25,3,8,30,2,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 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 arr_size, int sum ) [MASK] for ( int i = 0; i < arr_size - 2; i ++ ) { unordered_set < int > s; int curr_sum = sum - A [ i ]; for ( int j = i + 1; j < arr_size; j ++ ) { if ( s . find ( curr_sum - A [ j ] ) != s . end ( ) ) { printf ( "Triplet is %d, %d, %d", A [ i ], A [ j ], curr_sum - A [ j ] ); return true; } s . insert ( A [ j ] ); } } return false; } bool f_filled ( int A [ ], int arr_size, int sum ) {}s %d, %d, %d", A [ i ], A [ j ], curr_sum - A [ j ] ); return true; } s . insert ( A [ j ] ); } } return false; } bool f_filled ( int A [ ], int arr_size, int sum ) {} int main(void) { int n_success = 0; int param0_0[] = {1,6,8,8,9,11,13,13,15,17,21,24,38,38,42,43,46,46,47,54,55,56,57,58,60,60,60,62,63,63,65,66,67,67,69,81,84,84,85,86,95,99}; int param0_1[] = {20,-86,-24,38,-32,-64,-72,72,68,94,18,-60,-4,-18,-18,-70,6,-86,46,-16,46,-28}; int param0_2[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_3[] = {13,96,31,39,23,39,50,10,21,64,41,54,44,97,24,91,79,86,38,49,77,71,8,98,85,36,37,65,42,48}; int param0_4[] = {-86,-68,-58,-56,-54,-54,-48,-40,-36,-32,-26,-16,-14,-12,-12,-4,-4,-4,0,10,22,22,30,54,62,68,88,88}; int param0_5[] = {0,1,1,1,1,0,0}; int param0_6[] = {8,8,9,13,20,24,29,52,53,96}; int param0_7[] = {18,-92,-10,26,58,-48,38,66,-98,-72,4,76,-52,20,60,-56,96,60,-10,-26,-64,-66,-22,-86,74,82,2,-14,76,82,40,70,-40,-2,-46,-38,22,98,58}; int param0_8[] = {1,1,1,1}; int param0_9[] = {72}; 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[] = {27,21,17,17,21,5,9,30,2,0}; int param2[] = {24,20,13,18,25,3,8,30,2,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; }
{
[ "a) N,", "b) 0", "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 n, int m ) { int dp [ n + 2 ] [ n + 2 ]; memset ( dp, 0, sizeof ( dp ) ); dp [ 0 ] [ n + 1 ] = 1; for ( int k = n; k >= m; k -- ) { for ( int i = 0; i <= n; i ++ ) { dp [ i ] [ k ] = dp [ i ] [ k + 1 ]; if ( i - k >= 0 ) dp [ i ] [ k ] = ( dp [ i ] [ k ] + dp [ i - k ] [ k ] ); } } return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {} dp [ i ] [ k ] = dp [ i ] [ k + 1 ]; if ( i - k >= 0 ) dp [ i ] [ k ] = ( dp [ i ] [ k ] + dp [ i - k ] [ k ] ); } } return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {} int main(void) { int n_success = 0; int param0[] = {20,77,59,5,41,39,23,7,82,11}; int param1[] = {18,74,85,76,62,40,58,1,45,66}; 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 n, int m ) { int dp [ n + 2 ] [ n + 2 ]; memset ( dp, 0, sizeof ( dp ) ); dp [ 0 ] [ n + 1 ] = 1; for ( int k = n; k >= m; k -- ) { for ( int i = 0; i <= n; i ++ ) { dp [ i ] [ k ] = dp [ i ] [ k + 1 ]; if ( i - k >= 0 ) dp [ i ] [ k ] = ( dp [ i ] [ k ] + dp [ i - k ] [ k ] ); } } return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {} dp [ i ] [ k ] = dp [ i ] [ k + 1 ]; if ( i - k >= 0 ) dp [ i ] [ k ] = ( dp [ i ] [ k ] + dp [ i - k ] [ k ] ); } } return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {} int main(void) { int n_success = 0; int param0[] = {20,77,59,5,41,39,23,7,82,11}; int param1[] = {18,74,85,76,62,40,58,1,45,66}; 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) [", "b) {", "c) len", "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 n, int templeHeight [ ] ) { int sum = 0; for ( int i = 0; i < n; ++ i ) { int left = 0, right = 0; for ( int j = i - 1; j >= 0; -- j ) { if ( templeHeight [ j ] < templeHeight [ j + 1 ] ) ++ left; else break; } for ( int j = i + 1; j < n; ++ j ) { if ( templeHeight [ j ] < templeHeight [ j - 1 ] ) ++ right; else break; } sum += max ( right, left ) + 1; } return sum; } int f_filled ( int n, int templeHeight [ ] ) {} if ( templeHeight [ j ] < templeHeight [ j - 1 ] ) ++ right; else break; } sum += max ( right, left ) + 1; } return sum; } int f_filled ( int n, int templeHeight [ ] ) {} int main(void) { int n_success = 0; int param0[] = {12,46,16,9,0,38,28,9,18,29}; int param1_0[] = {3,11,12,15,16,21,24,29,32,39,42,44,51,68,79,81,81,85,92,94}; int param1_1[] = {76,48,88,70,-64,66,-6,-58,26,-28,-42,-94,80,-4,-56,-46,4,90,-12,-78,64,18,-38,26,56,-24,66,-18,-12,0,-94,12,-10,4,-68,-20,88,2,-58,16,46,-80,-42,44,-86,96,-44}; int param1_2[] = {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 param1_3[] = {2,95,20,50,2,58,20,14,65,69,78,7}; int param1_4[] = {-88}; int param1_5[] = {0,0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,1,0,0}; int param1_6[] = {2,3,6,8,9,10,14,17,17,22,25,27,29,29,30,32,33,35,38,42,50,51,51,57,59,59,59,60,62,62,63,67,70,75,76,77,81,81,83,84}; int param1_7[] = {-52,62,74,-62,-58,62,38,42,-50,20}; int param1_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}; int param1_9[] = {96,15,9,9,40,34,17,4,51,49,34,66,97,28,64,65,92,56,74,48,43,17,82,8,21,39,83,35,42,37,64,34,42,59,45,61,55,93,94,29,20,96,77,66}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; 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 templeHeight [ ] ) { int sum = 0; for ( int i = 0; i < n; ++ i ) { int left = 0, right = 0; for ( int j = i - 1; j >= 0; -- j ) { if ( templeHeight [ j ] < templeHeight [ j + 1 ] ) ++ left; else break; } for ( int j = i + 1; j < n; ++ j ) { if ( templeHeight [ j ] < templeHeight [ [MASK] - 1 ] ) ++ right; else break; } sum += max ( right, left ) + 1; } return sum; } int f_filled ( int n, int templeHeight [ ] ) {} if ( templeHeight [ j ] < templeHeight [ j - 1 ] ) ++ right; else break; } sum += max ( right, left ) + 1; } return sum; } int f_filled ( int n, int templeHeight [ ] ) {} int main(void) { int n_success = 0; int param0[] = {12,46,16,9,0,38,28,9,18,29}; int param1_0[] = {3,11,12,15,16,21,24,29,32,39,42,44,51,68,79,81,81,85,92,94}; int param1_1[] = {76,48,88,70,-64,66,-6,-58,26,-28,-42,-94,80,-4,-56,-46,4,90,-12,-78,64,18,-38,26,56,-24,66,-18,-12,0,-94,12,-10,4,-68,-20,88,2,-58,16,46,-80,-42,44,-86,96,-44}; int param1_2[] = {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 param1_3[] = {2,95,20,50,2,58,20,14,65,69,78,7}; int param1_4[] = {-88}; int param1_5[] = {0,0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,1,0,0}; int param1_6[] = {2,3,6,8,9,10,14,17,17,22,25,27,29,29,30,32,33,35,38,42,50,51,51,57,59,59,59,60,62,62,63,67,70,75,76,77,81,81,83,84}; int param1_7[] = {-52,62,74,-62,-58,62,38,42,-50,20}; int param1_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}; int param1_9[] = {96,15,9,9,40,34,17,4,51,49,34,66,97,28,64,65,92,56,74,48,43,17,82,8,21,39,83,35,42,37,64,34,42,59,45,61,55,93,94,29,20,96,77,66}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; 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; }
j
[ "a) <", "b) i", "c) .", "d) j", "e) 0;" ]
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 <= 0 ) return 0; int fibo [ n + 1 ]; fibo [ 0 ] = 0, fibo [ 1 ] = 1; int sum = fibo [ 0 ] + fibo [ 1 ]; for ( int i = 2; i <= n; i ++ ) { fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ]; sum += fibo [ i ]; } return sum; } int f_filled ( int n ) {} int sum = fibo [ 0 ] + fibo [ 1 ]; for ( int i = 2; i <= n; i ++ ) { fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ]; sum += fibo [ i ]; } return sum; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {9,50,7,21,21,91,11,25,62,4}; 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 [MASK] [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { if ( n <= 0 ) return 0; int fibo [ n + 1 ]; fibo [ 0 ] = 0, fibo [ 1 ] = 1; int sum = fibo [ 0 ] + fibo [ 1 ]; for ( int i = 2; i <= n; i ++ ) { fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ]; sum += fibo [ i ]; } return sum; } int f_filled ( int n ) {} int sum = fibo [ 0 ] + fibo [ 1 ]; for ( int i = 2; i <= n; i ++ ) { fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ]; sum += fibo [ i ]; } return sum; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {9,50,7,21,21,91,11,25,62,4}; 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; }
arr
[ "a) unsigned", "b) i", "c) sort", "d) {", "e) arr" ]
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 coin [ ], int n, int k ) { sort ( coin, coin + n ); int coins_needed = ceil ( 1.0 * n / ( k + 1 ) ); int ans = 0; for ( int i = 0; i <= coins_needed - 1; i ++ ) ans += coin [ i ]; return ans; } int f_filled ( int coin [ ], int n, int k ) {} coins_needed = ceil ( 1.0 * n / ( k + 1 ) ); int ans = 0; for ( int i = 0; i <= coins_needed - 1; i ++ ) ans += coin [ i ]; return ans; } int f_filled ( int coin [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {2,4,5,9,10,10,11,14,15,19,21,22,29,36,36,38,39,39,39,41,41,42,45,45,48,55,56,57,64,66,66,66,66,69,74,76,80,81,82,82,85,87,95,95}; int param0_1[] = {-6,-52,20,-98,-10,48,36,66,-88,94,68,16}; int param0_2[] = {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[] = {91,62,29,49,6,11,10,43,78,35,32,5,1,48,15,24,4,71}; int param0_4[] = {-98,-92,-88,-84,-82,-78,-74,-74,-68,-62,-62,-56,-56,-50,-46,-44,-26,-18,-14,-8,-8,-6,8,16,20,20,22,26,36,42,44,44,52,60,66,68,68,70,76,84}; int param0_5[] = {1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0}; int param0_6[] = {5,12,38,39,52,54,62,81,87,93}; int param0_7[] = {86,-18,-32,70,40,-76,-8,8,-84,-10,92,94,-18,-12,-26,-40,-74,60,16,-70,44,-32,40,-24,0,4}; int param0_8[] = {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,1,1,1}; int param0_9[] = {86,62,98,97,61,31,23,56,63,72,44,74,58,97}; 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,6,16,13,25,32,6,25,37,12}; int param2[] = {27,10,16,17,34,32,8,20,29,13}; 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 [MASK] 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 coin [ ], int n, int k ) { sort ( coin, coin + n ); int coins_needed = ceil ( 1.0 * n / ( k + 1 ) ); int ans = 0; for ( int i = 0; i <= coins_needed - 1; i ++ ) ans += coin [ i ]; return ans; } int f_filled ( int coin [ ], int n, int k ) {} coins_needed = ceil ( 1.0 * n / ( k + 1 ) ); int ans = 0; for ( int i = 0; i <= coins_needed - 1; i ++ ) ans += coin [ i ]; return ans; } int f_filled ( int coin [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {2,4,5,9,10,10,11,14,15,19,21,22,29,36,36,38,39,39,39,41,41,42,45,45,48,55,56,57,64,66,66,66,66,69,74,76,80,81,82,82,85,87,95,95}; int param0_1[] = {-6,-52,20,-98,-10,48,36,66,-88,94,68,16}; int param0_2[] = {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[] = {91,62,29,49,6,11,10,43,78,35,32,5,1,48,15,24,4,71}; int param0_4[] = {-98,-92,-88,-84,-82,-78,-74,-74,-68,-62,-62,-56,-56,-50,-46,-44,-26,-18,-14,-8,-8,-6,8,16,20,20,22,26,36,42,44,44,52,60,66,68,68,70,76,84}; int param0_5[] = {1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0}; int param0_6[] = {5,12,38,39,52,54,62,81,87,93}; int param0_7[] = {86,-18,-32,70,40,-76,-8,8,-84,-10,92,94,-18,-12,-26,-40,-74,60,16,-70,44,-32,40,-24,0,4}; int param0_8[] = {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,1,1,1}; int param0_9[] = {86,62,98,97,61,31,23,56,63,72,44,74,58,97}; 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,6,16,13,25,32,6,25,37,12}; int param2[] = {27,10,16,17,34,32,8,20,29,13}; 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) int", "b) f_gold", "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 ( char num [] ) { if ( strlen(num) >= 3 ) { int d1 = ( int ) num [ strlen(num) - 1 ]; if ( d1 % 2 != 0 ) return ( 0 ); int d2 = ( int ) num [ strlen(num) - 2 ]; int sum = 0; for ( int i = 0; i < strlen(num); i ++ ) sum += num [ i ]; return ( sum % 3 == 0 && ( d2 * 10 + d1 ) % 4 == 0 ); } else { int number = stoi ( num ); return ( number % 12 == 0 ); } } bool f_filled ( char num [] ) {} + ) sum += num [ i ]; return ( sum % 3 == 0 && ( d2 * 10 + d1 ) % 4 == 0 ); } else { int number = stoi ( num ); return ( number % 12 == 0 ); } } bool f_filled ( char num [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"12244824607284961224","392603977949","11101001111","92387493287593874594898678979792","2233244912","10101","12","254535361","1","hMPxVMpOBt"}; 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 ( char num [] ) { if ( strlen(num) >= 3 ) { int d1 = ( int ) num [ strlen(num) - 1 ]; if ( d1 % 2 != 0 ) return ( 0 ); int d2 = ( int ) num [ strlen(num) - 2 ]; int sum = 0; for ( int i = 0; i < strlen(num); i ++ ) sum += num [ i ]; return ( sum % [MASK] == 0 && ( d2 * 10 + d1 ) % 4 == 0 ); } else { int number = stoi ( num ); return ( number % 12 == 0 ); } } bool f_filled ( char num [] ) {}+ ) sum += num [ i ]; return ( sum % 3 == 0 && ( d2 * 10 + d1 ) % 4 == 0 ); } else { int number = stoi ( num ); return ( number % 12 == 0 ); } } bool f_filled ( char num [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"12244824607284961224","392603977949","11101001111","92387493287593874594898678979792","2233244912","10101","12","254535361","1","hMPxVMpOBt"}; 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; }
3
[ "a) char", "b) void", "c) x:", "d) 3", "e) b)" ]
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 ( unsigned int n ) { int count = 0; if ( n && ! ( n & ( n - 1 ) ) ) { while ( n > 1 ) { n >>= 1; count += 1; } return ( count % 2 == 0 ) ? 1 : 0; } return 0; } bool f_filled ( unsigned int n ) {} = 0; if ( n && ! ( n & ( n - 1 ) ) ) { while ( n > 1 ) { n >>= 1; count += 1; } return ( count % 2 == 0 ) ? 1 : 0; } return 0; } bool f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {1,4,64,-64,128,1024,45,33,66,74}; 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 [MASK] * 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 ) { int count = 0; if ( n && ! ( n & ( n - 1 ) ) ) { while ( n > 1 ) { n >>= 1; count += 1; } return ( count % 2 == 0 ) ? 1 : 0; } return 0; } bool f_filled ( unsigned int n ) {} = 0; if ( n && ! ( n & ( n - 1 ) ) ) { while ( n > 1 ) { n >>= 1; count += 1; } return ( count % 2 == 0 ) ? 1 : 0; } return 0; } bool f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {1,4,64,-64,128,1024,45,33,66,74}; 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; }
void
[ "a) :", "b) sizeof", "c) 4", "d) void", "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 s ) { int length = s / 3; s -= length; int breadth = s / 2; int height = s - breadth; return length * breadth * height; } int f_filled ( int s ) {} of(int), cmpfunc);} int f_gold ( int s ) { int length = s / 3; s -= length; int breadth = s / 2; int height = s - breadth; return length * breadth * height; } int f_filled ( int s ) {} int main(void) { int n_success = 0; int param0[] = {8,96,96,96,12,95,72,81,42,13}; 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 [MASK] [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int s ) { int length = s / 3; s -= length; int breadth = s / 2; int height = s - breadth; return length * breadth * height; } int f_filled ( int s ) {}of(int), cmpfunc);} int f_gold ( int s ) { int length = s / 3; s -= length; int breadth = s / 2; int height = s - breadth; return length * breadth * height; } int f_filled ( int s ) {} int main(void) { int n_success = 0; int param0[] = {8,96,96,96,12,95,72,81,42,13}; 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; }
arr
[ "a) -", "b) arr", "c) res", "d) k", "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);} bool f_gold ( char str1 [ ], char str2 [ ], int m, int n ) { if ( m == 0 ) return true; if ( n == 0 ) return false; if ( str1 [ m - 1 ] == str2 [ n - 1 ] ) return f_gold ( str1, str2, m - 1, n - 1 ); return f_gold ( str1, str2, m, n - 1 ); } bool f_filled ( char str1 [ ], char str2 [ ], int m, int n ) {} ; if ( str1 [ m - 1 ] == str2 [ n - 1 ] ) return f_gold ( str1, str2, m - 1, n - 1 ); return f_gold ( str1, str2, m, n - 1 ); } 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) [MASK] 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 ) { if ( m == 0 ) return true; if ( n == 0 ) return false; if ( str1 [ m - 1 ] == str2 [ n - 1 ] ) return f_gold ( str1, str2, m - 1, n - 1 ); return f_gold ( str1, str2, m, n - 1 ); } bool f_filled ( char str1 [ ], char str2 [ ], int m, int n ) {}; if ( str1 [ m - 1 ] == str2 [ n - 1 ] ) return f_gold ( str1, str2, m - 1, n - 1 ); return f_gold ( str1, str2, m, n - 1 ); } 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; }
/
[ "a) /", "b) >", "c) *", "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);} unsigned int f_gold ( unsigned int x ) { unsigned int even_bits = x & 0xAAAAAAAA; unsigned int odd_bits = x & 0x55555555; even_bits >>= 1; odd_bits <<= 1; return ( even_bits | odd_bits ); } unsigned int f_filled ( unsigned int x ) {} ned int even_bits = x & 0xAAAAAAAA; unsigned int odd_bits = x & 0x55555555; even_bits >>= 1; odd_bits <<= 1; return ( even_bits | odd_bits ); } unsigned int f_filled ( unsigned int x ) {} int main(void) { int n_success = 0; int param0[] = {99,94,11,3,77,57,54,66,98,36}; 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)? [MASK] 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);} unsigned int f_gold ( unsigned int x ) { unsigned int even_bits = x & 0xAAAAAAAA; unsigned int odd_bits = x & 0x55555555; even_bits >>= 1; odd_bits <<= 1; return ( even_bits | odd_bits ); } unsigned int f_filled ( unsigned int x ) {}ned int even_bits = x & 0xAAAAAAAA; unsigned int odd_bits = x & 0x55555555; even_bits >>= 1; odd_bits <<= 1; return ( even_bits | odd_bits ); } unsigned int f_filled ( unsigned int x ) {} int main(void) { int n_success = 0; int param0[] = {99,94,11,3,77,57,54,66,98,36}; 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; }
x:
[ "a) x:", "b) ==", "c) <cstdlib>", "d) )", "e) a," ]
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 odd_count = 0; int even_count = 0; if ( n < 0 ) n = - n; if ( n == 0 ) return 1; if ( n == 1 ) return 0; while ( n ) { if ( n & 1 ) odd_count ++; if ( n & 2 ) even_count ++; n = n >> 2; } return f_gold ( abs ( odd_count - even_count ) ); } int f_filled ( int n ) {} == 1 ) return 0; while ( n ) { if ( n & 1 ) odd_count ++; if ( n & 2 ) even_count ++; n = n >> 2; } return f_gold ( abs ( odd_count - even_count ) ); } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {94,94,79,39,16,90,64,76,83,47}; 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 odd_count = 0; int even_count = 0; if ( n < 0 ) n = - n; if ( n == 0 ) return 1; if ( n == 1 ) return [MASK] while ( n ) { if ( n & 1 ) odd_count ++; if ( n & 2 ) even_count ++; n = n >> 2; } return f_gold ( abs ( odd_count - even_count ) ); } int f_filled ( int n ) {}== 1 ) return 0; while ( n ) { if ( n & 1 ) odd_count ++; if ( n & 2 ) even_count ++; n = n >> 2; } return f_gold ( abs ( odd_count - even_count ) ); } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {94,94,79,39,16,90,64,76,83,47}; 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) a", "b) %", "c) =", "d) :", "e) 0;" ]
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 n ) { unordered_map < int, int > mp; for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; int ans = 0; for ( auto it = mp . begin ( ); it != mp . end ( ); it ++ ) { int count = it -> second; ans += ( count * ( count - 1 ) ) / 2; } return ans; } int f_filled ( int arr [ ], int n ) {} or ( auto it = mp . begin ( ); it != mp . end ( ); it ++ ) { int count = it -> second; ans += ( count * ( count - 1 ) ) / 2; } return ans; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {5,11,18,22,40,46,50,51,53,55,64,67,73,78,86}; int param0_1[] = {14,-98,98,58,-82,90,-80,-56,-30,-36,-56,-30,-58,68,72,-76,38,-90,-72,4,-32,32,-28,2,12,-72,54,2,0,-74,8,12,46,72,-84,-66,70,18,26,72,-26,44,-8,20,-32,-56,28}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_3[] = {93,23,62,64,31,78,99}; int param0_4[] = {-94,-94,-92,-86,-84,-76,-76,-68,-66,-56,-56,-54,-50,-46,-38,-34,-34,-30,-26,-18,-16,2,8,42,52,54,56,64,68,82,82,82,94,96,98}; int param0_5[] = {0}; int param0_6[] = {3,18,18,20,21,23,24,27,35,36,38,40,46,50,50,51,52,53,59,61,63,63,65,66,68,68,70,71,74,75,96,98}; int param0_7[] = {-68,40,16,50,36,42,-20,-46,-92,4,-18,-12,48,0,-46,64,-74,-50,42,44,-56,28,-10,78,62,70,-60,12,-44,-78}; 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}; int param0_9[] = {31,5}; 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,24,13,4,19,0,19,23,30,1}; 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 ( [MASK] i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; int ans = 0; for ( auto it = mp . begin ( ); it != mp . end ( ); it ++ ) { int count = it -> second; ans += ( count * ( count - 1 ) ) / 2; } return ans; } int f_filled ( int arr [ ], int n ) {}or ( auto it = mp . begin ( ); it != mp . end ( ); it ++ ) { int count = it -> second; ans += ( count * ( count - 1 ) ) / 2; } return ans; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {5,11,18,22,40,46,50,51,53,55,64,67,73,78,86}; int param0_1[] = {14,-98,98,58,-82,90,-80,-56,-30,-36,-56,-30,-58,68,72,-76,38,-90,-72,4,-32,32,-28,2,12,-72,54,2,0,-74,8,12,46,72,-84,-66,70,18,26,72,-26,44,-8,20,-32,-56,28}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_3[] = {93,23,62,64,31,78,99}; int param0_4[] = {-94,-94,-92,-86,-84,-76,-76,-68,-66,-56,-56,-54,-50,-46,-38,-34,-34,-30,-26,-18,-16,2,8,42,52,54,56,64,68,82,82,82,94,96,98}; int param0_5[] = {0}; int param0_6[] = {3,18,18,20,21,23,24,27,35,36,38,40,46,50,50,51,52,53,59,61,63,63,65,66,68,68,70,71,74,75,96,98}; int param0_7[] = {-68,40,16,50,36,42,-20,-46,-92,4,-18,-12,48,0,-46,64,-74,-50,42,44,-56,28,-10,78,62,70,-60,12,-44,-78}; 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}; int param0_9[] = {31,5}; 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,24,13,4,19,0,19,23,30,1}; 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) sum", "b) y)", "c) if", "d) int", "e) namespace" ]
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 K ) { sort ( arr, arr + N ); int dp [ N ]; dp [ 0 ] = 0; for ( int i = 1; i < N; i ++ ) { dp [ i ] = dp [ i - 1 ]; if ( arr [ i ] - arr [ i - 1 ] < K ) { if ( i >= 2 ) dp [ i ] = max ( dp [ i ], dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ); else dp [ i ] = max ( dp [ i ], arr [ i ] + arr [ i - 1 ] ); } } return dp [ N - 1 ]; } int f_filled ( int arr [ ], int N, int K ) {} ], dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ); else dp [ i ] = max ( dp [ i ], arr [ i ] + arr [ i - 1 ] ); } } return dp [ N - 1 ]; } int f_filled ( int arr [ ], int N, int K ) {} int main(void) { int n_success = 0; int param0_0[] = {48,53,67,78,78,93,95}; int param0_1[] = {-2,52,18,70,32,88,-70,-32,72,30}; 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,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {98,84,13,61,58,90,45,89,45,80,3,5,57,86,40,80,60,51,60,73,67,10,52,56,60,36,34,60,75,63,23,86,51,68,86,13,71,86,99,6,42,2,39,82,16,5,23,47,12}; int param0_4[] = {-84,-56,68,78}; int param0_5[] = {0,0,1,0,0,1,1,0,0,0,1,0,1,1,1,1,0}; int param0_6[] = {1,2,3,9,12,12,16,17,18,19,20,21,21,26,29,42,44,45,48,48,48,54,54,55,60,63,63,64,64,67,67,68,69,74,78,78,79,83,95,95,95,96,97,99}; int param0_7[] = {40,-48,-14,64,-58,60,-42,-56,54,28,-16,-92,42}; 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[] = {64,25,96}; 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,8,37,31,3,14,27,9,21,1}; int param2[] = {4,8,31,37,3,9,42,8,19,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 [MASK] ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int N, int K ) { sort ( arr, arr + N ); int dp [ N ]; dp [ 0 ] = 0; for ( int i = 1; i < N; i ++ ) { dp [ i ] = dp [ i - 1 ]; if ( arr [ i ] - arr [ i - 1 ] < K ) { if ( i >= 2 ) dp [ i ] = max ( dp [ i ], dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ); else dp [ i ] = max ( dp [ i ], arr [ i ] + arr [ i - 1 ] ); } } return dp [ N - 1 ]; } int f_filled ( int arr [ ], int N, int K ) {} ], dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ); else dp [ i ] = max ( dp [ i ], arr [ i ] + arr [ i - 1 ] ); } } return dp [ N - 1 ]; } int f_filled ( int arr [ ], int N, int K ) {} int main(void) { int n_success = 0; int param0_0[] = {48,53,67,78,78,93,95}; int param0_1[] = {-2,52,18,70,32,88,-70,-32,72,30}; 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,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {98,84,13,61,58,90,45,89,45,80,3,5,57,86,40,80,60,51,60,73,67,10,52,56,60,36,34,60,75,63,23,86,51,68,86,13,71,86,99,6,42,2,39,82,16,5,23,47,12}; int param0_4[] = {-84,-56,68,78}; int param0_5[] = {0,0,1,0,0,1,1,0,0,0,1,0,1,1,1,1,0}; int param0_6[] = {1,2,3,9,12,12,16,17,18,19,20,21,21,26,29,42,44,45,48,48,48,54,54,55,60,63,63,64,64,67,67,68,69,74,78,78,79,83,95,95,95,96,97,99}; int param0_7[] = {40,-48,-14,64,-58,60,-42,-56,54,28,-16,-92,42}; 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[] = {64,25,96}; 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,8,37,31,3,14,27,9,21,1}; int param2[] = {4,8,31,37,3,9,42,8,19,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) return", "b) )", "c) min", "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 s [] ) { int n = len(s); int ans = - 1; char num []; for ( int i = 1; i < ( 1 << n ); i ++ ) { char str [] = ""; for ( int j = 0; j < n; j ++ ) { if ( ( i >> j ) & 1 ) { str += s [ j ]; } } if ( str [ 0 ] != '0' ) { int temp = 0; for ( int j = 0; j < len(str); j ++ ) temp = temp * 10 + ( int ) ( str [ j ] - '0' ); int k = sqrt ( temp ); if ( k * k == temp ) { if ( ans < ( int ) len(str) ) { ans = ( int ) len(str); num = str; } } } } if ( ans == - 1 ) return ans; else { printf(num, " "); return n - ans; } } int f_filled ( char s [] ) {} ans = ( int ) len(str); num = str; } } } } if ( ans == - 1 ) return ans; else { printf(num, " "); return n - ans; } } int f_filled ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"h","1391212","010","ksRFLRVL","5809836998","1111000","hJoDzrrBaF","6076","001010010","lU DBBVF"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf(num, " "); 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 s [] ) { int n = len(s); int ans = - 1; char num []; for ( int i = 1; i < ( 1 << n ); i [MASK] ) { char str [] = ""; for ( int j = 0; j < n; j ++ ) { if ( ( i >> j ) & 1 ) { str += s [ j ]; } } if ( str [ 0 ] != '0' ) { int temp = 0; for ( int j = 0; j < len(str); j ++ ) temp = temp * 10 + ( int ) ( str [ j ] - '0' ); int k = sqrt ( temp ); if ( k * k == temp ) { if ( ans < ( int ) len(str) ) { ans = ( int ) len(str); num = str; } } } } if ( ans == - 1 ) return ans; else { printf(num, " "); return n - ans; } } int f_filled ( char s [] ) {} ans = ( int ) len(str); num = str; } } } } if ( ans == - 1 ) return ans; else { printf(num, " "); return n - ans; } } int f_filled ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"h","1391212","010","ksRFLRVL","5809836998","1111000","hJoDzrrBaF","6076","001010010","lU DBBVF"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf(num, " "); return 0; }
++
[ "a) ++", "b) *(int*)b", "c) if", "d) =", "e) if" ]
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 W, int n, int val [ ], int wt [ ] ) { int dp [ W + 1 ]; memset ( dp, 0, sizeof dp ); int ans = 0; for ( int i = 0; i <= W; i ++ ) for ( int j = 0; j < n; j ++ ) if ( wt [ j ] <= i ) dp [ i ] = max ( dp [ i ], dp [ i - wt [ j ] ] + val [ j ] ); return dp [ W ]; } int f_filled ( int W, int n, int val [ ], int wt [ ] ) {} or ( int j = 0; j < n; j ++ ) if ( wt [ j ] <= i ) dp [ i ] = max ( dp [ i ], dp [ i - wt [ j ] ] + val [ j ] ); return dp [ W ]; } int f_filled ( int W, int n, int val [ ], int wt [ ] ) {} int main(void) { int n_success = 0; int param0[] = {12,1,30,25,10,20,2,23,13,18}; int param1[] = {19,1,24,22,12,32,3,25,13,28}; int param2_0[] = {2,12,13,13,13,24,29,34,45,47,53,55,58,64,66,74,78,80,82,83,83,84,88,91,91}; int param2_1[] = {54,82}; int param2_2[] = {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 param2_3[] = {37,72,57,18,31,44,81,13,75,91,16,96,55,8,65,47,98,7,88,89,28,78,91,41,34,78,38,71,79,61,37,99,16,87,13,93,20,84,30,53,26,54,23,33,54}; int param2_4[] = {-80,-70,-40,-38,-38,-36,-34,24,26,38,44,62,64,92}; int param2_5[] = {1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,1,0,1,1,0,0,0,0,1,1,1,1}; int param2_6[] = {30,50,64,71}; int param2_7[] = {8,96,72,-88,42,-40,64,-24,68,46,-84,-58,66,-86,-12,78,-24,50,-34,88,-30,74,-82,-68,-54,72}; int param2_8[] = {0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}; int param2_9[] = {4,76,50,27,10,35,96,98,59,77,52,52,80,61,12,49,51,15,30,27,29,2,45,27,57,90,47,56,45}; int *param2[10] = {param2_0,param2_1,param2_2,param2_3,param2_4,param2_5,param2_6,param2_7,param2_8,param2_9}; int param3_0[] = {5,5,5,28,30,33,36,37,43,50,60,61,67,70,74,79,80,81,84,85,86,86,92,92,99}; int param3_1[] = {12,14}; int param3_2[] = {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 param3_3[] = {37,70,43,47,9,27,30,30,16,91,34,12,98,36,66,91,79,53,16,52,87,99,83,71,79,8,9,55,66,76,77,28,85,82,56,57,11,41,19,48,76,49,83,21,21}; int param3_4[] = {-98,-88,-78,-70,-58,-10,-2,8,20,38,40,56,66,86}; int param3_5[] = {0,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,1,0,1,1,0,0,0}; int param3_6[] = {6,10,23,97}; int param3_7[] = {-42,48,66,-84,98,-14,84,80,-20,-76,-74,44,-44,18,86,58,68,80,-72,-52,-2,58,90,64,54,80}; int param3_8[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; int param3_9[] = {73,26,38,19,54,61,62,52,40,49,93,1,73,55,31,77,75,84,73,54,93,57,15,67,54,43,17,16,89}; int *param3[10] = {param3_0,param3_1,param3_2,param3_3,param3_4,param3_5,param3_6,param3_7,param3_8,param3_9}; 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 W, int n, int val [ ], int wt [ ] ) { int dp [ W + 1 ]; memset ( dp, 0, sizeof dp ); int ans = 0; for ( int i = 0; i <= W; i ++ ) for ( int j = 0; j < n; j ++ ) if ( wt [ j ] <= i ) dp [ i ] = max ( dp [ i ], dp [ i - wt [ j ] ] + val [ j ] ); return dp [ [MASK] ]; } int f_filled ( int W, int n, int val [ ], int wt [ ] ) {}or ( int j = 0; j < n; j ++ ) if ( wt [ j ] <= i ) dp [ i ] = max ( dp [ i ], dp [ i - wt [ j ] ] + val [ j ] ); return dp [ W ]; } int f_filled ( int W, int n, int val [ ], int wt [ ] ) {} int main(void) { int n_success = 0; int param0[] = {12,1,30,25,10,20,2,23,13,18}; int param1[] = {19,1,24,22,12,32,3,25,13,28}; int param2_0[] = {2,12,13,13,13,24,29,34,45,47,53,55,58,64,66,74,78,80,82,83,83,84,88,91,91}; int param2_1[] = {54,82}; int param2_2[] = {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 param2_3[] = {37,72,57,18,31,44,81,13,75,91,16,96,55,8,65,47,98,7,88,89,28,78,91,41,34,78,38,71,79,61,37,99,16,87,13,93,20,84,30,53,26,54,23,33,54}; int param2_4[] = {-80,-70,-40,-38,-38,-36,-34,24,26,38,44,62,64,92}; int param2_5[] = {1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,1,0,1,1,0,0,0,0,1,1,1,1}; int param2_6[] = {30,50,64,71}; int param2_7[] = {8,96,72,-88,42,-40,64,-24,68,46,-84,-58,66,-86,-12,78,-24,50,-34,88,-30,74,-82,-68,-54,72}; int param2_8[] = {0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}; int param2_9[] = {4,76,50,27,10,35,96,98,59,77,52,52,80,61,12,49,51,15,30,27,29,2,45,27,57,90,47,56,45}; int *param2[10] = {param2_0,param2_1,param2_2,param2_3,param2_4,param2_5,param2_6,param2_7,param2_8,param2_9}; int param3_0[] = {5,5,5,28,30,33,36,37,43,50,60,61,67,70,74,79,80,81,84,85,86,86,92,92,99}; int param3_1[] = {12,14}; int param3_2[] = {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 param3_3[] = {37,70,43,47,9,27,30,30,16,91,34,12,98,36,66,91,79,53,16,52,87,99,83,71,79,8,9,55,66,76,77,28,85,82,56,57,11,41,19,48,76,49,83,21,21}; int param3_4[] = {-98,-88,-78,-70,-58,-10,-2,8,20,38,40,56,66,86}; int param3_5[] = {0,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,1,0,1,1,0,0,0}; int param3_6[] = {6,10,23,97}; int param3_7[] = {-42,48,66,-84,98,-14,84,80,-20,-76,-74,44,-44,18,86,58,68,80,-72,-52,-2,58,90,64,54,80}; int param3_8[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; int param3_9[] = {73,26,38,19,54,61,62,52,40,49,93,1,73,55,31,77,75,84,73,54,93,57,15,67,54,43,17,16,89}; int *param3[10] = {param3_0,param3_1,param3_2,param3_3,param3_4,param3_5,param3_6,param3_7,param3_8,param3_9}; 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; }
W
[ "a) (", "b) W", "c) i", "d) i", "e) const" ]
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 m, int n ) { if ( m < n ) return 0; if ( n == 0 ) return 1; return f_gold ( m - 1, n ) + f_gold ( m / 2, n - 1 ); } int f_filled ( int m, int n ) {} izeof(int), cmpfunc);} int f_gold ( int m, int n ) { if ( m < n ) return 0; if ( n == 0 ) return 1; return f_gold ( m - 1, n ) + f_gold ( m / 2, n - 1 ); } int f_filled ( int m, int n ) {} int main(void) { int n_success = 0; int param0[] = {38,39,24,90,44,49,58,97,99,19}; int param1[] = {34,29,99,23,2,70,84,34,72,67}; 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 m, [MASK] n ) { if ( m < n ) return 0; if ( n == 0 ) return 1; return f_gold ( m - 1, n ) + f_gold ( m / 2, n - 1 ); } int f_filled ( int m, int n ) {}izeof(int), cmpfunc);} int f_gold ( int m, int n ) { if ( m < n ) return 0; if ( n == 0 ) return 1; return f_gold ( m - 1, n ) + f_gold ( m / 2, n - 1 ); } int f_filled ( int m, int n ) {} int main(void) { int n_success = 0; int param0[] = {38,39,24,90,44,49,58,97,99,19}; int param1[] = {34,29,99,23,2,70,84,34,72,67}; 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) len", "c) :", "d) while", "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);} int f_gold ( int a, int b ) { return ( a + b ) / 2; } int f_filled ( int a, int b ) {} sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a, int b ) { return ( a + b ) / 2; } int f_filled ( int a, int b ) {} int main(void) { int n_success = 0; int param0[] = {1,6,75,51,19,82,72,48,12,41}; int param1[] = {44,61,20,17,25,98,21,41,17,80}; 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 b ) { return ( a + b ) / 2; } int f_filled [MASK] int a, int b ) {}sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a, int b ) { return ( a + b ) / 2; } int f_filled ( int a, int b ) {} int main(void) { int n_success = 0; int param0[] = {1,6,75,51,19,82,72,48,12,41}; int param1[] = {44,61,20,17,25,98,21,41,17,80}; 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) x", "b) cmpfunc);}", "c) M", "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 str [] ) { int len = strlen(str); int num, rem = 0; for ( int i = 0; i < len; i ++ ) { num = rem * 10 + ( str [ i ] - '0' ); rem = num % 11; } return rem; } int f_filled ( char str [] ) {} t len = strlen(str); int num, rem = 0; for ( int i = 0; i < len; i ++ ) { num = rem * 10 + ( str [ i ] - '0' ); rem = num % 11; } return rem; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"DvsNZVNZ","1170","10","evsPwREbSY","09219178704","1001010","SkZbWSajDKmiG","0287976763","011011000111","lUn"}; 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 [MASK] { 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 len = strlen(str); int num, rem = 0; for ( int i = 0; i < len; i ++ ) { num = rem * 10 + ( str [ i ] - '0' ); rem = num % 11; } return rem; } int f_filled ( char str [] ) {}t len = strlen(str); int num, rem = 0; for ( int i = 0; i < len; i ++ ) { num = rem * 10 + ( str [ i ] - '0' ); rem = num % 11; } return rem; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"DvsNZVNZ","1170","10","evsPwREbSY","09219178704","1001010","SkZbWSajDKmiG","0287976763","011011000111","lUn"}; 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; }
y)
[ "a) return", "b) {", "c) y)", "d) ]", "e) (arr)" ]
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 N ) { if ( N == 1 ) return 4; int countB = 1, countS = 1, prev_countB, prev_countS; for ( int i = 2; i <= N; i ++ ) { prev_countB = countB; prev_countS = countS; countS = prev_countB + prev_countS; countB = prev_countS; } int result = countS + countB; return ( result * result ); } int f_filled ( int N ) {} = countB; prev_countS = countS; countS = prev_countB + prev_countS; countB = prev_countS; } int result = countS + countB; return ( result * result ); } int f_filled ( int N ) {} int main(void) { int n_success = 0; int param0[] = {17,66,53,97,34,54,9,99,59,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 [ ]) [MASK] ((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 == 1 ) return 4; int countB = 1, countS = 1, prev_countB, prev_countS; for ( int i = 2; i <= N; i ++ ) { prev_countB = countB; prev_countS = countS; countS = prev_countB + prev_countS; countB = prev_countS; } int result = countS + countB; return ( result * result ); } int f_filled ( int N ) {}= countB; prev_countS = countS; countS = prev_countB + prev_countS; countB = prev_countS; } int result = countS + countB; return ( result * result ); } int f_filled ( int N ) {} int main(void) { int n_success = 0; int param0[] = {17,66,53,97,34,54,9,99,59,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; }
{return
[ "a) bool", "b) {}", "c) {return", "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 arr [ ], int n, int k ) { int count; for ( int i = 0; i < n; i ++ ) { count = 0; for ( int j = 0; j < n; j ++ ) { if ( arr [ j ] == arr [ i ] ) count ++; if ( count > 2 * k ) return false; } } return true; } bool f_filled ( int arr [ ], int n, int k ) {} int j = 0; j < n; j ++ ) { if ( arr [ j ] == arr [ i ] ) count ++; if ( count > 2 * k ) return false; } } return true; } bool f_filled ( int arr [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {1,1,2,3,1}; int param0_1[] = {2,3,3,5,3,3}; int param0_2[] = {0,0,1,1,1}; int param0_3[] = {7,60,78,91,80,75,85,21,41,63,1,84,69,13,94,25,54,54,52,68,53,35,17,37,98,27,2,31}; int param0_4[] = {-96,-94,-82,-80,-78,-66,-36,-24,-18,-12,-2,-2,6,8,10,12,36,38,42,58,64,68,82,84,86,88,94}; int param0_5[] = {0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,1,1,0}; int param0_6[] = {16,19,25,25,32,37,48,59,60,60,71,74,77,81,91,94}; int param0_7[] = {-62,-94,72,-22,86,-80,64,98,-82,-50,12,-4,56,46,-80,2,-86,-44,-26,68,-94,-82,74,26,94,40,50,-40,-42,-10}; int param0_8[] = {0,0,0,0,0,1,1,1}; int param0_9[] = {83,57,2,47,70,22,49,51,25,57,32,7,8,99,6,86,24,79,42,43,1,24,68,11,24,12,43,40,14,45,11,46,12,80,66}; 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[] = {5,6,2,24,24,34,10,20,5,21}; int param2[] = {2,2,1,2,3,2,8,4,2,33}; 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> [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);} bool f_gold ( int arr [ ], int n, int k ) { int count; for ( int i = 0; i < n; i ++ ) { count = 0; for ( int j = 0; j < n; j ++ ) { if ( arr [ j ] == arr [ i ] ) count ++; if ( count > 2 * k ) return false; } } return true; } bool f_filled ( int arr [ ], int n, int k ) {}int j = 0; j < n; j ++ ) { if ( arr [ j ] == arr [ i ] ) count ++; if ( count > 2 * k ) return false; } } return true; } bool f_filled ( int arr [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {1,1,2,3,1}; int param0_1[] = {2,3,3,5,3,3}; int param0_2[] = {0,0,1,1,1}; int param0_3[] = {7,60,78,91,80,75,85,21,41,63,1,84,69,13,94,25,54,54,52,68,53,35,17,37,98,27,2,31}; int param0_4[] = {-96,-94,-82,-80,-78,-66,-36,-24,-18,-12,-2,-2,6,8,10,12,36,38,42,58,64,68,82,84,86,88,94}; int param0_5[] = {0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,1,1,0}; int param0_6[] = {16,19,25,25,32,37,48,59,60,60,71,74,77,81,91,94}; int param0_7[] = {-62,-94,72,-22,86,-80,64,98,-82,-50,12,-4,56,46,-80,2,-86,-44,-26,68,-94,-82,74,26,94,40,50,-40,-42,-10}; int param0_8[] = {0,0,0,0,0,1,1,1}; int param0_9[] = {83,57,2,47,70,22,49,51,25,57,32,7,8,99,6,86,24,79,42,43,1,24,68,11,24,12,43,40,14,45,11,46,12,80,66}; 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[] = {5,6,2,24,24,34,10,20,5,21}; int param2[] = {2,2,1,2,3,2,8,4,2,33}; 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
[ "a) max(int", "b) #include", "c) f3", "d) ]", "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 min_xor = INT_MAX; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) min_xor = min ( min_xor, arr [ i ] ^ arr [ j ] ); return min_xor; } int f_filled ( int arr [ ], int n ) {} = INT_MAX; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) min_xor = min ( min_xor, arr [ i ] ^ arr [ j ] ); return min_xor; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {4,5,7,10,10,11,14,19,21,24,27,27,27,28,28,28,33,34,41,42,43,48,52,53,53,59,62,64,66,71,77,78,78,79,80,82,90,97,99,99}; int param0_1[] = {-68,-58,52,88,90,66,-66,-84,-70,-64,56,42,94,-10,0,80,8,28,-94,36,90,56,56,80,-94,50,90,-28,-22,-2,-96,74,-16,-14}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {57,63,11,73,60,73,25,65,39,48,31,17,23,94,10,97,42,45,83,75,97,96}; int param0_4[] = {-92,-92,-90,-88,-84,-82,-66,-64,-64,-62,-44,-42,-40,-28,-22,-12,-4,-2,0,4,16,22,28,34,54,60,72,74,78,86,94}; int param0_5[] = {1,1,1,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,0}; int param0_6[] = {2,2,6,13,16,16,17,19,19,20,22,25,27,29,34,34,34,36,38,39,42,49,49,53,59,59,71,77,79,82,83,83,84,84,86,86,87,88,93,96}; int param0_7[] = {-14,20,36,12,-54,-50,92,-28,44,-46,6,96,82,70,-20,24,-96,-14,46,-28,-46,-28,22,-82,36,-94,-48,-92,96,74,14}; 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,1,1,1,1}; int param0_9[] = {50,48,94,64,60,48,79,75,77,62,33,42,22,78,32,99,27,23,76,51,34,54,70,12,19,17,13,82,96,70,4,12,5,11,23,23,18,93,38,69}; 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[] = {34,17,9,21,18,36,36,20,39,30}; 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 [MASK] int arr [ ], int n ) { int min_xor = INT_MAX; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) min_xor = min ( min_xor, arr [ i ] ^ arr [ j ] ); return min_xor; } int f_filled ( int arr [ ], int n ) {}= INT_MAX; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) min_xor = min ( min_xor, arr [ i ] ^ arr [ j ] ); return min_xor; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {4,5,7,10,10,11,14,19,21,24,27,27,27,28,28,28,33,34,41,42,43,48,52,53,53,59,62,64,66,71,77,78,78,79,80,82,90,97,99,99}; int param0_1[] = {-68,-58,52,88,90,66,-66,-84,-70,-64,56,42,94,-10,0,80,8,28,-94,36,90,56,56,80,-94,50,90,-28,-22,-2,-96,74,-16,-14}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {57,63,11,73,60,73,25,65,39,48,31,17,23,94,10,97,42,45,83,75,97,96}; int param0_4[] = {-92,-92,-90,-88,-84,-82,-66,-64,-64,-62,-44,-42,-40,-28,-22,-12,-4,-2,0,4,16,22,28,34,54,60,72,74,78,86,94}; int param0_5[] = {1,1,1,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,0}; int param0_6[] = {2,2,6,13,16,16,17,19,19,20,22,25,27,29,34,34,34,36,38,39,42,49,49,53,59,59,71,77,79,82,83,83,84,84,86,86,87,88,93,96}; int param0_7[] = {-14,20,36,12,-54,-50,92,-28,44,-46,6,96,82,70,-20,24,-96,-14,46,-28,-46,-28,22,-82,36,-94,-48,-92,96,74,14}; 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,1,1,1,1}; int param0_9[] = {50,48,94,64,60,48,79,75,77,62,33,42,22,78,32,99,27,23,76,51,34,54,70,12,19,17,13,82,96,70,4,12,5,11,23,23,18,93,38,69}; 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[] = {34,17,9,21,18,36,36,20,39,30}; 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) long", "d) (", "e) <cstdlib>" ]
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 str [] ) { int n = strlen(str); int dp [ n + 1 ] [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n; j ++ ) dp [ i ] [ j ] = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = 1; j <= n; j ++ ) if ( str [ i - 1 ] == str [ j - 1 ] && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]; else dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] ); char res [] = ""; int i = n, j = n; while ( i > 0 && j > 0 ) { if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) { res = res + str [ i - 1 ]; i --; j --; } else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i --; else j --; } reverse ( res . begin ( ), res . end ( ) ); return res; } char f_filled [] ( char str [] ) {} ; j --; } else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i --; else j --; } reverse ( res . begin ( ), res . end ( ) ); return res; } char f_filled [] ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"qnQxjoRx","27473733400077","000010111111","TNVwgrWSLu","9537","1100","lYcoiQfzN","52","00100001100","Rkxe"}; 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 str [] ) { int n = strlen(str); int dp [ n + 1 ] [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n; j ++ ) dp [ i ] [ j ] = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = 1; j <= n; j ++ ) if ( str [ i - 1 ] == str [ j - 1 ] && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]; else dp [ i [MASK] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] ); char res [] = ""; int i = n, j = n; while ( i > 0 && j > 0 ) { if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) { res = res + str [ i - 1 ]; i --; j --; } else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i --; else j --; } reverse ( res . begin ( ), res . end ( ) ); return res; } char f_filled [] ( char str [] ) {}; j --; } else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i --; else j --; } reverse ( res . begin ( ), res . end ( ) ); return res; } char f_filled [] ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"qnQxjoRx","27473733400077","000010111111","TNVwgrWSLu","9537","1100","lYcoiQfzN","52","00100001100","Rkxe"}; 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) invcount;", "c) <bits/stdc++.h>", "d) {", "e) const" ]
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);} double f_gold ( double side ) { return ( 2 * ( sqrt ( 3 ) ) * ( side * side ) ); } double f_filled ( double side ) {} );} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} double f_gold ( double side ) { return ( 2 * ( sqrt ( 3 ) ) * ( side * side ) ); } double f_filled ( double side ) {} int main(void) { int n_success = 0; double param0[] = {1449.255716877097,-8772.104874265995,2948.419328234334,-1184.220109553511,7422.825800698956,-5808.280006171851,829.8963781665169,-7368.438572511732,5572.033890611617,-3998.9441642787706}; 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.001) { 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: [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);} double f_gold ( double side ) { return ( 2 * ( sqrt ( 3 ) ) * ( side * side ) ); } double f_filled ( double side ) {});} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} double f_gold ( double side ) { return ( 2 * ( sqrt ( 3 ) ) * ( side * side ) ); } double f_filled ( double side ) {} int main(void) { int n_success = 0; double param0[] = {1449.255716877097,-8772.104874265995,2948.419328234334,-1184.220109553511,7422.825800698956,-5808.280006171851,829.8963781665169,-7368.438572511732,5572.033890611617,-3998.9441642787706}; 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.001) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
y;
[ "a) return", "b) )", "c) (", "d) y;", "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);} bool f_gold ( int arr [ ], int n, int x ) { for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; i < n; i ++ ) if ( arr [ i ] * arr [ j ] == x ) return true; return false; } bool f_filled ( int arr [ ], int n, int x ) {} ) { for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; i < n; i ++ ) if ( arr [ i ] * arr [ j ] == x ) return true; return false; } bool f_filled ( int arr [ ], int n, int x ) {} int main(void) { int n_success = 0; int param0_0[] = {3,4,5,5,6,11,18,29,29,30,35,36,38,38,40,43,43,43,50,53,58,61,62,63,64,64,65,72,73,77,78,78,84,90,94,96}; int param0_1[] = {-72,16,0,68,-58,58,46,38,-28,-56,-28,-14,-56,40,30,80,94,-52,0,-88,8,-96,-52,-96,48,-10,-32,-74,88,18,70}; int param0_2[] = {0,0,0,0,0,1,1,1,1}; int param0_3[] = {78,49,30,28,71,70,29,43,91,56,51,47,21,57,69,28,68,78,38,31,35,33,55,18,88,15,69,7,51,75,8,64,6,84,79,23,62,10,71,52,77}; int param0_4[] = {-90,-86,-76,-72,-70,-62,-56,-50,-18,-12,-10,4,16,26,42,48,52,54,54,70,84,86,88,98}; int param0_5[] = {1}; int param0_6[] = {4,7,14,14,16,18,19,20,22,24,29,38,38,38,40,40,46,46,47,51,51,52,55,56,56,62,62,62,78,79,81,84,86,88,89,89,89}; int param0_7[] = {72,80,-82,24,-98,90,-32,-56,-22,8,-12,8,-78,60,-62,50,12,-60,10,-54,74,98,26,56,24}; 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}; int param0_9[] = {93,40,48,99,95,59,43,58,79,70,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[] = {28,25,7,35,23,0,23,21,22,9}; int param2[] = {26,16,8,25,23,0,32,19,18,5}; 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) { [MASK] (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 arr [ ], int n, int x ) { for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; i < n; i ++ ) if ( arr [ i ] * arr [ j ] == x ) return true; return false; } bool f_filled ( int arr [ ], int n, int x ) {}) { for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; i < n; i ++ ) if ( arr [ i ] * arr [ j ] == x ) return true; return false; } bool f_filled ( int arr [ ], int n, int x ) {} int main(void) { int n_success = 0; int param0_0[] = {3,4,5,5,6,11,18,29,29,30,35,36,38,38,40,43,43,43,50,53,58,61,62,63,64,64,65,72,73,77,78,78,84,90,94,96}; int param0_1[] = {-72,16,0,68,-58,58,46,38,-28,-56,-28,-14,-56,40,30,80,94,-52,0,-88,8,-96,-52,-96,48,-10,-32,-74,88,18,70}; int param0_2[] = {0,0,0,0,0,1,1,1,1}; int param0_3[] = {78,49,30,28,71,70,29,43,91,56,51,47,21,57,69,28,68,78,38,31,35,33,55,18,88,15,69,7,51,75,8,64,6,84,79,23,62,10,71,52,77}; int param0_4[] = {-90,-86,-76,-72,-70,-62,-56,-50,-18,-12,-10,4,16,26,42,48,52,54,54,70,84,86,88,98}; int param0_5[] = {1}; int param0_6[] = {4,7,14,14,16,18,19,20,22,24,29,38,38,38,40,40,46,46,47,51,51,52,55,56,56,62,62,62,78,79,81,84,86,88,89,89,89}; int param0_7[] = {72,80,-82,24,-98,90,-32,-56,-22,8,-12,8,-78,60,-62,50,12,-60,10,-54,74,98,26,56,24}; 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}; int param0_9[] = {93,40,48,99,95,59,43,58,79,70,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[] = {28,25,7,35,23,0,23,21,22,9}; int param2[] = {26,16,8,25,23,0,32,19,18,5}; 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; }
return
[ "a) return", "b) b)", "c) n", "d) i", "e) i" ]
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 ) { unordered_map < int, int > freq; for ( int i = 0; i < n; i ++ ) freq [ arr [ i ] ] ++; int ans = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = 0; j < n; j ++ ) { if ( freq [ arr [ i ] ] > freq [ arr [ j ] ] && arr [ i ] > arr [ j ] ) ans = max ( ans, freq [ arr [ i ] ] - freq [ arr [ j ] ] ); else if ( freq [ arr [ i ] ] < freq [ arr [ j ] ] && arr [ i ] < arr [ j ] ) ans = max ( ans, freq [ arr [ j ] ] - freq [ arr [ i ] ] ); } } return ans; } int f_filled ( int arr [ ], int n ) {} f ( freq [ arr [ i ] ] < freq [ arr [ j ] ] && arr [ i ] < arr [ j ] ) ans = max ( ans, freq [ arr [ j ] ] - freq [ arr [ i ] ] ); } } return ans; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {6,6,16,22,33,37,46,49,50,51,65,82,94}; int param0_1[] = {-4,-16,92,-28,-44,50,54,24,-28,-32,20,-94,-78,-20,26,90,-90,10,36,-52,60,-96,-64,-34,10,-12,86,78,32,-46,92,-66,18,-78,-28,14,-26,26,4,16,-96,86,-50}; int param0_2[] = {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}; int param0_3[] = {98,54,41,62,95,18,74,57,37,90,35,45,10,14,90,88,58,8,85,58,97,59,13,94,40,3,89,62,45,90,8,31,93,5,40,78,43,75,79,74,17,38,62}; int param0_4[] = {-88,-78,-76,-66,-56,-54,-54,-52,-34,-24,2,58,76,78}; int param0_5[] = {1,1,1,1,1,0,0,1,0,0,1,0,1,1,0}; int param0_6[] = {8,43,44,86}; int param0_7[] = {54,92,-46,6,-38}; 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}; int param0_9[] = {54,47,56,2,23,40,15,18,31,48,53,77,83,29,62,86}; 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[] = {9,25,35,40,8,12,2,4,12,9}; 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 > freq; for ( int i = 0; i < n; i ++ ) freq [MASK] arr [ i ] ] ++; int ans = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = 0; j < n; j ++ ) { if ( freq [ arr [ i ] ] > freq [ arr [ j ] ] && arr [ i ] > arr [ j ] ) ans = max ( ans, freq [ arr [ i ] ] - freq [ arr [ j ] ] ); else if ( freq [ arr [ i ] ] < freq [ arr [ j ] ] && arr [ i ] < arr [ j ] ) ans = max ( ans, freq [ arr [ j ] ] - freq [ arr [ i ] ] ); } } return ans; } int f_filled ( int arr [ ], int n ) {}f ( freq [ arr [ i ] ] < freq [ arr [ j ] ] && arr [ i ] < arr [ j ] ) ans = max ( ans, freq [ arr [ j ] ] - freq [ arr [ i ] ] ); } } return ans; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {6,6,16,22,33,37,46,49,50,51,65,82,94}; int param0_1[] = {-4,-16,92,-28,-44,50,54,24,-28,-32,20,-94,-78,-20,26,90,-90,10,36,-52,60,-96,-64,-34,10,-12,86,78,32,-46,92,-66,18,-78,-28,14,-26,26,4,16,-96,86,-50}; int param0_2[] = {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}; int param0_3[] = {98,54,41,62,95,18,74,57,37,90,35,45,10,14,90,88,58,8,85,58,97,59,13,94,40,3,89,62,45,90,8,31,93,5,40,78,43,75,79,74,17,38,62}; int param0_4[] = {-88,-78,-76,-66,-56,-54,-54,-52,-34,-24,2,58,76,78}; int param0_5[] = {1,1,1,1,1,0,0,1,0,0,1,0,1,1,0}; int param0_6[] = {8,43,44,86}; int param0_7[] = {54,92,-46,6,-38}; 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}; int param0_9[] = {54,47,56,2,23,40,15,18,31,48,53,77,83,29,62,86}; 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[] = {9,25,35,40,8,12,2,4,12,9}; 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) <iomanip>", "c) ]", "d) [", "e) neg" ]
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 ( string & s, int k ) { int seg_len = strlen(s) - k; int res = 0; for ( int i = 0; i < seg_len; i ++ ) res = res * 10 + ( s [ i ] - '0' ); int seg_len_pow = pow ( 10, seg_len - 1 ); int curr_val = res; for ( int i = 1; i <= ( strlen(s) - seg_len ); i ++ ) { curr_val = curr_val - ( s [ i - 1 ] - '0' ) * seg_len_pow; curr_val = curr_val * 10 + ( s [ i + seg_len - 1 ] - '0' ); res = max ( res, curr_val ); } return res; } int f_filled ( string & s, int k ) {} l - ( s [ i - 1 ] - '0' ) * seg_len_pow; curr_val = curr_val * 10 + ( s [ i + seg_len - 1 ] - '0' ); res = max ( res, curr_val ); } return res; } int f_filled ( string & s, int k ) {} int main(void) { int n_success = 0; char param0[][100] = {"kjgHiKOrCpvn","656666342","11010111010101","hTSBuAXHgWd","458794087","100000","EtbP","870292","1","DkRQuGByuhHcw"}; int param1[] = {5,3,3,4,1,5,3,4,11,61}; 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 ( string & s, int k ) { int seg_len = strlen(s) - k; int res = 0; for ( int i = 0; i < seg_len; i ++ ) res = res * 10 + ( s [ i ] - '0' ); int seg_len_pow = pow ( 10, seg_len - 1 ); int curr_val = res; for ( int i = 1; i [MASK] ( strlen(s) - seg_len ); i ++ ) { curr_val = curr_val - ( s [ i - 1 ] - '0' ) * seg_len_pow; curr_val = curr_val * 10 + ( s [ i + seg_len - 1 ] - '0' ); res = max ( res, curr_val ); } return res; } int f_filled ( string & s, int k ) {}l - ( s [ i - 1 ] - '0' ) * seg_len_pow; curr_val = curr_val * 10 + ( s [ i + seg_len - 1 ] - '0' ); res = max ( res, curr_val ); } return res; } int f_filled ( string & s, int k ) {} int main(void) { int n_success = 0; char param0[][100] = {"kjgHiKOrCpvn","656666342","11010111010101","hTSBuAXHgWd","458794087","100000","EtbP","870292","1","DkRQuGByuhHcw"}; int param1[] = {5,3,3,4,1,5,3,4,11,61}; 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) <=", "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 dist ) { int count [ dist + 1 ]; count [ 0 ] = 1, count [ 1 ] = 1, count [ 2 ] = 2; for ( int i = 3; i <= dist; i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ]; return count [ dist ]; } int f_filled ( int dist ) {} unt [ 1 ] = 1, count [ 2 ] = 2; for ( int i = 3; i <= dist; i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ]; return count [ dist ]; } int f_filled ( int dist ) {} int main(void) { int n_success = 0; int param0[] = {37,82,87,80,92,58,98,53,11,58}; 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 [MASK] int dist ) { int count [ dist + 1 ]; count [ 0 ] = 1, count [ 1 ] = 1, count [ 2 ] = 2; for ( int i = 3; i <= dist; i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ]; return count [ dist ]; } int f_filled ( int dist ) {}unt [ 1 ] = 1, count [ 2 ] = 2; for ( int i = 3; i <= dist; i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ]; return count [ dist ]; } int f_filled ( int dist ) {} int main(void) { int n_success = 0; int param0[] = {37,82,87,80,92,58,98,53,11,58}; 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) n" ]
d