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);} double f_gold ( vector < int > & A, int K ) { int n = len(A); double pre_sum [ n + 1 ]; pre_sum [ 0 ] = 0; for ( int i = 0; i < n; i ++ ) pre_sum [ i + 1 ] = pre_sum [ i ] + A [ i ]; double dp [ n ] = { 0 }; double sum = 0; for ( int i = 0; i < n; i ++ ) dp [ i ] = ( pre_sum [ n ] - pre_sum [ i ] ) / ( n - i ); for ( int k = 0; k < K - 1; k ++ ) for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) dp [ i ] = max ( dp [ i ], ( pre_sum [ j ] - pre_sum [ i ] ) / ( j - i ) + dp [ j ] ); return dp [ 0 ]; } double f_filled ( vector < int > & A, int K ) {} j = i + 1; j < n; j ++ ) dp [ i ] = max ( dp [ i ], ( pre_sum [ j ] - pre_sum [ i ] ) / ( j - i ) + dp [ j ] ); return dp [ 0 ]; } double f_filled ( vector < int > & A, int K ) {} int main(void) { int n_success = 0; int param0_0[] = {4,11,14,27,32,37,39,49,52,53,57,62,67,67,68,69,76,77,78,81,85,85,87,91,91,91,99,99,99}; int param0_1[] = {80,12,32,44,24,82,-40,42,26,36,58,52,-34,44,12,-18,-72,52,2,-8,22,-18,98,-60,62,92,-46,20,20,-46,52,94,0,-28,-22,80,26,-92,-50,48,-80}; 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}; int param0_3[] = {32,16,67,53,99,56,80,92,84,21,36,46,94,31,63,67,59,88,41,17,74,47,95,12,27,99,32,4,82,31,65,40,93,72,23,33,93,9,62,47}; int param0_4[] = {-92,-86,-80,-78,-72,-70,-70,-68,-66,-62,-60,-54,-54,-52,-52,-40,-36,-32,-28,-26,-22,-22,-20,-16,-16,-8,0,6,8,10,14,18,20,42,46,52,60,66,68,70,74,86,88,88,92,94,98}; int param0_5[] = {1,0,0,0,1,0,1,1,0,1,0,1,1,1,1,0,1,0,0}; int param0_6[] = {1,1,3,3,6,7,10,11,12,13,16,16,22,23,24,27,28,30,30,30,31,33,35,35,39,40,41,52,52,58,59,60,61,61,66,66,71,73,74,75,75,76,80,83,85,95,96,97,97}; int param0_7[] = {28,-52,48,96,54,94,60,18}; int param0_8[] = {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[] = {26,80,12,87,90,98,46,91,38,46,20,64,53,4,60,87,44,88,22,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[] = {24,26,15,36,36,16,34,7,31,19}; for(int i = 0; i < len(param0); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[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: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)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 ( vector < int > & A, int K ) { int n = len(A); double pre_sum [ n + 1 ]; pre_sum [ 0 ] = 0; for ( int i = 0; i < n; i ++ ) pre_sum [ i + 1 ] = pre_sum [ i ] + A [ i ]; double dp [ n ] = { 0 }; double sum = 0; for ( int i = 0; i < n; i ++ ) dp [ i ] = ( pre_sum [ n ] - pre_sum [ i ] ) / ( n - i ); for ( int k = 0; k < K - 1; k ++ ) for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) dp [ i ] = max ( dp [ i ], ( pre_sum [ j ] - pre_sum [ i ] ) / ( j - i ) + dp [ j ] ); return dp [MASK] 0 ]; } double f_filled ( vector < int > & A, int K ) {}j = i + 1; j < n; j ++ ) dp [ i ] = max ( dp [ i ], ( pre_sum [ j ] - pre_sum [ i ] ) / ( j - i ) + dp [ j ] ); return dp [ 0 ]; } double f_filled ( vector < int > & A, int K ) {} int main(void) { int n_success = 0; int param0_0[] = {4,11,14,27,32,37,39,49,52,53,57,62,67,67,68,69,76,77,78,81,85,85,87,91,91,91,99,99,99}; int param0_1[] = {80,12,32,44,24,82,-40,42,26,36,58,52,-34,44,12,-18,-72,52,2,-8,22,-18,98,-60,62,92,-46,20,20,-46,52,94,0,-28,-22,80,26,-92,-50,48,-80}; 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}; int param0_3[] = {32,16,67,53,99,56,80,92,84,21,36,46,94,31,63,67,59,88,41,17,74,47,95,12,27,99,32,4,82,31,65,40,93,72,23,33,93,9,62,47}; int param0_4[] = {-92,-86,-80,-78,-72,-70,-70,-68,-66,-62,-60,-54,-54,-52,-52,-40,-36,-32,-28,-26,-22,-22,-20,-16,-16,-8,0,6,8,10,14,18,20,42,46,52,60,66,68,70,74,86,88,88,92,94,98}; int param0_5[] = {1,0,0,0,1,0,1,1,0,1,0,1,1,1,1,0,1,0,0}; int param0_6[] = {1,1,3,3,6,7,10,11,12,13,16,16,22,23,24,27,28,30,30,30,31,33,35,35,39,40,41,52,52,58,59,60,61,61,66,66,71,73,74,75,75,76,80,83,85,95,96,97,97}; int param0_7[] = {28,-52,48,96,54,94,60,18}; int param0_8[] = {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[] = {26,80,12,87,90,98,46,91,38,46,20,64,53,4,60,87,44,88,22,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[] = {24,26,15,36,36,16,34,7,31,19}; for(int i = 0; i < len(param0); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[i])) + 0.0000001)) < 0.001) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
[
[ "a) f_gold", "b) *(int*)b", "c) [", "d) arr", "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 ) { unordered_set < int > S; int ans = 0; for ( int i = 0; i < n; i ++ ) S . insert ( arr [ i ] ); for ( int i = 0; i < n; i ++ ) { if ( S . find ( arr [ i ] - 1 ) == S . end ( ) ) { int j = arr [ i ]; while ( S . find ( j ) != S . end ( ) ) j ++; ans = max ( ans, j - arr [ i ] ); } } return ans; } int f_filled ( int arr [ ], int n ) {} . end ( ) ) { int j = arr [ i ]; while ( S . find ( j ) != S . end ( ) ) j ++; ans = max ( ans, j - arr [ i ] ); } } return ans; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,28,31,64,73}; int param0_1[] = {46,26,-84,-24,50,94,-14,74,-52,-62,2,46,62,54,-30,-70,-76,74,60,10,60,98,-92,98,-96,34,30,58,-60,-52,-66,-40,-78,-26,80,-58,-26,80,92,66,90,4,46,-78,80,62,30,0,38}; 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[] = {24,72,87,81,90,59,18,29,12,24,78,59,93,80,79,26,17,28,43,85,85,76,83,71,28,99,80,14,9,92,46,59,66,34}; int param0_4[] = {-94,-94,-94,-76,-68,-64,-64,-56,-48,-46,-36,-26,-12,-6,-6,-2,-2,6,6,24,46,48,50,52,58,76,88}; int param0_5[] = {1}; int param0_6[] = {1,8,22,27,28,58,80,89,95}; int param0_7[] = {46,38,-50,98,-22,92,84,-48}; 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}; int param0_9[] = {74,2,85,72,1,49,53,48,46,44,98,75,5,13,98,69,65,68,37,38,77,69,14,17,46,54,55,20,23,59,98,44,22,12,71,18,94,49,57,82,7,64,33,7,29,58,45,98}; 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[] = {3,29,38,32,19,0,5,6,19,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 [MASK] ( int arr [ ], int n ) { unordered_set < int > S; int ans = 0; for ( int i = 0; i < n; i ++ ) S . insert ( arr [ i ] ); for ( int i = 0; i < n; i ++ ) { if ( S . find ( arr [ i ] - 1 ) == S . end ( ) ) { int j = arr [ i ]; while ( S . find ( j ) != S . end ( ) ) j ++; ans = max ( ans, j - arr [ i ] ); } } return ans; } int f_filled ( int arr [ ], int n ) {}. end ( ) ) { int j = arr [ i ]; while ( S . find ( j ) != S . end ( ) ) j ++; ans = max ( ans, j - arr [ i ] ); } } return ans; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,28,31,64,73}; int param0_1[] = {46,26,-84,-24,50,94,-14,74,-52,-62,2,46,62,54,-30,-70,-76,74,60,10,60,98,-92,98,-96,34,30,58,-60,-52,-66,-40,-78,-26,80,-58,-26,80,92,66,90,4,46,-78,80,62,30,0,38}; 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[] = {24,72,87,81,90,59,18,29,12,24,78,59,93,80,79,26,17,28,43,85,85,76,83,71,28,99,80,14,9,92,46,59,66,34}; int param0_4[] = {-94,-94,-94,-76,-68,-64,-64,-56,-48,-46,-36,-26,-12,-6,-6,-2,-2,6,6,24,46,48,50,52,58,76,88}; int param0_5[] = {1}; int param0_6[] = {1,8,22,27,28,58,80,89,95}; int param0_7[] = {46,38,-50,98,-22,92,84,-48}; 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}; int param0_9[] = {74,2,85,72,1,49,53,48,46,44,98,75,5,13,98,69,65,68,37,38,77,69,14,17,46,54,55,20,23,59,98,44,22,12,71,18,94,49,57,82,7,64,33,7,29,58,45,98}; 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[] = {3,29,38,32,19,0,5,6,19,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; }
f_gold
[ "a) {}", "b) f_gold", "c) y2", "d) int", "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);} int f_gold ( int array [ ], int start, int end ) { if ( start > end ) return end + 1; if ( start != array [ start ] ) return start; int mid = ( start + end ) / 2; if ( array [ mid ] == mid ) return f_gold ( array, mid + 1, end ); return f_gold ( array, start, mid ); } int f_filled ( int array [ ], int start, int end ) {} int mid = ( start + end ) / 2; if ( array [ mid ] == mid ) return f_gold ( array, mid + 1, end ); return f_gold ( array, start, mid ); } int f_filled ( int array [ ], int start, int end ) {} int main(void) { int n_success = 0; int param0_0[] = {3,6,7,9,11,14,18,30,30,32,32,34,37,44,45,45,48,48,48,52,58,60,63,67,69,69,81,83,87,89,97,99}; int param0_1[] = {88,-62,16,80,66,78,88,38,52,-96,48,98,96,-62,18,34,-58,30,-10,26,-98,48,-96,4,92,36,36,-36,-32,-70,62,-58,-58,-84,86,-98}; 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,1,1,1,1,1,1}; int param0_3[] = {79,99,79,85,61,58,62,61,39,87,39,74,36,70,30,43,20,52,54,50,81,98,42}; int param0_4[] = {-98,-72,-46,-44,-42,-40,-16,-4,62,70,74}; int param0_5[] = {1,1,0,1,0,0,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0}; int param0_6[] = {58}; int param0_7[] = {4,-84,-42,12,-50,42,-36,-38,-36,98,-2,20,6,-96,-78,24,34,88,0,74,0,-8,-86,-68,-42,98,-26,86,-70,-32,-82,78,46,58,84,4,-60,-90,-52,-78}; 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}; int param0_9[] = {8}; 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[] = {24,19,26,20,8,26,0,37,28,0}; int param2[] = {18,26,28,20,10,23,0,31,28,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);} int f_gold ( int array [ ], int start, int end ) { if ( start > end ) return end + 1; if ( start [MASK] array [ start ] ) return start; int mid = ( start + end ) / 2; if ( array [ mid ] == mid ) return f_gold ( array, mid + 1, end ); return f_gold ( array, start, mid ); } int f_filled ( int array [ ], int start, int end ) {} int mid = ( start + end ) / 2; if ( array [ mid ] == mid ) return f_gold ( array, mid + 1, end ); return f_gold ( array, start, mid ); } int f_filled ( int array [ ], int start, int end ) {} int main(void) { int n_success = 0; int param0_0[] = {3,6,7,9,11,14,18,30,30,32,32,34,37,44,45,45,48,48,48,52,58,60,63,67,69,69,81,83,87,89,97,99}; int param0_1[] = {88,-62,16,80,66,78,88,38,52,-96,48,98,96,-62,18,34,-58,30,-10,26,-98,48,-96,4,92,36,36,-36,-32,-70,62,-58,-58,-84,86,-98}; 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,1,1,1,1,1,1}; int param0_3[] = {79,99,79,85,61,58,62,61,39,87,39,74,36,70,30,43,20,52,54,50,81,98,42}; int param0_4[] = {-98,-72,-46,-44,-42,-40,-16,-4,62,70,74}; int param0_5[] = {1,1,0,1,0,0,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0}; int param0_6[] = {58}; int param0_7[] = {4,-84,-42,12,-50,42,-36,-38,-36,98,-2,20,6,-96,-78,24,34,88,0,74,0,-8,-86,-68,-42,98,-26,86,-70,-32,-82,78,46,58,84,4,-60,-90,-52,-78}; 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}; int param0_9[] = {8}; 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[] = {24,19,26,20,8,26,0,37,28,0}; int param2[] = {18,26,28,20,10,23,0,31,28,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) pos", "b) !=", "c) i", "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);} char f_gold [] ( char s [] ) { int l = strlen(s); char s1 [] = ""; bool isEven = ( l % 2 == 0 ) ? true : false; for ( int i = 0; i < l; i += 2 ) { if ( isEven ) { s1 = s [ i ] + s1; s1 += s [ i + 1 ]; } else { if ( l - i > 1 ) { s1 += s [ i ]; s1 = s [ i + 1 ] + s1; } else { s1 += s [ i ]; } } } return s1; } char f_filled [] ( char s [] ) {} lse { if ( l - i > 1 ) { s1 += s [ i ]; s1 = s [ i + 1 ] + s1; } else { s1 += s [ i ]; } } } return s1; } char f_filled [] ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {" EgvQCeqYpZtv","488540","0000101010111","syw","402355","0","wmHMlAtq","7962","111111","UbgRGDquop"}; 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 [MASK] [] ) { int l = strlen(s); char s1 [] = ""; bool isEven = ( l % 2 == 0 ) ? true : false; for ( int i = 0; i < l; i += 2 ) { if ( isEven ) { s1 = s [ i ] + s1; s1 += s [ i + 1 ]; } else { if ( l - i > 1 ) { s1 += s [ i ]; s1 = s [ i + 1 ] + s1; } else { s1 += s [ i ]; } } } return s1; } char f_filled [] ( char s [] ) {}lse { if ( l - i > 1 ) { s1 += s [ i ]; s1 = s [ i + 1 ] + s1; } else { s1 += s [ i ]; } } } return s1; } char f_filled [] ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {" EgvQCeqYpZtv","488540","0000101010111","syw","402355","0","wmHMlAtq","7962","111111","UbgRGDquop"}; 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; }
s
[ "a) ;", "b) %", "c) c", "d) s", "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);} int f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > h; for ( int i = 0; i < n; i ++ ) h [ arr [ i ] ] ++; if ( len(h) < k ) return - 1; int dist_count = 0; for ( int i = 0; i < n; i ++ ) { if ( h [ arr [ i ] ] == 1 ) dist_count ++; if ( dist_count == k ) return arr [ i ]; } return - 1; } int f_filled ( int arr [ ], int n, int k ) {} for ( int i = 0; i < n; i ++ ) { if ( h [ arr [ i ] ] == 1 ) dist_count ++; if ( dist_count == k ) return arr [ i ]; } return - 1; } int f_filled ( int arr [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {17,25,27,27,73,91}; int param0_1[] = {-86,-74,-88,28,-32,20,-34,32}; 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}; int param0_3[] = {5,11,36,27,6,24,58,44,14,68}; int param0_4[] = {-98,-98,-94,-92,-86,-86,-70,-66,-64,-64,-58,-52,-46,-44,-44,-38,-38,-28,-24,-12,-10,-4,-2,2,8,10,12,20,22,26,26,36,42,52,54,60,60,68,82,82,92,98}; int param0_5[] = {0,1,0,0,1,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,0,0,1,0,1,1,1,1}; int param0_6[] = {3,8,9,10,10,13,14,16,18,23,24,25,27,28,30,33,36,39,42,42,44,45,45,48,52,52,55,55,59,59,59,60,61,61,66,66,67,68,71,72,75,76,79,80,94,94}; int param0_7[] = {-12,56,-48,52,-96,-84,32,-12,-6,82,70,18,66,-6,-22,-46,-54,18,-14,-32,68,82,-44,-42,10,56,8,-56,24,20,-38,30,-52,-66,82,-64,68,-82,52,-88,-34,-26,94,58,-4,-84,-60}; 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}; int param0_9[] = {1,23,75,84,28,34,15,13,51,69,94,45,38,38}; 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,5,33,7,27,27,44,37,22,13}; int param2[] = {3,6,32,5,27,20,26,46,21,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 ( int arr [ ], int n, int k ) { unordered_map < int, int > h; for ( int i = 0; [MASK] < n; i ++ ) h [ arr [ i ] ] ++; if ( len(h) < k ) return - 1; int dist_count = 0; for ( int i = 0; i < n; i ++ ) { if ( h [ arr [ i ] ] == 1 ) dist_count ++; if ( dist_count == k ) return arr [ i ]; } return - 1; } int f_filled ( int arr [ ], int n, int k ) {} for ( int i = 0; i < n; i ++ ) { if ( h [ arr [ i ] ] == 1 ) dist_count ++; if ( dist_count == k ) return arr [ i ]; } return - 1; } int f_filled ( int arr [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {17,25,27,27,73,91}; int param0_1[] = {-86,-74,-88,28,-32,20,-34,32}; 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}; int param0_3[] = {5,11,36,27,6,24,58,44,14,68}; int param0_4[] = {-98,-98,-94,-92,-86,-86,-70,-66,-64,-64,-58,-52,-46,-44,-44,-38,-38,-28,-24,-12,-10,-4,-2,2,8,10,12,20,22,26,26,36,42,52,54,60,60,68,82,82,92,98}; int param0_5[] = {0,1,0,0,1,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,0,0,1,0,1,1,1,1}; int param0_6[] = {3,8,9,10,10,13,14,16,18,23,24,25,27,28,30,33,36,39,42,42,44,45,45,48,52,52,55,55,59,59,59,60,61,61,66,66,67,68,71,72,75,76,79,80,94,94}; int param0_7[] = {-12,56,-48,52,-96,-84,32,-12,-6,82,70,18,66,-6,-22,-46,-54,18,-14,-32,68,82,-44,-42,10,56,8,-56,24,20,-38,30,-52,-66,82,-64,68,-82,52,-88,-34,-26,94,58,-4,-84,-60}; 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}; int param0_9[] = {1,23,75,84,28,34,15,13,51,69,94,45,38,38}; 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,5,33,7,27,27,44,37,22,13}; int param2[] = {3,6,32,5,27,20,26,46,21,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; }
i
[ "a) =", "b) i", "c) {", "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 n, int x, int y ) { vector < bool > arr ( n + 1, false ); if ( x <= n ) arr [ x ] = true; if ( y <= n ) arr [ y ] = true; int result = 0; for ( int i = min ( x, y ); i <= n; i ++ ) { if ( arr [ i ] ) { if ( i + x <= n ) arr [ i + x ] = true; if ( i + y <= n ) arr [ i + y ] = true; result ++; } } return result; } int f_filled ( int n, int x, int y ) {} f ( arr [ i ] ) { if ( i + x <= n ) arr [ i + x ] = true; if ( i + y <= n ) arr [ i + y ] = true; result ++; } } return result; } int f_filled ( int n, int x, int y ) {} int main(void) { int n_success = 0; int param0[] = {23,56,30,51,21,69,12,44,99,46}; int param1[] = {16,95,63,89,99,63,69,52,65,58}; int param2[] = {16,6,1,46,38,50,73,9,10,37}; 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 n, int x, int y ) { vector < bool > arr ( n + 1, false ); if ( x <= n ) arr [ x ] = true; if ( y <= n ) arr [ y ] = true; int result = 0; for ( int i = min ( x, y ); i <= n; i ++ ) { if ( arr [ i ] ) { if ( i + x <= n ) arr [ i + x ] = true; if ( i + y <= n ) arr [MASK] i + y ] = true; result ++; } } return result; } int f_filled ( int n, int x, int y ) {}f ( arr [ i ] ) { if ( i + x <= n ) arr [ i + x ] = true; if ( i + y <= n ) arr [ i + y ] = true; result ++; } } return result; } int f_filled ( int n, int x, int y ) {} int main(void) { int n_success = 0; int param0[] = {23,56,30,51,21,69,12,44,99,46}; int param1[] = {16,95,63,89,99,63,69,52,65,58}; int param2[] = {16,6,1,46,38,50,73,9,10,37}; 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) mat", "d) long", "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 ) { int longest_start = - 1, longest_end = 0; for ( int start = 0; start < n; start ++ ) { int min = INT_MAX, max = INT_MIN; for ( int end = start; end < n; end ++ ) { int val = arr [ end ]; if ( val < min ) min = val; if ( val > max ) max = val; if ( 2 * min <= max ) break; if ( end - start > longest_end - longest_start || longest_start == - 1 ) { longest_start = start; longest_end = end; } } } if ( longest_start == - 1 ) return n; return ( n - ( longest_end - longest_start + 1 ) ); } int f_filled ( int arr [ ], int n ) {} _start = start; longest_end = end; } } } if ( longest_start == - 1 ) return n; return ( n - ( longest_end - longest_start + 1 ) ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {32,50,66,73,76,87}; int param0_1[] = {68,74,16,40,6,-44,-36,94,6,-24,-4,-58,-16,24}; int param0_2[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {91,22}; int param0_4[] = {-84,-80,-78,-76,-58,-54,-52,-48,-42,-42,-40,-38,-34,-32,-28,-24,-6,2,2,4,10,14,16,18,26,26,36,40,50,52,62,64,72,74,84,90,94,96,98}; int param0_5[] = {1,0,1,1,1,0,1,1,1,0,1,0,0,1,0,1,1,1,1,0,1}; int param0_6[] = {10,19,25,29,32,37,40,43,43,44,46,51,51,54,56,58,63,79,83,86,87,97,97}; int param0_7[] = {-48,-28,10,30,78,-72,78,52,-52,-68,56,42,8,-42,16,-56,2,-90,-26,-28,-56,-2,80,-50,98,-64,-96,10,-10,44,98,-48,-88,42,30,24,38,-26,-52,-12,0,34,-82,-80,0,-84,-20}; int param0_8[] = {0,0,1,1,1,1,1,1}; int param0_9[] = {25,82}; 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,11,11,1,35,13,11,25,6,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, [MASK] sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int longest_start = - 1, longest_end = 0; for ( int start = 0; start < n; start ++ ) { int min = INT_MAX, max = INT_MIN; for ( int end = start; end < n; end ++ ) { int val = arr [ end ]; if ( val < min ) min = val; if ( val > max ) max = val; if ( 2 * min <= max ) break; if ( end - start > longest_end - longest_start || longest_start == - 1 ) { longest_start = start; longest_end = end; } } } if ( longest_start == - 1 ) return n; return ( n - ( longest_end - longest_start + 1 ) ); } int f_filled ( int arr [ ], int n ) {}_start = start; longest_end = end; } } } if ( longest_start == - 1 ) return n; return ( n - ( longest_end - longest_start + 1 ) ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {32,50,66,73,76,87}; int param0_1[] = {68,74,16,40,6,-44,-36,94,6,-24,-4,-58,-16,24}; int param0_2[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {91,22}; int param0_4[] = {-84,-80,-78,-76,-58,-54,-52,-48,-42,-42,-40,-38,-34,-32,-28,-24,-6,2,2,4,10,14,16,18,26,26,36,40,50,52,62,64,72,74,84,90,94,96,98}; int param0_5[] = {1,0,1,1,1,0,1,1,1,0,1,0,0,1,0,1,1,1,1,0,1}; int param0_6[] = {10,19,25,29,32,37,40,43,43,44,46,51,51,54,56,58,63,79,83,86,87,97,97}; int param0_7[] = {-48,-28,10,30,78,-72,78,52,-52,-68,56,42,8,-42,16,-56,2,-90,-26,-28,-56,-2,80,-50,98,-64,-96,10,-10,44,98,-48,-88,42,30,24,38,-26,-52,-12,0,34,-82,-80,0,-84,-20}; int param0_8[] = {0,0,1,1,1,1,1,1}; int param0_9[] = {25,82}; 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,11,11,1,35,13,11,25,6,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; }
n,
[ "a) int", "b) n,", "c) return", "d) (int", "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 ) { for ( int sum = 0, i = 1; sum < n; i += 2 ) { sum += i; if ( sum == n ) return true; } return false; } bool f_filled ( int n ) {} izeof(int), cmpfunc);} bool f_gold ( int n ) { for ( int sum = 0, i = 1; sum < n; i += 2 ) { sum += i; if ( sum == n ) return true; } return false; } bool f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {1,4,9,25,36,3,121,14,17,80}; 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] int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int n ) { for ( int sum = 0, i = 1; sum < n; i += 2 ) { sum += i; if ( sum == n ) return true; } return false; } bool f_filled ( int n ) {}izeof(int), cmpfunc);} bool f_gold ( int n ) { for ( int sum = 0, i = 1; sum < n; i += 2 ) { sum += i; if ( sum == n ) return true; } return false; } bool f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {1,4,9,25,36,3,121,14,17,80}; 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) ans", "c) ],", "d) <string>", "e) (x" ]
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);} void f_gold ( char s1 [ ], char s2 [ ], int index = 0 ) { s2 [ index ] = s1 [ index ]; if ( s1 [ index ] == '\0' ) return; f_gold ( s1, s2, index + 1 ); } void f_filled ( char s1 [ ], char s2 [ ], int index = 0 ) {} char s2 [ ], int index = 0 ) { s2 [ index ] = s1 [ index ]; if ( s1 [ index ] == '\0' ) return; f_gold ( s1, s2, index + 1 ); } void f_filled ( char s1 [ ], char s2 [ ], int index = 0 ) {} int main(void) { int n_success = 0; char param0_0[] = {','B','D','D','D','E','E','E','G','H','J','K','K','K','L','N','O','S','V','W','Y','Z','b','c','d','d','f','f','f','f','f','f','i','k','k','o','t','u','v','x','x','z'}; char param0_1[] = {'4'}; char param0_2[] = {'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1'}; char param0_3[] = {'D','I','u','K','e','s','n','z','d','y','S','P','y','r'}; char *param0[4] = {param0_0,param0_1,param0_2,param0_3}; char param1_0[] = {'Z'}; char param1_1[] = {'8','6','0','2','8','0','8','7','0','5','4','5','9','4','5','4','4'}; char param1_2[] = {'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'}; char param1_3[] = {'S','m','d','a','W','N','F','H','B','E','h','M','z','H','c','X','l','a','R','e','D','D','q','V','U','w','o','K','u','n','b','k','Y','M','L','H','L','X','H','r','D','o','A','Y','H'}; char param1_4[] = {'0','0','0','0','0','1','1','1','2','2','2','3','3','4','4','4','5','5','5','5','6','6','7','7','7','7','7','8','8','8','8','9','9','9','9','9','9','9'}; char param1_5[] = {'1','1','0','0','0','1','0','1','1','0','0','0','1','0','1','0','1','1','0','1','1','0','1'}; char param1_6[] = {'G','G','J','K','L','N','Q','R','R','S','U','W','X','Y','Y','a','b','b','b','c','d','e','e','f','f','h','j','j','k','k','l','m','m','n','o','s','t','t','w','z','z','z'}; char param1_7[] = {'8'}; char param1_8[] = {'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}; char param1_9[] = {'N','h','M','N','n','F','Y','L','G','w','o','G','y','q'}; char *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {0,11,34,41,33,13,40,0,12,7}; char filled_function_param0_0[] = {','B','D','D','D','E','E','E','G','H','J','K','K','K','L','N','O','S','V','W','Y','Z','b','c','d','d','f','f','f','f','f','f','i','k','k','o','t','u','v','x','x','z'}; char filled_function_param0_1[] = {'4'}; char filled_function_param0_2[] = {'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1'}; char filled_function_param0_3[] = {'D','I','u','K','e','s','n','z','d','y','S','P','y','r'}; char *filled_function_param0[4] = {filled_function_param0_0,filled_function_param0_1,filled_function_param0_2,filled_function_param0_3}; char filled_function_param1_0[] = {'Z'}; char filled_function_param1_1[] = {'8','6','0','2','8','0','8','7','0','5','4','5','9','4','5','4','4'}; char filled_function_param1_2[] = {'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'}; char filled_function_param1_3[] = {'S','m','d','a','W','N','F','H','B','E','h','M','z','H','c','X','l','a','R','e','D','D','q','V','U','w','o','K','u','n','b','k','Y','M','L','H','L','X','H','r','D','o','A','Y','H'}; char filled_function_param1_4[] = {'0','0','0','0','0','1','1','1','2','2','2','3','3','4','4','4','5','5','5','5','6','6','7','7','7','7','7','8','8','8','8','9','9','9','9','9','9','9'}; char filled_function_param1_5[] = {'1','1','0','0','0','1','0','1','1','0','0','0','1','0','1','0','1','1','0','1','1','0','1'}; char filled_function_param1_6[] = {'G','G','J','K','L','N','Q','R','R','S','U','W','X','Y','Y','a','b','b','b','c','d','e','e','f','f','h','j','j','k','k','l','m','m','n','o','s','t','t','w','z','z','z'}; char filled_function_param1_7[] = {'8'}; char filled_function_param1_8[] = {'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}; char filled_function_param1_9[] = {'N','h','M','N','n','F','Y','L','G','w','o','G','y','q'}; char *filled_function_param1[10] = {filled_function_param1_0,filled_function_param1_1,filled_function_param1_2,filled_function_param1_3,filled_function_param1_4,filled_function_param1_5,filled_function_param1_6,filled_function_param1_7,filled_function_param1_8,filled_function_param1_9}; int filled_function_param2[] = {0,11,34,41,33,13,40,0,12,7}; for(int i = 0; i < len(param0); ++i) { f_filled(filled_function_param0[i],filled_function_param1[i],filled_function_param2[i]); f_gold(param0[i],param1[i],param2[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && equal(begin(param1[i]), end(param1[i]), begin(filled_function_param1[i])) && param2[i] == filled_function_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 > [MASK] x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)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 ( char s1 [ ], char s2 [ ], int index = 0 ) { s2 [ index ] = s1 [ index ]; if ( s1 [ index ] == '\0' ) return; f_gold ( s1, s2, index + 1 ); } void f_filled ( char s1 [ ], char s2 [ ], int index = 0 ) {} char s2 [ ], int index = 0 ) { s2 [ index ] = s1 [ index ]; if ( s1 [ index ] == '\0' ) return; f_gold ( s1, s2, index + 1 ); } void f_filled ( char s1 [ ], char s2 [ ], int index = 0 ) {} int main(void) { int n_success = 0; char param0_0[] = {','B','D','D','D','E','E','E','G','H','J','K','K','K','L','N','O','S','V','W','Y','Z','b','c','d','d','f','f','f','f','f','f','i','k','k','o','t','u','v','x','x','z'}; char param0_1[] = {'4'}; char param0_2[] = {'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1'}; char param0_3[] = {'D','I','u','K','e','s','n','z','d','y','S','P','y','r'}; char *param0[4] = {param0_0,param0_1,param0_2,param0_3}; char param1_0[] = {'Z'}; char param1_1[] = {'8','6','0','2','8','0','8','7','0','5','4','5','9','4','5','4','4'}; char param1_2[] = {'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'}; char param1_3[] = {'S','m','d','a','W','N','F','H','B','E','h','M','z','H','c','X','l','a','R','e','D','D','q','V','U','w','o','K','u','n','b','k','Y','M','L','H','L','X','H','r','D','o','A','Y','H'}; char param1_4[] = {'0','0','0','0','0','1','1','1','2','2','2','3','3','4','4','4','5','5','5','5','6','6','7','7','7','7','7','8','8','8','8','9','9','9','9','9','9','9'}; char param1_5[] = {'1','1','0','0','0','1','0','1','1','0','0','0','1','0','1','0','1','1','0','1','1','0','1'}; char param1_6[] = {'G','G','J','K','L','N','Q','R','R','S','U','W','X','Y','Y','a','b','b','b','c','d','e','e','f','f','h','j','j','k','k','l','m','m','n','o','s','t','t','w','z','z','z'}; char param1_7[] = {'8'}; char param1_8[] = {'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}; char param1_9[] = {'N','h','M','N','n','F','Y','L','G','w','o','G','y','q'}; char *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {0,11,34,41,33,13,40,0,12,7}; char filled_function_param0_0[] = {','B','D','D','D','E','E','E','G','H','J','K','K','K','L','N','O','S','V','W','Y','Z','b','c','d','d','f','f','f','f','f','f','i','k','k','o','t','u','v','x','x','z'}; char filled_function_param0_1[] = {'4'}; char filled_function_param0_2[] = {'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1'}; char filled_function_param0_3[] = {'D','I','u','K','e','s','n','z','d','y','S','P','y','r'}; char *filled_function_param0[4] = {filled_function_param0_0,filled_function_param0_1,filled_function_param0_2,filled_function_param0_3}; char filled_function_param1_0[] = {'Z'}; char filled_function_param1_1[] = {'8','6','0','2','8','0','8','7','0','5','4','5','9','4','5','4','4'}; char filled_function_param1_2[] = {'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'}; char filled_function_param1_3[] = {'S','m','d','a','W','N','F','H','B','E','h','M','z','H','c','X','l','a','R','e','D','D','q','V','U','w','o','K','u','n','b','k','Y','M','L','H','L','X','H','r','D','o','A','Y','H'}; char filled_function_param1_4[] = {'0','0','0','0','0','1','1','1','2','2','2','3','3','4','4','4','5','5','5','5','6','6','7','7','7','7','7','8','8','8','8','9','9','9','9','9','9','9'}; char filled_function_param1_5[] = {'1','1','0','0','0','1','0','1','1','0','0','0','1','0','1','0','1','1','0','1','1','0','1'}; char filled_function_param1_6[] = {'G','G','J','K','L','N','Q','R','R','S','U','W','X','Y','Y','a','b','b','b','c','d','e','e','f','f','h','j','j','k','k','l','m','m','n','o','s','t','t','w','z','z','z'}; char filled_function_param1_7[] = {'8'}; char filled_function_param1_8[] = {'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}; char filled_function_param1_9[] = {'N','h','M','N','n','F','Y','L','G','w','o','G','y','q'}; char *filled_function_param1[10] = {filled_function_param1_0,filled_function_param1_1,filled_function_param1_2,filled_function_param1_3,filled_function_param1_4,filled_function_param1_5,filled_function_param1_6,filled_function_param1_7,filled_function_param1_8,filled_function_param1_9}; int filled_function_param2[] = {0,11,34,41,33,13,40,0,12,7}; for(int i = 0; i < len(param0); ++i) { f_filled(filled_function_param0[i],filled_function_param1[i],filled_function_param2[i]); f_gold(param0[i],param1[i],param2[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && equal(begin(param1[i]), end(param1[i]), begin(filled_function_param1[i])) && param2[i] == filled_function_param2[i]) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
y)?
[ "a) (x", "b) {", "c) (", "d) const", "e) y)?" ]
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 ( long long a, long long b ) { if ( a == 0 || b == 0 ) return false; long long result = a * b; if ( a == result / b ) return false; else return true; } bool f_filled ( long long a, long long b ) {} g a, long long b ) { if ( a == 0 || b == 0 ) return false; long long result = a * b; if ( a == result / b ) return false; else return true; } bool f_filled ( long long a, long long b ) {} int main(void) { int n_success = 0; long param0[] = {37,10000000000,10000000000,999999999,39,92,14,19,14,88}; long param1[] = {80,-10000000000,10000000000,999999999,36,56,21,38,82,41}; 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 [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);} bool f_gold ( long long a, long long b ) { if ( a == 0 || b == 0 ) return false; long long result = a * b; if ( a == result / b ) return false; else return true; } bool f_filled ( long long a, long long b ) {}g a, long long b ) { if ( a == 0 || b == 0 ) return false; long long result = a * b; if ( a == result / b ) return false; else return true; } bool f_filled ( long long a, long long b ) {} int main(void) { int n_success = 0; long param0[] = {37,10000000000,10000000000,999999999,39,92,14,19,14,88}; long param1[] = {80,-10000000000,10000000000,999999999,36,56,21,38,82,41}; 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) \"a\";", "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 dp [ n + 1 ]; dp [ 0 ] = dp [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + 1; return dp [ n ]; } int f_filled ( int n ) {} f_gold ( int n ) { int dp [ n + 1 ]; dp [ 0 ] = dp [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + 1; return dp [ n ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {75,76,55,14,43,10,16,30,44,65}; 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 dp [ n + 1 ]; dp [ 0 ] = dp [ 1 ] = 1; for ( int i [MASK] 2; i <= n; i ++ ) dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + 1; return dp [ n ]; } int f_filled ( int n ) {} f_gold ( int n ) { int dp [ n + 1 ]; dp [ 0 ] = dp [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + 1; return dp [ n ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {75,76,55,14,43,10,16,30,44,65}; 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) m", "b) -", "c) =", "d) positive", "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 count = 0; for ( int curr = 1; ; curr ++ ) { int sum = 0; for ( int x = curr; x > 0; x = x / 10 ) sum = sum + x % 10; if ( sum == 10 ) count ++; if ( count == n ) return curr; } return - 1; } int f_filled ( int n ) {} nt sum = 0; for ( int x = curr; x > 0; x = x / 10 ) sum = sum + x % 10; if ( sum == 10 ) count ++; if ( count == n ) return curr; } return - 1; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {37,13,51,69,76,10,97,40,69,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 arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int count = 0; for ( int curr = 1; ; curr [MASK] ) { int sum = 0; for ( int x = curr; x > 0; x = x / 10 ) sum = sum + x % 10; if ( sum == 10 ) count ++; if ( count == n ) return curr; } return - 1; } int f_filled ( int n ) {}nt sum = 0; for ( int x = curr; x > 0; x = x / 10 ) sum = sum + x % 10; if ( sum == 10 ) count ++; if ( count == n ) return curr; } return - 1; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {37,13,51,69,76,10,97,40,69,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; }
++
[ "a) j", "b) arr", "c) i", "d) ++", "e) break" ]
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 f_gold ( unsigned n ) { unsigned ugly [ n ]; unsigned i2 = 0, i3 = 0, i5 = 0; unsigned next_multiple_of_2 = 2; unsigned next_multiple_of_3 = 3; unsigned next_multiple_of_5 = 5; unsigned next_ugly_no = 1; ugly [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { next_ugly_no = min ( next_multiple_of_2, min ( next_multiple_of_3, next_multiple_of_5 ) ); ugly [ i ] = next_ugly_no; if ( next_ugly_no == next_multiple_of_2 ) { i2 = i2 + 1; next_multiple_of_2 = ugly [ i2 ] * 2; } if ( next_ugly_no == next_multiple_of_3 ) { i3 = i3 + 1; next_multiple_of_3 = ugly [ i3 ] * 3; } if ( next_ugly_no == next_multiple_of_5 ) { i5 = i5 + 1; next_multiple_of_5 = ugly [ i5 ] * 5; } } return next_ugly_no; } unsigned f_filled ( unsigned n ) {} ] * 3; } if ( next_ugly_no == next_multiple_of_5 ) { i5 = i5 + 1; next_multiple_of_5 = ugly [ i5 ] * 5; } } return next_ugly_no; } unsigned f_filled ( unsigned n ) {} int main(void) { int n_success = 0; int param0[] = {27,64,93,90,85,86,72,86,32,1}; 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 f_gold ( unsigned n ) { unsigned ugly [ n ]; unsigned i2 = 0, i3 = 0, i5 = 0; unsigned next_multiple_of_2 = 2; unsigned next_multiple_of_3 = 3; unsigned next_multiple_of_5 = 5; unsigned next_ugly_no = 1; ugly [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { next_ugly_no = min ( next_multiple_of_2, min ( next_multiple_of_3, next_multiple_of_5 ) ); ugly [ i ] = next_ugly_no; if ( next_ugly_no == next_multiple_of_2 ) { i2 = i2 + 1; next_multiple_of_2 = ugly [ i2 ] * 2; } [MASK] ( next_ugly_no == next_multiple_of_3 ) { i3 = i3 + 1; next_multiple_of_3 = ugly [ i3 ] * 3; } if ( next_ugly_no == next_multiple_of_5 ) { i5 = i5 + 1; next_multiple_of_5 = ugly [ i5 ] * 5; } } return next_ugly_no; } unsigned f_filled ( unsigned n ) {} ] * 3; } if ( next_ugly_no == next_multiple_of_5 ) { i5 = i5 + 1; next_multiple_of_5 = ugly [ i5 ] * 5; } } return next_ugly_no; } unsigned f_filled ( unsigned n ) {} int main(void) { int n_success = 0; int param0[] = {27,64,93,90,85,86,72,86,32,1}; 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) if", "b) [", "c) min(int", "d) ;", "e) ans;" ]
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 ) { queue < int > q; q . push ( 1 ); int cnt = 0; int t; while ( ! q . empty ( ) ) { t = q . front ( ); q . pop ( ); if ( t <= N ) { cnt ++; q . push ( t * 10 ); q . push ( t * 10 + 1 ); } } return cnt; } int f_filled ( int N ) {} pty ( ) ) { t = q . front ( ); q . pop ( ); if ( t <= N ) { cnt ++; q . push ( t * 10 ); q . push ( t * 10 + 1 ); } } return cnt; } int f_filled ( int N ) {} int main(void) { int n_success = 0; int param0[] = {1,3,150932532,71,44,36,88,69,53,20}; 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 [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);} int f_gold ( int N ) { queue < int > q; q . push ( 1 ); int cnt = 0; int t; while ( ! q . empty ( ) ) { t = q . front ( ); q . pop ( ); if ( t <= N ) { cnt ++; q . push ( t * 10 ); q . push ( t * 10 + 1 ); } } return cnt; } int f_filled ( int N ) {}pty ( ) ) { t = q . front ( ); q . pop ( ); if ( t <= N ) { cnt ++; q . push ( t * 10 ); q . push ( t * 10 + 1 ); } } return cnt; } int f_filled ( int N ) {} int main(void) { int n_success = 0; int param0[] = {1,3,150932532,71,44,36,88,69,53,20}; 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) std;", "d) *", "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 ) { int BT [ n + 1 ]; memset ( BT, 0, sizeof ( BT ) ); BT [ 0 ] = BT [ 1 ] = 1; for ( int i = 2; i <= n; ++ i ) for ( int j = 0; j < i; j ++ ) BT [ i ] += BT [ j ] * BT [ i - j - 1 ]; return BT [ n ]; } int f_filled ( int n ) {} BT ) ); BT [ 0 ] = BT [ 1 ] = 1; for ( int i = 2; i <= n; ++ i ) for ( int j = 0; j < i; j ++ ) BT [ i ] += BT [ j ] * BT [ i - j - 1 ]; return BT [ n ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {87,69,15,11,11,15,47,65,50,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 ( int n ) { int BT [ n + 1 ]; memset ( BT, 0, sizeof ( BT ) ); BT [ 0 ] = BT [ 1 ] = 1; for ( int i = 2; i <= n; ++ i ) for ( int j = 0; j < i; j ++ ) BT [ i ] += BT [ j ] * BT [ i - j - 1 ]; return BT [ [MASK] ]; } int f_filled ( int n ) {}BT ) ); BT [ 0 ] = BT [ 1 ] = 1; for ( int i = 2; i <= n; ++ i ) for ( int j = 0; j < i; j ++ ) BT [ i ] += BT [ j ] * BT [ i - j - 1 ]; return BT [ n ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {87,69,15,11,11,15,47,65,50,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; }
n
[ "a) {}", "b) n", "c) =", "d) str1", "e) i" ]
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 ) { return 1162261467 % n == 0; } bool f_filled ( int n ) {} int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int n ) { return 1162261467 % n == 0; } bool f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {1,3,27,9,-9,11,57,21,60,44}; 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 [MASK] {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int n ) { return 1162261467 % n == 0; } bool f_filled ( int n ) {}int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int n ) { return 1162261467 % n == 0; } bool f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {1,3,27,9,-9,11,57,21,60,44}; 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) *", "b) y)?", "c) imin", "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 n ) { long int dp [ n + 1 ] [ 27 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 0; i <= 25; i ++ ) dp [ 1 ] [ i ] = 1; for ( int i = 2; i <= n; i ++ ) { for ( int j = 0; j <= 25; j ++ ) if ( j == 0 ) dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ]; else dp [ i ] [ j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ); } long int sum = 0; for ( int i = 0; i <= 25; i ++ ) sum = ( sum + dp [ n ] [ i ] ); return sum; } int f_filled ( int n ) {} j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ); } long int sum = 0; for ( int i = 0; i <= 25; i ++ ) sum = ( sum + dp [ n ] [ i ] ); return sum; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {7,47,72,66,71,56,61,68,78,22}; 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), [MASK] int f_gold ( int n ) { long int dp [ n + 1 ] [ 27 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 0; i <= 25; i ++ ) dp [ 1 ] [ i ] = 1; for ( int i = 2; i <= n; i ++ ) { for ( int j = 0; j <= 25; j ++ ) if ( j == 0 ) dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ]; else dp [ i ] [ j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ); } long int sum = 0; for ( int i = 0; i <= 25; i ++ ) sum = ( sum + dp [ n ] [ i ] ); return sum; } int f_filled ( int n ) {}j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ); } long int sum = 0; for ( int i = 0; i <= 25; i ++ ) sum = ( sum + dp [ n ] [ i ] ); return sum; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {7,47,72,66,71,56,61,68,78,22}; 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; }
cmpfunc);}
[ "a) cmpfunc);}", "b) #include", "c) i", "d) 10", "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 x, int y, int n ) { int dp [ n + 1 ]; dp [ 0 ] = false; dp [ 1 ] = true; for ( int i = 2; i <= n; i ++ ) { if ( i - 1 >= 0 and ! dp [ i - 1 ] ) dp [ i ] = true; else if ( i - x >= 0 and ! dp [ i - x ] ) dp [ i ] = true; else if ( i - y >= 0 and ! dp [ i - y ] ) dp [ i ] = true; else dp [ i ] = false; } return dp [ n ]; } bool f_filled ( int x, int y, int n ) {} 0 and ! dp [ i - x ] ) dp [ i ] = true; else if ( i - y >= 0 and ! dp [ i - y ] ) dp [ i ] = true; else dp [ i ] = false; } return dp [ n ]; } bool f_filled ( int x, int y, int n ) {} int main(void) { int n_success = 0; int param0[] = {6,32,99,22,26,67,69,39,7,91}; int param1[] = {27,88,18,1,78,51,57,8,82,56}; int param2[] = {51,69,48,74,95,27,91,9,41,7}; 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 x, int y, int n ) { int dp [ n + 1 ]; dp [ 0 ] = false; dp [MASK] 1 ] = true; for ( int i = 2; i <= n; i ++ ) { if ( i - 1 >= 0 and ! dp [ i - 1 ] ) dp [ i ] = true; else if ( i - x >= 0 and ! dp [ i - x ] ) dp [ i ] = true; else if ( i - y >= 0 and ! dp [ i - y ] ) dp [ i ] = true; else dp [ i ] = false; } return dp [ n ]; } bool f_filled ( int x, int y, int n ) {}0 and ! dp [ i - x ] ) dp [ i ] = true; else if ( i - y >= 0 and ! dp [ i - y ] ) dp [ i ] = true; else dp [ i ] = false; } return dp [ n ]; } bool f_filled ( int x, int y, int n ) {} int main(void) { int n_success = 0; int param0[] = {6,32,99,22,26,67,69,39,7,91}; int param1[] = {27,88,18,1,78,51,57,8,82,56}; int param2[] = {51,69,48,74,95,27,91,9,41,7}; 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) a", "d) ,", "e) 0;" ]
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 boxes [ ], int n ) { sort ( boxes, boxes + n ); int ans = 1; int prev_width = boxes [ 0 ]; int prev_count = 1; int curr_count = 0; int curr_width = 0; for ( int i = 1; i < n; i ++ ) { curr_width += boxes [ i ]; curr_count += 1; if ( curr_width > prev_width && curr_count > prev_count ) { prev_width = curr_width; prev_count = curr_count; curr_count = 0; curr_width = 0; ans ++; } } return ans; } int f_filled ( int boxes [ ], int n ) {} ount ) { prev_width = curr_width; prev_count = curr_count; curr_count = 0; curr_width = 0; ans ++; } } return ans; } int f_filled ( int boxes [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {7,8,11,11,14,19,25,27,41,42,46,52,53,54,55,58,59,62,63,66,67,69,74,75,77,81,83,84,88,88,93,93,94}; int param0_1[] = {80,72,40,-78,-72,20,-28,-18,-96,14,20,-60,-56,-92,12,86,16,76,30,76,16}; 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}; int param0_3[] = {12,85,16,78,85,48,91,1,65,22,15,84,67,14,73,19,40,98,4,33,43,37,66,27,45,81,50,95,63,6,95,67,67,97,59,13,21,64,37,80}; int param0_4[] = {-98,-92,-90,-88,-88,-74,-64,-64,-64,-62,-60,-52,-48,-46,-42,-42,-38,-34,-28,-26,-20,-20,-18,-4,0,2,2,6,18,18,18,20,24,24,26,32,40,46,58,66,74,78,90,96}; int param0_5[] = {1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,0,1,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0}; int param0_6[] = {8,12,13,13,13,16,16,17,19,20,22,23,26,29,29,30,31,37,38,39,39,41,45,45,46,49,49,53,56,62,62,66,67,68,68,69,69,73,77,78,82,85,85,88,88,97}; int param0_7[] = {36,-30,-84,4,-20,-28,-88,72,40,46,-68,-8,18,-24,94,-64,-76,8,82,-6,-98,-70,82,60,-58,-98,86,34,-76,-44,-22,-26,90,20,-38,16,94,94,-78,-42,78,-74,2,8,-62}; 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}; int param0_9[] = {70,54,71,85,51,28,64,85,21,88,27,27,77,50,29,39,57,92,37,93,64,48,22,30,28,23,97,4,3,61,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[] = {22,12,35,35,30,21,26,25,26,18}; 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 boxes [ ], int n ) { sort ( boxes, boxes + n ); int ans = 1; int prev_width = boxes [ 0 ]; int prev_count = 1; int curr_count = 0; int curr_width = 0; for ( int i = 1; i < n; i ++ ) { curr_width += boxes [ i ]; curr_count += [MASK] if ( curr_width > prev_width && curr_count > prev_count ) { prev_width = curr_width; prev_count = curr_count; curr_count = 0; curr_width = 0; ans ++; } } return ans; } int f_filled ( int boxes [ ], int n ) {}ount ) { prev_width = curr_width; prev_count = curr_count; curr_count = 0; curr_width = 0; ans ++; } } return ans; } int f_filled ( int boxes [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {7,8,11,11,14,19,25,27,41,42,46,52,53,54,55,58,59,62,63,66,67,69,74,75,77,81,83,84,88,88,93,93,94}; int param0_1[] = {80,72,40,-78,-72,20,-28,-18,-96,14,20,-60,-56,-92,12,86,16,76,30,76,16}; 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}; int param0_3[] = {12,85,16,78,85,48,91,1,65,22,15,84,67,14,73,19,40,98,4,33,43,37,66,27,45,81,50,95,63,6,95,67,67,97,59,13,21,64,37,80}; int param0_4[] = {-98,-92,-90,-88,-88,-74,-64,-64,-64,-62,-60,-52,-48,-46,-42,-42,-38,-34,-28,-26,-20,-20,-18,-4,0,2,2,6,18,18,18,20,24,24,26,32,40,46,58,66,74,78,90,96}; int param0_5[] = {1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,0,1,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0}; int param0_6[] = {8,12,13,13,13,16,16,17,19,20,22,23,26,29,29,30,31,37,38,39,39,41,45,45,46,49,49,53,56,62,62,66,67,68,68,69,69,73,77,78,82,85,85,88,88,97}; int param0_7[] = {36,-30,-84,4,-20,-28,-88,72,40,46,-68,-8,18,-24,94,-64,-76,8,82,-6,-98,-70,82,60,-58,-98,86,34,-76,-44,-22,-26,90,20,-38,16,94,94,-78,-42,78,-74,2,8,-62}; 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}; int param0_9[] = {70,54,71,85,51,28,64,85,21,88,27,27,77,50,29,39,57,92,37,93,64,48,22,30,28,23,97,4,3,61,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[] = {22,12,35,35,30,21,26,25,26,18}; 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; }
1;
[ "a) int", "b) 1;", "c) #include", "d) (", "e) min(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);} long long int f_gold ( int n ) { long long int multiTerms = n * ( n + 1 ) / 2; long long int sum = multiTerms; for ( int i = 2; i <= n; i ++ ) { multiTerms = multiTerms - ( i - 1 ); sum = sum + multiTerms * i; } return sum; } long long int f_filled ( int n ) {} long int sum = multiTerms; for ( int i = 2; i <= n; i ++ ) { multiTerms = multiTerms - ( i - 1 ); sum = sum + multiTerms * i; } return sum; } long long int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {41,50,67,18,60,6,27,46,50,20}; 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; }
[MASK] <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)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 multiTerms = n * ( n + 1 ) / 2; long long int sum = multiTerms; for ( int i = 2; i <= n; i ++ ) { multiTerms = multiTerms - ( i - 1 ); sum = sum + multiTerms * i; } return sum; } long long int f_filled ( int n ) {}long int sum = multiTerms; for ( int i = 2; i <= n; i ++ ) { multiTerms = multiTerms - ( i - 1 ); sum = sum + multiTerms * i; } return sum; } long long int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {41,50,67,18,60,6,27,46,50,20}; 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) return", "b) #include", "c) f_gold", "d) =", "e) bool" ]
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 f_gold [ n ]; f_gold [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { f_gold [ i ] = 1; for ( int j = 0; j < i; j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1; } return * max_element ( f_gold, f_gold + n ); } int f_filled ( int arr [ ], int n ) {} j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1; } return * max_element ( f_gold, f_gold + n ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,3,5,6,8,12,12,17,17,18,22,22,26,26,31,31,31,31,32,35,35,38,41,42,49,49,60,60,61,63,64,68,69,70,71,72,76,77,80,83,83,89,90,90,90,96}; int param0_1[] = {-24,-16,-64,28,-30,-26,-14}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_3[] = {11,42,44,52,15,35,48}; int param0_4[] = {-54}; int param0_5[] = {1,0,1,1,1,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0}; int param0_6[] = {2,5,6,10,13,15,18,18,19,27,30,32,34,40,47,50,53,54,55,56,56,56,59,60,63,64,71,80,83,84,86,95}; int param0_7[] = {-80,60,-6,0,-50,82,-84,36,-96,-32,-14,16,60,-14,0,-22,28,12,8,-86,38,56,-32,-6,-80,-42,56,10,72,12,96,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,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[] = {10,38,45,57,44,13,8,62,74,54,37,75,35,60,36,33,14,71,4,21,6,8,30,5,2,5,4,20,33,69,83,87,83,52,77,79,49,25,11,35,98,31,52,82,13,25,17,35,53}; 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[] = {40,4,11,6,0,22,24,16,37,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 [ ], int n) {qsort (arr, n, sizeof(int), [MASK] int f_gold ( int arr [ ], int n ) { int f_gold [ n ]; f_gold [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { f_gold [ i ] = 1; for ( int j = 0; j < i; j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1; } return * max_element ( f_gold, f_gold + n ); } int f_filled ( int arr [ ], int n ) {}j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1; } return * max_element ( f_gold, f_gold + n ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {2,3,5,6,8,12,12,17,17,18,22,22,26,26,31,31,31,31,32,35,35,38,41,42,49,49,60,60,61,63,64,68,69,70,71,72,76,77,80,83,83,89,90,90,90,96}; int param0_1[] = {-24,-16,-64,28,-30,-26,-14}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_3[] = {11,42,44,52,15,35,48}; int param0_4[] = {-54}; int param0_5[] = {1,0,1,1,1,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0}; int param0_6[] = {2,5,6,10,13,15,18,18,19,27,30,32,34,40,47,50,53,54,55,56,56,56,59,60,63,64,71,80,83,84,86,95}; int param0_7[] = {-80,60,-6,0,-50,82,-84,36,-96,-32,-14,16,60,-14,0,-22,28,12,8,-86,38,56,-32,-6,-80,-42,56,10,72,12,96,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,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[] = {10,38,45,57,44,13,8,62,74,54,37,75,35,60,36,33,14,71,4,21,6,8,30,5,2,5,4,20,33,69,83,87,83,52,77,79,49,25,11,35,98,31,52,82,13,25,17,35,53}; 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[] = {40,4,11,6,0,22,24,16,37,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; }
cmpfunc);}
[ "a) cmpfunc);}", "b) neg", "c) max(int", "d) a", "e) int" ]
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 b ) { int count = 0; int p = abs ( a * b ); if ( p == 0 ) return 1; while ( p > 0 ) { count ++; p = p / 10; } return count; } int f_filled ( int a, int b ) {} old ( int a, int b ) { int count = 0; int p = abs ( a * b ); if ( p == 0 ) return 1; while ( p > 0 ) { count ++; p = p / 10; } return count; } int f_filled ( int a, int b ) {} int main(void) { int n_success = 0; int param0[] = {86,81,48,64,56,5,25,94,5,46}; int param1[] = {39,87,84,80,20,70,13,83,55,46}; 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) [MASK] (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a, int b ) { int count = 0; int p = abs ( a * b ); if ( p == 0 ) return 1; while ( p > 0 ) { count ++; p = p / 10; } return count; } int f_filled ( int a, int b ) {}old ( int a, int b ) { int count = 0; int p = abs ( a * b ); if ( p == 0 ) return 1; while ( p > 0 ) { count ++; p = p / 10; } return count; } int f_filled ( int a, int b ) {} int main(void) { int n_success = 0; int param0[] = {86,81,48,64,56,5,25,94,5,46}; int param1[] = {39,87,84,80,20,70,13,83,55,46}; 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; }
{qsort
[ "a) ++", "b) [", "c) i", "d) (", "e) {qsort" ]
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, int c ) { if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b; else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a; else return c; } int f_filled ( int a, int b, int c ) {} , int c ) { if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b; else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a; else return c; } int f_filled ( int a, int b, int c ) {} int main(void) { int n_success = 0; int param0[] = {56,56,36,71,3,84,30,82,90,38}; int param1[] = {5,60,56,54,70,57,80,54,70,4}; int param2[] = {82,17,51,6,81,47,85,32,55,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) { return (x < y)? x: y; } int 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 a, int b, int c ) { if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b; else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a; else return c; } int f_filled ( int a, int b, int c ) {}, int c ) { if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b; else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a; else return c; } int f_filled ( int a, int b, int c ) {} int main(void) { int n_success = 0; int param0[] = {56,56,36,71,3,84,30,82,90,38}; int param1[] = {5,60,56,54,70,57,80,54,70,4}; int param2[] = {82,17,51,6,81,47,85,32,55,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; }
len
[ "a) len", "b) *;", "c) s", "d) :", "e) sort" ]
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 ( char str [] ) { int result = 0; for ( int i = 0; i < len(str); i ++ ) if ( i == ( str [ i ] - 'a' ) || i == ( str [ i ] - 'A' ) ) result ++; return result; } int f_filled ( char str [] ) {} str [] ) { int result = 0; for ( int i = 0; i < len(str); i ++ ) if ( i == ( str [ i ] - 'a' ) || i == ( str [ i ] - 'A' ) ) result ++; return result; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"lLkhFeZGcb","ABcED","geeksforgeeks","Alphabetical","abababab","bcdefgxyz","cBzaqx L"," bcd","11","MqqKY"}; 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 str [] ) { int result = 0; for ( int i = 0; i < len(str); i ++ ) if ( i == ( str [ i [MASK] - 'a' ) || i == ( str [ i ] - 'A' ) ) result ++; return result; } int f_filled ( char str [] ) {} str [] ) { int result = 0; for ( int i = 0; i < len(str); i ++ ) if ( i == ( str [ i ] - 'a' ) || i == ( str [ i ] - 'A' ) ) result ++; return result; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"lLkhFeZGcb","ABcED","geeksforgeeks","Alphabetical","abababab","bcdefgxyz","cBzaqx L"," bcd","11","MqqKY"}; 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) i", "d) =", "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 A [ ], int n ) { int min_val = * min_element ( A, A + n ); return ( min_val * ( n - 1 ) ); } int f_filled ( int A [ ], int n ) {} n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int A [ ], int n ) { int min_val = * min_element ( A, A + n ); return ( min_val * ( n - 1 ) ); } int f_filled ( int A [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {4,9,10,13,13,15,16,16,17,18,18,23,24,24,25,25,25,32,32,36,38,39,40,40,40,41,43,48,51,56,59,60,70,72,74,76,79,83,83,85,88,90,92,94,95,95}; int param0_1[] = {46,-10,56,46,-30,-68,50,8,72,-2,38,-12,20,-30,-38,-78,-18,-34,16,94,30,-86,36,88,-26,-56,-98,-92,96,-70,-78,-60,20,-54,36,-12,78,24,14,98,-14,-88,76,12}; 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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {59,64,29,99,29,63,29,63,88,94,82,92,99,56,51,74,73,22,42,37,21,36,68,69,16,81,3,85,67,13,41,87,67,99,83,47,95,90,24,31,1,54,61,35,51,13}; int param0_4[] = {-98,-92,-82,-78,-76,-72,-64,-60,-44,-28,-22,-22,-14,-12,2,2,4,6,10,14,16,24,28,28,32,34,36,46,46,48,52,60,62,66,68,72,74,84,96}; int param0_5[] = {1,1,1,1,1,0,1}; int param0_6[] = {5,20,34,37,51,55,89}; int param0_7[] = {-70,78,-52,-82,-24,96,-32,8,-50,38,-76,-56,64,-28,-22,94,52,-32,66,-34,-30,14,42,98,96,-56,50,50,-24,-56,70,6,78,86,52,-40,92,46,46,-14,-74,40}; int param0_8[] = {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_9[] = {51,42,29,30,65,42,7,2,90,85,1,47,79,98,90,66,47,54,32,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[] = {26,25,32,45,31,6,3,33,26,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 A [ ], int n ) { int min_val = * min_element ( A, A + n ); [MASK] ( min_val * ( n - 1 ) ); } int f_filled ( int A [ ], int n ) {} n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int A [ ], int n ) { int min_val = * min_element ( A, A + n ); return ( min_val * ( n - 1 ) ); } int f_filled ( int A [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {4,9,10,13,13,15,16,16,17,18,18,23,24,24,25,25,25,32,32,36,38,39,40,40,40,41,43,48,51,56,59,60,70,72,74,76,79,83,83,85,88,90,92,94,95,95}; int param0_1[] = {46,-10,56,46,-30,-68,50,8,72,-2,38,-12,20,-30,-38,-78,-18,-34,16,94,30,-86,36,88,-26,-56,-98,-92,96,-70,-78,-60,20,-54,36,-12,78,24,14,98,-14,-88,76,12}; 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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {59,64,29,99,29,63,29,63,88,94,82,92,99,56,51,74,73,22,42,37,21,36,68,69,16,81,3,85,67,13,41,87,67,99,83,47,95,90,24,31,1,54,61,35,51,13}; int param0_4[] = {-98,-92,-82,-78,-76,-72,-64,-60,-44,-28,-22,-22,-14,-12,2,2,4,6,10,14,16,24,28,28,32,34,36,46,46,48,52,60,62,66,68,72,74,84,96}; int param0_5[] = {1,1,1,1,1,0,1}; int param0_6[] = {5,20,34,37,51,55,89}; int param0_7[] = {-70,78,-52,-82,-24,96,-32,8,-50,38,-76,-56,64,-28,-22,94,52,-32,66,-34,-30,14,42,98,96,-56,50,50,-24,-56,70,6,78,86,52,-40,92,46,46,-14,-74,40}; int param0_8[] = {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_9[] = {51,42,29,30,65,42,7,2,90,85,1,47,79,98,90,66,47,54,32,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[] = {26,25,32,45,31,6,3,33,26,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; }
return
[ "a) <", "b) return", "c) (", "d) r", "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 ( char str [] ) { int n = strlen(str); int oddDigSum = 0, evenDigSum = 0; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) oddDigSum += ( str [ i ] - '0' ); else evenDigSum += ( str [ i ] - '0' ); } return ( ( oddDigSum - evenDigSum ) % 11 == 0 ); } int f_filled ( char str [] ) {} ++ ) { if ( i % 2 == 0 ) oddDigSum += ( str [ i ] - '0' ); else evenDigSum += ( str [ i ] - '0' ); } return ( ( oddDigSum - evenDigSum ) % 11 == 0 ); } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"r","7386620","1010","rWFOLX VB","3845847974820","01001","yq","770356","0000110111001","tDMrBdHJJITDx"}; 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 str [] ) { int n = strlen(str); int oddDigSum = 0, evenDigSum = 0; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) oddDigSum += ( str [ i ] - '0' ); else evenDigSum += ( str [ i ] - '0' ); } return ( ( oddDigSum - evenDigSum ) % [MASK] == 0 ); } int f_filled ( char str [] ) {}++ ) { if ( i % 2 == 0 ) oddDigSum += ( str [ i ] - '0' ); else evenDigSum += ( str [ i ] - '0' ); } return ( ( oddDigSum - evenDigSum ) % 11 == 0 ); } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"r","7386620","1010","rWFOLX VB","3845847974820","01001","yq","770356","0000110111001","tDMrBdHJJITDx"}; 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; }
11
[ "a) java.util.", "b) =", "c) 11", "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 * jumps = new int [ n ]; int min; jumps [ n - 1 ] = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( arr [ i ] == 0 ) jumps [ i ] = INT_MAX; else if ( arr [ i ] >= n - i - 1 ) jumps [ i ] = 1; else { min = INT_MAX; for ( int j = i + 1; j < n && j <= arr [ i ] + i; j ++ ) { if ( min > jumps [ j ] ) min = jumps [ j ]; } if ( min != INT_MAX ) jumps [ i ] = min + 1; else jumps [ i ] = min; } } return jumps [ 0 ]; } int f_filled ( int arr [ ], int n ) {} jumps [ j ] ) min = jumps [ j ]; } if ( min != INT_MAX ) jumps [ i ] = min + 1; else jumps [ i ] = min; } } return jumps [ 0 ]; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,6,7,14,22,32,42,42,43,48,54,57,59,69,84,92,98}; int param0_1[] = {98,-66,-70,-64,-88,-76,-90,16,58,68,-10,-42,-28,10,72,68,-30,60,92,-56,80,-4,-82,30,58,98,-56,98,-14,-38,-20,-74,-46,-22,78,36,-54,-64,80,-10,-26,82,96,-72,-36,-36,-32,-88,0}; 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}; int param0_3[] = {64,25,63,54,7,43,79,27,34,13,84,80,34,48,5,56,67,2}; int param0_4[] = {2,28,68}; int param0_5[] = {1,0,0,0,0,1,1,1,1,0,1,0,0}; int param0_6[] = {1,1,9,16,17,18,19,20,21,22,25,28,29,29,36,37,40,40,42,48,49,49,55,63,65,66,69,70,72,73,76,77,77,79,79,81,81,93,95,99}; int param0_7[] = {38,-42,-8,98,-90,38,88,-8,70,-28,-50,-22,28,24,88,-26,58,48,6,0,68,-6,8,54,-2,46,-44,96,-82,-14,-48,-18,-16,-48,-44,-16,-58,-64}; 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}; int param0_9[] = {98,46,12,55,57,11,25,64,92,35,90,72,95,30,75,67,64,12,31,84,70,96,71,80,62,34,70,10,54}; 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[] = {11,26,41,10,2,11,24,34,14,25}; 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 * jumps = new int [ n ]; int min; jumps [ n - 1 ] = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( arr [ i ] == 0 ) jumps [ i ] = INT_MAX; else if ( arr [ i ] >= n - i - 1 ) jumps [ i [MASK] = 1; else { min = INT_MAX; for ( int j = i + 1; j < n && j <= arr [ i ] + i; j ++ ) { if ( min > jumps [ j ] ) min = jumps [ j ]; } if ( min != INT_MAX ) jumps [ i ] = min + 1; else jumps [ i ] = min; } } return jumps [ 0 ]; } int f_filled ( int arr [ ], int n ) {} jumps [ j ] ) min = jumps [ j ]; } if ( min != INT_MAX ) jumps [ i ] = min + 1; else jumps [ i ] = min; } } return jumps [ 0 ]; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,6,7,14,22,32,42,42,43,48,54,57,59,69,84,92,98}; int param0_1[] = {98,-66,-70,-64,-88,-76,-90,16,58,68,-10,-42,-28,10,72,68,-30,60,92,-56,80,-4,-82,30,58,98,-56,98,-14,-38,-20,-74,-46,-22,78,36,-54,-64,80,-10,-26,82,96,-72,-36,-36,-32,-88,0}; 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}; int param0_3[] = {64,25,63,54,7,43,79,27,34,13,84,80,34,48,5,56,67,2}; int param0_4[] = {2,28,68}; int param0_5[] = {1,0,0,0,0,1,1,1,1,0,1,0,0}; int param0_6[] = {1,1,9,16,17,18,19,20,21,22,25,28,29,29,36,37,40,40,42,48,49,49,55,63,65,66,69,70,72,73,76,77,77,79,79,81,81,93,95,99}; int param0_7[] = {38,-42,-8,98,-90,38,88,-8,70,-28,-50,-22,28,24,88,-26,58,48,6,0,68,-6,8,54,-2,46,-44,96,-82,-14,-48,-18,-16,-48,-44,-16,-58,-64}; 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}; int param0_9[] = {98,46,12,55,57,11,25,64,92,35,90,72,95,30,75,67,64,12,31,84,70,96,71,80,62,34,70,10,54}; 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[] = {11,26,41,10,2,11,24,34,14,25}; 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) *" ]
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 n ) { int result = 0; for ( int i = 1; i <= 9; i ++ ) { stack < int > s; if ( i <= n ) { s . push ( i ); result ++; } while ( ! s . empty ( ) ) { int tp = s . top ( ); s . pop ( ); for ( int j = tp % 10; j <= 9; j ++ ) { int x = tp * 10 + j; if ( x <= n ) { s . push ( x ); result ++; } } } } return result; } int f_filled ( int n ) {} j <= 9; j ++ ) { int x = tp * 10 + j; if ( x <= n ) { s . push ( x ); result ++; } } } } return result; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {69,72,88,7,66,34,23,37,33,21}; 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 = 1; i <= 9; i ++ ) { stack < int > s; if ( i <= n ) { s . push ( i ); result ++; } while ( ! s . empty ( ) ) { int tp = s . top ( ); s . pop ( ); for ( int j = tp % 10; j <= 9; j ++ ) { int x = tp * 10 [MASK] j; if ( x <= n ) { s . push ( x ); result ++; } } } } return result; } int f_filled ( int n ) {}j <= 9; j ++ ) { int x = tp * 10 + j; if ( x <= n ) { s . push ( x ); result ++; } } } } return result; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {69,72,88,7,66,34,23,37,33,21}; 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) void", "d) x,", "e) <bits/stdc++.h>" ]
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);} char f_gold [] ( char n [] ) { char res [] = n; for ( int j = strlen(n) - 1; j >= 0; -- j ) res += n [ j ]; return res; } char f_filled [] ( char n [] ) {} , n, sizeof(int), cmpfunc);} char f_gold [] ( char n [] ) { char res [] = n; for ( int j = strlen(n) - 1; j >= 0; -- j ) res += n [ j ]; return res; } char f_filled [] ( char n [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"lSUhEvxcgfI","77329283","010111111","Stazb","0702","01111111","a","359118754930","11011010010","rznb"}; 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 * [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);} char f_gold [] ( char n [] ) { char res [] = n; for ( int j = strlen(n) - 1; j >= 0; -- j ) res += n [ j ]; return res; } char f_filled [] ( char n [] ) {}, n, sizeof(int), cmpfunc);} char f_gold [] ( char n [] ) { char res [] = n; for ( int j = strlen(n) - 1; j >= 0; -- j ) res += n [ j ]; return res; } char f_filled [] ( char n [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"lSUhEvxcgfI","77329283","010111111","Stazb","0702","01111111","a","359118754930","11011010010","rznb"}; 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,
[ "a) a,", "b) f_gold", "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);} int f_gold ( int arr [ ], int n ) { int c [ 3 ] = { 0 }, i; int res = 0; for ( i = 0; i < n; i ++ ) c [ arr [ i ] % 3 ] ++; res += ( ( c [ 0 ] * ( c [ 0 ] - 1 ) ) >> 1 ); res += c [ 1 ] * c [ 2 ]; res += ( c [ 0 ] * ( c [ 0 ] - 1 ) * ( c [ 0 ] - 2 ) ) / 6; res += ( c [ 1 ] * ( c [ 1 ] - 1 ) * ( c [ 1 ] - 2 ) ) / 6; res += ( ( c [ 2 ] * ( c [ 2 ] - 1 ) * ( c [ 2 ] - 2 ) ) / 6 ); res += c [ 0 ] * c [ 1 ] * c [ 2 ]; return res; } int f_filled ( int arr [ ], int n ) {} ) * ( c [ 1 ] - 2 ) ) / 6; res += ( ( c [ 2 ] * ( c [ 2 ] - 1 ) * ( c [ 2 ] - 2 ) ) / 6 ); res += c [ 0 ] * c [ 1 ] * c [ 2 ]; return res; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,3,6,12,18,31,36,43,47,59,64,64,69,69,94,98,98}; int param0_1[] = {94,46,64,18,70,22,-98,52,-26,34,-22,22,40,66,-72,-66,86,84,12,-38,28,-60,-10,-30,-78,76,62,74,24,-64,0,92,-20,-66,-52}; 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,1,1,1,1,1,1,1,1,1}; int param0_3[] = {68,96,74,38,70,70}; int param0_4[] = {-88,-74,-70,-64,-64,-64,-58,-52,-18,-10,-6,4,4,28,44,48,52,54,64,72,76,94}; int param0_5[] = {0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,0,0,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,1,0,0,0,0,1,0,0,1}; int param0_6[] = {9,12,14,21,27,28,45,50,54,57,58,62,78,82,91,92,95}; int param0_7[] = {16,-46,-32,-36,-84,-14,-18,16,54,90,-4}; int param0_8[] = {0,0,1,1}; int param0_9[] = {53,32,54,84,79,37,44,30,92,53,89,95}; 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,23,29,5,18,36,9,8,3,8}; 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 c [ 3 ] = { 0 }, i; int res = 0; for ( i = 0; i < n; i ++ ) c [ arr [ i ] % 3 ] ++; res += ( ( c [ 0 ] * ( c [ 0 ] - 1 ) ) >> 1 ); res += c [ 1 ] * c [ 2 ]; res += ( c [ 0 ] * ( c [ 0 ] - 1 ) * ( c [ 0 ] - 2 ) ) / 6; res += ( c [ 1 ] * ( c [ 1 ] - 1 ) * ( c [ 1 ] - 2 ) ) / 6; res += ( ( c [ 2 ] * ( c [ 2 ] - 1 ) * ( c [ 2 ] - 2 ) [MASK] / 6 ); res += c [ 0 ] * c [ 1 ] * c [ 2 ]; return res; } int f_filled ( int arr [ ], int n ) {}) * ( c [ 1 ] - 2 ) ) / 6; res += ( ( c [ 2 ] * ( c [ 2 ] - 1 ) * ( c [ 2 ] - 2 ) ) / 6 ); res += c [ 0 ] * c [ 1 ] * c [ 2 ]; return res; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,3,6,12,18,31,36,43,47,59,64,64,69,69,94,98,98}; int param0_1[] = {94,46,64,18,70,22,-98,52,-26,34,-22,22,40,66,-72,-66,86,84,12,-38,28,-60,-10,-30,-78,76,62,74,24,-64,0,92,-20,-66,-52}; 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,1,1,1,1,1,1,1,1,1}; int param0_3[] = {68,96,74,38,70,70}; int param0_4[] = {-88,-74,-70,-64,-64,-64,-58,-52,-18,-10,-6,4,4,28,44,48,52,54,64,72,76,94}; int param0_5[] = {0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,0,0,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,1,0,0,0,0,1,0,0,1}; int param0_6[] = {9,12,14,21,27,28,45,50,54,57,58,62,78,82,91,92,95}; int param0_7[] = {16,-46,-32,-36,-84,-14,-18,16,54,90,-4}; int param0_8[] = {0,0,1,1}; int param0_9[] = {53,32,54,84,79,37,44,30,92,53,89,95}; 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,23,29,5,18,36,9,8,3,8}; 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) n", "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 ) { int bell [ n + 1 ] [ n + 1 ]; bell [ 0 ] [ 0 ] = 1; for ( int i = 1; i <= n; i ++ ) { bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ]; for ( int j = 1; j <= i; j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ]; } return bell [ n ] [ 0 ]; } int f_filled ( int n ) {} ell [ i - 1 ] [ i - 1 ]; for ( int j = 1; j <= i; j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ]; } return bell [ n ] [ 0 ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {84,78,9,73,4,53,85,38,39,6}; 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 bell [ n + 1 ] [ n + 1 ]; bell [ 0 ] [ 0 ] = 1; for ( int i = 1; i [MASK] n; i ++ ) { bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ]; for ( int j = 1; j <= i; j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ]; } return bell [ n ] [ 0 ]; } int f_filled ( int n ) {}ell [ i - 1 ] [ i - 1 ]; for ( int j = 1; j <= i; j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ]; } return bell [ n ] [ 0 ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {84,78,9,73,4,53,85,38,39,6}; 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) a", "b) (", "c) n,", "d) <=", "e) #include" ]
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 arr1 [ ], int arr2 [ ], int n1, int n2 ) { int max = arr1 [ 0 ]; int min = arr2 [ 0 ]; int i; for ( i = 1; i < n1 && i < n2; ++ i ) { if ( arr1 [ i ] > max ) max = arr1 [ i ]; if ( arr2 [ i ] < min ) min = arr2 [ i ]; } while ( i < n1 ) { if ( arr1 [ i ] > max ) max = arr1 [ i ]; i ++; } while ( i < n2 ) { if ( arr2 [ i ] < min ) min = arr2 [ i ]; i ++; } return max * min; } int f_filled ( int arr1 [ ], int arr2 [ ], int n1, int n2 ) {} x = arr1 [ i ]; i ++; } while ( i < n2 ) { if ( arr2 [ i ] < min ) min = arr2 [ i ]; i ++; } return max * min; } int f_filled ( int arr1 [ ], int arr2 [ ], int n1, int n2 ) {} int main(void) { int n_success = 0; int param0_0[] = {4,6,32,33,34,36,41,43,52,70,70,70,75,78,88,88,95,95}; int param0_1[] = {78,-88,44,10,96,-46,-66,84,32,44,56,76,-72,-72,82,-12,-20,-76,8,-34,12,-22,-92,-74,76,46,86,-2,-76,-86,36,80}; int param0_2[] = {0,0,1}; int param0_3[] = {87,4,90,50,2,35,87}; int param0_4[] = {-98,-86,-86,-82,-72,-72,-70,-68,-64,-58,-50,-48,-44,-38,-36,-32,-32,-30,-28,-16,-12,-12,-4,8,10,16,18,22,28,32,32,42,60,70,88,88,88,98,98}; int param0_5[] = {0}; int param0_6[] = {31,32,33,49,68,77,89,94}; int param0_7[] = {64,-44,-6,12,-98,42,-48,-70,-76,30,-48,-72,32,-2,68,42,-60,86,-24,98,62,-60,36,-52,-50,-74,96,36,-30,66,-92,-74,8,74,-64,-24,-60,-70}; int param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {35,11,39,23,49,12,96,98,46,76,29,1,88,71,27,49,12,24,95,61,38,33,59,97,56,7,97,7,71,59,46,68,45}; 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,4,11,25,26,26,32,39,50,53,65,66,69,74,81,83,89,99}; int param1_1[] = {30,0,-50,-62,36,-26,-26,70,-72,-8,58,34,26,36,-14,52,18,-80,-64,92,-22,50,-10,56,2,42,90,-80,-94,-62,76,-56}; int param1_2[] = {0,0,1}; int param1_3[] = {33,90,2,95,54,94,96}; int param1_4[] = {-98,-84,-72,-70,-60,-58,-54,-52,-44,-44,-24,-10,-6,2,10,12,12,14,18,22,30,34,42,48,50,54,54,56,68,68,70,76,76,78,86,88,88,90,96}; int param1_5[] = {1}; int param1_6[] = {7,26,28,35,36,37,81,98}; int param1_7[] = {44,-70,16,60,84,-8,58,-64,-32,-58,38,-30,-38,-94,-64,-42,-42,-84,-94,2,-22,46,-72,-38,-28,0,-94,-92,-24,46,48,-18,-56,52,26,-60,-84,-68}; int param1_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; int param1_9[] = {53,67,70,97,2,97,28,59,89,14,83,71,49,86,13,16,40,60,10,54,35,22,59,53,70,83,95,71,91,72,38,91,39}; 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[] = {13,26,2,5,22,0,7,21,12,31}; int param3[] = {11,31,2,4,31,0,7,23,15,27}; 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 arr1 [ ], int arr2 [ ], int n1, int n2 ) { int max = arr1 [ 0 ]; int min = arr2 [ 0 ]; int i; for ( [MASK] = 1; i < n1 && i < n2; ++ i ) { if ( arr1 [ i ] > max ) max = arr1 [ i ]; if ( arr2 [ i ] < min ) min = arr2 [ i ]; } while ( i < n1 ) { if ( arr1 [ i ] > max ) max = arr1 [ i ]; i ++; } while ( i < n2 ) { if ( arr2 [ i ] < min ) min = arr2 [ i ]; i ++; } return max * min; } int f_filled ( int arr1 [ ], int arr2 [ ], int n1, int n2 ) {}x = arr1 [ i ]; i ++; } while ( i < n2 ) { if ( arr2 [ i ] < min ) min = arr2 [ i ]; i ++; } return max * min; } int f_filled ( int arr1 [ ], int arr2 [ ], int n1, int n2 ) {} int main(void) { int n_success = 0; int param0_0[] = {4,6,32,33,34,36,41,43,52,70,70,70,75,78,88,88,95,95}; int param0_1[] = {78,-88,44,10,96,-46,-66,84,32,44,56,76,-72,-72,82,-12,-20,-76,8,-34,12,-22,-92,-74,76,46,86,-2,-76,-86,36,80}; int param0_2[] = {0,0,1}; int param0_3[] = {87,4,90,50,2,35,87}; int param0_4[] = {-98,-86,-86,-82,-72,-72,-70,-68,-64,-58,-50,-48,-44,-38,-36,-32,-32,-30,-28,-16,-12,-12,-4,8,10,16,18,22,28,32,32,42,60,70,88,88,88,98,98}; int param0_5[] = {0}; int param0_6[] = {31,32,33,49,68,77,89,94}; int param0_7[] = {64,-44,-6,12,-98,42,-48,-70,-76,30,-48,-72,32,-2,68,42,-60,86,-24,98,62,-60,36,-52,-50,-74,96,36,-30,66,-92,-74,8,74,-64,-24,-60,-70}; int param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {35,11,39,23,49,12,96,98,46,76,29,1,88,71,27,49,12,24,95,61,38,33,59,97,56,7,97,7,71,59,46,68,45}; 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,4,11,25,26,26,32,39,50,53,65,66,69,74,81,83,89,99}; int param1_1[] = {30,0,-50,-62,36,-26,-26,70,-72,-8,58,34,26,36,-14,52,18,-80,-64,92,-22,50,-10,56,2,42,90,-80,-94,-62,76,-56}; int param1_2[] = {0,0,1}; int param1_3[] = {33,90,2,95,54,94,96}; int param1_4[] = {-98,-84,-72,-70,-60,-58,-54,-52,-44,-44,-24,-10,-6,2,10,12,12,14,18,22,30,34,42,48,50,54,54,56,68,68,70,76,76,78,86,88,88,90,96}; int param1_5[] = {1}; int param1_6[] = {7,26,28,35,36,37,81,98}; int param1_7[] = {44,-70,16,60,84,-8,58,-64,-32,-58,38,-30,-38,-94,-64,-42,-42,-84,-94,2,-22,46,-72,-38,-28,0,-94,-92,-24,46,48,-18,-56,52,26,-60,-84,-68}; int param1_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; int param1_9[] = {53,67,70,97,2,97,28,59,89,14,83,71,49,86,13,16,40,60,10,54,35,22,59,53,70,83,95,71,91,72,38,91,39}; 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[] = {13,26,2,5,22,0,7,21,12,31}; int param3[] = {11,31,2,4,31,0,7,23,15,27}; 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; }
i
[ "a) i", "b) c;", "c) max(int", "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 arr [ ], int n ) { int invcount = 0; for ( int i = 0; i < n - 2; i ++ ) { for ( int j = i + 1; j < n - 1; j ++ ) { if ( arr [ i ] > arr [ j ] ) { for ( int k = j + 1; k < n; k ++ ) { if ( arr [ j ] > arr [ k ] ) invcount ++; } } } } return invcount; } int f_filled ( int arr [ ], int n ) {} for ( int k = j + 1; k < n; k ++ ) { if ( arr [ j ] > arr [ k ] ) invcount ++; } } } } return invcount; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {11,17,27,29,31,31,32,44,45,93}; int param0_1[] = {-48,-10,-44,-94,50,-24,30,72,-6,56,94,-44,-96,-52,-2,68,-52,30,98,0,12,-98,-94,48,-96,-86}; int param0_2[] = {0,0,0,1,1,1,1,1,1}; int param0_3[] = {78,82,51,92,88,95}; int param0_4[] = {-98,-96,-84,-72,-70,-62,-62,-58,-56,-54,-52,-52,-52,-50,-40,-40,-38,-36,-34,-26,-26,-22,-22,-20,-12,-8,-2,4,14,14,18,22,28,32,34,34,42,44,54,58,60,64,74,80,88,90,92,94,96}; int param0_5[] = {1,0,0,0}; int param0_6[] = {2,3,5,5,5,7,7,15,16,21,29,29,35,39,39,40,42,44,46,48,48,52,52,52,54,55,57,62,67,67,67,70,71,71,76,78,79,87,94,96}; int param0_7[] = {-60,-42,20,52,-54,40,56}; 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,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[] = {98,81,23,71,82,31,15,21,4,68,68,22,77,83,22,9,10,56}; 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,15,6,3,47,3,39,6,37,13}; 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 invcount = 0; for ( int i = 0; i < n - 2; i ++ ) { for ( int j = i + 1; j < n - 1; j ++ ) { if ( arr [ i ] > arr [ j ] ) { for ( int k = j + 1; k < n; k ++ ) { if ( arr [ j ] > arr [ k ] ) invcount ++; } } } } return [MASK] } int f_filled ( int arr [ ], int n ) {} for ( int k = j + 1; k < n; k ++ ) { if ( arr [ j ] > arr [ k ] ) invcount ++; } } } } return invcount; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {11,17,27,29,31,31,32,44,45,93}; int param0_1[] = {-48,-10,-44,-94,50,-24,30,72,-6,56,94,-44,-96,-52,-2,68,-52,30,98,0,12,-98,-94,48,-96,-86}; int param0_2[] = {0,0,0,1,1,1,1,1,1}; int param0_3[] = {78,82,51,92,88,95}; int param0_4[] = {-98,-96,-84,-72,-70,-62,-62,-58,-56,-54,-52,-52,-52,-50,-40,-40,-38,-36,-34,-26,-26,-22,-22,-20,-12,-8,-2,4,14,14,18,22,28,32,34,34,42,44,54,58,60,64,74,80,88,90,92,94,96}; int param0_5[] = {1,0,0,0}; int param0_6[] = {2,3,5,5,5,7,7,15,16,21,29,29,35,39,39,40,42,44,46,48,48,52,52,52,54,55,57,62,67,67,67,70,71,71,76,78,79,87,94,96}; int param0_7[] = {-60,-42,20,52,-54,40,56}; 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,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[] = {98,81,23,71,82,31,15,21,4,68,68,22,77,83,22,9,10,56}; 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,15,6,3,47,3,39,6,37,13}; 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; }
invcount;
[ "a) False", "b) (arr)", "c) return", "d) invcount;", "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 r ) { return ( 2 * r * r ); } int f_filled ( int r ) {} eturn ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int r ) { return ( 2 * r * r ); } int f_filled ( int r ) {} int main(void) { int n_success = 0; int param0[] = {14,78,45,66,18,32,60,16,99,65}; 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 [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 ( int r ) { return ( 2 * r * r ); } int f_filled ( int r ) {}eturn ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int r ) { return ( 2 * r * r ); } int f_filled ( int r ) {} int main(void) { int n_success = 0; int param0[] = {14,78,45,66,18,32,60,16,99,65}; 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) y)", "b) <", "c) i", "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);} int 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 ] ); } } return dp [ n ] [ n ]; } int f_filled ( char str [] ) {} = j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]; else dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] ); } } return dp [ n ] [ n ]; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"JxZFz","7648992235770","11100000","cRN SgYjPsctJ","434","1","JRfZIAsbrPBZ","03779368305592","1111000","BkULuIi"}; 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 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 ] [MASK] 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 ] ); } } return dp [ n ] [ n ]; } int f_filled ( char str [] ) {}= j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]; else dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] ); } } return dp [ n ] [ n ]; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"JxZFz","7648992235770","11100000","cRN SgYjPsctJ","434","1","JRfZIAsbrPBZ","03779368305592","1111000","BkULuIi"}; 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) javafx.util.Pair;", "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 n ) { int nthElement = 19 + ( n - 1 ) * 9; int outliersCount = ( int ) log10 ( nthElement ) - 1; nthElement += 9 * outliersCount; return nthElement; } int f_filled ( int n ) {} gold ( int n ) { int nthElement = 19 + ( n - 1 ) * 9; int outliersCount = ( int ) log10 ( nthElement ) - 1; nthElement += 9 * outliersCount; return nthElement; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {68,70,69,93,99,44,91,8,83,51}; 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) [MASK] (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int nthElement = 19 + ( n - 1 ) * 9; int outliersCount = ( int ) log10 ( nthElement ) - 1; nthElement += 9 * outliersCount; return nthElement; } int f_filled ( int n ) {}gold ( int n ) { int nthElement = 19 + ( n - 1 ) * 9; int outliersCount = ( int ) log10 ( nthElement ) - 1; nthElement += 9 * outliersCount; return nthElement; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {68,70,69,93,99,44,91,8,83,51}; 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; }
(sizeof
[ "a) (sizeof", "b) f_gold(k):", "c) 1", "d) i", "e) int" ]
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 low, int high ) { int f1 = 0, f2 = 1, f3 = 1; int result = 0; while ( f1 <= high ) { if ( f1 >= low ) result ++; f1 = f2; f2 = f3; f3 = f1 + f2; } return result; } int f_filled ( int low, int high ) {} f2 = 1, f3 = 1; int result = 0; while ( f1 <= high ) { if ( f1 >= low ) result ++; f1 = f2; f2 = f3; f3 = f1 + f2; } return result; } int f_filled ( int low, int high ) {} int main(void) { int n_success = 0; int param0[] = {76,96,19,36,60,20,76,63,2,41}; int param1[] = {43,52,79,2,11,15,4,93,25,39}; 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 [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);} int f_gold ( int low, int high ) { int f1 = 0, f2 = 1, f3 = 1; int result = 0; while ( f1 <= high ) { if ( f1 >= low ) result ++; f1 = f2; f2 = f3; f3 = f1 + f2; } return result; } int f_filled ( int low, int high ) {}f2 = 1, f3 = 1; int result = 0; while ( f1 <= high ) { if ( f1 >= low ) result ++; f1 = f2; f2 = f3; f3 = f1 + f2; } return result; } int f_filled ( int low, int high ) {} int main(void) { int n_success = 0; int param0[] = {76,96,19,36,60,20,76,63,2,41}; int param1[] = {43,52,79,2,11,15,4,93,25,39}; 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) i", "b) 1", "c) void", "d) java.util.", "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 start, int end, int arr [ ] ) { unordered_map < int, int > frequency; for ( int i = start; i <= end; i ++ ) frequency [ arr [ i ] ] ++; int count = 0; for ( auto x : frequency ) if ( x . first == x . second ) count ++; return count; } int f_filled ( int start, int end, int arr [ ] ) {} ; i ++ ) frequency [ arr [ i ] ] ++; int count = 0; for ( auto x : frequency ) if ( x . first == x . second ) count ++; return count; } int f_filled ( int start, int end, int arr [ ] ) {} int main(void) { int n_success = 0; int param0[] = {0,1,3,10,2,0,14,29,31,21}; int param1[] = {31,25,4,15,3,6,18,33,19,32}; int param2_0[] = {1,2,2,3,3,3,12,13,18,18,26,28,29,36,37,39,40,49,55,57,63,69,69,73,85,86,87,87,89,89,90,91,92,93,93,93,95,99}; int param2_1[] = {24,-62,2,1,94,56,-22,-70,-22,-34,-92,-18,56,2,60,38,-88,16,-28,30,-30,58,-80,94,6,56}; int param2_2[] = {0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param2_3[] = {84,13,81,40,87,82,50,30,90,80,81,70,14,54,72,93,78,27,61}; int param2_4[] = {-20,20,34,60,90}; int param2_5[] = {1,0,0,0,0,0,0,0,0,0}; int param2_6[] = {11,18,18,19,25,30,42,42,56,58,63,66,67,68,69,75,78,83,83}; int param2_7[] = {-24,-82,24,-84,94,2,-30,86,58,-56,-96,60,-38,76,94,74,-98,-84,-38,46,4,-84,-90,-28,-50,46,16,28,-14,-82,-64,42,64,-2,-40,96,60,2,-86,32,38,-66}; int param2_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}; int param2_9[] = {2,91,42,85,97,92,24,39,63,89,31,59,51,89,72,62,26,92,75,4,6,13,20,95,22,30,52,60,37,27,49,15,67,26}; int *param2[10] = {param2_0,param2_1,param2_2,param2_3,param2_4,param2_5,param2_6,param2_7,param2_8,param2_9}; 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: [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 start, int end, int arr [ ] ) { unordered_map < int, int > frequency; for ( int i = start; i <= end; i ++ ) frequency [ arr [ i ] ] ++; int count = 0; for ( auto x : frequency ) if ( x . first == x . second ) count ++; return count; } int f_filled ( int start, int end, int arr [ ] ) {}; i ++ ) frequency [ arr [ i ] ] ++; int count = 0; for ( auto x : frequency ) if ( x . first == x . second ) count ++; return count; } int f_filled ( int start, int end, int arr [ ] ) {} int main(void) { int n_success = 0; int param0[] = {0,1,3,10,2,0,14,29,31,21}; int param1[] = {31,25,4,15,3,6,18,33,19,32}; int param2_0[] = {1,2,2,3,3,3,12,13,18,18,26,28,29,36,37,39,40,49,55,57,63,69,69,73,85,86,87,87,89,89,90,91,92,93,93,93,95,99}; int param2_1[] = {24,-62,2,1,94,56,-22,-70,-22,-34,-92,-18,56,2,60,38,-88,16,-28,30,-30,58,-80,94,6,56}; int param2_2[] = {0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param2_3[] = {84,13,81,40,87,82,50,30,90,80,81,70,14,54,72,93,78,27,61}; int param2_4[] = {-20,20,34,60,90}; int param2_5[] = {1,0,0,0,0,0,0,0,0,0}; int param2_6[] = {11,18,18,19,25,30,42,42,56,58,63,66,67,68,69,75,78,83,83}; int param2_7[] = {-24,-82,24,-84,94,2,-30,86,58,-56,-96,60,-38,76,94,74,-98,-84,-38,46,4,-84,-90,-28,-50,46,16,28,-14,-82,-64,42,64,-2,-40,96,60,2,-86,32,38,-66}; int param2_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}; int param2_9[] = {2,91,42,85,97,92,24,39,63,89,31,59,51,89,72,62,26,92,75,4,6,13,20,95,22,30,52,60,37,27,49,15,67,26}; int *param2[10] = {param2_0,param2_1,param2_2,param2_3,param2_4,param2_5,param2_6,param2_7,param2_8,param2_9}; 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; }
y;
[ "a) max", "b) x:", "c) for", "d) ]", "e) y;" ]
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 res [ n + 1 ]; res [ 0 ] = 0; res [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) res [ i ] = max ( i, ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) ); return res [ n ]; } int f_filled ( int n ) {} 0; res [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) res [ i ] = max ( i, ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) ); return res [ n ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {3,19,39,89,96,68,48,5,3,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 arr [ ], int [MASK] {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int res [ n + 1 ]; res [ 0 ] = 0; res [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) res [ i ] = max ( i, ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) ); return res [ n ]; } int f_filled ( int n ) {}0; res [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) res [ i ] = max ( i, ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) ); return res [ n ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {3,19,39,89,96,68,48,5,3,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; }
n)
[ "a) n)", "b) n", "c) x", "d) b)", "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 ( long n ) { int S = 0; for ( int i = 1; i <= n; i ++ ) S += i * i - ( i - 1 ) * ( i - 1 ); return S; } int f_filled ( long n ) {} n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( long n ) { int S = 0; for ( int i = 1; i <= n; i ++ ) S += i * i - ( i - 1 ) * ( i - 1 ); return S; } int f_filled ( long n ) {} int main(void) { int n_success = 0; long param0[] = {39,20,10,39,70,21,21,80,89,99}; 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 ( long n ) { [MASK] S = 0; for ( int i = 1; i <= n; i ++ ) S += i * i - ( i - 1 ) * ( i - 1 ); return S; } int f_filled ( long n ) {}n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( long n ) { int S = 0; for ( int i = 1; i <= n; i ++ ) S += i * i - ( i - 1 ) * ( i - 1 ); return S; } int f_filled ( long n ) {} int main(void) { int n_success = 0; long param0[] = {39,20,10,39,70,21,21,80,89,99}; 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) 9;", "c) j", "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 ) { sort ( a, a + n ); int num1 = 0; int num2 = 0; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) num1 = num1 * 10 + a [ i ]; else num2 = num2 * 10 + a [ i ]; } return num2 + num1; } int f_filled ( int a [ ], int n ) {} = 0; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) num1 = num1 * 10 + a [ i ]; else num2 = num2 * 10 + a [ i ]; } return num2 + num1; } int f_filled ( int a [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {4,16,29,30,38,83}; int param0_1[] = {58,74,-28,-60,-6,66,-76,46,0,-24,28,-16,-14,24,-94,-56,-80,40,-18,-68,-8,-94,-88,-12,-20,-8}; int param0_2[] = {0,1}; int param0_3[] = {7,12,78,8}; int param0_4[] = {-78,-48,-48,-26,8,34}; int param0_5[] = {1,1,1,1,0,1,1,1,0,1,0,1,0,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0}; int param0_6[] = {2,3,5,7,25,30,31,38,42,45,52,53,56,59,60,71,74,76,80,90,91,98}; int param0_7[] = {40,-62,-2,-58,60,38,48,-4,0,62,-52,-80,56,38,58,-72,32,-26,-14,70,58,-86,-32,56,-40,84,24,60,-46,-32,78,78,-66,20,-32,98,84,44,48,4,54,-66,6,-62,58}; int param0_8[] = {0,0,0,0,0,0,1,1,1}; int param0_9[] = {59,9,3,20,83,87,48,4,86,67,89,96,17,36,39,45,99,8,56,92,63,81,7,75,32,10,71,82,97,92,65,23,22,47,70,79,57,81,65,50}; 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,16,1,3,4,27,13,34,8,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; } [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 a [ ], int n ) { sort ( a, a + n ); int num1 = 0; int num2 = 0; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) num1 = num1 * 10 + a [ i ]; else num2 = num2 * 10 + a [ i ]; } return num2 + num1; } int f_filled ( int a [ ], int n ) {}= 0; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) num1 = num1 * 10 + a [ i ]; else num2 = num2 * 10 + a [ i ]; } return num2 + num1; } int f_filled ( int a [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {4,16,29,30,38,83}; int param0_1[] = {58,74,-28,-60,-6,66,-76,46,0,-24,28,-16,-14,24,-94,-56,-80,40,-18,-68,-8,-94,-88,-12,-20,-8}; int param0_2[] = {0,1}; int param0_3[] = {7,12,78,8}; int param0_4[] = {-78,-48,-48,-26,8,34}; int param0_5[] = {1,1,1,1,0,1,1,1,0,1,0,1,0,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0}; int param0_6[] = {2,3,5,7,25,30,31,38,42,45,52,53,56,59,60,71,74,76,80,90,91,98}; int param0_7[] = {40,-62,-2,-58,60,38,48,-4,0,62,-52,-80,56,38,58,-72,32,-26,-14,70,58,-86,-32,56,-40,84,24,60,-46,-32,78,78,-66,20,-32,98,84,44,48,4,54,-66,6,-62,58}; int param0_8[] = {0,0,0,0,0,0,1,1,1}; int param0_9[] = {59,9,3,20,83,87,48,4,86,67,89,96,17,36,39,45,99,8,56,92,63,81,7,75,32,10,71,82,97,92,65,23,22,47,70,79,57,81,65,50}; 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,16,1,3,4,27,13,34,8,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; }
int
[ "a) int", "b) class", "c) )", "d) <vector>", "e) y;" ]
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);} long long f_gold ( int n ) { if ( n < 0 ) return 0; if ( n <= 1 ) return 1; double x = ( ( n * log10 ( n / M_E ) + log10 ( 2 * M_PI * n ) / 2.0 ) ); return floor ( x ) + 1; } long long f_filled ( int n ) {} int n ) { if ( n < 0 ) return 0; if ( n <= 1 ) return 1; double x = ( ( n * log10 ( n / M_E ) + log10 ( 2 * M_PI * n ) / 2.0 ) ); return floor ( x ) + 1; } long long f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {56,92,52,96,96,63,51,79,70,9}; 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) [MASK] (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long f_gold ( int n ) { if ( n < 0 ) return 0; if ( n <= 1 ) return 1; double x = ( ( n * log10 ( n / M_E ) + log10 ( 2 * M_PI * n ) / 2.0 ) ); return floor ( x ) + 1; } long long f_filled ( int n ) {}int n ) { if ( n < 0 ) return 0; if ( n <= 1 ) return 1; double x = ( ( n * log10 ( n / M_E ) + log10 ( 2 * M_PI * n ) / 2.0 ) ); return floor ( x ) + 1; } long long f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {56,92,52,96,96,63,51,79,70,9}; 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; }
(sizeof
[ "a) (sizeof", "b) def", "c) );", "d) in", "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_map < int, int > vis; for ( int i = 0; i < n; ++ i ) vis [ arr [ i ] ] = 1; int k = len(vis); vis . clear ( ); int ans = 0, right = 0, window = 0; for ( int left = 0; left < n; ++ left ) { while ( right < n && window < k ) { ++ vis [ arr [ right ] ]; if ( vis [ arr [ right ] ] == 1 ) ++ window; ++ right; } if ( window == k ) ans += ( n - right + 1 ); -- vis [ arr [ left ] ]; if ( vis [ arr [ left ] ] == 0 ) -- window; } return ans; } int f_filled ( int arr [ ], int n ) {} ght; } if ( window == k ) ans += ( n - right + 1 ); -- vis [ arr [ left ] ]; if ( vis [ arr [ left ] ] == 0 ) -- window; } return ans; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {13,39,49,52,53,69,72,79,83,96}; int param0_1[] = {-98,-98,22,-10,-28,0,56,72,36,88,96,22,90,74,-60,-64,0,2,-42,0,94,-82,-74}; 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[] = {35,23,41,58,66,92,3,33,78,70,80,86,21,21,74,19}; int param0_4[] = {-98,-80,-52,-10,4,76}; int param0_5[] = {1,0,0,0,1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,0,1,0,1,1,1,0,0,0,1,1,0,1,1,1,1}; int param0_6[] = {2,7,10,17,26,36,37,85,87,88}; int param0_7[] = {64,-2,-94,-84,-48,86}; 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}; int param0_9[] = {91,49,94,81,64,5,13,70,82,9,80,82}; 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,20,26,12,3,36,8,5,20,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 > vis; for ( int i = 0; i < n; ++ i ) vis [ arr [ i ] ] = 1; int k = len(vis); vis . clear ( ); int ans = 0, right = 0, window = 0; for ( int left = 0; left < n; ++ left ) { while ( right < n && window < k ) { ++ vis [ arr [ right ] ]; if ( vis [ arr [MASK] right ] ] == 1 ) ++ window; ++ right; } if ( window == k ) ans += ( n - right + 1 ); -- vis [ arr [ left ] ]; if ( vis [ arr [ left ] ] == 0 ) -- window; } return ans; } int f_filled ( int arr [ ], int n ) {}ght; } if ( window == k ) ans += ( n - right + 1 ); -- vis [ arr [ left ] ]; if ( vis [ arr [ left ] ] == 0 ) -- window; } return ans; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {13,39,49,52,53,69,72,79,83,96}; int param0_1[] = {-98,-98,22,-10,-28,0,56,72,36,88,96,22,90,74,-60,-64,0,2,-42,0,94,-82,-74}; 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[] = {35,23,41,58,66,92,3,33,78,70,80,86,21,21,74,19}; int param0_4[] = {-98,-80,-52,-10,4,76}; int param0_5[] = {1,0,0,0,1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,0,1,0,1,1,1,0,0,0,1,1,0,1,1,1,1}; int param0_6[] = {2,7,10,17,26,36,37,85,87,88}; int param0_7[] = {64,-2,-94,-84,-48,86}; 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}; int param0_9[] = {91,49,94,81,64,5,13,70,82,9,80,82}; 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,20,26,12,3,36,8,5,20,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) int", "c) =", "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);} unsigned int f_gold ( unsigned int n ) { int res = 1, i; for ( i = 2; i <= n; i ++ ) res *= i; return res; } unsigned int f_filled ( unsigned int n ) {} arr, n, sizeof(int), cmpfunc);} unsigned int f_gold ( unsigned int n ) { int res = 1, i; for ( i = 2; i <= n; i ++ ) res *= i; return res; } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {57,28,23,79,52,42,79,77,99,70}; 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 [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);} unsigned int f_gold ( unsigned int n ) { int res = 1, i; for ( i = 2; i <= n; i ++ ) res *= i; return res; } unsigned int f_filled ( unsigned int n ) {}arr, n, sizeof(int), cmpfunc);} unsigned int f_gold ( unsigned int n ) { int res = 1, i; for ( i = 2; i <= n; i ++ ) res *= i; return res; } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {57,28,23,79,52,42,79,77,99,70}; 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) j", "b) <iostream>", "c) in", "d) void", "e) y)" ]
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 ) { n --; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; n ++; return n; } unsigned int f_filled ( unsigned int n ) {} );} unsigned int f_gold ( unsigned int n ) { n --; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; n ++; return n; } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {60,20,33,34,68,79,20,41,36,17}; 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] {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 ) { n --; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; n ++; return n; } unsigned int f_filled ( unsigned int n ) {});} unsigned int f_gold ( unsigned int n ) { n --; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; n ++; return n; } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {60,20,33,34,68,79,20,41,36,17}; 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) javafx.util.Pair;", "c) public", "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);} char f_gold [] ( double num, int k_prec ) { char binary [] = ""; int Integral = num; double fractional = num - Integral; while ( Integral ) { int rem = Integral % 2; binary . push_back ( rem + '0' ); Integral /= 2; } reverse ( binary . begin ( ), binary . end ( ) ); binary . push_back ( '.' ); while ( k_prec -- ) { fractional *= 2; int fract_bit = fractional; if ( fract_bit == 1 ) { fractional -= fract_bit; binary . push_back ( 1 + '0' ); } else binary . push_back ( 0 + '0' ); } return binary; } char f_filled [] ( double num, int k_prec ) {} == 1 ) { fractional -= fract_bit; binary . push_back ( 1 + '0' ); } else binary . push_back ( 0 + '0' ); } return binary; } char f_filled [] ( double num, int k_prec ) {} int main(void) { int n_success = 0; double param0[] = {669.1814271974272,-6553.367253116433,2087.729683310425,-953.9651645597713,8433.012733502104,-173.90092987443873,5301.037770893914,-1650.793567487302,6800.282512726602,-4080.798596227304}; int param1[] = {33,55,10,83,17,14,34,24,70,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 * 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 [] ( double num, int k_prec ) { char binary [] = ""; int Integral = num; double fractional = num - Integral; while ( Integral ) { int rem = Integral % 2; binary . push_back ( rem + '0' ); Integral /= 2; } reverse ( binary . begin ( ), binary . end ( ) ); binary . push_back ( '.' ); while ( k_prec -- ) { fractional *= 2; int fract_bit = fractional; if ( fract_bit == 1 ) { fractional -= fract_bit; binary . push_back ( 1 + '0' ); } else binary . push_back ( 0 + '0' ); } return binary; } char f_filled [] ( double num, int k_prec ) {} == 1 ) { fractional -= fract_bit; binary . push_back ( 1 + '0' ); } else binary . push_back ( 0 + '0' ); } return binary; } char f_filled [] ( double num, int k_prec ) {} int main(void) { int n_success = 0; double param0[] = {669.1814271974272,-6553.367253116433,2087.729683310425,-953.9651645597713,8433.012733502104,-173.90092987443873,5301.037770893914,-1650.793567487302,6800.282512726602,-4080.798596227304}; int param1[] = {33,55,10,83,17,14,34,24,70,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; }
*(int*)b
[ "a) -", "b) *(int*)b", "c) )", "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 n, int k, int a [ ] ) { sort ( a, a + n, greater < int > ( ) ); int f_gold = 0; for ( int i = 0; i < n; i += k ) f_gold += ( 2 * a [ i ] ); return f_gold; } int f_filled ( int n, int k, int a [ ] ) {} ] ) { sort ( a, a + n, greater < int > ( ) ); int f_gold = 0; for ( int i = 0; i < n; i += k ) f_gold += ( 2 * a [ i ] ); return f_gold; } int f_filled ( int n, int k, int a [ ] ) {} int main(void) { int n_success = 0; int param0[] = {17,2,0,16,31,28,9,32,17,19}; int param1[] = {15,2,0,27,23,33,10,26,22,15}; int param2_0[] = {1,4,8,18,24,34,38,38,39,39,41,53,56,57,63,72,73,77,79,99}; int param2_1[] = {-8,70,-90,-74}; int param2_2[] = {0}; int param2_3[] = {3,66,11,21,82,75,19,39,1,55,7,26,10,87,11,94,91,76,21,91,83,18,44,29,47,84,6,10,83,74,26,50}; int param2_4[] = {-96,-84,-80,-72,-60,-60,-58,-58,-52,-46,-36,-34,-32,-26,-22,-22,-20,-18,-14,-14,-6,-2,-2,0,2,4,18,22,24,38,42,46,50,58,72,78,82,84,90,96,96,96}; int param2_5[] = {0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1}; int param2_6[] = {8,13,17,19,24,33,43,54,63,74,79,83}; int param2_7[] = {0,52,20,40,-2,74,12,10,-56,68,-52,36,8,34,82,-64,-78,-22,-24,74,-54,62,-70,-76,-80,8,-24,84,-84,-74,-90,6,22,58,62,24,-74,50,92}; int param2_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 param2_9[] = {97,4,69,27,23,97,26,67,72,26,15,67,66,73,27,68,27,60,53,80,20,59,96,9,94,66,5,32}; int *param2[10] = {param2_0,param2_1,param2_2,param2_3,param2_4,param2_5,param2_6,param2_7,param2_8,param2_9}; 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 [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 n, int k, int a [ ] ) { sort ( a, a + n, greater < int > ( ) ); int f_gold = 0; for ( int i = 0; i < n; i += k ) f_gold += ( 2 * a [ i ] ); return f_gold; } int f_filled ( int n, int k, int a [ ] ) {} ] ) { sort ( a, a + n, greater < int > ( ) ); int f_gold = 0; for ( int i = 0; i < n; i += k ) f_gold += ( 2 * a [ i ] ); return f_gold; } int f_filled ( int n, int k, int a [ ] ) {} int main(void) { int n_success = 0; int param0[] = {17,2,0,16,31,28,9,32,17,19}; int param1[] = {15,2,0,27,23,33,10,26,22,15}; int param2_0[] = {1,4,8,18,24,34,38,38,39,39,41,53,56,57,63,72,73,77,79,99}; int param2_1[] = {-8,70,-90,-74}; int param2_2[] = {0}; int param2_3[] = {3,66,11,21,82,75,19,39,1,55,7,26,10,87,11,94,91,76,21,91,83,18,44,29,47,84,6,10,83,74,26,50}; int param2_4[] = {-96,-84,-80,-72,-60,-60,-58,-58,-52,-46,-36,-34,-32,-26,-22,-22,-20,-18,-14,-14,-6,-2,-2,0,2,4,18,22,24,38,42,46,50,58,72,78,82,84,90,96,96,96}; int param2_5[] = {0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1}; int param2_6[] = {8,13,17,19,24,33,43,54,63,74,79,83}; int param2_7[] = {0,52,20,40,-2,74,12,10,-56,68,-52,36,8,34,82,-64,-78,-22,-24,74,-54,62,-70,-76,-80,8,-24,84,-84,-74,-90,6,22,58,62,24,-74,50,92}; int param2_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 param2_9[] = {97,4,69,27,23,97,26,67,72,26,15,67,66,73,27,68,27,60,53,80,20,59,96,9,94,66,5,32}; int *param2[10] = {param2_0,param2_1,param2_2,param2_3,param2_4,param2_5,param2_6,param2_7,param2_8,param2_9}; 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; }
cmpfunc
[ "a) cmpfunc", "b) [", "c) 2", "d) <stdio.h>", "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 a [ n ], b [ n ]; a [ 0 ] = b [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { a [ i ] = a [ i - 1 ] + b [ i - 1 ]; b [ i ] = a [ i - 1 ]; } return ( 1 << n ) - a [ n - 1 ] - b [ n - 1 ]; } int f_filled ( int n ) {} ] = 1; for ( int i = 1; i < n; i ++ ) { a [ i ] = a [ i - 1 ] + b [ i - 1 ]; b [ i ] = a [ i - 1 ]; } return ( 1 << n ) - a [ n - 1 ] - b [ n - 1 ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {27,72,13,83,75,33,57,51,10,1}; 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);} int f_gold ( int n ) { int a [ n ], b [ n ]; a [ 0 ] = b [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { a [ i ] = a [ i - 1 ] + b [ i - 1 ]; b [ i ] = a [ i - 1 ]; } return ( 1 << n ) - a [ n - 1 ] - b [ n - 1 ]; } int f_filled ( int n ) {} ] = 1; for ( int i = 1; i < n; i ++ ) { a [ i ] = a [ i - 1 ] + b [ i - 1 ]; b [ i ] = a [ i - 1 ]; } return ( 1 << n ) - a [ n - 1 ] - b [ n - 1 ]; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {27,72,13,83,75,33,57,51,10,1}; 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) void", "c) ]", "d) useOdd", "e) (arr)" ]
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 ) { return accumulate ( arr, arr + n, 0 ) - ( ( n - 1 ) * n / 2 ); } int f_filled ( int arr [ ], int n ) {} [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { return accumulate ( arr, arr + n, 0 ) - ( ( n - 1 ) * n / 2 ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {4,8,27,34,39,42,43,54,72}; int param0_1[] = {-38,-66,-38,-48,-96,74,-32,-62,-34,-32,-88,-12,-8,-4}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}; int param0_3[] = {88,86,23,81,76,16,94,64,59,50,71,62,10,89,73,64,65,96,83,40,99,40,77,33,14,62,6,89,74,96,93,29,15,93,9,58,98,76,23,23,70,99}; int param0_4[] = {-96,-94,-82,-64,-56,-40,-36,-34,-32,-24,-24,-22,-20,-20,-20,-18,-18,-12,-10,-6,16,20,20,22,26,30,36,46,46,50,50,52,64,64,64,68,72,74,76,92,96,98}; int param0_5[] = {0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1}; int param0_6[] = {2,6,7,13,19,23,37,39,42,42,43,45,52,53,55,56,59,63,66,71,76,85,86,89,92,94,96,99}; int param0_7[] = {52,-56,-12,78,6,32,0,36,34,-54,-74,-32}; 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,1,1,1,1}; int param0_9[] = {10,42,50,5,74,81,30,76,6,34,86,4,77,71,96,22,34,50,35,16,60,11,21,38}; 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,9,8,31,28,25,27,11,15,13}; 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 [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);} int f_gold ( int arr [ ], int n ) { return accumulate ( arr, arr + n, 0 ) - ( ( n - 1 ) * n / 2 ); } int f_filled ( int arr [ ], int n ) {} [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { return accumulate ( arr, arr + n, 0 ) - ( ( n - 1 ) * n / 2 ); } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {4,8,27,34,39,42,43,54,72}; int param0_1[] = {-38,-66,-38,-48,-96,74,-32,-62,-34,-32,-88,-12,-8,-4}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}; int param0_3[] = {88,86,23,81,76,16,94,64,59,50,71,62,10,89,73,64,65,96,83,40,99,40,77,33,14,62,6,89,74,96,93,29,15,93,9,58,98,76,23,23,70,99}; int param0_4[] = {-96,-94,-82,-64,-56,-40,-36,-34,-32,-24,-24,-22,-20,-20,-20,-18,-18,-12,-10,-6,16,20,20,22,26,30,36,46,46,50,50,52,64,64,64,68,72,74,76,92,96,98}; int param0_5[] = {0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1}; int param0_6[] = {2,6,7,13,19,23,37,39,42,42,43,45,52,53,55,56,59,63,66,71,76,85,86,89,92,94,96,99}; int param0_7[] = {52,-56,-12,78,6,32,0,36,34,-54,-74,-32}; 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,1,1,1,1}; int param0_9[] = {10,42,50,5,74,81,30,76,6,34,86,4,77,71,96,22,34,50,35,16,60,11,21,38}; 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,9,8,31,28,25,27,11,15,13}; 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; }
<stdlib.h>
[ "a) <stdlib.h>", "b) false;", "c) <=", "d) =", "e) n" ]
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 ) { if ( n == 1 ) return true; int i; for ( i = 1; i < n && arr [ i - 1 ] < arr [ i ]; i ++ ); if ( i == n ) return true; int j = i; while ( arr [ j ] < arr [ j - 1 ] ) { if ( i > 1 && arr [ j ] < arr [ i - 2 ] ) return false; j ++; } if ( j == n ) return true; int k = j; if ( arr [ k ] < arr [ i - 1 ] ) return false; while ( k > 1 && k < n ) { if ( arr [ k ] < arr [ k - 1 ] ) return false; k ++; } return true; } bool f_filled ( int arr [ ], int n ) {} ( arr [ k ] < arr [ i - 1 ] ) return false; while ( k > 1 && k < n ) { if ( arr [ k ] < arr [ k - 1 ] ) return false; k ++; } return true; } bool f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,2,5,4,3}; int param0_1[] = {1,2,4,5,3}; int param0_2[] = {1,1,0,0}; int param0_3[] = {5,99,40,33,61,4,64,92,28,27,21,35,40,79,10,20,76,87,80,15,57,39,96,98,99,72,72,50,61,39,35,70,27}; int param0_4[] = {-98,-92,-86,-58,-22,-12,0,26}; int param0_5[] = {0,0,1,0,1,0,1,0,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,0,1,0,1,0,1,1,1,0,1,1,0}; int param0_6[] = {6,10,27,30,40,47,49,55,59,60,68,82,91}; int param0_7[] = {36,56,-56,94,52,-82,88,-62,70,-94,38,10,-78,66,-94,-72,18,96,-72,88,-6,48,6,-88,64,-96,-40,8,36,36,-90,-68,-20,-76,22,-92}; 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}; int param0_9[] = {2,5,42,28,47,26,88,16,30,30,36,49,21,95,99,21,41,52,57,39,69,2,42,22,55,92,64,27,95,71,19,38,40,65,7,21,29,38,13,11,41,54,38,40,35,51,88}; 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,5,4,32,6,24,8,30,31,46}; 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);} bool f_gold ( int arr [ ], int n ) { if ( n == 1 ) return true; int i; for ( i = 1; i < n && arr [ i - 1 ] < arr [ i ]; i ++ ); if ( i == n ) return true; int j = i; while ( arr [ j ] < arr [ j - 1 ] ) { if ( i > 1 && arr [ j ] < arr [ i - 2 ] ) return false; j ++; } if ( j == n ) return true; int k = j; if ( arr [ k ] < arr [ i - 1 ] ) return false; while ( k > 1 && k < n ) { if ( arr [ k ] < arr [ k - 1 ] ) return false; k ++; } return true; } bool f_filled ( int arr [ ], int n ) {} ( arr [ k ] < arr [ i - 1 ] ) return false; while ( k > 1 && k < n ) { if ( arr [ k ] < arr [ k - 1 ] ) return false; k ++; } return true; } bool f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,2,5,4,3}; int param0_1[] = {1,2,4,5,3}; int param0_2[] = {1,1,0,0}; int param0_3[] = {5,99,40,33,61,4,64,92,28,27,21,35,40,79,10,20,76,87,80,15,57,39,96,98,99,72,72,50,61,39,35,70,27}; int param0_4[] = {-98,-92,-86,-58,-22,-12,0,26}; int param0_5[] = {0,0,1,0,1,0,1,0,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,0,1,0,1,0,1,1,1,0,1,1,0}; int param0_6[] = {6,10,27,30,40,47,49,55,59,60,68,82,91}; int param0_7[] = {36,56,-56,94,52,-82,88,-62,70,-94,38,10,-78,66,-94,-72,18,96,-72,88,-6,48,6,-88,64,-96,-40,8,36,36,-90,-68,-20,-76,22,-92}; 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}; int param0_9[] = {2,5,42,28,47,26,88,16,30,30,36,49,21,95,99,21,41,52,57,39,69,2,42,22,55,92,64,27,95,71,19,38,40,65,7,21,29,38,13,11,41,54,38,40,35,51,88}; 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,5,4,32,6,24,8,30,31,46}; 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) [" ]
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);} char f_gold [] ( char str [] ) { int i = strlen(str) - 1; int start, end = i + 1; char result [] = ""; while ( i >= 0 ) { if ( str [ i ] == ' ' ) { start = i + 1; while ( start != end ) result += str [ start ++ ]; result += ' '; end = i; } i --; } start = 0; while ( start != end ) result += str [ start ++ ]; return result; } char f_filled [] ( char str [] ) {} str [ start ++ ]; result += ' '; end = i; } i --; } start = 0; while ( start != end ) result += str [ start ++ ]; return result; } char f_filled [] ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = { "m Dm YZ", "65 48 57 71", "01 010", "mT vhByi", "19 44 9 1", "0", "z vUi ", "7 591 36643 9 055", "01", "ti YGaijPY" }; 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 i = strlen(str) - 1; int start, end = i + 1; char result [] = ""; while ( i >= 0 ) { if ( str [ i ] == ' ' [MASK] { start = i + 1; while ( start != end ) result += str [ start ++ ]; result += ' '; end = i; } i --; } start = 0; while ( start != end ) result += str [ start ++ ]; return result; } char f_filled [] ( char str [] ) {} str [ start ++ ]; result += ' '; end = i; } i --; } start = 0; while ( start != end ) result += str [ start ++ ]; return result; } char f_filled [] ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = { "m Dm YZ", "65 48 57 71", "01 010", "mT vhByi", "19 44 9 1", "0", "z vUi ", "7 591 36643 9 055", "01", "ti YGaijPY" }; 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) ord", "c) ++", "d) int", "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);} unsigned int f_gold ( unsigned int n ) { if ( n == 0 ) return 1; return n * f_gold ( n - 1 ); } unsigned int f_filled ( unsigned int n ) {} ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} unsigned int f_gold ( unsigned int n ) { if ( n == 0 ) return 1; return n * f_gold ( n - 1 ); } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {77,62,42,16,82,37,29,32,82,91}; 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);} [MASK] int f_gold ( unsigned int n ) { if ( n == 0 ) return 1; return n * f_gold ( n - 1 ); } unsigned int f_filled ( unsigned int n ) {} ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} unsigned int f_gold ( unsigned int n ) { if ( n == 0 ) return 1; return n * f_gold ( n - 1 ); } unsigned int f_filled ( unsigned int n ) {} int main(void) { int n_success = 0; int param0[] = {77,62,42,16,82,37,29,32,82,91}; 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; }
unsigned
[ "a) #include", "b) 2", "c) unsigned", "d) )", "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 n, int k ) { int eggFloor [ n + 1 ] [ k + 1 ]; int res; int i, j, x; for ( i = 1; i <= n; i ++ ) { eggFloor [ i ] [ 1 ] = 1; eggFloor [ i ] [ 0 ] = 0; } for ( j = 1; j <= k; j ++ ) eggFloor [ 1 ] [ j ] = j; for ( i = 2; i <= n; i ++ ) { for ( j = 2; j <= k; j ++ ) { eggFloor [ i ] [ j ] = INT_MAX; for ( x = 1; x <= j; x ++ ) { res = 1 + max ( eggFloor [ i - 1 ] [ x - 1 ], eggFloor [ i ] [ j - x ] ); if ( res < eggFloor [ i ] [ j ] ) eggFloor [ i ] [ j ] = res; } } } return eggFloor [ n ] [ k ]; } int f_filled ( int n, int k ) {} ] [ x - 1 ], eggFloor [ i ] [ j - x ] ); if ( res < eggFloor [ i ] [ j ] ) eggFloor [ i ] [ j ] = res; } } } return eggFloor [ n ] [ k ]; } int f_filled ( int n, int k ) {} int main(void) { int n_success = 0; int param0[] = {42,16,24,95,49,39,63,17,45,40}; int param1[] = {34,18,3,58,98,92,68,80,41,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 [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 n, int k ) { int eggFloor [ n + 1 ] [ k + 1 ]; int res; int i, j, x; for ( i = 1; i <= n; i ++ ) { eggFloor [ i ] [ 1 ] = 1; eggFloor [ i ] [ 0 ] = 0; } for ( j = 1; j <= k; j ++ ) eggFloor [ 1 ] [ j ] = j; for ( i = 2; i <= n; i ++ ) { for ( j = 2; j <= k; j ++ ) { eggFloor [ i ] [ j ] = INT_MAX; for ( x = 1; x <= j; x ++ ) { res = 1 + max ( eggFloor [ i - 1 ] [ x - 1 ], eggFloor [ i ] [ j - x ] ); if ( res < eggFloor [ i ] [ j ] ) eggFloor [ i ] [ j ] = res; } } } return eggFloor [ n ] [ k ]; } int f_filled ( int n, int k ) {} ] [ x - 1 ], eggFloor [ i ] [ j - x ] ); if ( res < eggFloor [ i ] [ j ] ) eggFloor [ i ] [ j ] = res; } } } return eggFloor [ n ] [ k ]; } int f_filled ( int n, int k ) {} int main(void) { int n_success = 0; int param0[] = {42,16,24,95,49,39,63,17,45,40}; int param1[] = {34,18,3,58,98,92,68,80,41,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; }
cmpfunc
[ "a) return", "b) count", "c) )", "d) cmpfunc", "e) y;" ]
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 ( char s1 [], char s2 [] ) { int n = strlen(s1); int m = strlen(s2); bool dp [ n + 1 ] [ m + 1 ]; for ( int i = 0; i <= n; i ++ ) { for ( int j = 0; j <= m; j ++ ) { dp [ i ] [ j ] = false; } } dp [ 0 ] [ 0 ] = true; for ( int i = 0; i < strlen(s1); i ++ ) { for ( int j = 0; j <= strlen(s2); j ++ ) { if ( dp [ i ] [ j ] ) { if ( j < strlen(s2) && ( toupper ( s1 [ i ] ) == s2 [ j ] ) ) dp [ i + 1 ] [ j + 1 ] = true; if ( ! isupper ( s1 [ i ] ) ) dp [ i + 1 ] [ j ] = true; } } } return ( dp [ n ] [ m ] ); } bool f_filled ( char s1 [], char s2 [] ) {} ] ) ) dp [ i + 1 ] [ j + 1 ] = true; if ( ! isupper ( s1 [ i ] ) ) dp [ i + 1 ] [ j ] = true; } } } return ( dp [ n ] [ m ] ); } bool f_filled ( char s1 [], char s2 [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"daBcd","417514","010000","ZcKYguiMrdyn","argaju","1110101101","ySOCoSaygi","204","10011100000010","nMAioozPmY"}; char param1[][100] = {"ABC","9","1111011010","iz","RAJ","110101001","aRhxkYqh","6986871066","0","WZFdDKw"}; 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 s1 [], char s2 [] ) { int n = strlen(s1); int m = strlen(s2); bool dp [ n + 1 ] [ m + 1 ]; for ( int i = 0; i <= n; i ++ ) { for ( int j = 0; j <= m; j ++ ) { dp [ i ] [ j ] = false; } } dp [ 0 ] [ 0 ] = true; for ( int i = 0; i < strlen(s1); i ++ ) { for ( int j = 0; j <= strlen(s2); j ++ ) { if ( dp [ i ] [ j ] ) { if ( j < strlen(s2) && ( toupper ( s1 [ i ] ) == s2 [ j ] ) ) dp [ i + 1 ] [ j + 1 ] = true; if ( ! isupper ( s1 [ [MASK] ] ) ) dp [ i + 1 ] [ j ] = true; } } } return ( dp [ n ] [ m ] ); } bool f_filled ( char s1 [], char s2 [] ) {} ] ) ) dp [ i + 1 ] [ j + 1 ] = true; if ( ! isupper ( s1 [ i ] ) ) dp [ i + 1 ] [ j ] = true; } } } return ( dp [ n ] [ m ] ); } bool f_filled ( char s1 [], char s2 [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"daBcd","417514","010000","ZcKYguiMrdyn","argaju","1110101101","ySOCoSaygi","204","10011100000010","nMAioozPmY"}; char param1[][100] = {"ABC","9","1111011010","iz","RAJ","110101001","aRhxkYqh","6986871066","0","WZFdDKw"}; 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) import", "b) out", "c) (", "d) i", "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 low, int high ) { int fact = 1, x = 1; while ( fact < low ) { fact = fact * x; x ++; } int res = 0; while ( fact <= high ) { res ++; fact = fact * x; x ++; } return res; } int f_filled ( int low, int high ) {} ( fact < low ) { fact = fact * x; x ++; } int res = 0; while ( fact <= high ) { res ++; fact = fact * x; x ++; } return res; } int f_filled ( int low, int high ) {} int main(void) { int n_success = 0; int param0[] = {57,57,31,62,49,82,31,5,76,55}; int param1[] = {79,21,37,87,98,76,45,52,43,6}; 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 low, int high ) { int fact = 1, x = 1; while ( fact < low ) { fact = fact * x; [MASK] ++; } int res = 0; while ( fact <= high ) { res ++; fact = fact * x; x ++; } return res; } int f_filled ( int low, int high ) {} ( fact < low ) { fact = fact * x; x ++; } int res = 0; while ( fact <= high ) { res ++; fact = fact * x; x ++; } return res; } int f_filled ( int low, int high ) {} int main(void) { int n_success = 0; int param0[] = {57,57,31,62,49,82,31,5,76,55}; int param1[] = {79,21,37,87,98,76,45,52,43,6}; 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) 3", "c) x", "d) result", "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 ) { for ( int i = 0; i < n; i ++ ) { int j; for ( j = 0; j < n; j ++ ) if ( i != j && arr [ i ] == arr [ j ] ) break; if ( j == n ) return arr [ i ]; } return - 1; } int f_filled ( int arr [ ], int n ) {} ) { int j; for ( j = 0; j < n; j ++ ) if ( i != j && arr [ i ] == arr [ j ] ) break; if ( j == n ) return arr [ i ]; } return - 1; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,2,3,4,6,6,7,9,10,13,16,23,30,32,36,42,42,43,44,47,48,48,49,52,52,53,55,56,58,59,60,60,63,67,68,68,74,75,76,80,81,81,83,83,86,87,91,92,97}; int param0_1[] = {-96,-46,-86,56,-72,50,18,8,50}; int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {19,10,49,40,34,21,63,51}; int param0_4[] = {-96,-96,-90,-88,-88,-84,-80,-76,-68,-64,-64,-52,-52,-52,-52,-50,-50,-48,-48,-40,-32,-26,-24,-22,-20,-14,-12,0,6,8,10,20,24,28,34,36,54,60,60,60,68,74,74,74,84,88,94}; int param0_5[] = {1,0,0,1,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,0}; int param0_6[] = {1,2,3,10,15,21,28,36,41,44,45,47,72,77,77,79,85}; int param0_7[] = {42,-84,42,36,-10,24,-62,60}; 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}; int param0_9[] = {2,21,42,92,65,62,75,43,81,17,92,86,37,63,27,97,24,61,85,49,84,7,14,19,60,55,68,79,8,12,75,12,92,79,42}; 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[] = {47,8,14,5,27,19,15,7,35,27}; 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 ) { for ( int i = 0; i < n; i ++ ) { int j; for ( j = 0; j < n; j ++ ) if ( i != j && arr [ i ] == arr [ j ] ) break; if ( j == n ) return arr [ i ]; } return - 1; [MASK] int f_filled ( int arr [ ], int n ) {}) { int j; for ( j = 0; j < n; j ++ ) if ( i != j && arr [ i ] == arr [ j ] ) break; if ( j == n ) return arr [ i ]; } return - 1; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,2,3,4,6,6,7,9,10,13,16,23,30,32,36,42,42,43,44,47,48,48,49,52,52,53,55,56,58,59,60,60,63,67,68,68,74,75,76,80,81,81,83,83,86,87,91,92,97}; int param0_1[] = {-96,-46,-86,56,-72,50,18,8,50}; int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {19,10,49,40,34,21,63,51}; int param0_4[] = {-96,-96,-90,-88,-88,-84,-80,-76,-68,-64,-64,-52,-52,-52,-52,-50,-50,-48,-48,-40,-32,-26,-24,-22,-20,-14,-12,0,6,8,10,20,24,28,34,36,54,60,60,60,68,74,74,74,84,88,94}; int param0_5[] = {1,0,0,1,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,0}; int param0_6[] = {1,2,3,10,15,21,28,36,41,44,45,47,72,77,77,79,85}; int param0_7[] = {42,-84,42,36,-10,24,-62,60}; 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}; int param0_9[] = {2,21,42,92,65,62,75,43,81,17,92,86,37,63,27,97,24,61,85,49,84,7,14,19,60,55,68,79,8,12,75,12,92,79,42}; 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[] = {47,8,14,5,27,19,15,7,35,27}; 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) 5", "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);} unsigned int f_gold ( unsigned int n, unsigned int d ) { return ( n & ( d - 1 ) ); } unsigned int f_filled ( unsigned int n, unsigned int d ) {} int n) {qsort (arr, n, sizeof(int), cmpfunc);} unsigned int f_gold ( unsigned int n, unsigned int d ) { return ( n & ( d - 1 ) ); } unsigned int f_filled ( unsigned int n, unsigned int d ) {} int main(void) { int n_success = 0; int param0[] = {54,39,35,9,62,16,93,32,39,63}; int param1[] = {59,84,81,60,68,16,96,38,62,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 [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);} unsigned int f_gold ( unsigned int n, unsigned int d ) { return ( n & ( d - 1 ) ); } unsigned int f_filled ( unsigned int n, unsigned int d ) {} int n) {qsort (arr, n, sizeof(int), cmpfunc);} unsigned int f_gold ( unsigned int n, unsigned int d ) { return ( n & ( d - 1 ) ); } unsigned int f_filled ( unsigned int n, unsigned int d ) {} int main(void) { int n_success = 0; int param0[] = {54,39,35,9,62,16,93,32,39,63}; int param1[] = {59,84,81,60,68,16,96,38,62,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; }
max(int
[ "a) max(int", "b) mid", "c) j", "d) ]", "e) <cstdlib>" ]
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 ( char str [] ) { vector < pair < char, int > > arr; arr . push_back ( { '@', - 1 } ); int maxlen = 0; for ( int i = 0; i < strlen(str); ++ i ) { arr . push_back ( { str [ i ], i } ); while ( len(arr) >= 3 && arr [ len(arr) - 3 ] . first == '1' && arr [ len(arr) - 2 ] . first == '0' && arr [ len(arr) - 1 ] . first == '0' ) { arr . pop_back ( ); arr . pop_back ( ); arr . pop_back ( ); } int tmp = arr . back ( ) . second; maxlen = max ( maxlen, i - tmp ); } return maxlen; } int f_filled ( char str [] ) {} arr . pop_back ( ); } int tmp = arr . back ( ) . second; maxlen = max ( maxlen, i - tmp ); } return maxlen; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"U","544","111"," cDQaNxpRSOe","42920062459","00100101","FiC","302746335230","1","ZBLHiwGreUR "}; 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 str [] ) { vector < pair < char, int > > arr; arr . push_back ( { '@', - 1 } ); int maxlen = 0; for ( int i = 0; i < strlen(str); ++ i ) { arr . push_back ( { str [ i ], i } ); while ( len(arr) >= 3 && arr [ len(arr) - 3 ] . first == '1' && arr [ len(arr) - 2 ] . first == '0' && arr [ len(arr) - 1 ] . first == '0' ) { arr . pop_back ( ); arr . pop_back ( [MASK] arr . pop_back ( ); } int tmp = arr . back ( ) . second; maxlen = max ( maxlen, i - tmp ); } return maxlen; } int f_filled ( char str [] ) {} arr . pop_back ( ); } int tmp = arr . back ( ) . second; maxlen = max ( maxlen, i - tmp ); } return maxlen; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"U","544","111"," cDQaNxpRSOe","42920062459","00100101","FiC","302746335230","1","ZBLHiwGreUR "}; 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) int", "b) (", "c) mid", "d) );", "e) false;" ]
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 ) { for ( int i = 0; i < n - 1; i ++ ) { if ( arr [ i ] > arr [ i + 1 ] ) { if ( arr [ i ] - arr [ i + 1 ] == 1 ) swap ( arr [ i ], arr [ i + 1 ] ); else return false; } } return true; } bool f_filled ( int arr [ ], int n ) {} i ] > arr [ i + 1 ] ) { if ( arr [ i ] - arr [ i + 1 ] == 1 ) swap ( arr [ i ], arr [ i + 1 ] ); else return false; } } return true; } bool f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,4,12,16,37,44,47,51,55,57,57,62,62,62,64,69,69,70,72,81,81,88,89,97}; int param0_1[] = {-86,0,14,-16,-12,-72,62,-34,-72,30,84,-60,84,-64,50,74,18,-82,-64,-64,-74,-56,86,84,-32,-10,20,4,8,96,82,26,42}; 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}; int param0_3[] = {48,66,83,12,77,98,18,33,21,16,28,24,46,43}; int param0_4[] = {-92,-58,-36,-28,-6,2,4,26,48,58,60,62,62,98}; int param0_5[] = {1,0,0,0,0,1}; int param0_6[] = {22,38,41,41,42,51,54,58,68,76,80,85}; int param0_7[] = {84,-38,52,-72,-24,82,54,74,0}; int param0_8[] = {0,1,1}; int param0_9[] = {63,31,14,19,77,64,62,23,22,19,39,9,79,1,87,29,58,3,3,39,1,39,35,64,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[] = {15,18,31,13,10,4,9,8,2,13}; 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 ( int arr [ ], int n ) { for ( int i = 0; i < n [MASK] 1; i ++ ) { if ( arr [ i ] > arr [ i + 1 ] ) { if ( arr [ i ] - arr [ i + 1 ] == 1 ) swap ( arr [ i ], arr [ i + 1 ] ); else return false; } } return true; } bool f_filled ( int arr [ ], int n ) {} i ] > arr [ i + 1 ] ) { if ( arr [ i ] - arr [ i + 1 ] == 1 ) swap ( arr [ i ], arr [ i + 1 ] ); else return false; } } return true; } bool f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,4,12,16,37,44,47,51,55,57,57,62,62,62,64,69,69,70,72,81,81,88,89,97}; int param0_1[] = {-86,0,14,-16,-12,-72,62,-34,-72,30,84,-60,84,-64,50,74,18,-82,-64,-64,-74,-56,86,84,-32,-10,20,4,8,96,82,26,42}; 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}; int param0_3[] = {48,66,83,12,77,98,18,33,21,16,28,24,46,43}; int param0_4[] = {-92,-58,-36,-28,-6,2,4,26,48,58,60,62,62,98}; int param0_5[] = {1,0,0,0,0,1}; int param0_6[] = {22,38,41,41,42,51,54,58,68,76,80,85}; int param0_7[] = {84,-38,52,-72,-24,82,54,74,0}; int param0_8[] = {0,1,1}; int param0_9[] = {63,31,14,19,77,64,62,23,22,19,39,9,79,1,87,29,58,3,3,39,1,39,35,64,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[] = {15,18,31,13,10,4,9,8,2,13}; 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) 1", "b) y)?", "c) -", "d) i", "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 a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) { unordered_set < int > s; for ( int i = 0; i < n1; i ++ ) s . insert ( a1 [ i ] ); for ( int i = 0; i < n2; i ++ ) { for ( int j = 0; j < n3; j ++ ) { if ( s . find ( sum - a2 [ i ] - a3 [ j ] ) != s . end ( ) ) return true; } } return false; } bool f_filled ( int a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) {} if ( s . find ( sum - a2 [ i ] - a3 [ j ] ) != s . end ( ) ) return true; } } return false; } bool f_filled ( int a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) {} int main(void) { int n_success = 0; int param0_0[] = {6,7,10,15,28,30,30,35,38,43,44,44,54,55,64,68,69,73,75,75,86,87,92,93,94}; int param0_1[] = {-72,-90,-92,4,22,14,-50,16,-56,-66,62,-32,82,8,12,-24,92,-98,-94,56,-74,-66,26,-98,10,-74,-14,2,60,-88,-84,34,82,28,-86,-90,-92,52,72,90,92,-20,-86,74,-96,-46,28}; int param0_2[] = {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[] = {85,34,78,64,22,94,52,71,44,48,46,88,59,95,4,55,21,83,56,19,85,6,87,13}; int param0_4[] = {-98,-98,-96,-94,-90,-90,-84,-36,-34,-34,-32,16,26,26,56,74,80}; int param0_5[] = {1,1,1,0,0,0,1,1,1,1}; int param0_6[] = {4,4,25,27,35,39,50,60,60,63,67,73,75,81,84,85,91,98}; int param0_7[] = {54,-64,76,78,24,40,44,-56,80,-10,-12,-8,-18,42,70,14,-70,48,-68,-98,-74,-40,-16,-90,48,92,-64,58,-98,60,-10,-10}; 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,1,1,1,1,1,1,1,1}; int param0_9[] = {28,88,75,86,51,82,2,20,22,18,96,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[] = {11,17,18,24,26,26,33,35,38,41,55,60,63,63,69,73,78,81,82,87,90,91,93,94,99}; int param1_1[] = {50,-20,26,32,-46,38,36,0,-96,60,-70,-36,-12,50,64,-70,22,-22,32,60,-94,98,-58,-86,-16,40,-68,2,-50,6,-36,-28,-68,44,-98,-38,-46,68,4,60,-36,28,-38,4,50,-84,-12}; int param1_2[] = {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_3[] = {58,45,14,13,73,82,34,78,83,84,39,34,65,84,84,61,26,67,48,51,41,46,89,10}; int param1_4[] = {-92,-70,-70,-56,-54,-48,-38,-14,-10,0,4,30,34,70,72,76,78}; int param1_5[] = {0,0,1,0,0,1,0,1,0,1}; int param1_6[] = {20,21,23,25,37,41,51,57,62,66,74,77,77,79,80,87,88,95}; int param1_7[] = {88,-66,-50,74,-44,-32,-58,-24,-40,62,52,88,-48,-2,-46,38,30,-56,76,56,60,52,-32,36,90,92,-74,88,-36,-14,-16,-14}; int param1_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,1,1,1,1,1,1,1,1}; int param1_9[] = {62,54,79,88,27,13,48,94,86,28,86,60}; 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_0[] = {3,3,8,22,24,24,28,30,32,32,34,39,40,45,46,50,54,59,75,78,79,90,95,95,97}; int param2_1[] = {-28,20,-62,-84,14,10,28,-10,94,-2,52,66,38,-50,48,-88,-28,92,-48,86,4,-16,26,26,-82,44,70,72,-6,-98,80,56,38,42,-20,64,36,80,12,4,-50,54,22,98,-30,-52,4}; int param2_2[] = {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}; int param2_3[] = {46,1,2,90,31,49,62,10,28,4,48,84,87,51,88,74,99,15,35,24,32,66,10,66}; int param2_4[] = {-92,-88,-70,-56,-50,-50,-48,-36,-20,-10,-8,2,16,22,48,70,78}; int param2_5[] = {1,1,1,1,0,1,1,1,0,1}; int param2_6[] = {2,3,9,10,10,18,24,40,41,47,68,69,70,86,90,95,96,98}; int param2_7[] = {38,-96,16,38,-48,-22,-52,-78,42,94,-26,-20,12,-10,72,16,-8,-2,-36,-76,-6,-92,10,34,-76,-54,-20,20,-76,-46,24,44}; int param2_8[] = {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}; int param2_9[] = {49,14,18,61,94,54,12,56,97,59,85,44}; 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[] = {21,41,26,15,15,5,12,23,38,6}; int param4[] = {16,42,20,16,10,7,17,18,22,6}; int param5[] = {17,34,30,23,15,9,13,29,40,8}; int param6[] = {18,32,16,15,15,6,9,19,32,9}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i],param6[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i],param6[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 a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) { unordered_set < int > s; for ( int i = 0; i < n1; i ++ ) s . insert ( a1 [ [MASK] ] ); for ( int i = 0; i < n2; i ++ ) { for ( int j = 0; j < n3; j ++ ) { if ( s . find ( sum - a2 [ i ] - a3 [ j ] ) != s . end ( ) ) return true; } } return false; } bool f_filled ( int a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) {} if ( s . find ( sum - a2 [ i ] - a3 [ j ] ) != s . end ( ) ) return true; } } return false; } bool f_filled ( int a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) {} int main(void) { int n_success = 0; int param0_0[] = {6,7,10,15,28,30,30,35,38,43,44,44,54,55,64,68,69,73,75,75,86,87,92,93,94}; int param0_1[] = {-72,-90,-92,4,22,14,-50,16,-56,-66,62,-32,82,8,12,-24,92,-98,-94,56,-74,-66,26,-98,10,-74,-14,2,60,-88,-84,34,82,28,-86,-90,-92,52,72,90,92,-20,-86,74,-96,-46,28}; int param0_2[] = {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[] = {85,34,78,64,22,94,52,71,44,48,46,88,59,95,4,55,21,83,56,19,85,6,87,13}; int param0_4[] = {-98,-98,-96,-94,-90,-90,-84,-36,-34,-34,-32,16,26,26,56,74,80}; int param0_5[] = {1,1,1,0,0,0,1,1,1,1}; int param0_6[] = {4,4,25,27,35,39,50,60,60,63,67,73,75,81,84,85,91,98}; int param0_7[] = {54,-64,76,78,24,40,44,-56,80,-10,-12,-8,-18,42,70,14,-70,48,-68,-98,-74,-40,-16,-90,48,92,-64,58,-98,60,-10,-10}; 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,1,1,1,1,1,1,1,1}; int param0_9[] = {28,88,75,86,51,82,2,20,22,18,96,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[] = {11,17,18,24,26,26,33,35,38,41,55,60,63,63,69,73,78,81,82,87,90,91,93,94,99}; int param1_1[] = {50,-20,26,32,-46,38,36,0,-96,60,-70,-36,-12,50,64,-70,22,-22,32,60,-94,98,-58,-86,-16,40,-68,2,-50,6,-36,-28,-68,44,-98,-38,-46,68,4,60,-36,28,-38,4,50,-84,-12}; int param1_2[] = {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_3[] = {58,45,14,13,73,82,34,78,83,84,39,34,65,84,84,61,26,67,48,51,41,46,89,10}; int param1_4[] = {-92,-70,-70,-56,-54,-48,-38,-14,-10,0,4,30,34,70,72,76,78}; int param1_5[] = {0,0,1,0,0,1,0,1,0,1}; int param1_6[] = {20,21,23,25,37,41,51,57,62,66,74,77,77,79,80,87,88,95}; int param1_7[] = {88,-66,-50,74,-44,-32,-58,-24,-40,62,52,88,-48,-2,-46,38,30,-56,76,56,60,52,-32,36,90,92,-74,88,-36,-14,-16,-14}; int param1_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,1,1,1,1,1,1,1,1}; int param1_9[] = {62,54,79,88,27,13,48,94,86,28,86,60}; 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_0[] = {3,3,8,22,24,24,28,30,32,32,34,39,40,45,46,50,54,59,75,78,79,90,95,95,97}; int param2_1[] = {-28,20,-62,-84,14,10,28,-10,94,-2,52,66,38,-50,48,-88,-28,92,-48,86,4,-16,26,26,-82,44,70,72,-6,-98,80,56,38,42,-20,64,36,80,12,4,-50,54,22,98,-30,-52,4}; int param2_2[] = {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}; int param2_3[] = {46,1,2,90,31,49,62,10,28,4,48,84,87,51,88,74,99,15,35,24,32,66,10,66}; int param2_4[] = {-92,-88,-70,-56,-50,-50,-48,-36,-20,-10,-8,2,16,22,48,70,78}; int param2_5[] = {1,1,1,1,0,1,1,1,0,1}; int param2_6[] = {2,3,9,10,10,18,24,40,41,47,68,69,70,86,90,95,96,98}; int param2_7[] = {38,-96,16,38,-48,-22,-52,-78,42,94,-26,-20,12,-10,72,16,-8,-2,-36,-76,-6,-92,10,34,-76,-54,-20,20,-76,-46,24,44}; int param2_8[] = {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}; int param2_9[] = {49,14,18,61,94,54,12,56,97,59,85,44}; 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[] = {21,41,26,15,15,5,12,23,38,6}; int param4[] = {16,42,20,16,10,7,17,18,22,6}; int param5[] = {17,34,30,23,15,9,13,29,40,8}; int param6[] = {18,32,16,15,15,6,9,19,32,9}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i],param6[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i],param6[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
i
[ "a) i", "b) }", "c) k", "d) INT_MAX;", "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 s [] ) { int n = strlen(s); s [ 0 ] = tolower ( s [ 0 ] ); for ( int i = 1; i < n; i ++ ) { if ( s [ i ] == ' ' && i < n ) { s [ i + 1 ] = tolower ( s [ i + 1 ] ); i ++; } else s [ i ] = toupper ( s [ i ] ); } return s; } char f_filled [] ( char s [] ) {} ) { if ( s [ i ] == ' ' && i < n ) { s [ i + 1 ] = tolower ( s [ i + 1 ] ); i ++; } else s [ i ] = toupper ( s [ i ] ); } return s; } char f_filled [] ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"TEYndweqZA","01865","11001100","CzwznJmQet","318305446","0000001111110","yzT","38630230","01101","zoizI"}; 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 s [] ) { int n = strlen(s); s [ 0 ] = tolower ( s [ 0 ] [MASK] for ( int i = 1; i < n; i ++ ) { if ( s [ i ] == ' ' && i < n ) { s [ i + 1 ] = tolower ( s [ i + 1 ] ); i ++; } else s [ i ] = toupper ( s [ i ] ); } return s; } char f_filled [] ( char s [] ) {}) { if ( s [ i ] == ' ' && i < n ) { s [ i + 1 ] = tolower ( s [ i + 1 ] ); i ++; } else s [ i ] = toupper ( s [ i ] ); } return s; } char f_filled [] ( char s [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"TEYndweqZA","01865","11001100","CzwznJmQet","318305446","0000001111110","yzT","38630230","01101","zoizI"}; 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) arr", "b) <", "c) );", "d) 3", "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);} float f_gold ( float a, float b ) { return ( ( 2 * a ) + ( 2 * b ) ); } float f_filled ( float a, float b ) {} rr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} float f_gold ( float a, float b ) { return ( ( 2 * a ) + ( 2 * b ) ); } float f_filled ( float a, float b ) {} int main(void) { int n_success = 0; float param0[] = {801.0366882228715F,-7069.610056819919F,7723.966966568705F,-7935.859205856963F,6094.247432557289F,-7371.490363309265F,8368.473889617526F,-3761.921143166053F,3139.1089185587884F,-5218.286665567171F}; float param1[] = {456.71190645582783F,-4226.483870778477F,5894.65405158763F,-5333.225064296693F,1660.420120702062F,-1095.4543576847332F,4735.838330834498F,-5315.871691690649F,6490.194159517967F,-8265.153014320813F}; for(int i = 0; i < len(param0); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[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 [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);} float f_gold ( float a, float b ) { return ( ( 2 * a ) + ( 2 * b ) ); } float f_filled ( float a, float b ) {}rr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} float f_gold ( float a, float b ) { return ( ( 2 * a ) + ( 2 * b ) ); } float f_filled ( float a, float b ) {} int main(void) { int n_success = 0; float param0[] = {801.0366882228715F,-7069.610056819919F,7723.966966568705F,-7935.859205856963F,6094.247432557289F,-7371.490363309265F,8368.473889617526F,-3761.921143166053F,3139.1089185587884F,-5218.286665567171F}; float param1[] = {456.71190645582783F,-4226.483870778477F,5894.65405158763F,-5333.225064296693F,1660.420120702062F,-1095.4543576847332F,4735.838330834498F,-5315.871691690649F,6490.194159517967F,-8265.153014320813F}; for(int i = 0; i < len(param0); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
>
[ "a) {", "b) int", "c) >", "d) (", "e) itr" ]
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 k ) { if ( m <= n - k + 1 ) return m + k - 1; m = m - ( n - k + 1 ); return ( m % n == 0 ) ? n : ( m % n ); } int f_filled ( int n, int m, int k ) {} func);} int f_gold ( int n, int m, int k ) { if ( m <= n - k + 1 ) return m + k - 1; m = m - ( n - k + 1 ); return ( m % n == 0 ) ? n : ( m % n ); } int f_filled ( int n, int m, int k ) {} int main(void) { int n_success = 0; int param0[] = {19,23,92,9,20,68,66,77,90,26}; int param1[] = {14,51,10,50,67,25,30,22,1,34}; int param2[] = {34,5,24,34,20,40,24,32,71,54}; 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 [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 n, int m, int k ) { if ( m <= n - k + 1 ) return m + k - 1; m = m - ( n - k + 1 ); return ( m % n == 0 ) ? n : ( m % n ); } int f_filled ( int n, int m, int k ) {}func);} int f_gold ( int n, int m, int k ) { if ( m <= n - k + 1 ) return m + k - 1; m = m - ( n - k + 1 ); return ( m % n == 0 ) ? n : ( m % n ); } int f_filled ( int n, int m, int k ) {} int main(void) { int n_success = 0; int param0[] = {19,23,92,9,20,68,66,77,90,26}; int param1[] = {14,51,10,50,67,25,30,22,1,34}; int param2[] = {34,5,24,34,20,40,24,32,71,54}; 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; }
cmpfunc
[ "a) -", "b) \"", "c) ]", "d) cmpfunc", "e) table" ]
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 arr [ ], int n ) { vector < int > evenArr; vector < int > oddArr; for ( int i = 0; i < n; i ++ ) { if ( ! ( i % 2 ) ) evenArr . push_back ( arr [ i ] ); else oddArr . push_back ( arr [ i ] ); } sort ( evenArr . begin ( ), evenArr . end ( ) ); sort ( oddArr . begin ( ), oddArr . end ( ), greater < int > ( ) ); int i = 0; for ( int j = 0; j < len(evenArr); j ++ ) arr [ i ++ ] = evenArr [ j ]; for ( int j = 0; j < len(oddArr); j ++ ) arr [ i ++ ] = oddArr [ j ]; } void f_filled ( int arr [ ], int n ) {} for ( int j = 0; j < len(evenArr); j ++ ) arr [ i ++ ] = evenArr [ j ]; for ( int j = 0; j < len(oddArr); j ++ ) arr [ i ++ ] = oddArr [ j ]; } void f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {6,6,6,10,15,21,38,50,51,72,79,81,82,84,85,86,87}; int param0_1[] = {82,-36,18,-88,-24,20,26,-52,28,2}; int param0_2[] = {0,0,0,1,1,1}; int param0_3[] = {81,47,38,70,35,43,94,30,57,55,78,97,72,1}; int param0_4[] = {-80,-78,-72,-46,-26,-24,-20,8,16,26,38,44,54,68,68,78,86,92}; int param0_5[] = {0,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0}; int param0_6[] = {3,4,9,12,20,30,33,34,37,38,50,51,52,54,60,69,73,74,92,93,94,97,98}; int param0_7[] = {86,-32,64,-36,-36,-30,-66,-60,-76,-56,-60,-16,-60,-98,-18,72,-14}; 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}; int param0_9[] = {61,11,46,40,82,35,37,41,52,76,13,53,53,3,40,29,7,51,20,51,87,1,80,73,89,93,1,71,33,50,62,85,46,1,71,54,81,85}; 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,7,3,8,11,21,13,10,29,36}; int filled_function_param0_0[] = {6,6,6,10,15,21,38,50,51,72,79,81,82,84,85,86,87}; int filled_function_param0_1[] = {82,-36,18,-88,-24,20,26,-52,28,2}; int filled_function_param0_2[] = {0,0,0,1,1,1}; int filled_function_param0_3[] = {81,47,38,70,35,43,94,30,57,55,78,97,72,1}; int filled_function_param0_4[] = {-80,-78,-72,-46,-26,-24,-20,8,16,26,38,44,54,68,68,78,86,92}; int filled_function_param0_5[] = {0,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0}; int filled_function_param0_6[] = {3,4,9,12,20,30,33,34,37,38,50,51,52,54,60,69,73,74,92,93,94,97,98}; int filled_function_param0_7[] = {86,-32,64,-36,-36,-30,-66,-60,-76,-56,-60,-16,-60,-98,-18,72,-14}; int filled_function_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}; int filled_function_param0_9[] = {61,11,46,40,82,35,37,41,52,76,13,53,53,3,40,29,7,51,20,51,87,1,80,73,89,93,1,71,33,50,62,85,46,1,71,54,81,85}; 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,7,3,8,11,21,13,10,29,36}; 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 arr [ ], int n ) { vector < int > evenArr; vector < int > oddArr; for ( int i = 0; i < n; i ++ ) { if ( ! ( i % 2 ) ) evenArr . push_back ( arr [ i ] ); else oddArr . push_back ( arr [ i ] ); } sort ( evenArr . begin ( ), evenArr . end ( ) ); sort ( oddArr . begin ( ), oddArr . end ( ), greater [MASK] int > ( ) ); int i = 0; for ( int j = 0; j < len(evenArr); j ++ ) arr [ i ++ ] = evenArr [ j ]; for ( int j = 0; j < len(oddArr); j ++ ) arr [ i ++ ] = oddArr [ j ]; } void f_filled ( int arr [ ], int n ) {} for ( int j = 0; j < len(evenArr); j ++ ) arr [ i ++ ] = evenArr [ j ]; for ( int j = 0; j < len(oddArr); j ++ ) arr [ i ++ ] = oddArr [ j ]; } void f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {6,6,6,10,15,21,38,50,51,72,79,81,82,84,85,86,87}; int param0_1[] = {82,-36,18,-88,-24,20,26,-52,28,2}; int param0_2[] = {0,0,0,1,1,1}; int param0_3[] = {81,47,38,70,35,43,94,30,57,55,78,97,72,1}; int param0_4[] = {-80,-78,-72,-46,-26,-24,-20,8,16,26,38,44,54,68,68,78,86,92}; int param0_5[] = {0,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0}; int param0_6[] = {3,4,9,12,20,30,33,34,37,38,50,51,52,54,60,69,73,74,92,93,94,97,98}; int param0_7[] = {86,-32,64,-36,-36,-30,-66,-60,-76,-56,-60,-16,-60,-98,-18,72,-14}; 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}; int param0_9[] = {61,11,46,40,82,35,37,41,52,76,13,53,53,3,40,29,7,51,20,51,87,1,80,73,89,93,1,71,33,50,62,85,46,1,71,54,81,85}; 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,7,3,8,11,21,13,10,29,36}; int filled_function_param0_0[] = {6,6,6,10,15,21,38,50,51,72,79,81,82,84,85,86,87}; int filled_function_param0_1[] = {82,-36,18,-88,-24,20,26,-52,28,2}; int filled_function_param0_2[] = {0,0,0,1,1,1}; int filled_function_param0_3[] = {81,47,38,70,35,43,94,30,57,55,78,97,72,1}; int filled_function_param0_4[] = {-80,-78,-72,-46,-26,-24,-20,8,16,26,38,44,54,68,68,78,86,92}; int filled_function_param0_5[] = {0,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0}; int filled_function_param0_6[] = {3,4,9,12,20,30,33,34,37,38,50,51,52,54,60,69,73,74,92,93,94,97,98}; int filled_function_param0_7[] = {86,-32,64,-36,-36,-30,-66,-60,-76,-56,-60,-16,-60,-98,-18,72,-14}; int filled_function_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}; int filled_function_param0_9[] = {61,11,46,40,82,35,37,41,52,76,13,53,53,3,40,29,7,51,20,51,87,1,80,73,89,93,1,71,33,50,62,85,46,1,71,54,81,85}; 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,7,3,8,11,21,13,10,29,36}; 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) n", "b) <stdlib.h>", "c) m", "d) <", "e) else" ]
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);} long long int f_gold ( int n ) { long long int sum = 0; sum = 1 << n; return ( sum - 1 ); } long long int f_filled ( int n ) {} (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long int f_gold ( int n ) { long long int sum = 0; sum = 1 << n; return ( sum - 1 ); } long long int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {53,3,28,44,84,83,46,3,16,89}; 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 [MASK] int sum = 0; sum = 1 << n; return ( sum - 1 ); } long long int f_filled ( int n ) {}(int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long int f_gold ( int n ) { long long int sum = 0; sum = 1 << n; return ( sum - 1 ); } long long int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {53,3,28,44,84,83,46,3,16,89}; 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; }
long
[ "a) arr.sort", "b) *", "c) int", "d) )", "e) long" ]
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 brr [ 2 * n + 1 ]; for ( int i = 0; i < n; i ++ ) brr [ i ] = arr [ i ]; for ( int i = 0; i < n; i ++ ) brr [ n + i ] = arr [ i ]; int maxHam = 0; for ( int i = 1; i < n; i ++ ) { int currHam = 0; for ( int j = i, k = 0; j < ( i + n ); j ++, k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++; if ( currHam == n ) return n; maxHam = max ( maxHam, currHam ); } return maxHam; } int f_filled ( int arr [ ], int n ) {} ); j ++, k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++; if ( currHam == n ) return n; maxHam = max ( maxHam, currHam ); } return maxHam; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,4,18,22,28,34,35,39,44,45,67,73,75,79,81,83,89,93,96}; int param0_1[] = {52,-28}; 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,1,1}; int param0_3[] = {24}; int param0_4[] = {-68,14,36,62}; int param0_5[] = {1,0,1,1,1,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0}; int param0_6[] = {7,10,19,22,24,28,29,39,46,55,62,66,68,73,74,76,83,84,85,99}; int param0_7[] = {-38,56,86,12,24,-90,-20,-46,38,92,-44,-74,54,50,46,50,-94,64,32,-84,70}; int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {61,89,8}; 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,1,21,0,2,12,15,14,8,2}; 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 [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);} int f_gold ( int arr [ ], int n ) { int brr [ 2 * n + 1 ]; for ( int i = 0; i < n; i ++ ) brr [ i ] = arr [ i ]; for ( int i = 0; i < n; i ++ ) brr [ n + i ] = arr [ i ]; int maxHam = 0; for ( int i = 1; i < n; i ++ ) { int currHam = 0; for ( int j = i, k = 0; j < ( i + n ); j ++, k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++; if ( currHam == n ) return n; maxHam = max ( maxHam, currHam ); } return maxHam; } int f_filled ( int arr [ ], int n ) {}); j ++, k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++; if ( currHam == n ) return n; maxHam = max ( maxHam, currHam ); } return maxHam; } int f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,4,18,22,28,34,35,39,44,45,67,73,75,79,81,83,89,93,96}; int param0_1[] = {52,-28}; 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,1,1}; int param0_3[] = {24}; int param0_4[] = {-68,14,36,62}; int param0_5[] = {1,0,1,1,1,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0}; int param0_6[] = {7,10,19,22,24,28,29,39,46,55,62,66,68,73,74,76,83,84,85,99}; int param0_7[] = {-38,56,86,12,24,-90,-20,-46,38,92,-44,-74,54,50,46,50,-94,64,32,-84,70}; int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {61,89,8}; 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,1,21,0,2,12,15,14,8,2}; 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; }
<stdio.h>
[ "a) '", "b) n", "c) ;", "d) <stdio.h>", "e) 4;" ]
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 b ) { char s [] = to_string ( b ); int i; for ( i = 0; i < strlen(s); i ++ ) { if ( s [ i ] != '9' ) break; } int result; if ( i == strlen(s) ) result = a * strlen(s); else result = a * ( strlen(s) - 1 ); return result; } int f_filled ( int a, int b ) {} + ) { if ( s [ i ] != '9' ) break; } int result; if ( i == strlen(s) ) result = a * strlen(s); else result = a * ( strlen(s) - 1 ); return result; } int f_filled ( int a, int b ) {} int main(void) { int n_success = 0; int param0[] = {31,72,23,42,13,93,33,94,60,11}; int param1[] = {91,85,49,32,7,5,32,76,60,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 [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 ( int a, int b ) { char s [] = to_string ( b ); int i; for ( i = 0; i < strlen(s); i ++ ) { if ( s [ i ] != '9' ) break; } int result; if ( i == strlen(s) ) result = a * strlen(s); else result = a * ( strlen(s) - 1 ); return result; } int f_filled ( int a, int b ) {}+ ) { if ( s [ i ] != '9' ) break; } int result; if ( i == strlen(s) ) result = a * strlen(s); else result = a * ( strlen(s) - 1 ); return result; } int f_filled ( int a, int b ) {} int main(void) { int n_success = 0; int param0[] = {31,72,23,42,13,93,33,94,60,11}; int param1[] = {91,85,49,32,7,5,32,76,60,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; }
y)
[ "a) x:", "b) small", "c) )", "d) )", "e) y)" ]
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 k ) { int M, S = 0, S1 = 0, max_difference = 0; for ( int i = 0; i < N; i ++ ) S += arr [ i ]; sort ( arr, arr + N, greater < int > ( ) ); M = max ( k, N - k ); for ( int i = 0; i < M; i ++ ) S1 += arr [ i ]; max_difference = S1 - ( S - S1 ); return max_difference; } int f_filled ( int arr [ ], int N, int k ) {} > ( ) ); M = max ( k, N - k ); for ( int i = 0; i < M; i ++ ) S1 += arr [ i ]; max_difference = S1 - ( S - S1 ); return max_difference; } int f_filled ( int arr [ ], int N, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {1,5,5,9,9,19,22,24,27,33,39,39,40,41,42,43,44,45,48,52,52,53,53,55,55,56,57,57,60,60,61,62,65,66,67,70,71,72,73,77,78,79,84,87,89,91,95,98}; int param0_1[] = {-22,-28}; 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}; int param0_3[] = {63,72,2,94,89,11,95,79,90,9,70,28,25,74,16,36,50,91,38,47,47,13,27,29,31,35}; int param0_4[] = {-86,-78,-76,-76,-66,-62,-62,-38,-34,-32,-30,-26,-22,-4,-4,2,8,8,10,22,52,52,58,64,66,66,66,70,82,82}; int param0_5[] = {0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0}; int param0_6[] = {1,2,2,9,9,12,13,26,26,33,34,35,51,57,70,79,83}; int param0_7[] = {98,-72,2,40,-20,-14,42,8,14,-58,-18,-70,-8,-66,-68,72,82,-38,-78,2,-66,-88,-34,52,12,84,72,-28,-34,60,-60,12,-28,-42,22,-66,88,-96}; 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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {21,85,64,20,4,5,2}; 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[] = {41,1,20,23,29,42,9,28,37,5}; int param2[] = {44,1,29,16,24,32,16,28,27,6}; 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 arr [ ], int N, int k ) { int M, S = 0, S1 = 0, max_difference = 0; for ( int i = 0; [MASK] < N; i ++ ) S += arr [ i ]; sort ( arr, arr + N, greater < int > ( ) ); M = max ( k, N - k ); for ( int i = 0; i < M; i ++ ) S1 += arr [ i ]; max_difference = S1 - ( S - S1 ); return max_difference; } int f_filled ( int arr [ ], int N, int k ) {}> ( ) ); M = max ( k, N - k ); for ( int i = 0; i < M; i ++ ) S1 += arr [ i ]; max_difference = S1 - ( S - S1 ); return max_difference; } int f_filled ( int arr [ ], int N, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {1,5,5,9,9,19,22,24,27,33,39,39,40,41,42,43,44,45,48,52,52,53,53,55,55,56,57,57,60,60,61,62,65,66,67,70,71,72,73,77,78,79,84,87,89,91,95,98}; int param0_1[] = {-22,-28}; 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}; int param0_3[] = {63,72,2,94,89,11,95,79,90,9,70,28,25,74,16,36,50,91,38,47,47,13,27,29,31,35}; int param0_4[] = {-86,-78,-76,-76,-66,-62,-62,-38,-34,-32,-30,-26,-22,-4,-4,2,8,8,10,22,52,52,58,64,66,66,66,70,82,82}; int param0_5[] = {0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0}; int param0_6[] = {1,2,2,9,9,12,13,26,26,33,34,35,51,57,70,79,83}; int param0_7[] = {98,-72,2,40,-20,-14,42,8,14,-58,-18,-70,-8,-66,-68,72,82,-38,-78,2,-66,-88,-34,52,12,84,72,-28,-34,60,-60,12,-28,-42,22,-66,88,-96}; 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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {21,85,64,20,4,5,2}; 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[] = {41,1,20,23,29,42,9,28,37,5}; int param2[] = {44,1,29,16,24,32,16,28,27,6}; 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) k", "b) i", "c) W", "d) int", "e) max(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 ( char X [], char Y [] ) { int m = strlen(X); int n = strlen(Y); int result = 0; int len [ 2 ] [ n ]; int currRow = 0; for ( int i = 0; i <= m; i ++ ) { for ( int j = 0; j <= n; j ++ ) { if ( i == 0 || j == 0 ) { len [ currRow ] [ j ] = 0; } else if ( X [ i - 1 ] == Y [ j - 1 ] ) { len [ currRow ] [ j ] = len [ 1 - currRow ] [ j - 1 ] + 1; result = max ( result, len [ currRow ] [ j ] ); } else { len [ currRow ] [ j ] = 0; } } currRow = 1 - currRow; } return result; } int f_filled ( char X [], char Y [] ) {} ( result, len [ currRow ] [ j ] ); } else { len [ currRow ] [ j ] = 0; } } currRow = 1 - currRow; } return result; } int f_filled ( char X [], char Y [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"GeeksforGeeks","333940","1000","Facebook","2684247","111","abcdxyz","625330958530","01011000001111","KXm"}; char param1[][100] = {"GeeksQuiz","390","0","nice book","1","10","xyzabcd","412511","1001010001","gF"}; 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 [MASK] ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char X [], char Y [] ) { int m = strlen(X); int n = strlen(Y); int result = 0; int len [ 2 ] [ n ]; int currRow = 0; for ( int i = 0; i <= m; i ++ ) { for ( int j = 0; j <= n; j ++ ) { if ( i == 0 || j == 0 ) { len [ currRow ] [ j ] = 0; } else if ( X [ i - 1 ] == Y [ j - 1 ] ) { len [ currRow ] [ j ] = len [ 1 - currRow ] [ j - 1 ] + 1; result = max ( result, len [ currRow ] [ j ] ); } else { len [ currRow ] [ j ] = 0; } } currRow = 1 - currRow; } return result; } int f_filled ( char X [], char Y [] ) {}( result, len [ currRow ] [ j ] ); } else { len [ currRow ] [ j ] = 0; } } currRow = 1 - currRow; } return result; } int f_filled ( char X [], char Y [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"GeeksforGeeks","333940","1000","Facebook","2684247","111","abcdxyz","625330958530","01011000001111","KXm"}; char param1[][100] = {"GeeksQuiz","390","0","nice book","1","10","xyzabcd","412511","1001010001","gF"}; 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) i", "b) for", "c) (arr)[0]));}", "d) i", "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 a = 1, b = 2, c = 0; if ( n <= 2 ) { return n; } for ( int i = 3; i <= n; i ++ ) { c = b + ( i - 1 ) * a; a = b; b = c; } return c; } int f_filled ( int n ) {} int a = 1, b = 2, c = 0; if ( n <= 2 ) { return n; } for ( int i = 3; i <= n; i ++ ) { c = b + ( i - 1 ) * a; a = b; b = c; } return c; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {24,1,91,90,89,29,3,60,75,14}; 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 * [MASK] {return ( *(int*)a - *(int*)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 = 1, b = 2, c = 0; if ( n <= 2 ) { return n; } for ( int i = 3; i <= n; i ++ ) { c = b + ( i - 1 ) * a; a = b; b = c; } return c; } int f_filled ( int n ) {} int a = 1, b = 2, c = 0; if ( n <= 2 ) { return n; } for ( int i = 3; i <= n; i ++ ) { c = b + ( i - 1 ) * a; a = b; b = c; } return c; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {24,1,91,90,89,29,3,60,75,14}; 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; }
b)
[ "a) sum", "b) b)", "c) [", "d) f_filled", "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 S [ ], int n ) { bool found = false; sort ( S, S + n ); for ( int i = n - 1; i >= 0; i -- ) { for ( int j = 0; j < n; j ++ ) { if ( i == j ) continue; for ( int k = j + 1; k < n; k ++ ) { if ( i == k ) continue; for ( int l = k + 1; l < n; l ++ ) { if ( i == l ) continue; if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) { found = true; return S [ i ]; } } } } } if ( found == false ) return INT_MIN; } int f_filled ( int S [ ], int n ) {} S [ k ] + S [ l ] ) { found = true; return S [ i ]; } } } } } if ( found == false ) return INT_MIN; } int f_filled ( int S [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {8,12,14,15,16,20,27,28,29,30,35,41,46,51,53,55,55,58,63,64,72,73,75,75,75,82,82,86,89,91,92,94,95,95,97,97,98}; int param0_1[] = {-62,48,-22,-44,-58,-50,-82,34,26,-2,86,-44,92,-96,42,-20,10,74,-56,-12,-28,-40}; int param0_2[] = {0,0,0,0,0,0,0,1,1,1}; int param0_3[] = {84,58,10,67,77,66,10,47,65,55,54}; int param0_4[] = {-46,-28,-20,-18,4,8,18,38,90,90}; int param0_5[] = {0,1,1,1,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,1,0,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,1,0,0,1,0,1,0}; int param0_6[] = {11,13,14,21,26,28,36,39,41,42,43,44,49,49,57,58,59,59,63,64,67,69,70,75,78,79,83,83,86,91,92,93,96,96,96,97}; int param0_7[] = {74,52,-16,34,-88,62,54,46,-82,76,-48,54,50,-66,-18,78,-48,38,96,-32,-82,0,-76,46,-56,4,-30,-70,-62}; int param0_8[] = {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_9[] = {55,74,18,4,68,66,33,61,66,92,21,9,49,14,99,87,74,6,11,25,5,58,56,20}; 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[] = {24,19,8,5,6,35,30,16,17,23}; 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 S [ ], int n ) { bool found = false; sort ( S, S + n ); for ( int i = n - 1; i >= 0; i -- ) { for ( int j = 0; j < n; j ++ ) { if ( i == j ) continue; for ( int k = j + 1; k < n; k ++ ) { if ( i == k ) continue; for ( int l = k + 1; l < n; l ++ ) { if ( i == l ) continue; if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) { found = true; [MASK] S [ i ]; } } } } } if ( found == false ) return INT_MIN; } int f_filled ( int S [ ], int n ) {} S [ k ] + S [ l ] ) { found = true; return S [ i ]; } } } } } if ( found == false ) return INT_MIN; } int f_filled ( int S [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {8,12,14,15,16,20,27,28,29,30,35,41,46,51,53,55,55,58,63,64,72,73,75,75,75,82,82,86,89,91,92,94,95,95,97,97,98}; int param0_1[] = {-62,48,-22,-44,-58,-50,-82,34,26,-2,86,-44,92,-96,42,-20,10,74,-56,-12,-28,-40}; int param0_2[] = {0,0,0,0,0,0,0,1,1,1}; int param0_3[] = {84,58,10,67,77,66,10,47,65,55,54}; int param0_4[] = {-46,-28,-20,-18,4,8,18,38,90,90}; int param0_5[] = {0,1,1,1,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,1,0,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,1,0,0,1,0,1,0}; int param0_6[] = {11,13,14,21,26,28,36,39,41,42,43,44,49,49,57,58,59,59,63,64,67,69,70,75,78,79,83,83,86,91,92,93,96,96,96,97}; int param0_7[] = {74,52,-16,34,-88,62,54,46,-82,76,-48,54,50,-66,-18,78,-48,38,96,-32,-82,0,-76,46,-56,4,-30,-70,-62}; int param0_8[] = {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_9[] = {55,74,18,4,68,66,33,61,66,92,21,9,49,14,99,87,74,6,11,25,5,58,56,20}; 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[] = {24,19,8,5,6,35,30,16,17,23}; 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; }
return
[ "a) return", "b) ;", "c) i", "d) f_filled", "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 ( char n [] ) { int len = strlen(n); int count = 0; if ( len == 1 ) { int oneDigit = n [ 0 ] - '0'; if ( oneDigit % 8 == 0 ) return 1; return 0; } if ( len == 2 ) { int first = ( n [ 0 ] - '0' ) * 10 + ( n [ 1 ] - '0' ); int second = ( n [ 1 ] - '0' ) * 10 + ( n [ 0 ] - '0' ); if ( first % 8 == 0 ) count ++; if ( second % 8 == 0 ) count ++; return count; } int threeDigit; for ( int i = 0; i < ( len - 2 ); i ++ ) { threeDigit = ( n [ i ] - '0' ) * 100 + ( n [ i + 1 ] - '0' ) * 10 + ( n [ i + 2 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; } threeDigit = ( n [ len - 1 ] - '0' ) * 100 + ( n [ 0 ] - '0' ) * 10 + ( n [ 1 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; threeDigit = ( n [ len - 2 ] - '0' ) * 100 + ( n [ len - 1 ] - '0' ) * 10 + ( n [ 0 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; return count; } int f_filled ( char n [] ) {} ) count ++; threeDigit = ( n [ len - 2 ] - '0' ) * 100 + ( n [ len - 1 ] - '0' ) * 10 + ( n [ 0 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; return count; } int f_filled ( char n [] ) {} int main(void) { int n_success = 0; char param0[][100] = {" MwBVIb","37291205493","0111111","BrrQon","226051","1001101","eREctoEen","299967","000111","GJUYuqbampKo"}; 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 n [] ) { int len = strlen(n); int count = 0; if ( len == 1 ) { int oneDigit = n [ 0 ] - '0'; if ( oneDigit % 8 == 0 ) return 1; return 0; } if ( len == 2 ) { int first = ( n [ 0 ] - '0' ) * 10 + ( n [ 1 ] - '0' ); int second = ( n [ 1 ] - '0' ) * 10 + ( n [ 0 ] - '0' ); if ( first % 8 == 0 ) count ++; if ( second % 8 == 0 ) count ++; return count; } int threeDigit; for ( int i = 0; i < ( len - 2 ); i ++ ) { threeDigit = ( n [ i ] - '0' ) * 100 + ( n [ i + 1 ] - '0' ) * 10 + ( n [ i + 2 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; } threeDigit = ( n [ len - 1 ] - '0' ) * 100 + ( n [ 0 ] - '0' ) * 10 + ( n [ 1 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; threeDigit = ( n [ len - 2 ] - '0' ) * 100 + ( n [ len - 1 ] - '0' ) * 10 + ( n [ 0 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; return count; } [MASK] f_filled ( char n [] ) {}) count ++; threeDigit = ( n [ len - 2 ] - '0' ) * 100 + ( n [ len - 1 ] - '0' ) * 10 + ( n [ 0 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; return count; } int f_filled ( char n [] ) {} int main(void) { int n_success = 0; char param0[][100] = {" MwBVIb","37291205493","0111111","BrrQon","226051","1001101","eREctoEen","299967","000111","GJUYuqbampKo"}; 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) i", "b) sizeof", "c) sizeof(int),", "d) import", "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 n ) { int num = n; int dec_value = 0; int base = 1; int temp = num; while ( temp ) { int last_digit = temp % 10; temp = temp / 10; dec_value += last_digit * base; base = base * 2; } return dec_value; } int f_filled ( int n ) {} t temp = num; while ( temp ) { int last_digit = temp % 10; temp = temp / 10; dec_value += last_digit * base; base = base * 2; } return dec_value; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {70,95,41,97,8,16,41,57,81,78}; 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 num = n; int dec_value = 0; int base = 1; int temp = num; while ( temp ) { int last_digit = temp % 10; temp = temp / 10; dec_value += last_digit * base; base = base * 2; } return dec_value; } int [MASK] ( int n ) {}t temp = num; while ( temp ) { int last_digit = temp % 10; temp = temp / 10; dec_value += last_digit * base; base = base * 2; } return dec_value; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {70,95,41,97,8,16,41,57,81,78}; 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; }
f_filled
[ "a) a", "b) f_filled", "c) }", "d) out", "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, int k ) { priority_queue < int, vector < int >, greater < int > > pq; for ( int i = 0; i < n; i ++ ) pq . push ( arr [ i ] ); int count = 0, ans = 1; while ( pq . empty ( ) == false && count < k ) { ans = ans * pq . top ( ); pq . pop ( ); count ++; } return ans; } int f_filled ( int arr [ ], int n, int k ) {} nt = 0, ans = 1; while ( pq . empty ( ) == false && count < k ) { ans = ans * pq . top ( ); pq . pop ( ); count ++; } return ans; } int f_filled ( int arr [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {57,66,91}; int param0_1[] = {-44,86,28,-70,-12,96,-10,74,-50,-52,-6,64,-62,92,-24,90,-26,-4,-92,-24,-84,76,-92,62,-62,-86,-86,-14,50,30,62,2,-88,-78,-48}; int param0_2[] = {0,0,1,1}; int param0_3[] = {99,85,37,27,55,20,76,38,33,78,24,80,74,42,15,16,97,51,71,92,18,63,47,10,6,72,40,21,14,68,98,49,48,64,50,66,44,1,26,55,61,43,9,16,8,42,51,98,1}; int param0_4[] = {-58,-12,16,18,24}; int param0_5[] = {0,0,1,0,0,1,0,1,0,0,0,0,0,1,1,1}; int param0_6[] = {5,10,13,14,19,21,22,25,28,36,39,44,46,53,54,55,55,67,73,75,77,78,80,84,91,94,96}; int param0_7[] = {18,-44,46,64,86,-36,8,-10,-50,-98,-6,-38,-34,14,-34,86,58,-30,76,6,38,98,78,56,-56,-66,-58,62,92,-94}; int param0_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {69,74,28,75,84,52,5,19,80,12,76,14,28,63,30,29,16,74,28,48,97,77,62,19,67,26,14,44,52,86,9,31,41,14,66,27,36,98,48,37,2,12,2}; 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[] = {2,29,3,36,2,8,23,23,13,27}; int param2[] = {2,21,3,47,3,15,23,20,17,23}; 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 arr [ ], int n, int k ) { priority_queue < int, vector < int >, greater < int > > pq; for ( int i = 0; i < n; i ++ ) pq . [MASK] ( arr [ i ] ); int count = 0, ans = 1; while ( pq . empty ( ) == false && count < k ) { ans = ans * pq . top ( ); pq . pop ( ); count ++; } return ans; } int f_filled ( int arr [ ], int n, int k ) {}nt = 0, ans = 1; while ( pq . empty ( ) == false && count < k ) { ans = ans * pq . top ( ); pq . pop ( ); count ++; } return ans; } int f_filled ( int arr [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {57,66,91}; int param0_1[] = {-44,86,28,-70,-12,96,-10,74,-50,-52,-6,64,-62,92,-24,90,-26,-4,-92,-24,-84,76,-92,62,-62,-86,-86,-14,50,30,62,2,-88,-78,-48}; int param0_2[] = {0,0,1,1}; int param0_3[] = {99,85,37,27,55,20,76,38,33,78,24,80,74,42,15,16,97,51,71,92,18,63,47,10,6,72,40,21,14,68,98,49,48,64,50,66,44,1,26,55,61,43,9,16,8,42,51,98,1}; int param0_4[] = {-58,-12,16,18,24}; int param0_5[] = {0,0,1,0,0,1,0,1,0,0,0,0,0,1,1,1}; int param0_6[] = {5,10,13,14,19,21,22,25,28,36,39,44,46,53,54,55,55,67,73,75,77,78,80,84,91,94,96}; int param0_7[] = {18,-44,46,64,86,-36,8,-10,-50,-98,-6,-38,-34,14,-34,86,58,-30,76,6,38,98,78,56,-56,-66,-58,62,92,-94}; int param0_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {69,74,28,75,84,52,5,19,80,12,76,14,28,63,30,29,16,74,28,48,97,77,62,19,67,26,14,44,52,86,9,31,41,14,66,27,36,98,48,37,2,12,2}; 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[] = {2,29,3,36,2,8,23,23,13,27}; int param2[] = {2,21,3,47,3,15,23,20,17,23}; 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; }
push
[ "a) );}", "b) def", "c) return", "d) push", "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 ( char str [] ) { int n = strlen(str); if ( n == 0 ) return false; if ( n == 1 ) return ( ( str [ 0 ] - '0' ) % 4 == 0 ); int last = str [ n - 1 ] - '0'; int second_last = str [ n - 2 ] - '0'; return ( ( second_last * 10 + last ) % 4 == 0 ); } bool f_filled ( char str [] ) {} ( ( str [ 0 ] - '0' ) % 4 == 0 ); int last = str [ n - 1 ] - '0'; int second_last = str [ n - 2 ] - '0'; return ( ( second_last * 10 + last ) % 4 == 0 ); } bool f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"PjAFZXQgN","12325195609714","00101111101","xOtbXZiA","980","000000100","zFacc W","8","110011","afiutekeSfYrX"}; 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 [MASK] int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)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 n = strlen(str); if ( n == 0 ) return false; if ( n == 1 ) return ( ( str [ 0 ] - '0' ) % 4 == 0 ); int last = str [ n - 1 ] - '0'; int second_last = str [ n - 2 ] - '0'; return ( ( second_last * 10 + last ) % 4 == 0 ); } bool f_filled ( char str [] ) {} ( ( str [ 0 ] - '0' ) % 4 == 0 ); int last = str [ n - 1 ] - '0'; int second_last = str [ n - 2 ] - '0'; return ( ( second_last * 10 + last ) % 4 == 0 ); } bool f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"PjAFZXQgN","12325195609714","00101111101","xOtbXZiA","980","000000100","zFacc W","8","110011","afiutekeSfYrX"}; 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) public", "b) if", "c) )", "d) y)", "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);} int f_gold ( int arr [ ], int n, int m ) { if ( m == 0 || n == 0 ) return 0; sort ( arr, arr + n ); if ( n < m ) return - 1; int min_diff = INT_MAX; int first = 0, last = 0; for ( int i = 0; i + m - 1 < n; i ++ ) { int diff = arr [ i + m - 1 ] - arr [ i ]; if ( diff < min_diff ) { min_diff = diff; first = i; last = i + m - 1; } } return ( arr [ last ] - arr [ first ] ); } int f_filled ( int arr [ ], int n, int m ) {} ; if ( diff < min_diff ) { min_diff = diff; first = i; last = i + m - 1; } } return ( arr [ last ] - arr [ first ] ); } int f_filled ( int arr [ ], int n, int m ) {} int main(void) { int n_success = 0; int param0_0[] = {2,5,11,23,33,35,39,51,52,56,74,76,76,79,85,88,93,98}; int param0_1[] = {-42,76,-34,-74,16,4,88,-70,-88,-94,-24,4,-14,-56,56,-18,84,0,-48,-94,72,42,36,52,74,-84,-50,16,30}; int param0_2[] = {0,0,1,1,1,1}; int param0_3[] = {29,49,88,44,92,43,12,5,38,75,57,3,85,16,86,62,16,40,76,37,5,69,16,63,84,78,74,18,4,89,73,67,60}; int param0_4[] = {-98,-80,-50,-44,-42,-36,-36,-28,-10,-8,-4,-2,2,10,18,18,26,32,36,56,80,86,88,90}; int param0_5[] = {0,0,1,0,1,1,1,0,1,0,0,1,1,1,1,1}; int param0_6[] = {13,15,62,65,87}; int param0_7[] = {-50,58,78,28,4,18,-8,18,-88,-48,-26,-32,64,48,60,94,-92,48,-36,30,-80,-60,82,-62,32,-36,-76,-88,-60,22,-14,72,30}; int param0_8[] = {0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {25,17,58,40,53,73,23,77,38}; 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,15,5,25,16,13,3,31,9,8}; int param2[] = {13,28,5,18,12,14,4,17,6,6}; 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 arr [ ], int n, int m ) { if ( m == 0 || n == 0 ) return 0; sort ( arr, arr + n ); if ( n < m ) return - 1; int min_diff = INT_MAX; int first = 0, last = 0; for ( int i = 0; i + m - 1 < [MASK] i ++ ) { int diff = arr [ i + m - 1 ] - arr [ i ]; if ( diff < min_diff ) { min_diff = diff; first = i; last = i + m - 1; } } return ( arr [ last ] - arr [ first ] ); } int f_filled ( int arr [ ], int n, int m ) {}; if ( diff < min_diff ) { min_diff = diff; first = i; last = i + m - 1; } } return ( arr [ last ] - arr [ first ] ); } int f_filled ( int arr [ ], int n, int m ) {} int main(void) { int n_success = 0; int param0_0[] = {2,5,11,23,33,35,39,51,52,56,74,76,76,79,85,88,93,98}; int param0_1[] = {-42,76,-34,-74,16,4,88,-70,-88,-94,-24,4,-14,-56,56,-18,84,0,-48,-94,72,42,36,52,74,-84,-50,16,30}; int param0_2[] = {0,0,1,1,1,1}; int param0_3[] = {29,49,88,44,92,43,12,5,38,75,57,3,85,16,86,62,16,40,76,37,5,69,16,63,84,78,74,18,4,89,73,67,60}; int param0_4[] = {-98,-80,-50,-44,-42,-36,-36,-28,-10,-8,-4,-2,2,10,18,18,26,32,36,56,80,86,88,90}; int param0_5[] = {0,0,1,0,1,1,1,0,1,0,0,1,1,1,1,1}; int param0_6[] = {13,15,62,65,87}; int param0_7[] = {-50,58,78,28,4,18,-8,18,-88,-48,-26,-32,64,48,60,94,-92,48,-36,30,-80,-60,82,-62,32,-36,-76,-88,-60,22,-14,72,30}; int param0_8[] = {0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {25,17,58,40,53,73,23,77,38}; 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,15,5,25,16,13,3,31,9,8}; int param2[] = {13,28,5,18,12,14,4,17,6,6}; 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; }
n;
[ "a) close", "b) n;", "c) int", "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);} bool f_gold ( char str [] ) { int n = strlen(str); int dp [ n + 1 ] [ 10 ]; memset ( dp, 0, sizeof ( dp ) ); int arr [ n + 1 ]; for ( int i = 1; i <= n; i ++ ) arr [ i ] = str [ i - 1 ] - '0'; for ( int i = 1; i <= n; i ++ ) { dp [ i ] [ arr [ i ] % 8 ] = 1; for ( int j = 0; j < 8; j ++ ) { if ( dp [ i - 1 ] [ j ] > dp [ i ] [ ( j * 10 + arr [ i ] ) % 8 ] ) dp [ i ] [ ( j * 10 + arr [ i ] ) % 8 ] = dp [ i - 1 ] [ j ]; if ( dp [ i - 1 ] [ j ] > dp [ i ] [ j ] ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ]; } } for ( int i = 1; i <= n; i ++ ) { if ( dp [ i ] [ 0 ] == 1 ) return true; } return false; } bool f_filled ( char str [] ) {} ] [ j ] ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ]; } } for ( int i = 1; i <= n; i ++ ) { if ( dp [ i ] [ 0 ] == 1 ) return true; } return false; } bool f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"n jcjfyMoJEK","70507","0000111","YjRiCqr","4730248784","010101110","nLJV duUNH","27","1000","L"}; 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 str [] ) { int n = strlen(str); int dp [ n + 1 ] [ 10 ]; memset ( dp, 0, sizeof ( dp ) ); int arr [ n + 1 ]; for ( int i = 1; i <= n; i ++ [MASK] arr [ i ] = str [ i - 1 ] - '0'; for ( int i = 1; i <= n; i ++ ) { dp [ i ] [ arr [ i ] % 8 ] = 1; for ( int j = 0; j < 8; j ++ ) { if ( dp [ i - 1 ] [ j ] > dp [ i ] [ ( j * 10 + arr [ i ] ) % 8 ] ) dp [ i ] [ ( j * 10 + arr [ i ] ) % 8 ] = dp [ i - 1 ] [ j ]; if ( dp [ i - 1 ] [ j ] > dp [ i ] [ j ] ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ]; } } for ( int i = 1; i <= n; i ++ ) { if ( dp [ i ] [ 0 ] == 1 ) return true; } return false; } bool f_filled ( char str [] ) {}] [ j ] ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ]; } } for ( int i = 1; i <= n; i ++ ) { if ( dp [ i ] [ 0 ] == 1 ) return true; } return false; } bool f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"n jcjfyMoJEK","70507","0000111","YjRiCqr","4730248784","010101110","nLJV duUNH","27","1000","L"}; 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) for", "b) +", "c) Math", "d) nextHigherOneBit", "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 ( string & str ) { int n = strlen(str); int res = - 1; for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( str [ i ] == str [ j ] ) res = max ( res, abs ( j - i - 1 ) ); return res; } int f_filled ( string & str ) {} for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( str [ i ] == str [ j ] ) res = max ( res, abs ( j - i - 1 ) ); return res; } int f_filled ( string & str ) {} int main(void) { int n_success = 0; char param0[][100] = {"cI","76478","1","tr","10","01","Rmhzp","5784080133917","1100","OK"}; 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 ( string & str ) { int n = strlen(str); int res = - 1; for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( str [ i ] == str [ j ] ) res = max ( res, abs ( j - i - 1 ) ); return res; } int f_filled ( string & str ) {} for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( str [ i ] == str [ j ] ) res = max ( res, abs ( j - i - 1 ) ); return res; } int f_filled ( string & str ) {} int main(void) { int n_success = 0; char param0[][100] = {"cI","76478","1","tr","10","01","Rmhzp","5784080133917","1100","OK"}; 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) fact", "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 weight [ ], int n, int c ) { int res = 0, bin_rem = c; for ( int i = 0; i < n; i ++ ) { if ( weight [ i ] > bin_rem ) { res ++; bin_rem = c - weight [ i ]; } else bin_rem -= weight [ i ]; } return res; } int f_filled ( int weight [ ], int n, int c ) {} { if ( weight [ i ] > bin_rem ) { res ++; bin_rem = c - weight [ i ]; } else bin_rem -= weight [ i ]; } return res; } int f_filled ( int weight [ ], int n, int c ) {} int main(void) { int n_success = 0; int param0_0[] = {6,12,14,16,19,24,29,31,33,34,41,43,47,53,53,59,64,70,70,71,72,73,74,80,81,89,90}; int param0_1[] = {-88,-26,70,-92,96,84,-24,-18,84,62,-72,42,72,2,30,86}; 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}; int param0_3[] = {51,7,6,24,19,83,9,36,40,93,24,48,63,69,53,54,42,45,90,14,29,6,7,37,53,18,87,38,59,1,68,44,47,35,87,91,60,90,52,8,80,41,3,96}; int param0_4[] = {-98,-90,-78,-48,-36,-20,2,8,16,40,54,54,60,92}; int param0_5[] = {1,1,1,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0}; int param0_6[] = {8,14,16,35,40,45,54,57,58,59,87,88,93,95,97}; int param0_7[] = {-46,-6,60,-88,10,94,-12,-64,-68,-76,-60,-10,28,18,86,88,80,-56,94,-6,-42,72,-10,54,-82,-52,-70,-28,-74,82,-12,42,44,56,52,-28,22,62,-20}; int param0_8[] = {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[] = {48,57,21,82,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[] = {21,11,27,26,11,32,11,19,26,4}; int param2[] = {16,14,23,41,7,28,12,38,23,2}; 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 weight [ ], int n, int c ) { int res = 0, bin_rem = c; for ( int i = 0; i < n; i ++ ) { if ( weight [ i [MASK] > bin_rem ) { res ++; bin_rem = c - weight [ i ]; } else bin_rem -= weight [ i ]; } return res; } int f_filled ( int weight [ ], int n, int c ) {} { if ( weight [ i ] > bin_rem ) { res ++; bin_rem = c - weight [ i ]; } else bin_rem -= weight [ i ]; } return res; } int f_filled ( int weight [ ], int n, int c ) {} int main(void) { int n_success = 0; int param0_0[] = {6,12,14,16,19,24,29,31,33,34,41,43,47,53,53,59,64,70,70,71,72,73,74,80,81,89,90}; int param0_1[] = {-88,-26,70,-92,96,84,-24,-18,84,62,-72,42,72,2,30,86}; 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}; int param0_3[] = {51,7,6,24,19,83,9,36,40,93,24,48,63,69,53,54,42,45,90,14,29,6,7,37,53,18,87,38,59,1,68,44,47,35,87,91,60,90,52,8,80,41,3,96}; int param0_4[] = {-98,-90,-78,-48,-36,-20,2,8,16,40,54,54,60,92}; int param0_5[] = {1,1,1,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0}; int param0_6[] = {8,14,16,35,40,45,54,57,58,59,87,88,93,95,97}; int param0_7[] = {-46,-6,60,-88,10,94,-12,-64,-68,-76,-60,-10,28,18,86,88,80,-56,94,-6,-42,72,-10,54,-82,-52,-70,-28,-74,82,-12,42,44,56,52,-28,22,62,-20}; int param0_8[] = {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[] = {48,57,21,82,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[] = {21,11,27,26,11,32,11,19,26,4}; int param2[] = {16,14,23,41,7,28,12,38,23,2}; 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) #include", "b) [", "c) )", "d) ]", "e) sizeof(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 ( int arr [ ], int n ) { sort ( arr, arr + n ); return arr [ n - 1 ] + arr [ n - 2 ] + arr [ n - 3 ]; } int f_filled ( int arr [ ], int n ) {} ort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); return 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[] = {6,8,18,18,27,33,33,38,42,43,44,47,52,58,64,65,67,68,71,75,85,89,91,94,94,95,95}; int param0_1[] = {24,24,44,28,-88,18,34,92,-84,94,-12,30,-82,-58}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_3[] = {95,75,5,51,67,63,26,47,70,11,21,9,18,31,76,66,81,73,63,55,16,72,15,28,25,25,35,79,4,73,23,87,2,1,92,94,18,70,87,27,34,84,12}; int param0_4[] = {-86,-86,-78,-56,-24,-14,-10,-6,12,12,18,22,22,26,50,50,72,78,94}; int param0_5[] = {0,1,1,1,1,1,0,0,0,1,1,1,0,0,0}; int param0_6[] = {2,13,17,19,20,23,28,28,29,40,45,51,52,58,58,68,70,75,79,81,92,96,97}; int param0_7[] = {94,6,52,6,-78,40,-46,-20,64,76,-36,-62,50,-4,4}; 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}; int param0_9[] = {34,11,15,42,32,4,6,25,52,44,14,57,3,44,7,89,35,3,70,66,58,22,5,17,33,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[] = {26,8,15,37,9,9,15,13,27,13}; 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: [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 ) { sort ( arr, arr + n ); return arr [ n - 1 ] + arr [ n - 2 ] + arr [ n - 3 ]; } int f_filled ( int arr [ ], int n ) {}ort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); return 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[] = {6,8,18,18,27,33,33,38,42,43,44,47,52,58,64,65,67,68,71,75,85,89,91,94,94,95,95}; int param0_1[] = {24,24,44,28,-88,18,34,92,-84,94,-12,30,-82,-58}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_3[] = {95,75,5,51,67,63,26,47,70,11,21,9,18,31,76,66,81,73,63,55,16,72,15,28,25,25,35,79,4,73,23,87,2,1,92,94,18,70,87,27,34,84,12}; int param0_4[] = {-86,-86,-78,-56,-24,-14,-10,-6,12,12,18,22,22,26,50,50,72,78,94}; int param0_5[] = {0,1,1,1,1,1,0,0,0,1,1,1,0,0,0}; int param0_6[] = {2,13,17,19,20,23,28,28,29,40,45,51,52,58,58,68,70,75,79,81,92,96,97}; int param0_7[] = {94,6,52,6,-78,40,-46,-20,64,76,-36,-62,50,-4,4}; 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}; int param0_9[] = {34,11,15,42,32,4,6,25,52,44,14,57,3,44,7,89,35,3,70,66,58,22,5,17,33,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[] = {26,8,15,37,9,9,15,13,27,13}; 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; }
y;
[ "a) (", "b) arr", "c) y;", "d) return", "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 ( char s [], char c ) { int res = 0; for ( int i = 0; i < strlen(s); i ++ ) if ( s [ i ] == c ) res ++; return res; } int f_filled ( char s [], char c ) {} (int), cmpfunc);} int f_gold ( char s [], char c ) { int res = 0; for ( int i = 0; i < strlen(s); i ++ ) if ( s [ i ] == c ) res ++; return res; } int f_filled ( char s [], char c ) {} int main(void) { int n_success = 0; char param0[][100] = {"mhjnKfd","716662107","01","wPHSxIbnHakGRO","721106","111","TIBFU","0","10","lqq"}; char param1[] = {'l','6','1','n','8','0','Q','3','0','d'}; 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 s [], char c ) { int res = 0; for ( int i = 0; i < strlen(s); i ++ ) if ( s [ i ] == c ) res ++; return res; } [MASK] f_filled ( char s [], char c ) {}(int), cmpfunc);} int f_gold ( char s [], char c ) { int res = 0; for ( int i = 0; i < strlen(s); i ++ ) if ( s [ i ] == c ) res ++; return res; } int f_filled ( char s [], char c ) {} int main(void) { int n_success = 0; char param0[][100] = {"mhjnKfd","716662107","01","wPHSxIbnHakGRO","721106","111","TIBFU","0","10","lqq"}; char param1[] = {'l','6','1','n','8','0','Q','3','0','d'}; 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) str", "c) =", "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 a [ ], int n, int k ) { int result = 0; for ( int i = 0; i < n; ++ i ) { if ( a [ i ] != 1 && a [ i ] > k ) { result = result + min ( a [ i ] % k, k - a [ i ] % k ); } else { result = result + k - a [ i ]; } } return result; } int f_filled ( int a [ ], int n, int k ) {} k ) { result = result + min ( a [ i ] % k, k - a [ i ] % k ); } else { result = result + k - a [ i ]; } } return result; } int f_filled ( int a [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {3,7,27,32,36,37,44,48,50,64,86}; int param0_1[] = {-22,6,-20,60,-74,98,52,-22}; int param0_2[] = {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[] = {77,11,51,11,84,79,43,12,14,50,15,6,85,32,74,49,7,2,58}; int param0_4[] = {-90,-66,-64,-58,-46,-44,-32,-30,-30,-22,-18,-14,12,12,18,34,44,60,70,70,74,76,86,98,98}; int param0_5[] = {1,1,0,0,0,0,1,0,0,1,1,1,0,1,1,1,0,0,0,1,1,1,1,0,1,0,1,1,1,1,1,0,0,0,0,1,1}; int param0_6[] = {9,22,27,27,37,53,53,56,63,73,76,81,82}; int param0_7[] = {-46,60,80,80,42,-98,30,-48,4,-32,-78,40,52,26,88,4,22,62,88,-94,2,0,58,38,52,-50,-52,58,-62,30,-38,-8,-82,-66}; 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}; int param0_9[] = {42,69,93,82,8,23,73,1,77,39,49,4,95,85}; 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,5,23,9,12,36,10,18,19,12}; int param2[] = {10,4,29,17,22,31,11,19,22,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 < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)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 result = 0; for ( int i = 0; i < n; ++ i ) { if ( a [ i ] != 1 && a [ i ] > k ) { result = result + min ( a [ i ] % k, k - a [ i ] % k ); } else { result = result + k - a [ i ]; } } return result; } int f_filled ( int a [ [MASK] int n, int k ) {} k ) { result = result + min ( a [ i ] % k, k - a [ i ] % k ); } else { result = result + k - a [ i ]; } } return result; } int f_filled ( int a [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {3,7,27,32,36,37,44,48,50,64,86}; int param0_1[] = {-22,6,-20,60,-74,98,52,-22}; int param0_2[] = {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[] = {77,11,51,11,84,79,43,12,14,50,15,6,85,32,74,49,7,2,58}; int param0_4[] = {-90,-66,-64,-58,-46,-44,-32,-30,-30,-22,-18,-14,12,12,18,34,44,60,70,70,74,76,86,98,98}; int param0_5[] = {1,1,0,0,0,0,1,0,0,1,1,1,0,1,1,1,0,0,0,1,1,1,1,0,1,0,1,1,1,1,1,0,0,0,0,1,1}; int param0_6[] = {9,22,27,27,37,53,53,56,63,73,76,81,82}; int param0_7[] = {-46,60,80,80,42,-98,30,-48,4,-32,-78,40,52,26,88,4,22,62,88,-94,2,0,58,38,52,-50,-52,58,-62,30,-38,-8,-82,-66}; 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}; int param0_9[] = {42,69,93,82,8,23,73,1,77,39,49,4,95,85}; 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,5,23,9,12,36,10,18,19,12}; int param2[] = {10,4,29,17,22,31,11,19,22,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) return", "b) {return", "c) ],", "d) sizeof", "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 i, int n ) { if ( i > ( n - 2 ) / 2 ) return true; if ( arr [ i ] >= arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && f_gold ( arr, 2 * i + 1, n ) && f_gold ( arr, 2 * i + 2, n ) ) return true; return false; } bool f_filled ( int arr [ ], int i, int n ) {} arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && f_gold ( arr, 2 * i + 1, n ) && f_gold ( arr, 2 * i + 2, n ) ) return true; return false; } bool f_filled ( int arr [ ], int i, int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,2,3,5,24,24,25,25,36,37,37,39,42,44,46,50,51,54,56,60,62,70,71,73,75,80,80,85,86,89,91,95,99}; int param0_1[] = {-44,-58,88,-42,42,-14,-44,42,64,94,-46,-70,34,-10,-46,-52,-6,-78,64,56,74,98,-34,-4,-92,6,-52,-20,78,-72,-40}; int param0_2[] = {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[] = {10,2,1,34,21,37,49,31,70,97,87,50,76,55}; int param0_4[] = {-94,-84,-82,-66,-64,-62,-56,-38,-24,-24,-4,2,4,4,8,14,16,20,30,34,34,48,58,58,70,76,78,86,88,96,98}; int param0_5[] = {1,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,0,0}; int param0_6[] = {5,20,30,5,10,21,5}; int param0_7[] = {50,20,30,5,10,21,5}; int param0_8[] = {50,20,30,5,10,21,5}; int param0_9[] = {50,20,30,5,10,21,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[] = {0,0,0,0,29,12,0,0,2,7}; int param2[] = {18,27,20,8,26,11,7,7,7,7}; 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 i, int n ) { if ( i > ( n - 2 ) / 2 ) return true; if ( arr [ i ] >= arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && [MASK] ( arr, 2 * i + 1, n ) && f_gold ( arr, 2 * i + 2, n ) ) return true; return false; } bool f_filled ( int arr [ ], int i, int n ) {}arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && f_gold ( arr, 2 * i + 1, n ) && f_gold ( arr, 2 * i + 2, n ) ) return true; return false; } bool f_filled ( int arr [ ], int i, int n ) {} int main(void) { int n_success = 0; int param0_0[] = {1,2,3,5,24,24,25,25,36,37,37,39,42,44,46,50,51,54,56,60,62,70,71,73,75,80,80,85,86,89,91,95,99}; int param0_1[] = {-44,-58,88,-42,42,-14,-44,42,64,94,-46,-70,34,-10,-46,-52,-6,-78,64,56,74,98,-34,-4,-92,6,-52,-20,78,-72,-40}; int param0_2[] = {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[] = {10,2,1,34,21,37,49,31,70,97,87,50,76,55}; int param0_4[] = {-94,-84,-82,-66,-64,-62,-56,-38,-24,-24,-4,2,4,4,8,14,16,20,30,34,34,48,58,58,70,76,78,86,88,96,98}; int param0_5[] = {1,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,0,0}; int param0_6[] = {5,20,30,5,10,21,5}; int param0_7[] = {50,20,30,5,10,21,5}; int param0_8[] = {50,20,30,5,10,21,5}; int param0_9[] = {50,20,30,5,10,21,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[] = {0,0,0,0,29,12,0,0,2,7}; int param2[] = {18,27,20,8,26,11,7,7,7,7}; 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; }
f_gold
[ "a) thi", "b) {", "c) useOdd", "d) ;", "e) f_gold" ]
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 ar [ ], int ar_size ) { int res = 0; for ( int i = 0; i < ar_size; i ++ ) res = res ^ ar [ i ]; return res; } int f_filled ( int ar [ ], int ar_size ) {} ), cmpfunc);} int f_gold ( int ar [ ], int ar_size ) { int res = 0; for ( int i = 0; i < ar_size; i ++ ) res = res ^ ar [ i ]; return res; } int f_filled ( int ar [ ], int ar_size ) {} int main(void) { int n_success = 0; int param0_0[] = {1,1,7,10,12,19,20,22,23,25,27,32,33,39,43,44,45,46,47,47,48,49,50,51,55,58,68,69,73,76,77,79,81,84,92,95,99}; int param0_1[] = {-12,-40,-68}; int param0_2[] = {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_3[] = {86,56,98,58,7,40,84,45,69,77,36,50,72,99,95}; int param0_4[] = {-90,-68,-66,-66,-58,-54,-52,-48,-40,-30,-26,-24,-20,-14,-10,-8,-6,-6,-6,18,30,34,36,42,50,56,64,68,70,74,92,92,98}; int param0_5[] = {0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,1,1,0,1,0,1,1,1,1,0,0,1,0,0,0}; int param0_6[] = {3,21,47,51,78,84,84,85,86,99}; int param0_7[] = {-26,-72,44,62,-22,22,28,-28,32,-72,72,96,92,-52,-2,-22,-76,-88,-74,-8,-30,54,0,-62,14,-92,-58,72,40,46,96,86,-54,-92,46,92,20,-96,-92,-70,-94,78,-92,-54,-90}; int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {69,1,12,81,78,18,81,47,49,19,99,40,52,47,71,69,80,72,66,84,72,6,98,89,3,87,81,85,37,14,5,36,26,74}; 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[] = {36,2,21,9,26,27,9,33,9,22}; 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 ar [ ], int ar_size ) { int res = 0; for ( int i = 0; i < ar_size; i ++ ) res = res ^ ar [ i ]; return res; } int f_filled ( int ar [ ], int ar_size ) [MASK]), cmpfunc);} int f_gold ( int ar [ ], int ar_size ) { int res = 0; for ( int i = 0; i < ar_size; i ++ ) res = res ^ ar [ i ]; return res; } int f_filled ( int ar [ ], int ar_size ) {} int main(void) { int n_success = 0; int param0_0[] = {1,1,7,10,12,19,20,22,23,25,27,32,33,39,43,44,45,46,47,47,48,49,50,51,55,58,68,69,73,76,77,79,81,84,92,95,99}; int param0_1[] = {-12,-40,-68}; int param0_2[] = {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_3[] = {86,56,98,58,7,40,84,45,69,77,36,50,72,99,95}; int param0_4[] = {-90,-68,-66,-66,-58,-54,-52,-48,-40,-30,-26,-24,-20,-14,-10,-8,-6,-6,-6,18,30,34,36,42,50,56,64,68,70,74,92,92,98}; int param0_5[] = {0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,1,1,0,1,0,1,1,1,1,0,0,1,0,0,0}; int param0_6[] = {3,21,47,51,78,84,84,85,86,99}; int param0_7[] = {-26,-72,44,62,-22,22,28,-28,32,-72,72,96,92,-52,-2,-22,-76,-88,-74,-8,-30,54,0,-62,14,-92,-58,72,40,46,96,86,-54,-92,46,92,20,-96,-92,-70,-94,78,-92,-54,-90}; int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {69,1,12,81,78,18,81,47,49,19,99,40,52,47,71,69,80,72,66,84,72,6,98,89,3,87,81,85,37,14,5,36,26,74}; 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[] = {36,2,21,9,26,27,9,33,9,22}; 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) 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 a [ ], int n, int k ) { unordered_map < int, int > b; for ( int i = 0; i < n; i ++ ) { int x = a [ i ]; int d = min ( 1 + i, n - i ); if ( b . find ( x ) == b . end ( ) ) b [ x ] = d; else b [ x ] = min ( d, b [ x ] ); } int ans = INT_MAX; for ( int i = 0; i < n; i ++ ) { int x = a [ i ]; if ( x != k - x && b . find ( k - x ) != b . end ( ) ) ans = min ( max ( b [ x ], b [ k - x ] ), ans ); } return ans; } int f_filled ( int a [ ], int n, int k ) {} { int x = a [ i ]; if ( x != k - x && b . find ( k - x ) != b . end ( ) ) ans = min ( max ( b [ x ], b [ k - x ] ), ans ); } return ans; } int f_filled ( int a [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {2,27,66,89,96,96}; int param0_1[] = {84,-38,-56,-20,-98,-40,-16,22,20,98,-56,-32,-44,30,-58,26,-44,-32,50,46,92}; 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}; int param0_3[] = {20,71,66,58,74,2,63,13,1,36,28,83,24,20,85,30,59,56,8,97,58,28,28,42}; int param0_4[] = {-94,-88,-86,-68,-66,-64,-28,-12,4,18,22,28,32,34,34,40,44,46,60,68,72,78,80,84,88,96}; int param0_5[] = {0,0,0,0,0,1,1,1,1,0,0,0,1,1,1}; int param0_6[] = {8,13,54,59,61,69,89,90,92}; int param0_7[] = {-58,50,-74,-8,-50,90,90,-2,-22,8,-76,16,4,56,94,36,28,-42,80,-88,88,52,74,40,12,-72,-50,50,88,-54,32,-24,-48,-66,-86,40,-6,14,10,-88,56,80,-34}; int param0_8[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {2,60,66,39,18,60,37,75,3,64,24,16,72,95,96,44,23,58,58,33,24,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[] = {4,13,23,23,16,8,4,27,9,21}; int param2[] = {4,11,13,17,15,13,8,42,12,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 [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n, int k ) { unordered_map < int, int > b; for ( int i = 0; i < n; i ++ ) { int x = a [ i ]; int d = min ( 1 + i, n - i ); if ( b . find ( x ) == b . end ( ) [MASK] b [ x ] = d; else b [ x ] = min ( d, b [ x ] ); } int ans = INT_MAX; for ( int i = 0; i < n; i ++ ) { int x = a [ i ]; if ( x != k - x && b . find ( k - x ) != b . end ( ) ) ans = min ( max ( b [ x ], b [ k - x ] ), ans ); } return ans; } int f_filled ( int a [ ], int n, int k ) {} { int x = a [ i ]; if ( x != k - x && b . find ( k - x ) != b . end ( ) ) ans = min ( max ( b [ x ], b [ k - x ] ), ans ); } return ans; } int f_filled ( int a [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {2,27,66,89,96,96}; int param0_1[] = {84,-38,-56,-20,-98,-40,-16,22,20,98,-56,-32,-44,30,-58,26,-44,-32,50,46,92}; 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}; int param0_3[] = {20,71,66,58,74,2,63,13,1,36,28,83,24,20,85,30,59,56,8,97,58,28,28,42}; int param0_4[] = {-94,-88,-86,-68,-66,-64,-28,-12,4,18,22,28,32,34,34,40,44,46,60,68,72,78,80,84,88,96}; int param0_5[] = {0,0,0,0,0,1,1,1,1,0,0,0,1,1,1}; int param0_6[] = {8,13,54,59,61,69,89,90,92}; int param0_7[] = {-58,50,-74,-8,-50,90,90,-2,-22,8,-76,16,4,56,94,36,28,-42,80,-88,88,52,74,40,12,-72,-50,50,88,-54,32,-24,-48,-66,-86,40,-6,14,10,-88,56,80,-34}; int param0_8[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1}; int param0_9[] = {2,60,66,39,18,60,37,75,3,64,24,16,72,95,96,44,23,58,58,33,24,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[] = {4,13,23,23,16,8,4,27,9,21}; int param2[] = {4,11,13,17,15,13,8,42,12,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) ,", "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 n ) { int arr [ n ] [ n ]; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n; j ++ ) arr [ i ] [ j ] = abs ( i - j ); int sum = 0; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n; j ++ ) sum += arr [ i ] [ j ]; return sum; } int f_filled ( int n ) {} j ++ ) arr [ i ] [ j ] = abs ( i - j ); int sum = 0; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n; j ++ ) sum += arr [ i ] [ j ]; return sum; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {60,44,72,90,99,45,27,11,65,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 arr [ n ] [ n ]; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n; j ++ ) arr [ i ] [ j ] = abs ( i - j ); int sum = 0; for ( int i = 0; i < n; i ++ ) for ( int j = [MASK] j < n; j ++ ) sum += arr [ i ] [ j ]; return sum; } int f_filled ( int n ) {} j ++ ) arr [ i ] [ j ] = abs ( i - j ); int sum = 0; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n; j ++ ) sum += arr [ i ] [ j ]; return sum; } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {60,44,72,90,99,45,27,11,65,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; }
0;
[ "a) <iostream>", "b) return", "c) [", "d) 0;", "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 ( long long int A, long long int B ) { int variable = 1; if ( A == B ) return 1; else if ( ( B - A ) >= 5 ) return 0; else { for ( long long int i = A + 1; i <= B; i ++ ) variable = ( variable * ( i % 10 ) ) % 10; return variable % 10; } } int f_filled ( long long int A, long long int B ) {} else { for ( long long int i = A + 1; i <= B; i ++ ) variable = ( variable * ( i % 10 ) ) % 10; return variable % 10; } } int f_filled ( long long int A, long long int B ) {} int main(void) { int n_success = 0; long param0[] = {79,61,39,39,61,86,7,86,86,11}; long param1[] = {84,29,77,65,78,73,92,50,63,2}; 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] long int A, long long int B ) { int variable = 1; if ( A == B ) return 1; else if ( ( B - A ) >= 5 ) return 0; else { for ( long long int i = A + 1; i <= B; i ++ ) variable = ( variable * ( i % 10 ) ) % 10; return variable % 10; } } int f_filled ( long long int A, long long int B ) {} else { for ( long long int i = A + 1; i <= B; i ++ ) variable = ( variable * ( i % 10 ) ) % 10; return variable % 10; } } int f_filled ( long long int A, long long int B ) {} int main(void) { int n_success = 0; long param0[] = {79,61,39,39,61,86,7,86,86,11}; long param1[] = {84,29,77,65,78,73,92,50,63,2}; 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; }
long
[ "a) long", "b) {", "c) )", "d) dp", "e) 1;" ]
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 ) { if ( n == 1 ) return true; sort ( arr, arr + n ); int d = arr [ 1 ] - arr [ 0 ]; for ( int i = 2; i < n; i ++ ) if ( arr [ i ] - arr [ i - 1 ] != d ) return false; return true; } bool f_filled ( int arr [ ], int n ) {} arr, arr + n ); int d = arr [ 1 ] - arr [ 0 ]; for ( int i = 2; i < n; i ++ ) if ( arr [ i ] - arr [ i - 1 ] != d ) return false; return true; } bool f_filled ( int arr [ ], int n ) {} 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}; int param0_2[] = {66,56,86,76,46}; int param0_3[] = {66,56,56,86,76,46}; int param0_4[] = {7,9,11,21,44,45,61,67,78,97,98,99}; int param0_5[] = {66,-28,-26,50,-18,54,84,-2,-70,-74,6,-34,44,-36,-4,36,14,24,64,74,86,-96,54,-68,-84,-62,-36,34,-36,70,-50,6,62,-50,-34,-38,-28,74,78,-2,-12,-4}; int param0_6[] = {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_7[] = {18,93,79,20,44,36,69,37,33,82,19,51,32,22,1,54,89,20,58,35,70,70,61,63,61,57,3,95,99,45,15,17,15,5,86,46,11,64,92,14,39,67}; int *param0[8] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7}; int param1[] = {4,4,5,7,5,6,11,33,33,40}; 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 ( int arr [ ], int n ) { if ( n == 1 ) return true; sort ( arr, arr + n ); int d = arr [ 1 ] - arr [MASK] 0 ]; for ( int i = 2; i < n; i ++ ) if ( arr [ i ] - arr [ i - 1 ] != d ) return false; return true; } bool f_filled ( int arr [ ], int n ) {} arr, arr + n ); int d = arr [ 1 ] - arr [ 0 ]; for ( int i = 2; i < n; i ++ ) if ( arr [ i ] - arr [ i - 1 ] != d ) return false; return true; } bool f_filled ( int arr [ ], int n ) {} 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}; int param0_2[] = {66,56,86,76,46}; int param0_3[] = {66,56,56,86,76,46}; int param0_4[] = {7,9,11,21,44,45,61,67,78,97,98,99}; int param0_5[] = {66,-28,-26,50,-18,54,84,-2,-70,-74,6,-34,44,-36,-4,36,14,24,64,74,86,-96,54,-68,-84,-62,-36,34,-36,70,-50,6,62,-50,-34,-38,-28,74,78,-2,-12,-4}; int param0_6[] = {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_7[] = {18,93,79,20,44,36,69,37,33,82,19,51,32,22,1,54,89,20,58,35,70,70,61,63,61,57,3,95,99,45,15,17,15,5,86,46,11,64,92,14,39,67}; int *param0[8] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7}; int param1[] = {4,4,5,7,5,6,11,33,33,40}; 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) )" ]
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 bin [] ) { int n = len(bin); if ( bin [ n - 1 ] == '1' ) return false; int sum = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( bin [ i ] == '1' ) { int posFromRight = n - i - 1; if ( posFromRight % 4 == 1 ) sum = sum + 2; else if ( posFromRight % 4 == 2 ) sum = sum + 4; else if ( posFromRight % 4 == 3 ) sum = sum + 8; else if ( posFromRight % 4 == 0 ) sum = sum + 6; } } if ( sum % 10 == 0 ) return true; return false; } bool f_filled ( char bin [] ) {} if ( posFromRight % 4 == 3 ) sum = sum + 8; else if ( posFromRight % 4 == 0 ) sum = sum + 6; } } if ( sum % 10 == 0 ) return true; return false; } bool f_filled ( char bin [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"101000","39613456759141","11","PoiHjo","2","0000101","T s dZKeDX gK","3944713969","1000","ifYUgdpmt"}; 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 bin [] ) { int n = len(bin); if ( bin [ n - 1 ] == '1' ) return false; int sum = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( bin [ i ] == '1' ) { int posFromRight = n - i - 1; if ( posFromRight % 4 == 1 ) sum = sum + 2; else if ( [MASK] % 4 == 2 ) sum = sum + 4; else if ( posFromRight % 4 == 3 ) sum = sum + 8; else if ( posFromRight % 4 == 0 ) sum = sum + 6; } } if ( sum % 10 == 0 ) return true; return false; } bool f_filled ( char bin [] ) {}if ( posFromRight % 4 == 3 ) sum = sum + 8; else if ( posFromRight % 4 == 0 ) sum = sum + 6; } } if ( sum % 10 == 0 ) return true; return false; } bool f_filled ( char bin [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"101000","39613456759141","11","PoiHjo","2","0000101","T s dZKeDX gK","3944713969","1000","ifYUgdpmt"}; 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; }
posFromRight
[ "a) (", "b) !=", "c) n", "d) posFromRight", "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 ( char str [] ) { char tmp [] = str + str; int n = strlen(str); for ( int i = 1; i <= n; i ++ ) { char substring [] = tmp . substr ( i, len(str) ); if ( str == substring ) return i; } return n; } int f_filled ( char str [] ) {} strlen(str); for ( int i = 1; i <= n; i ++ ) { char substring [] = tmp . substr ( i, len(str) ); if ( str == substring ) return i; } return n; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"vdevdNdQSopPtj","5","100010101011","tlDOvJHAyMllu","06","101","DYgtU","4","00","Dt"}; 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 str [] ) { char tmp [] = str + str; int n = strlen(str); for ( int i = 1; i <= n; i ++ ) { char substring [] = tmp . substr ( i, len(str) ); if ( str == substring ) return i; [MASK] return n; } int f_filled ( char str [] ) {} strlen(str); for ( int i = 1; i <= n; i ++ ) { char substring [] = tmp . substr ( i, len(str) ); if ( str == substring ) return i; } return n; } int f_filled ( char str [] ) {} int main(void) { int n_success = 0; char param0[][100] = {"vdevdNdQSopPtj","5","100010101011","tlDOvJHAyMllu","06","101","DYgtU","4","00","Dt"}; 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) 3", "d) {", "e) {qsort" ]
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 n ) { if ( n <= 1 ) return false; if ( n <= 3 ) return true; if ( n % 2 == 0 || n % 3 == 0 ) return false; for ( int i = 5; i * i <= n; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return false; return true; } bool f_filled ( int n ) {} e; if ( n % 2 == 0 || n % 3 == 0 ) return false; for ( int i = 5; i * i <= n; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return false; return true; } bool f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {15,90,38,65,91,16,48,74,14,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);} bool f_gold ( int n ) { if ( n <= 1 ) return false; if ( n <= 3 ) return true; if ( n % 2 == 0 || [MASK] % 3 == 0 ) return false; for ( int i = 5; i * i <= n; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return false; return true; } bool f_filled ( int n ) {}e; if ( n % 2 == 0 || n % 3 == 0 ) return false; for ( int i = 5; i * i <= n; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return false; return true; } bool f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {15,90,38,65,91,16,48,74,14,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; }
n
[ "a) top3", "b) ==", "c) n", "d) (x1", "e) return" ]
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);} long f_gold ( long n ) { return ( ( n << 3 ) - n ); } long f_filled ( long n ) {} nt) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long f_gold ( long n ) { return ( ( n << 3 ) - n ); } long f_filled ( long n ) {} int main(void) { int n_success = 0; int param0[] = {41,42,62,4,31,75,5,75,85,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 [ [MASK] int n) {qsort (arr, n, sizeof(int), cmpfunc);} long f_gold ( long n ) { return ( ( n << 3 ) - n ); } long f_filled ( long n ) {}nt) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long f_gold ( long n ) { return ( ( n << 3 ) - n ); } long f_filled ( long n ) {} int main(void) { int n_success = 0; int param0[] = {41,42,62,4,31,75,5,75,85,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) :", "c) /", "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 n, int i = 2 ) { if ( n <= 2 ) return ( n == 2 ) ? true : false; if ( n % i == 0 ) return false; if ( i * i > n ) return true; return f_gold ( n, i + 1 ); } bool f_filled ( int n, int i = 2 ) {} i = 2 ) { if ( n <= 2 ) return ( n == 2 ) ? true : false; if ( n % i == 0 ) return false; if ( i * i > n ) return true; return f_gold ( n, i + 1 ); } bool f_filled ( int n, int i = 2 ) {} int main(void) { int n_success = 0; int param0[] = {3,7,89,97,41,73,95,69,20,30}; int param1[] = {2,2,2,2,2,2,2,2,2,2}; 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 ( int n, int i = 2 ) { if ( n <= 2 ) return ( n == 2 ) ? true : false; if ( n % i == 0 ) return [MASK] if ( i * i > n ) return true; return f_gold ( n, i + 1 ); } bool f_filled ( int n, int i = 2 ) {}i = 2 ) { if ( n <= 2 ) return ( n == 2 ) ? true : false; if ( n % i == 0 ) return false; if ( i * i > n ) return true; return f_gold ( n, i + 1 ); } bool f_filled ( int n, int i = 2 ) {} int main(void) { int n_success = 0; int param0[] = {3,7,89,97,41,73,95,69,20,30}; int param1[] = {2,2,2,2,2,2,2,2,2,2}; 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; }
false;
[ "a) false;", "b) ;", "c) !=", "d) HashMap", "e) #include" ]
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);} void f_gold ( int arr [ ], int n, int k ) { for ( int i = 0; i < k; i ++ ) { int x = arr [ 0 ]; for ( int j = 0; j < n - 1; ++ j ) arr [ j ] = arr [ j + 1 ]; arr [ n - 1 ] = x; } } void f_filled ( int arr [ ], int n, int k ) {} ; i < k; i ++ ) { int x = arr [ 0 ]; for ( int j = 0; j < n - 1; ++ j ) arr [ j ] = arr [ j + 1 ]; arr [ n - 1 ] = x; } } void f_filled ( int arr [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {75}; int param0_1[] = {-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74}; int param0_2[] = {0,0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22}; int param0_4[] = {-88,-72,-64,-46,-40,-16,-8,0,22,34,44}; int param0_5[] = {0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0}; int param0_6[] = {8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94}; int param0_7[] = {-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94}; int param0_8[] = {0,0,0,0,1,1,1,1,1}; int param0_9[] = {80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}; 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,27,7,23,6,23,21,23,5,9}; int param2[] = {0,17,7,24,6,30,20,13,8,7}; int filled_function_param0_0[] = {75}; int filled_function_param0_1[] = {-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74}; int filled_function_param0_2[] = {0,0,0,0,0,1,1,1,1,1,1}; int filled_function_param0_3[] = {45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22}; int filled_function_param0_4[] = {-88,-72,-64,-46,-40,-16,-8,0,22,34,44}; int filled_function_param0_5[] = {0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0}; int filled_function_param0_6[] = {8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94}; int filled_function_param0_7[] = {-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94}; int filled_function_param0_8[] = {0,0,0,0,1,1,1,1,1}; int filled_function_param0_9[] = {80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}; 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[] = {0,27,7,23,6,23,21,23,5,9}; int filled_function_param2[] = {0,17,7,24,6,30,20,13,8,7}; for(int i = 0; i < len(param0); ++i) { f_filled(filled_function_param0[i],filled_function_param1[i],filled_function_param2[i]); f_gold(param0[i],param1[i],param2[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i] && param2[i] == filled_function_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);} void f_gold ( int arr [ ], int n, int k ) { for ( int i = 0; i < k; i ++ ) { int x = arr [ 0 ]; for ( int j = 0; j < n - 1; ++ j ) arr [ j ] = arr [ j + 1 ]; arr [ n - 1 ] = x; } } void f_filled ( int arr [ ], int n, int k ) {}; i < k; i ++ ) { int x = arr [ 0 ]; for ( int j = 0; j < n - 1; ++ j ) arr [ j ] = arr [ j + 1 ]; arr [ n - 1 ] = x; } } void f_filled ( int arr [ ], int n, int k ) {} int main(void) { int n_success = 0; int param0_0[] = {75}; int param0_1[] = {-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74}; int param0_2[] = {0,0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22}; int param0_4[] = {-88,-72,-64,-46,-40,-16,-8,0,22,34,44}; int param0_5[] = {0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0}; int param0_6[] = {8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94}; int param0_7[] = {-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94}; int param0_8[] = {0,0,0,0,1,1,1,1,1}; int param0_9[] = {80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}; 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,27,7,23,6,23,21,23,5,9}; int param2[] = {0,17,7,24,6,30,20,13,8,7}; int filled_function_param0_0[] = {75}; int filled_function_param0_1[] = {-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74}; int filled_function_param0_2[] = {0,0,0,0,0,1,1,1,1,1,1}; int filled_function_param0_3[] = {45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22}; int filled_function_param0_4[] = {-88,-72,-64,-46,-40,-16,-8,0,22,34,44}; int filled_function_param0_5[] = {0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0}; int filled_function_param0_6[] = {8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94}; int filled_function_param0_7[] = {-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94}; int filled_function_param0_8[] = {0,0,0,0,1,1,1,1,1}; int filled_function_param0_9[] = {80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}; 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[] = {0,27,7,23,6,23,21,23,5,9}; int filled_function_param2[] = {0,17,7,24,6,30,20,13,8,7}; for(int i = 0; i < len(param0); ++i) { f_filled(filled_function_param0[i],filled_function_param1[i],filled_function_param2[i]); f_gold(param0[i],param1[i],param2[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i] && param2[i] == filled_function_param2[i]) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
*
[ "a) <iomanip>", "b) ans", "c) def", "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);} unsigned int f_gold ( unsigned int a, unsigned int b ) { int res = 0; while ( b > 0 ) { if ( b & 1 ) res = res + a; a = a << 1; b = b >> 1; } return res; } unsigned int f_filled ( unsigned int a, unsigned int b ) {} signed int b ) { int res = 0; while ( b > 0 ) { if ( b & 1 ) res = res + a; a = a << 1; b = b >> 1; } return res; } unsigned int f_filled ( unsigned int a, unsigned int b ) {} int main(void) { int n_success = 0; int param0[] = {4,36,65,55,35,69,84,5,15,67}; int param1[] = {33,67,52,37,76,98,62,80,36,84}; 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);} unsigned int f_gold ( unsigned int a, unsigned int b ) { int res = 0; while ( b > 0 ) { if ( b & 1 ) res = res + a; a = a << 1; b = b >> [MASK] } return res; } unsigned int f_filled ( unsigned int a, unsigned int b ) {}signed int b ) { int res = 0; while ( b > 0 ) { if ( b & 1 ) res = res + a; a = a << 1; b = b >> 1; } return res; } unsigned int f_filled ( unsigned int a, unsigned int b ) {} int main(void) { int n_success = 0; int param0[] = {4,36,65,55,35,69,84,5,15,67}; int param1[] = {33,67,52,37,76,98,62,80,36,84}; 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; }
1;
[ "a) )", "b) arr", "c) 1;", "d) +", "e) #include" ]
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 sum = 0; for ( int i = 0; i < n; i ++ ) sum += arr [ i ]; if ( sum % 2 != 0 ) return false; sum = sum / 2; unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { int val = sum - arr [ i ]; if ( s . find ( val ) != s . end ( ) ) { printf ( "Pair elements are %d and %d\n", arr [ i ], val ); return true; } s . insert ( arr [ i ] ); } return false; } bool f_filled ( int arr [ ], int n ) {} end ( ) ) { printf ( "Pair elements are %d and %d\n", arr [ i ], val ); return true; } s . insert ( arr [ i ] ); } return false; } bool f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {15}; int param0_1[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_2[] = {69,6,24,30,75,37,61,76,19,18,90,9,49,24,58,97,18,85,24,93,71,98,92,59,75,75,75,70,35,58,50,1,64,66,33}; int param0_3[] = {-94,-94,-92,-74,-60,-58,-56,-44,-42,-40,-28,-14,2,4,14,20,24,28,40,42,42,66,78,78,80,82,96}; int param0_4[] = {1,0,1,1,0,0,1,1,0,0,1,1,0,1}; int param0_5[] = {21,26,26,27,61,62,96}; int param0_6[] = {-54,86,20,26}; int param0_7[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_8[] = {44,35,26,15,56,6,36,53,15,66,20,53,99,96,51,12,61,19,79,40,99,42,86,8,11,54,93,46,23,47,41,26,66,5,86,52,64,51,4,21,63,14,7,53,31,8,9,63}; int *param0[9] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8}; int param1[] = {6,6,13,18,26,10,6,3,4,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 (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 sum = 0; for ( int i = 0; i < n; i ++ ) sum += arr [ i ]; if ( sum % [MASK] != 0 ) return false; sum = sum / 2; unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { int val = sum - arr [ i ]; if ( s . find ( val ) != s . end ( ) ) { printf ( "Pair elements are %d and %d\n", arr [ i ], val ); return true; } s . insert ( arr [ i ] ); } return false; } bool f_filled ( int arr [ ], int n ) {} end ( ) ) { printf ( "Pair elements are %d and %d\n", arr [ i ], val ); return true; } s . insert ( arr [ i ] ); } return false; } bool f_filled ( int arr [ ], int n ) {} int main(void) { int n_success = 0; int param0_0[] = {15}; int param0_1[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_2[] = {69,6,24,30,75,37,61,76,19,18,90,9,49,24,58,97,18,85,24,93,71,98,92,59,75,75,75,70,35,58,50,1,64,66,33}; int param0_3[] = {-94,-94,-92,-74,-60,-58,-56,-44,-42,-40,-28,-14,2,4,14,20,24,28,40,42,42,66,78,78,80,82,96}; int param0_4[] = {1,0,1,1,0,0,1,1,0,0,1,1,0,1}; int param0_5[] = {21,26,26,27,61,62,96}; int param0_6[] = {-54,86,20,26}; int param0_7[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_8[] = {44,35,26,15,56,6,36,53,15,66,20,53,99,96,51,12,61,19,79,40,99,42,86,8,11,54,93,46,23,47,41,26,66,5,86,52,64,51,4,21,63,14,7,53,31,8,9,63}; int *param0[9] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8}; int param1[] = {6,6,13,18,26,10,6,3,4,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; }
2
[ "a) sum", "b) 2", "c) True", "d) (l", "e) using" ]
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);} unsigned long long f_gold ( int n ) { return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) ); } unsigned long long f_filled ( int n ) {} (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} unsigned long long f_gold ( int n ) { return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) ); } unsigned long long f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {76,26,45,35,34,22,3,25,22,78}; 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)? [MASK] y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)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 long long f_gold ( int n ) { return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) ); } unsigned long long f_filled ( int n ) {}(int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} unsigned long long f_gold ( int n ) { return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) ); } unsigned long long f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {76,26,45,35,34,22,3,25,22,78}; 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) =", "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 n, int r, int p ) { int C [ r + 1 ]; memset ( C, 0, sizeof ( C ) ); C [ 0 ] = 1; for ( int i = 1; i <= n; i ++ ) { for ( int j = min ( i, r ); j > 0; j -- ) C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p; } return C [ r ]; } int f_filled ( int n, int r, int p ) {} or ( int i = 1; i <= n; i ++ ) { for ( int j = min ( i, r ); j > 0; j -- ) C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p; } return C [ r ]; } int f_filled ( int n, int r, int p ) {} int main(void) { int n_success = 0; int param0[] = {82,45,44,88,90,98,80,60,52,71}; int param1[] = {5,24,68,24,75,55,54,75,73,26}; int param2[] = {94,95,61,43,57,43,88,65,86,45}; 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) / [MASK] (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int r, int p ) { int C [ r + 1 ]; memset ( C, 0, sizeof ( C ) ); C [ 0 ] = 1; for ( int i = 1; i <= n; i ++ ) { for ( int j = min ( i, r ); j > 0; j -- ) C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p; } return C [ r ]; } int f_filled ( int n, int r, int p ) {}or ( int i = 1; i <= n; i ++ ) { for ( int j = min ( i, r ); j > 0; j -- ) C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p; } return C [ r ]; } int f_filled ( int n, int r, int p ) {} int main(void) { int n_success = 0; int param0[] = {82,45,44,88,90,98,80,60,52,71}; int param1[] = {5,24,68,24,75,55,54,75,73,26}; int param2[] = {94,95,61,43,57,43,88,65,86,45}; 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; }
sizeof
[ "a) (", "b) sizeof", "c) False", "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 base ) { base = ( base - 2 ); base = base / 2; return base * ( base + 1 ) / 2; } int f_filled ( int base ) {} (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int base ) { base = ( base - 2 ); base = base / 2; return base * ( base + 1 ) / 2; } int f_filled ( int base ) {} int main(void) { int n_success = 0; int param0[] = {95,49,10,73,74,40,10,94,64,16}; 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 base ) { base = ( base - 2 ); base = base / 2; return base * ( base + 1 ) / 2; [MASK] int f_filled ( int base ) {} (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int base ) { base = ( base - 2 ); base = base / 2; return base * ( base + 1 ) / 2; } int f_filled ( int base ) {} int main(void) { int n_success = 0; int param0[] = {95,49,10,73,74,40,10,94,64,16}; 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) n", "d) +=", "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 n ) { if ( n == 2 || n == 3 ) return ( n - 1 ); int res = 1; while ( n > 4 ) { n -= 3; res *= 3; } return ( n * res ); } int f_filled ( int n ) {} , cmpfunc);} int f_gold ( int n ) { if ( n == 2 || n == 3 ) return ( n - 1 ); int res = 1; while ( n > 4 ) { n -= 3; res *= 3; } return ( n * res ); } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {62,53,8,6,35,35,46,74,69,3}; 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] int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { if ( n == 2 || n == 3 ) return ( n - 1 ); int res = 1; while ( n > 4 ) { n -= 3; res *= 3; } return ( n * res ); } int f_filled ( int n ) {}, cmpfunc);} int f_gold ( int n ) { if ( n == 2 || n == 3 ) return ( n - 1 ); int res = 1; while ( n > 4 ) { n -= 3; res *= 3; } return ( n * res ); } int f_filled ( int n ) {} int main(void) { int n_success = 0; int param0[] = {62,53,8,6,35,35,46,74,69,3}; 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) j", "b) #include", "c) sizeof", "d) (", "e) ]," ]
e