type
stringclasses 4
values | content_without_mask
stringlengths 610
1.37M
| content_masked
stringlengths 609
1.37M
| label
stringclasses 362
values | options
sequencelengths 5
5
| correct
stringclasses 5
values |
---|---|---|---|---|---|
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int C [ n + 1 ] [ n + 1 ];
int i, j;
for ( i = 0;
i <= n;
i ++ ) {
for ( j = 0;
j <= min ( i, n );
j ++ ) {
if ( j == 0 || j == i ) C [ i ] [ j ] = 1;
else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
}
}
int sum = 0;
for ( int i = 0;
i <= n;
i ++ ) sum += ( C [ n ] [ i ] * C [ n ] [ i ] );
return sum;
}
int f_filled ( int n ) {}
j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
}
}
int sum = 0;
for ( int i = 0;
i <= n;
i ++ ) sum += ( C [ n ] [ i ] * C [ n ] [ i ] );
return sum;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,44,19,24,64,60,57,22,15,63};
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 [MASK] arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int C [ n + 1 ] [ n + 1 ]; int i, j; for ( i = 0; i <= n; i ++ ) { for ( j = 0; j <= min ( i, n ); j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ]; } } int sum = 0; for ( int i = 0; i <= n; i ++ ) sum += ( C [ n ] [ i ] * C [ n ] [ i ] ); return sum; } int f_filled ( int n ) {}j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
}
}
int sum = 0;
for ( int i = 0;
i <= n;
i ++ ) sum += ( C [ n ] [ i ] * C [ n ] [ i ] );
return sum;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,44,19,24,64,60,57,22,15,63};
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) s",
"c) ]",
"d) (int",
"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 arr [ ], int n ) {
int mls [ n ], max = 0;
for ( int i = 0;
i < n;
i ++ ) mls [ i ] = 1;
for ( int i = 1;
i < n;
i ++ ) for ( int j = 0;
j < i;
j ++ ) if ( abs ( arr [ i ] - arr [ j ] ) <= 1 && mls [ i ] < mls [ j ] + 1 ) mls [ i ] = mls [ j ] + 1;
for ( int i = 0;
i < n;
i ++ ) if ( max < mls [ i ] ) max = mls [ i ];
return max;
}
int f_filled ( int arr [ ], int n ) {}
<= 1 && mls [ i ] < mls [ j ] + 1 ) mls [ i ] = mls [ j ] + 1;
for ( int i = 0;
i < n;
i ++ ) if ( max < mls [ i ] ) max = mls [ i ];
return max;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,5,9,31,31,37,41,55,56,61,79,81,89,93};
int param0_1[] = {-76,96,-68,-16,22,-24,-24,6,98,-82,54,-80,46,0,0,-50};
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[] = {97,93,43,51,15,33,13,96,39,89,78,25,45,6,64,54};
int param0_4[] = {-98,-78,-72,-70,-68,-58,-56,-54,-46,-44,-38,-34,-30,-24,-18,-16,-14,-12,2,6,8,8,10,10,16,24,26,28,40,42,44,56,58,62,66,66,78,86};
int param0_5[] = {1,1,0,1,0,0};
int param0_6[] = {7,8,10,11,12,15,16,16,19,21,23,23,23,25,26,35,38,43,46,47,51,52,53,57,60,61,66,67,69,74,75,81,83,84,88,92,94,98,98,99};
int param0_7[] = {14,-40};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {59,70,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[] = {12,15,29,13,19,3,34,1,38,1};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int mls [ n ], max = 0; for ( int i = 0; i < n; i ++ ) mls [ i ] = 1; for ( int i = 1; i < n; i ++ ) for ( int j = 0; j < i; j ++ ) if ( abs ( arr [ i ] - arr [ j ] ) <= 1 && mls [ i ] < mls [ j ] + 1 [MASK] mls [ i ] = mls [ j ] + 1; for ( int i = 0; i < n; i ++ ) if ( max < mls [ i ] ) max = mls [ i ]; return max; } int f_filled ( int arr [ ], int n ) {} <= 1 && mls [ i ] < mls [ j ] + 1 ) mls [ i ] = mls [ j ] + 1;
for ( int i = 0;
i < n;
i ++ ) if ( max < mls [ i ] ) max = mls [ i ];
return max;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,5,9,31,31,37,41,55,56,61,79,81,89,93};
int param0_1[] = {-76,96,-68,-16,22,-24,-24,6,98,-82,54,-80,46,0,0,-50};
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[] = {97,93,43,51,15,33,13,96,39,89,78,25,45,6,64,54};
int param0_4[] = {-98,-78,-72,-70,-68,-58,-56,-54,-46,-44,-38,-34,-30,-24,-18,-16,-14,-12,2,6,8,8,10,10,16,24,26,28,40,42,44,56,58,62,66,66,78,86};
int param0_5[] = {1,1,0,1,0,0};
int param0_6[] = {7,8,10,11,12,15,16,16,19,21,23,23,23,25,26,35,38,43,46,47,51,52,53,57,60,61,66,67,69,74,75,81,83,84,88,92,94,98,98,99};
int param0_7[] = {14,-40};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {59,70,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[] = {12,15,29,13,19,3,34,1,38,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;
} | ) | [
"a) f_gold",
"b) i",
"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 a, int b ) {
int cnt = 0;
for ( int i = a;
i <= b;
i ++ ) for ( int j = 1;
j * j <= i;
j ++ ) if ( j * j == i ) cnt ++;
return cnt;
}
int f_filled ( int a, int b ) {}
t f_gold ( int a, int b ) {
int cnt = 0;
for ( int i = a;
i <= b;
i ++ ) for ( int j = 1;
j * j <= i;
j ++ ) if ( j * j == i ) cnt ++;
return cnt;
}
int f_filled ( int a, int b ) {}
int main(void) {
int n_success = 0;
int param0[] = {48,3,20,98,96,40,9,57,28,98};
int param1[] = {42,82,72,98,90,82,15,77,80,75};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a, int b ) { int cnt = 0; for ( int i = a; i <= b; i ++ ) for ( int j = 1; j * j <= i; j ++ ) if ( j * j == i ) cnt ++; [MASK] cnt; } int f_filled ( int a, int b ) {}t f_gold ( int a, int b ) {
int cnt = 0;
for ( int i = a;
i <= b;
i ++ ) for ( int j = 1;
j * j <= i;
j ++ ) if ( j * j == i ) cnt ++;
return cnt;
}
int f_filled ( int a, int b ) {}
int main(void) {
int n_success = 0;
int param0[] = {48,3,20,98,96,40,9,57,28,98};
int param1[] = {42,82,72,98,90,82,15,77,80,75};
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) (int",
"c) unsigned",
"d) n",
"e) return"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > hash;
for ( int i = 0;
i < n;
i ++ ) hash [ arr [ i ] ] ++;
int max_count = 0;
for ( auto i : hash ) if ( max_count < i . second ) max_count = i . second;
return ( n - max_count );
}
int f_filled ( int arr [ ], int n ) {}
++ ) hash [ arr [ i ] ] ++;
int max_count = 0;
for ( auto i : hash ) if ( max_count < i . second ) max_count = i . second;
return ( n - max_count );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,4,6,8,17,25,29,33,33,33,38,42,43,49,55,60,62,63,68,69,70,75,77,79,79,85,87,87,90,90,90,90,94,98};
int param0_1[] = {-66,-44,72,-82,46,66,-78,-62,32,86,62,56,22,-58,46,-6,94};
int param0_2[] = {0,1,1};
int param0_3[] = {68,78,2,48,1,10,18,67,97,31,72,12,25,39,51,12,29,46,93,66,28,29,5,86,97,59,7,94,64,13,42,48,25,33,10,1,5,32,14,27};
int param0_4[] = {-98,-96,-78,-72,-64,-62,-56,-40,-36,-14,-8,4,18,22,28,32,52,56,58,60,78,88,94};
int param0_5[] = {0,0,1,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0};
int param0_6[] = {3,3,7,9,14,15,15,25,25,26,28,31,37,37,47,51,53,58,58,60,63,65,68,70,70,71,77,79,81,88,89,97};
int param0_7[] = {40,-64,-62,74,-10,48,-56,70,-60,54,-6,74,-8,-54,-20,-50,40,-22,-54,-76,-92,-76,36,16,-42,58,-74,-90,-54,-32,-38,-50,74,26,52,38,24,-32,78,68,82,36,64,56,86,-28,-44,48,88};
int param0_8[] = {0,0,1,1,1,1,1};
int param0_9[] = {87,77,76,1,59,15,98,45,62,10,87,59,13,50,58,10};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {33,11,1,36,18,21,23,36,4,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 > hash; for ( int i = 0; [MASK] < n; i ++ ) hash [ arr [ i ] ] ++; int max_count = 0; for ( auto i : hash ) if ( max_count < i . second ) max_count = i . second; return ( n - max_count ); } int f_filled ( int arr [ ], int n ) {}++ ) hash [ arr [ i ] ] ++;
int max_count = 0;
for ( auto i : hash ) if ( max_count < i . second ) max_count = i . second;
return ( n - max_count );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,4,6,8,17,25,29,33,33,33,38,42,43,49,55,60,62,63,68,69,70,75,77,79,79,85,87,87,90,90,90,90,94,98};
int param0_1[] = {-66,-44,72,-82,46,66,-78,-62,32,86,62,56,22,-58,46,-6,94};
int param0_2[] = {0,1,1};
int param0_3[] = {68,78,2,48,1,10,18,67,97,31,72,12,25,39,51,12,29,46,93,66,28,29,5,86,97,59,7,94,64,13,42,48,25,33,10,1,5,32,14,27};
int param0_4[] = {-98,-96,-78,-72,-64,-62,-56,-40,-36,-14,-8,4,18,22,28,32,52,56,58,60,78,88,94};
int param0_5[] = {0,0,1,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0};
int param0_6[] = {3,3,7,9,14,15,15,25,25,26,28,31,37,37,47,51,53,58,58,60,63,65,68,70,70,71,77,79,81,88,89,97};
int param0_7[] = {40,-64,-62,74,-10,48,-56,70,-60,54,-6,74,-8,-54,-20,-50,40,-22,-54,-76,-92,-76,36,16,-42,58,-74,-90,-54,-32,-38,-50,74,26,52,38,24,-32,78,68,82,36,64,56,86,-28,-44,48,88};
int param0_8[] = {0,0,1,1,1,1,1};
int param0_9[] = {87,77,76,1,59,15,98,45,62,10,87,59,13,50,58,10};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {33,11,1,36,18,21,23,36,4,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;
} | i | [
"a) [",
"b) +",
"c) import",
"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 m, int n ) {
int count [ m ] [ n ];
for ( int i = 0;
i < m;
i ++ ) count [ i ] [ 0 ] = 1;
for ( int j = 0;
j < n;
j ++ ) count [ 0 ] [ j ] = 1;
for ( int i = 1;
i < m;
i ++ ) {
for ( int j = 1;
j < n;
j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ];
}
return count [ m - 1 ] [ n - 1 ];
}
int f_filled ( int m, int n ) {}
i ++ ) {
for ( int j = 1;
j < n;
j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ];
}
return count [ m - 1 ] [ n - 1 ];
}
int f_filled ( int m, int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {79,95,15,71,16,91,10,98,30,58};
int param1[] = {16,62,9,18,85,52,91,81,42,69};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int m, int n ) { int count [ m ] [ n ]; for ( int i = 0; i < m; i ++ ) count [ i ] [ 0 ] = 1; for ( int j = 0; j < n; j ++ ) count [ 0 ] [ j ] = 1; for ( int i = 1; i < m; i ++ ) { for ( int j = 1; j < n; j ++ ) count [ [MASK] ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ]; } return count [ m - 1 ] [ n - 1 ]; } int f_filled ( int m, int n ) {} i ++ ) {
for ( int j = 1;
j < n;
j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ];
}
return count [ m - 1 ] [ n - 1 ];
}
int f_filled ( int m, int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {79,95,15,71,16,91,10,98,30,58};
int param1[] = {16,62,9,18,85,52,91,81,42,69};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | i | [
"a) i",
"b) range(n):",
"c) (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);}
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[] = {79,95,84,12,72,67,82,14,2,69};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) [MASK] ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} 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[] = {79,95,84,12,72,67,82,14,2,69};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | {return | [
"a) increment",
"b) (",
"c) -",
"d) {return",
"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 n [] ) {
int i = 0, pos = 0;
while ( n [ i ] != '\0' ) {
switch ( n [ i ] ) {
case '4' : pos = pos * 2 + 1;
break;
case '7' : pos = pos * 2 + 2;
break;
}
i ++;
}
return pos;
}
int f_filled ( char n [] ) {}
0' ) {
switch ( n [ i ] ) {
case '4' : pos = pos * 2 + 1;
break;
case '7' : pos = pos * 2 + 2;
break;
}
i ++;
}
return pos;
}
int f_filled ( char n [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"7","305745689","444","4","2074","27","447","255","10000111111011","fAKcSDRTNz"};
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; } [MASK] cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (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 i = 0, pos = 0; while ( n [ i ] != '\0' ) { switch ( n [ i ] ) { case '4' : pos = pos * 2 + 1; break; case '7' : pos = pos * 2 + 2; break; } i ++; } return pos; } int f_filled ( char n [] ) {}0' ) {
switch ( n [ i ] ) {
case '4' : pos = pos * 2 + 1;
break;
case '7' : pos = pos * 2 + 2;
break;
}
i ++;
}
return pos;
}
int f_filled ( char n [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"7","305745689","444","4","2074","27","447","255","10000111111011","fAKcSDRTNz"};
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) b)",
"c) ==",
"d) 1;",
"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);}
int f_gold ( int x, unsigned int y, int p ) {
int res = 1;
x = x % p;
while ( y > 0 ) {
if ( y & 1 ) res = ( res * x ) % p;
y = y >> 1;
x = ( x * x ) % p;
}
return res;
}
int f_filled ( int x, unsigned int y, int p ) {}
int res = 1;
x = x % p;
while ( y > 0 ) {
if ( y & 1 ) res = ( res * x ) % p;
y = y >> 1;
x = ( x * x ) % p;
}
return res;
}
int f_filled ( int x, unsigned int y, int p ) {}
int main(void) {
int n_success = 0;
int param0[] = {45,67,26,33,35,68,14,5,23,37};
int param1[] = {5,25,91,61,8,41,76,89,42,63};
int param2[] = {68,49,44,9,13,5,20,13,45,56};
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 [MASK] arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int x, unsigned int y, int p ) { int res = 1; x = x % p; while ( y > 0 ) { if ( y & 1 ) res = ( res * x ) % p; y = y >> 1; x = ( x * x ) % p; } return res; } int f_filled ( int x, unsigned int y, int p ) {} int res = 1;
x = x % p;
while ( y > 0 ) {
if ( y & 1 ) res = ( res * x ) % p;
y = y >> 1;
x = ( x * x ) % p;
}
return res;
}
int f_filled ( int x, unsigned int y, int p ) {}
int main(void) {
int n_success = 0;
int param0[] = {45,67,26,33,35,68,14,5,23,37};
int param1[] = {5,25,91,61,8,41,76,89,42,63};
int param2[] = {68,49,44,9,13,5,20,13,45,56};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | (int | [
"a) (int",
"b) 2",
"c) #include",
"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 ) {
unordered_map < int, int > um;
int longLen = 0;
for ( int i = 0;
i < n;
i ++ ) {
int len = 0;
if ( um . find ( arr [ i ] - 1 ) != um . end ( ) && len < um [ arr [ i ] - 1 ] ) len = um [ arr [ i ] - 1 ];
if ( um . find ( arr [ i ] + 1 ) != um . end ( ) && len < um [ arr [ i ] + 1 ] ) len = um [ arr [ i ] + 1 ];
um [ arr [ i ] ] = len + 1;
if ( longLen < um [ arr [ i ] ] ) longLen = um [ arr [ i ] ];
}
return longLen;
}
int f_filled ( int arr [ ], int n ) {}
1 ] ) len = um [ arr [ i ] + 1 ];
um [ arr [ i ] ] = len + 1;
if ( longLen < um [ arr [ i ] ] ) longLen = um [ arr [ i ] ];
}
return longLen;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {20,48,58};
int param0_1[] = {-36,94,-20,-90,-80,88,46,-8,-36,22,70,-16,-48,-54,-82,38,10,-84,12,10,-14,50,12,-28,-64,-38,-84,-62,-56,32,-78,34,-34,48};
int param0_2[] = {0,0,0};
int param0_3[] = {50,28,14,52,92,30,30,27,66,77,39,42,28,84,63,55,18,34,57,45,81,38,23,31,9,35,25,39,30,5,28,7,42,42};
int param0_4[] = {-96,-70,-64,-60,-56,-44,-40,-32,-30,-22,-10,14,26,28,28,38,58,78,80};
int param0_5[] = {1,0,0,0,1,0,0,1,0,1};
int param0_6[] = {8,19,30,37,44,46,49,50,51,57,65,67,70,70,76,83,91,92};
int param0_7[] = {40,62,-6,88,58,66,-40,46,-32,80,22,-30,32,-74,20,-82,-58,-18,30,68,-2,38,-76,-58,22,-22,74};
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};
int param0_9[] = {46,6,71,56,21,97,80,67,26,25,79,86,64,84,53,50,29,19,95,58,14,15,63,1,76,64,11,47,9,97,54,27};
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,1,22,11,8,13,20,12,17};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; [MASK] int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_map < int, int > um; int longLen = 0; for ( int i = 0; i < n; i ++ ) { int len = 0; if ( um . find ( arr [ i ] - 1 ) != um . end ( ) && len < um [ arr [ i ] - 1 ] ) len = um [ arr [ i ] - 1 ]; if ( um . find ( arr [ i ] + 1 ) != um . end ( ) && len < um [ arr [ i ] + 1 ] ) len = um [ arr [ i ] + 1 ]; um [ arr [ i ] ] = len + 1; if ( longLen < um [ arr [ i ] ] ) longLen = um [ arr [ i ] ]; } return longLen; } int f_filled ( int arr [ ], int n ) {} 1 ] ) len = um [ arr [ i ] + 1 ];
um [ arr [ i ] ] = len + 1;
if ( longLen < um [ arr [ i ] ] ) longLen = um [ arr [ i ] ];
}
return longLen;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {20,48,58};
int param0_1[] = {-36,94,-20,-90,-80,88,46,-8,-36,22,70,-16,-48,-54,-82,38,10,-84,12,10,-14,50,12,-28,-64,-38,-84,-62,-56,32,-78,34,-34,48};
int param0_2[] = {0,0,0};
int param0_3[] = {50,28,14,52,92,30,30,27,66,77,39,42,28,84,63,55,18,34,57,45,81,38,23,31,9,35,25,39,30,5,28,7,42,42};
int param0_4[] = {-96,-70,-64,-60,-56,-44,-40,-32,-30,-22,-10,14,26,28,28,38,58,78,80};
int param0_5[] = {1,0,0,0,1,0,0,1,0,1};
int param0_6[] = {8,19,30,37,44,46,49,50,51,57,65,67,70,70,76,83,91,92};
int param0_7[] = {40,62,-6,88,58,66,-40,46,-32,80,22,-30,32,-74,20,-82,-58,-18,30,68,-2,38,-76,-58,22,-22,74};
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};
int param0_9[] = {46,6,71,56,21,97,80,67,26,25,79,86,64,84,53,50,29,19,95,58,14,15,63,1,76,64,11,47,9,97,54,27};
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,1,22,11,8,13,20,12,17};
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) (x",
"d) 1",
"e) y)?"
] | 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 ans = INT_MIN;
for ( int i = 0;
i < n;
i ++ ) {
int curr_xor = 0;
for ( int j = i;
j < n;
j ++ ) {
curr_xor = curr_xor ^ arr [ j ];
ans = max ( ans, curr_xor );
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
rr_xor = 0;
for ( int j = i;
j < n;
j ++ ) {
curr_xor = curr_xor ^ arr [ j ];
ans = max ( ans, curr_xor );
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,7,7,11,12,18,20,23,27,30,44,47,53,53,55,57,57,58,61,62,67,74,76,80,86,86};
int param0_1[] = {-34,-4,68,-82,54,20,6,-18,-70,98,-40,80,-28,78,28,56,26,2,2,-56,-66,44,0,-72,12,54,-40,18,28,-48,-56,72,84,60,76,26,-8,62};
int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {33,98};
int param0_4[] = {-92,-80,-76,-76,-74,-58,-44,-38,-34,-32,-30,-24,-20,-18,-4,-2,2,8,44,52,52,56,70,72,80,80,98};
int param0_5[] = {0,0,0,1,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0};
int param0_6[] = {1,2,3,6,9,15,15,18,19,25,31,31,33,37,39,47,49,51,51,52,52,54,58,59,59,61,62,62,65,66,66,66,66,67,71,76,77,78,79,80,83,86,87,92,97,97,98,99};
int param0_7[] = {34,-90,64,88,-46,-4,-96,76,-32,10,-8,-24,32,-4,86,-20,-86,-88,-72,64,12,66,-96,-84,16,-58,-48,80,-80,70,-94,-84,56,8,-14,86,72,-16,-18,74,40,34,20,80};
int param0_8[] = {1,1};
int param0_9[] = {57,76,2,30,24,12,49,12,5,75,55,17,62,87,21,91,88,10,20,49,46,79,51,33,94,59,48,97,70,49};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {13,21,12,1,15,33,38,35,1,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) / [MASK] (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int ans = INT_MIN; for ( int i = 0; i < n; i ++ ) { int curr_xor = 0; for ( int j = i; j < n; j ++ ) { curr_xor = curr_xor ^ arr [ j ]; ans = max ( ans, curr_xor ); } } return ans; } int f_filled ( int arr [ ], int n ) {}rr_xor = 0;
for ( int j = i;
j < n;
j ++ ) {
curr_xor = curr_xor ^ arr [ j ];
ans = max ( ans, curr_xor );
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,7,7,11,12,18,20,23,27,30,44,47,53,53,55,57,57,58,61,62,67,74,76,80,86,86};
int param0_1[] = {-34,-4,68,-82,54,20,6,-18,-70,98,-40,80,-28,78,28,56,26,2,2,-56,-66,44,0,-72,12,54,-40,18,28,-48,-56,72,84,60,76,26,-8,62};
int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {33,98};
int param0_4[] = {-92,-80,-76,-76,-74,-58,-44,-38,-34,-32,-30,-24,-20,-18,-4,-2,2,8,44,52,52,56,70,72,80,80,98};
int param0_5[] = {0,0,0,1,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0};
int param0_6[] = {1,2,3,6,9,15,15,18,19,25,31,31,33,37,39,47,49,51,51,52,52,54,58,59,59,61,62,62,65,66,66,66,66,67,71,76,77,78,79,80,83,86,87,92,97,97,98,99};
int param0_7[] = {34,-90,64,88,-46,-4,-96,76,-32,10,-8,-24,32,-4,86,-20,-86,-88,-72,64,12,66,-96,-84,16,-58,-48,80,-80,70,-94,-84,56,8,-14,86,72,-16,-18,74,40,34,20,80};
int param0_8[] = {1,1};
int param0_9[] = {57,76,2,30,24,12,49,12,5,75,55,17,62,87,21,91,88,10,20,49,46,79,51,33,94,59,48,97,70,49};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {13,21,12,1,15,33,38,35,1,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;
} | sizeof | [
"a) sizeof",
"b) return",
"c) i",
"d) +",
"e) res"
] | 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 ) {
if ( n == 1 ) return a [ 0 ];
int max_neg = INT_MIN;
int min_pos = INT_MAX;
int count_neg = 0, count_zero = 0;
int prod = 1;
for ( int i = 0;
i < n;
i ++ ) {
if ( a [ i ] == 0 ) {
count_zero ++;
continue;
}
if ( a [ i ] < 0 ) {
count_neg ++;
max_neg = max ( max_neg, a [ i ] );
}
if ( a [ i ] > 0 ) min_pos = min ( min_pos, a [ i ] );
prod = prod * a [ i ];
}
if ( count_zero == n || ( count_neg == 0 && count_zero > 0 ) ) return 0;
if ( count_neg == 0 ) return min_pos;
if ( ! ( count_neg & 1 ) && count_neg != 0 ) {
prod = prod / max_neg;
}
return prod;
}
int f_filled ( int a [ ], int n ) {}
ero > 0 ) ) return 0;
if ( count_neg == 0 ) return min_pos;
if ( ! ( count_neg & 1 ) && count_neg != 0 ) {
prod = prod / max_neg;
}
return prod;
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,6,7,8,8,9,12,12,12,13,15,15,15,16,18,18,18,19,20,21,22,22,23,28,29,30,30,33,33,35,35,36,40,43,58,63,73,78,82,83,84,87,89,89,92,94};
int param0_1[] = {18,-6,-8,98,66,-86,24,6,58,74,82};
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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {97,79,93,41,76,34,94,57,63,98,52,62,96,7,63,44,55,43,36,66,35,14,24,40,26,16,67,19,31,86,64,93,85,86,66,24,73,86,45,99,25,98,38,57};
int param0_4[] = {-58,-48,-46,-36,0,18};
int param0_5[] = {1,1,1,0,0,0,1,0,1,0,0,1,1,0,1,0,0,0,0,0,1,0,0,1,1,0,1,1,0,0,1,0,1,0,0,1,0};
int param0_6[] = {1,3,5,15,18,19,21,23,29,29,33,33,34,37,39,43,43,68,73,74,75,84,87,88,89,90,93};
int param0_7[] = {74,70,-36,16,10,60,-82,96,-30,58,56,-54,-14,94,10,-82,-80,-40,-72,-68,8,38,-50,-76,34,2,-66,-30,26};
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};
int param0_9[] = {74,74,8,74,85,41,31,3,84,46,73,39,64,72,28,83,98,27,64,7,95,37,10,38,77,32,69,72,62,96,5,81,34,96,80,25,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[] = {23,10,25,30,3,36,18,15,20,33};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n ) { if ( n == 1 ) return a [ 0 ]; int max_neg = INT_MIN; int min_pos = INT_MAX; int count_neg = 0, count_zero = 0; int prod = 1; for ( int i = 0; i < n; i ++ ) { if ( [MASK] [ i ] == 0 ) { count_zero ++; continue; } if ( a [ i ] < 0 ) { count_neg ++; max_neg = max ( max_neg, a [ i ] ); } if ( a [ i ] > 0 ) min_pos = min ( min_pos, a [ i ] ); prod = prod * a [ i ]; } if ( count_zero == n || ( count_neg == 0 && count_zero > 0 ) ) return 0; if ( count_neg == 0 ) return min_pos; if ( ! ( count_neg & 1 ) && count_neg != 0 ) { prod = prod / max_neg; } return prod; } int f_filled ( int a [ ], int n ) {}ero > 0 ) ) return 0;
if ( count_neg == 0 ) return min_pos;
if ( ! ( count_neg & 1 ) && count_neg != 0 ) {
prod = prod / max_neg;
}
return prod;
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,6,7,8,8,9,12,12,12,13,15,15,15,16,18,18,18,19,20,21,22,22,23,28,29,30,30,33,33,35,35,36,40,43,58,63,73,78,82,83,84,87,89,89,92,94};
int param0_1[] = {18,-6,-8,98,66,-86,24,6,58,74,82};
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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {97,79,93,41,76,34,94,57,63,98,52,62,96,7,63,44,55,43,36,66,35,14,24,40,26,16,67,19,31,86,64,93,85,86,66,24,73,86,45,99,25,98,38,57};
int param0_4[] = {-58,-48,-46,-36,0,18};
int param0_5[] = {1,1,1,0,0,0,1,0,1,0,0,1,1,0,1,0,0,0,0,0,1,0,0,1,1,0,1,1,0,0,1,0,1,0,0,1,0};
int param0_6[] = {1,3,5,15,18,19,21,23,29,29,33,33,34,37,39,43,43,68,73,74,75,84,87,88,89,90,93};
int param0_7[] = {74,70,-36,16,10,60,-82,96,-30,58,56,-54,-14,94,10,-82,-80,-40,-72,-68,8,38,-50,-76,34,2,-66,-30,26};
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};
int param0_9[] = {74,74,8,74,85,41,31,3,84,46,73,39,64,72,28,83,98,27,64,7,95,37,10,38,77,32,69,72,62,96,5,81,34,96,80,25,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[] = {23,10,25,30,3,36,18,15,20,33};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | a | [
"a) )",
"b) i",
"c) a",
"d) namespace",
"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 ) {
if ( n < 3 ) return - 1;
int max_product = INT_MIN;
for ( int i = 0;
i < n - 2;
i ++ ) for ( int j = i + 1;
j < n - 1;
j ++ ) for ( int k = j + 1;
k < n;
k ++ ) max_product = max ( max_product, arr [ i ] * arr [ j ] * arr [ k ] );
return max_product;
}
int f_filled ( int arr [ ], int n ) {}
;
j < n - 1;
j ++ ) for ( int k = j + 1;
k < n;
k ++ ) max_product = max ( max_product, arr [ i ] * arr [ j ] * arr [ k ] );
return max_product;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {41,66,77};
int param0_1[] = {92,-34,-36,-50,20,-94,2,-86,22,-50,74,84,52,-84,98,-50,88,26,-36,-36,6,-50,-48,-84,38,-96,-62,34,52,92,40,-84,18,-90,54,-38,-74,-98,-8,-92,-60,86,-36,94,56};
int param0_2[] = {0,0,1};
int param0_3[] = {2,77,99,95,78,15,69,39,34,43,66,45,97,27,67,62,64,2,28,94,41,87,97,52,14,61,78,50};
int param0_4[] = {-62,-28,40,76};
int param0_5[] = {0,1,1,0,1,1,1,1,1};
int param0_6[] = {2,6,10,11,12,12,17,18,18,19,20,22,24,25,30,35,36,37,40,41,42,47,60,60,64,69,69,70,73,79,80,83,97,97,97};
int param0_7[] = {-72,98,68,18,92,-84,50,32,-90,-40,50,60,-50,-50,50,24,30,94,-98,-6,46,-46,-24,-62,-20,62,-76};
int param0_8[] = {0,0,0,0,0,1,1,1};
int param0_9[] = {85,36,7,69,9,45,18,47,1,78,72,53,37,20,95,71,58,41};
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,40,1,26,3,5,25,14,7,14};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { if ( n < 3 ) return - 1; int max_product = INT_MIN; for ( int i = 0; i < n - 2; i ++ ) for ( int j = i + 1; j < n - 1; j ++ ) for ( int k = j + 1; k < n; k ++ ) max_product = max [MASK] max_product, arr [ i ] * arr [ j ] * arr [ k ] ); return max_product; } int f_filled ( int arr [ ], int n ) {};
j < n - 1;
j ++ ) for ( int k = j + 1;
k < n;
k ++ ) max_product = max ( max_product, arr [ i ] * arr [ j ] * arr [ k ] );
return max_product;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {41,66,77};
int param0_1[] = {92,-34,-36,-50,20,-94,2,-86,22,-50,74,84,52,-84,98,-50,88,26,-36,-36,6,-50,-48,-84,38,-96,-62,34,52,92,40,-84,18,-90,54,-38,-74,-98,-8,-92,-60,86,-36,94,56};
int param0_2[] = {0,0,1};
int param0_3[] = {2,77,99,95,78,15,69,39,34,43,66,45,97,27,67,62,64,2,28,94,41,87,97,52,14,61,78,50};
int param0_4[] = {-62,-28,40,76};
int param0_5[] = {0,1,1,0,1,1,1,1,1};
int param0_6[] = {2,6,10,11,12,12,17,18,18,19,20,22,24,25,30,35,36,37,40,41,42,47,60,60,64,69,69,70,73,79,80,83,97,97,97};
int param0_7[] = {-72,98,68,18,92,-84,50,32,-90,-40,50,60,-50,-50,50,24,30,94,-98,-6,46,-46,-24,-62,-20,62,-76};
int param0_8[] = {0,0,0,0,0,1,1,1};
int param0_9[] = {85,36,7,69,9,45,18,47,1,78,72,53,37,20,95,71,58,41};
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,40,1,26,3,5,25,14,7,14};
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) import",
"c) (",
"d) <bits/stdc++.h>",
"e) java.util.stream.*;"
] | 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 ) {
float fibo = 2.078087 * log ( n ) + 1.672276;
return round ( fibo );
}
int f_filled ( int n ) {}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
float fibo = 2.078087 * log ( n ) + 1.672276;
return round ( fibo );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {20,95,39,21,94,79,56,62,23,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 [MASK] arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { float fibo = 2.078087 * log ( n ) + 1.672276; return round ( fibo ); } int f_filled ( int n ) {}void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
float fibo = 2.078087 * log ( n ) + 1.672276;
return round ( fibo );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {20,95,39,21,94,79,56,62,23,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;
} | (int | [
"a) (int",
"b) [",
"c) return",
"d) m",
"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);}
double f_gold ( int n ) {
int i = 1;
double res = 0.0;
bool sign = true;
while ( n > 0 ) {
n --;
if ( sign ) {
sign = ! sign;
res = res + ( double ) ++ i / ++ i;
}
else {
sign = ! sign;
res = res - ( double ) ++ i / ++ i;
}
}
return res;
}
double f_filled ( int n ) {}
sign = ! sign;
res = res + ( double ) ++ i / ++ i;
}
else {
sign = ! sign;
res = res - ( double ) ++ i / ++ i;
}
}
return res;
}
double f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {49,4,60,90,96,29,86,47,77,87};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)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 ( int n ) { int i = 1; double res = 0.0; bool sign = true; while ( n > 0 ) { n --; if ( sign ) { sign = ! sign; res = res + ( double ) ++ i / ++ i; } else { sign = ! sign; res = res - ( double ) ++ i / ++ i; } } return [MASK] } double f_filled ( int n ) {} sign = ! sign;
res = res + ( double ) ++ i / ++ i;
}
else {
sign = ! sign;
res = res - ( double ) ++ i / ++ i;
}
}
return res;
}
double f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {49,4,60,90,96,29,86,47,77,87};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | res; | [
"a) res;",
"b) n",
"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);}
long long int f_gold ( int arr [ ], int n ) {
int res = 0;
unordered_map < int, int > m;
for ( int i = 0;
i < n;
i ++ ) {
int sum = 0;
for ( int j = i;
j < n;
j ++ ) {
sum += arr [ j ];
m [ sum ] ++;
}
}
for ( auto x : m ) if ( x . second == 1 ) res += x . first;
return res;
}
long long int f_filled ( int arr [ ], int n ) {}
;
j ++ ) {
sum += arr [ j ];
m [ sum ] ++;
}
}
for ( auto x : m ) if ( x . second == 1 ) res += x . first;
return res;
}
long long int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,24,34,35,36,40,49,51,53,74,78};
int param0_1[] = {-34,60,32};
int param0_2[] = {0};
int param0_3[] = {80,64,10,82,14,75,51,91,1,25,98,22,36,27,21,31,93,6,52,91,80,8,62,95,10,71,40,80,35,86,85,26,74,72,64,88,4,71,4,16};
int param0_4[] = {-94,-46,-36,-24,-22,0,10,14,34,34,90,92,98};
int param0_5[] = {1,0,1,0,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,1,1,0,1,1,1,1,1,1,0,0,0,1,0,1,0,1};
int param0_6[] = {19,20,20,24,25,33,43,47,57,61,61,64,65,71,72,73,75,82,90,93,95};
int param0_7[] = {-6,56,58,-36,70,-92,30,58,-40,98,80,-96,-4,-88,34,76,40,-32,-94,-26,8,72,-56,-96,-88,-24,36,14,-88,-32,90,4,-88,28,18};
int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {91,51,15,78,55,3,10,24,42,84,66,78,10,41,21,53,69,57,20,22,50,72,8,80,12,91,29,95,38,74,95,26,10,57,51,25,49,74,15,42,99,21,27};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {9,2,0,31,9,21,15,24,11,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);} long long int f_gold ( int arr [ ], int n ) { int res = 0; unordered_map < int, int > m; for [MASK] int i = 0; i < n; i ++ ) { int sum = 0; for ( int j = i; j < n; j ++ ) { sum += arr [ j ]; m [ sum ] ++; } } for ( auto x : m ) if ( x . second == 1 ) res += x . first; return res; } long long int f_filled ( int arr [ ], int n ) {};
j ++ ) {
sum += arr [ j ];
m [ sum ] ++;
}
}
for ( auto x : m ) if ( x . second == 1 ) res += x . first;
return res;
}
long long int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,24,34,35,36,40,49,51,53,74,78};
int param0_1[] = {-34,60,32};
int param0_2[] = {0};
int param0_3[] = {80,64,10,82,14,75,51,91,1,25,98,22,36,27,21,31,93,6,52,91,80,8,62,95,10,71,40,80,35,86,85,26,74,72,64,88,4,71,4,16};
int param0_4[] = {-94,-46,-36,-24,-22,0,10,14,34,34,90,92,98};
int param0_5[] = {1,0,1,0,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,1,1,0,1,1,1,1,1,1,0,0,0,1,0,1,0,1};
int param0_6[] = {19,20,20,24,25,33,43,47,57,61,61,64,65,71,72,73,75,82,90,93,95};
int param0_7[] = {-6,56,58,-36,70,-92,30,58,-40,98,80,-96,-4,-88,34,76,40,-32,-94,-26,8,72,-56,-96,-88,-24,36,14,-88,-32,90,4,-88,28,18};
int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {91,51,15,78,55,3,10,24,42,84,66,78,10,41,21,53,69,57,20,22,50,72,8,80,12,91,29,95,38,74,95,26,10,57,51,25,49,74,15,42,99,21,27};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {9,2,0,31,9,21,15,24,11,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;
} | ( | [
"a) ;",
"b) {return",
"c) else",
"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 ( char slots [] [ ], int n, int m ) {
int counts [ m ] = {
0 };
for ( int i = 0;
i < n;
i ++ ) for ( int j = 0;
j < m;
j ++ ) if ( slots [ i ] [ j ] == '1' ) counts [ j ] ++;
return * max_element ( counts, counts + m );
}
int f_filled ( char slots [] [ ], int n, int m ) {}
for ( int j = 0;
j < m;
j ++ ) if ( slots [ i ] [ j ] == '1' ) counts [ j ] ++;
return * max_element ( counts, counts + m );
}
int f_filled ( char slots [] [ ], int n, int m ) {}
int main(void) {
int n_success = 0;
char param0_0 [][] = {gcte","ULo","wGb","unnP"};
string *param0[1] = {param0_0};
int param1[] = {18,3,11,46,33,8,5,7,1,7};
int param2[] = {30,7,10,29,21,7,4,12,1,8};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char slots [] [ ], int n, int m ) { [MASK] counts [ m ] = { 0 }; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < m; j ++ ) if ( slots [ i ] [ j ] == '1' ) counts [ j ] ++; return * max_element ( counts, counts + m ); } int f_filled ( char slots [] [ ], int n, int m ) {} for ( int j = 0;
j < m;
j ++ ) if ( slots [ i ] [ j ] == '1' ) counts [ j ] ++;
return * max_element ( counts, counts + m );
}
int f_filled ( char slots [] [ ], int n, int m ) {}
int main(void) {
int n_success = 0;
char param0_0 [][] = {gcte","ULo","wGb","unnP"};
string *param0[1] = {param0_0};
int param1[] = {18,3,11,46,33,8,5,7,1,7};
int param2[] = {30,7,10,29,21,7,4,12,1,8};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) def",
"b) +",
"c) int",
"d) (",
"e) for"
] | 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 m ) {
int max = 0, min = 0;
sort ( arr, arr + n );
for ( int i = 0, j = n - 1;
i < m;
i ++, j -- ) {
min += arr [ i ];
max += arr [ j ];
}
return ( max - min );
}
int f_filled ( int arr [ ], int n, int m ) {}
t ( arr, arr + n );
for ( int i = 0, j = n - 1;
i < m;
i ++, j -- ) {
min += arr [ i ];
max += arr [ j ];
}
return ( max - min );
}
int f_filled ( int arr [ ], int n, int m ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,3,6,16,21,22,23,27,27,28,29,29,31,31,37,37,38,40,41,43,51,52,53,55,55,56,57,63,67,67,67,72,75,79,82,84,91,92,93,96,96,97};
int param0_1[] = {58,-62,24,-10,-30,-92,-50,-32,54,-18,94,-14,-40,-16,48};
int param0_2[] = {0,0};
int param0_3[] = {7,51,6,71,10,29,49,63,77,13,13,56,65,34,76,16,84,2,89,83,65,1,5,99,11,59,71,54,17,9,11,48,2,65,62,77,29,80,97,83,44,91,4,44,21,12,24};
int param0_4[] = {-90,-58,6,16,20,34,36,38,48,66,82,84,86,90,90};
int param0_5[] = {0,0,1,1,0};
int param0_6[] = {7,12,15,15,21,37,40,45,50,52,53,68,68,72,75,78,86,86,88};
int param0_7[] = {22,-20,94,-88,72,44};
int param0_8[] = {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[] = {32,63,87,26,77,4,87,60,21,25,30,65,38,96,11,75};
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,8,1,31,14,3,16,4,25,12};
int param2[] = {25,12,1,34,8,2,18,3,17,15};
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 [MASK] ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n, int m ) { int max = 0, min = 0; sort ( arr, arr + n ); for ( int i = 0, j = n - 1; i < m; i ++, j -- ) { min += arr [ i ]; max += arr [ j ]; } return ( max - min ); } int f_filled ( int arr [ ], int n, int m ) {}t ( arr, arr + n );
for ( int i = 0, j = n - 1;
i < m;
i ++, j -- ) {
min += arr [ i ];
max += arr [ j ];
}
return ( max - min );
}
int f_filled ( int arr [ ], int n, int m ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,3,6,16,21,22,23,27,27,28,29,29,31,31,37,37,38,40,41,43,51,52,53,55,55,56,57,63,67,67,67,72,75,79,82,84,91,92,93,96,96,97};
int param0_1[] = {58,-62,24,-10,-30,-92,-50,-32,54,-18,94,-14,-40,-16,48};
int param0_2[] = {0,0};
int param0_3[] = {7,51,6,71,10,29,49,63,77,13,13,56,65,34,76,16,84,2,89,83,65,1,5,99,11,59,71,54,17,9,11,48,2,65,62,77,29,80,97,83,44,91,4,44,21,12,24};
int param0_4[] = {-90,-58,6,16,20,34,36,38,48,66,82,84,86,90,90};
int param0_5[] = {0,0,1,1,0};
int param0_6[] = {7,12,15,15,21,37,40,45,50,52,53,68,68,72,75,78,86,86,88};
int param0_7[] = {22,-20,94,-88,72,44};
int param0_8[] = {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[] = {32,63,87,26,77,4,87,60,21,25,30,65,38,96,11,75};
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,8,1,31,14,3,16,4,25,12};
int param2[] = {25,12,1,34,8,2,18,3,17,15};
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) min(int",
"b) sizeof",
"c) 1;",
"d) [",
"e) n"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int m ) {
int dp [ n + 1 ] [ m + 1 ];
for ( int i = 0;
i <= n;
i ++ ) dp [ i ] [ 0 ] = 1;
for ( int i = 0;
i <= m;
i ++ ) dp [ 0 ] [ i ] = 1;
for ( int i = 1;
i <= n;
i ++ ) for ( int j = 1;
j <= m;
j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i ] [ j - 1 ];
return dp [ n ] [ m ];
}
int f_filled ( int n, int m ) {}
1;
for ( int i = 1;
i <= n;
i ++ ) for ( int j = 1;
j <= m;
j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i ] [ j - 1 ];
return dp [ n ] [ m ];
}
int f_filled ( int n, int m ) {}
int main(void) {
int n_success = 0;
int param0[] = {55,74,76,6,2,36,40,14,42,62};
int param1[] = {30,15,57,90,64,1,71,56,4,12};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; [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 n, int m ) { int dp [ n + 1 ] [ m + 1 ]; for ( int i = 0; i <= n; i ++ ) dp [ i ] [ 0 ] = 1; for ( int i = 0; i <= m; i ++ ) dp [ 0 ] [ i ] = 1; for ( int i = 1; i <= n; i ++ ) for ( int j = 1; j <= m; j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i ] [ j - 1 ]; return dp [ n ] [ m ]; } int f_filled ( int n, int m ) {} 1;
for ( int i = 1;
i <= n;
i ++ ) for ( int j = 1;
j <= m;
j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i ] [ j - 1 ];
return dp [ n ] [ m ];
}
int f_filled ( int n, int m ) {}
int main(void) {
int n_success = 0;
int param0[] = {55,74,76,6,2,36,40,14,42,62};
int param1[] = {30,15,57,90,64,1,71,56,4,12};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | } | [
"a) ,",
"b) n)",
"c) =",
"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 ) {
if ( n < 10 ) return n * ( n + 1 ) / 2;
int d = log10 ( n );
int * a = new int [ d + 1 ];
a [ 0 ] = 0, a [ 1 ] = 45;
for ( int i = 2;
i <= d;
i ++ ) a [ i ] = a [ i - 1 ] * 10 + 45 * ceil ( pow ( 10, i - 1 ) );
int p = ceil ( pow ( 10, d ) );
int msd = n / p;
return msd * a [ d ] + ( msd * ( msd - 1 ) / 2 ) * p + msd * ( 1 + n % p ) + f_gold ( n % p );
}
int f_filled ( int n ) {}
( 10, i - 1 ) );
int p = ceil ( pow ( 10, d ) );
int msd = n / p;
return msd * a [ d ] + ( msd * ( msd - 1 ) / 2 ) * p + msd * ( 1 + n % p ) + f_gold ( n % p );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {29,97,71,82,69,30,82,32,77,39};
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 ) { if ( n < 10 ) return n * ( n + 1 ) / 2; int d = log10 ( n ); int * a = new int [ d + 1 ]; a [ 0 ] = 0, a [ 1 ] = [MASK] for ( int i = 2; i <= d; i ++ ) a [ i ] = a [ i - 1 ] * 10 + 45 * ceil ( pow ( 10, i - 1 ) ); int p = ceil ( pow ( 10, d ) ); int msd = n / p; return msd * a [ d ] + ( msd * ( msd - 1 ) / 2 ) * p + msd * ( 1 + n % p ) + f_gold ( n % p ); } int f_filled ( int n ) {} ( 10, i - 1 ) );
int p = ceil ( pow ( 10, d ) );
int msd = n / p;
return msd * a [ d ] + ( msd * ( msd - 1 ) / 2 ) * p + msd * ( 1 + n % p ) + f_gold ( n % p );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {29,97,71,82,69,30,82,32,77,39};
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;
} | 45; | [
"a) )",
"b) for",
"c) 45;",
"d) <math.h>",
"e) <iomanip>"
] | 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 n ) {
bool arr [ 10 ];
for ( int i = 0;
i < 10;
i ++ ) arr [ i ] = false;
while ( n > 0 ) {
int digit = n % 10;
if ( arr [ digit ] ) return false;
arr [ digit ] = true;
n = n / 10;
}
return true;
}
bool f_filled ( int n ) {}
+ ) arr [ i ] = false;
while ( n > 0 ) {
int digit = n % 10;
if ( arr [ digit ] ) return false;
arr [ digit ] = true;
n = n / 10;
}
return true;
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {474,9445,90,30,37453,27,2400,98,46,722};
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 ) { bool arr [ 10 ]; for ( int i = 0; i < 10; i ++ ) arr [ i ] = false; while ( n > 0 ) { int digit = n % 10; if ( arr [ digit [MASK] ) return false; arr [ digit ] = true; n = n / 10; } return true; } bool f_filled ( int n ) {}+ ) arr [ i ] = false;
while ( n > 0 ) {
int digit = n % 10;
if ( arr [ digit ] ) return false;
arr [ digit ] = true;
n = n / 10;
}
return true;
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {474,9445,90,30,37453,27,2400,98,46,722};
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) x",
"b) javafx.util.Pair;",
"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);}
int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int k ) {
int sorted1 [ m + n ];
int i = 0, j = 0, d = 0;
while ( i < m && j < n ) {
if ( arr1 [ i ] < arr2 [ j ] ) sorted1 [ d ++ ] = arr1 [ i ++ ];
else sorted1 [ d ++ ] = arr2 [ j ++ ];
}
while ( i < m ) sorted1 [ d ++ ] = arr1 [ i ++ ];
while ( j < n ) sorted1 [ d ++ ] = arr2 [ j ++ ];
return sorted1 [ k - 1 ];
}
int f_filled ( int arr1 [ ], int arr2 [ ], int m, int n, int k ) {}
e ( i < m ) sorted1 [ d ++ ] = arr1 [ i ++ ];
while ( j < n ) sorted1 [ d ++ ] = arr2 [ j ++ ];
return sorted1 [ k - 1 ];
}
int f_filled ( int arr1 [ ], int arr2 [ ], int m, int n, int k ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,2,4,4,9,10,14,16,16,19,20,21,25,26,29,36,36,37,38,44,44,49,53,54,56,61,62,64,72,72,73,77,80,84,84,87,93,94};
int param0_1[] = {2,4,-90,62,22,-94,-74,-22,44,-94,20,-40,20,0,32,24,78,8,4,98,-74,-60};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {85,44,62,2,71,88,60,78,32,46,17,47,65,78,65,94};
int param0_4[] = {-94,-84,-82,-70,-70,-60,-54,-54,-52,-52,-46,-40,-40,-36,-34,-32,-30,-22,-18,-16,-10,-4,8,12,18,22,32,38,38,44,50,56,64,82,84,86,88};
int param0_5[] = {0,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,1,1};
int param0_6[] = {53,96,99};
int param0_7[] = {98,86,36,-68,86,22,52,-20,-2,74,-72,86,80,-78,14,62,10,94,-66,78,28,92,-8,46,-24,66};
int param0_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};
int param0_9[] = {6,21,86,58,48,27,18,73,16,79,51,33,63,26,37,88,48,58,44,32,58,23,31};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {6,8,10,10,12,14,24,31,33,33,35,35,35,41,46,47,49,51,52,56,57,59,62,65,72,72,73,73,79,80,82,83,83,84,87,87,93,99};
int param1_1[] = {58,74,-46,38,-58,-78,-32,-84,84,-54,84,-34,-26,88,74,48,26,-92,68,-86,74,88};
int param1_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};
int param1_3[] = {18,3,15,9,61,73,3,62,87,1,54,97,61,37,23,65};
int param1_4[] = {-92,-68,-64,-62,-54,-52,-52,-34,-24,-22,-20,-12,-12,-10,6,10,14,22,22,24,24,30,30,36,36,48,50,56,58,64,68,80,84,88,88,92,94};
int param1_5[] = {1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,1,0,1,0,1,1,0,0,0,1,0};
int param1_6[] = {30,55,56};
int param1_7[] = {72,-72,-90,24,-22,60,78,-68,98,26,-30,-20,44,-96,8,90,0,98,-24,-68,-32,-62,0,-60,26,-98};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_9[] = {87,77,44,15,70,89,36,79,82,3,18,76,37,79,85,97,19,53,17,74,87,58,49};
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[] = {27,18,30,11,19,24,1,22,42,14};
int param3[] = {21,11,31,11,26,17,1,19,40,22};
int param4[] = {23,12,42,13,28,23,1,24,42,19};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[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 arr1 [ ], int arr2 [ ], int m, int n, int k ) { int sorted1 [ m + n ]; int i = 0, j = 0, d = 0; while ( i < m && j < n ) { if ( arr1 [ i ] < arr2 [ j ] ) sorted1 [ d ++ ] = arr1 [ i ++ ]; else sorted1 [ d ++ ] = arr2 [ j ++ ]; } while ( i < m ) sorted1 [ d ++ ] = arr1 [ i ++ ]; while ( j < n ) sorted1 [ d ++ ] = arr2 [ j ++ ]; return sorted1 [ k - 1 ]; } int f_filled ( int arr1 [ ], int arr2 [ ], int m, int n, int k ) {}e ( i < m ) sorted1 [ d ++ ] = arr1 [ i ++ ];
while ( j < n ) sorted1 [ d ++ ] = arr2 [ j ++ ];
return sorted1 [ k - 1 ];
}
int f_filled ( int arr1 [ ], int arr2 [ ], int m, int n, int k ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,2,4,4,9,10,14,16,16,19,20,21,25,26,29,36,36,37,38,44,44,49,53,54,56,61,62,64,72,72,73,77,80,84,84,87,93,94};
int param0_1[] = {2,4,-90,62,22,-94,-74,-22,44,-94,20,-40,20,0,32,24,78,8,4,98,-74,-60};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {85,44,62,2,71,88,60,78,32,46,17,47,65,78,65,94};
int param0_4[] = {-94,-84,-82,-70,-70,-60,-54,-54,-52,-52,-46,-40,-40,-36,-34,-32,-30,-22,-18,-16,-10,-4,8,12,18,22,32,38,38,44,50,56,64,82,84,86,88};
int param0_5[] = {0,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,1,1};
int param0_6[] = {53,96,99};
int param0_7[] = {98,86,36,-68,86,22,52,-20,-2,74,-72,86,80,-78,14,62,10,94,-66,78,28,92,-8,46,-24,66};
int param0_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};
int param0_9[] = {6,21,86,58,48,27,18,73,16,79,51,33,63,26,37,88,48,58,44,32,58,23,31};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {6,8,10,10,12,14,24,31,33,33,35,35,35,41,46,47,49,51,52,56,57,59,62,65,72,72,73,73,79,80,82,83,83,84,87,87,93,99};
int param1_1[] = {58,74,-46,38,-58,-78,-32,-84,84,-54,84,-34,-26,88,74,48,26,-92,68,-86,74,88};
int param1_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};
int param1_3[] = {18,3,15,9,61,73,3,62,87,1,54,97,61,37,23,65};
int param1_4[] = {-92,-68,-64,-62,-54,-52,-52,-34,-24,-22,-20,-12,-12,-10,6,10,14,22,22,24,24,30,30,36,36,48,50,56,58,64,68,80,84,88,88,92,94};
int param1_5[] = {1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,1,0,1,0,1,1,0,0,0,1,0};
int param1_6[] = {30,55,56};
int param1_7[] = {72,-72,-90,24,-22,60,78,-68,98,26,-30,-20,44,-96,8,90,0,98,-24,-68,-32,-62,0,-60,26,-98};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_9[] = {87,77,44,15,70,89,36,79,82,3,18,76,37,79,85,97,19,53,17,74,87,58,49};
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[] = {27,18,30,11,19,24,1,22,42,14};
int param3[] = {21,11,31,11,26,17,1,19,40,22};
int param4[] = {23,12,42,13,28,23,1,24,42,19};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) int",
"b) s",
"c) ]",
"d) n",
"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);}
char f_gold [] ( char number [], int divisor ) {
char ans [];
int idx = 0;
int temp = number [ idx ] - '0';
while ( temp < divisor ) temp = temp * 10 + ( number [ ++ idx ] - '0' );
while ( len(number) > idx ) {
ans += ( temp / divisor ) + '0';
temp = ( temp % divisor ) * 10 + number [ ++ idx ] - '0';
}
if ( strlen(ans) == 0 ) return "0";
return ans;
}
char f_filled [] ( char number [], int divisor ) {}
temp / divisor ) + '0';
temp = ( temp % divisor ) * 10 + number [ ++ idx ] - '0';
}
if ( strlen(ans) == 0 ) return "0";
return ans;
}
char f_filled [] ( char number [], int divisor ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"xcI","92733233370448","01","ENxfvIzh","00478135","11","O","813","011011","aot"};
int param1[] = {96,71,12,62,85,92,24,31,78,17};
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 [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);} char f_gold [] ( char number [], int divisor ) { char ans []; int idx = 0; int temp = number [ idx ] - '0'; while ( temp < divisor ) temp = temp * 10 + ( number [ ++ idx ] - '0' ); while ( len(number) > idx ) { ans += ( temp / divisor ) + '0'; temp = ( temp % divisor ) * 10 + number [ ++ idx ] - '0'; } if ( strlen(ans) == 0 ) return "0"; return ans; } char f_filled [] ( char number [], int divisor ) {}temp / divisor ) + '0';
temp = ( temp % divisor ) * 10 + number [ ++ idx ] - '0';
}
if ( strlen(ans) == 0 ) return "0";
return ans;
}
char f_filled [] ( char number [], int divisor ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"xcI","92733233370448","01","ENxfvIzh","00478135","11","O","813","011011","aot"};
int param1[] = {96,71,12,62,85,92,24,31,78,17};
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) x,",
"b) }",
"c) i",
"d) <string>",
"e) clock_rot"
] | 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 s [], int K ) {
int n = strlen(s);
int C, c1 = 0, c2 = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( s [ i ] == 'a' ) c1 ++;
if ( s [ i ] == 'b' ) {
c2 ++;
C += c1;
}
}
return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2;
}
int f_filled ( char s [], int K ) {}
++ ) {
if ( s [ i ] == 'a' ) c1 ++;
if ( s [ i ] == 'b' ) {
c2 ++;
C += c1;
}
}
return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2;
}
int f_filled ( char s [], int K ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"KdJ","031","11000","zPbB","9","1010","c","06064629743411","1111","PFXAhru"};
int param1[] = {96,70,59,60,80,41,87,4,18,83};
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) [MASK] return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char s [], int K ) { int n = strlen(s); int C, c1 = 0, c2 = 0; for ( int i = 0; i < n; i ++ ) { if ( s [ i ] == 'a' ) c1 ++; if ( s [ i ] == 'b' ) { c2 ++; C += c1; } } return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2; } int f_filled ( char s [], int K ) {} ++ ) {
if ( s [ i ] == 'a' ) c1 ++;
if ( s [ i ] == 'b' ) {
c2 ++;
C += c1;
}
}
return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2;
}
int f_filled ( char s [], int K ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"KdJ","031","11000","zPbB","9","1010","c","06064629743411","1111","PFXAhru"};
int param1[] = {96,70,59,60,80,41,87,4,18,83};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | { | [
"a) public",
"b) [",
"c) arr",
"d) {",
"e) j"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int sum = 0;
unordered_set < int > s;
for ( int i = 0;
i < n;
i ++ ) {
if ( s . find ( arr [ i ] ) == s . end ( ) ) {
sum += arr [ i ];
s . insert ( arr [ i ] );
}
}
return sum;
}
int f_filled ( int arr [ ], int n ) {}
0;
i < n;
i ++ ) {
if ( s . find ( arr [ i ] ) == s . end ( ) ) {
sum += arr [ i ];
s . insert ( arr [ i ] );
}
}
return sum;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,6,8,10,21,22,27,32,35,36,43,44,46,48,49,55,60,61,69,69,71,72,73,78,88,94};
int param0_1[] = {80,94,16,-74,32,-64,-84,-66,-10};
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[] = {99,4,96,39,39,24,15,47,25,74,7,98,88,91,62,12,31,14,48,26,37,25,11,32,34,64,72,5,80,86,6};
int param0_4[] = {-86,-84,-84,-78,-78,-76,-74,-68,-66,-64,-60,-60,-56,-50,-42,-42,-38,-34,-32,-22,-16,-14,-10,-6,-6,4,4,26,36,36,54,62,64,68,70,76,76,76,84,92,92,94,96};
int param0_5[] = {1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,1,0,0,0,1};
int param0_6[] = {3,3,5,8,32,33,35,35,42,48,67,71,71,74,77,80,94,96,96,97};
int param0_7[] = {-50,-18,-66,76,-54,96,98,26,42,64,-60};
int param0_8[] = {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[] = {70,21,44,82,62,41,86};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {24,6,27,15,27,25,19,9,15,3};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const [MASK] * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int sum = 0; unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) == s . end ( ) ) { sum += arr [ i ]; s . insert ( arr [ i ] ); } } return sum; } int f_filled ( int arr [ ], int n ) {} 0;
i < n;
i ++ ) {
if ( s . find ( arr [ i ] ) == s . end ( ) ) {
sum += arr [ i ];
s . insert ( arr [ i ] );
}
}
return sum;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,6,8,10,21,22,27,32,35,36,43,44,46,48,49,55,60,61,69,69,71,72,73,78,88,94};
int param0_1[] = {80,94,16,-74,32,-64,-84,-66,-10};
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[] = {99,4,96,39,39,24,15,47,25,74,7,98,88,91,62,12,31,14,48,26,37,25,11,32,34,64,72,5,80,86,6};
int param0_4[] = {-86,-84,-84,-78,-78,-76,-74,-68,-66,-64,-60,-60,-56,-50,-42,-42,-38,-34,-32,-22,-16,-14,-10,-6,-6,4,4,26,36,36,54,62,64,68,70,76,76,76,84,92,92,94,96};
int param0_5[] = {1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,1,0,0,0,1};
int param0_6[] = {3,3,5,8,32,33,35,35,42,48,67,71,71,74,77,80,94,96,96,97};
int param0_7[] = {-50,-18,-66,76,-54,96,98,26,42,64,-60};
int param0_8[] = {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[] = {70,21,44,82,62,41,86};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {24,6,27,15,27,25,19,9,15,3};
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) )",
"b) x,",
"c) (",
"d) size",
"e) void"
] | 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 x ) {
return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 );
}
int f_filled ( int x ) {}
sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int x ) {
return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 );
}
int f_filled ( int x ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,99,66,97,95,42,95,89,3,84};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold [MASK] int x ) { return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 ); } int f_filled ( int x ) {} sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int x ) {
return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 );
}
int f_filled ( int x ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,99,66,97,95,42,95,89,3,84};
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) '0'",
"b) hash",
"c) (",
"d) int",
"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);}
int f_gold ( int arr [ ], int n, int k ) {
unordered_map < int, int > count_map;
for ( int i = 0;
i < n;
i ++ ) count_map [ arr [ i ] ] ++;
for ( int i = 0;
i < n;
i ++ ) if ( count_map [ arr [ i ] ] == k ) return arr [ i ];
return - 1;
}
int f_filled ( int arr [ ], int n, int k ) {}
< n;
i ++ ) count_map [ arr [ i ] ] ++;
for ( int i = 0;
i < n;
i ++ ) if ( count_map [ arr [ i ] ] == 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[] = {2,3,4,4,7,18,20,23,27,30,31,31,32,35,36,43,45,46,49,50,53,55,59,60,64,64,65,68,78,80,80,85,95};
int param0_1[] = {-26,32,36,6,64,24,-28,96};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {38,40,43,70,20,40,95,96,81,82};
int param0_4[] = {-68,-8,-8,16,24,54};
int param0_5[] = {1,0,1,0,0,0,1,0,1,0,0,0,1};
int param0_6[] = {13,18,19,28,31,34,49,49,53,57,58,62,75,76,77,78,80,84,84,85,87,91,98,99};
int param0_7[] = {-4,24,-86,-84,30,-16,12,-92,-68,22};
int param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1};
int param0_9[] = {55,44,75,97,25,65,76,53,20,78,25,59,61,29,81,35,15,78,41,44,31,33,39,93,26,67};
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[] = {30,6,15,9,3,6,20,6,8,23};
int param2[] = {2,3,7,1,2,4,2,5,10,20};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void [MASK] a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > count_map; for ( int i = 0; i < n; i ++ ) count_map [ arr [ i ] ] ++; for ( int i = 0; i < n; i ++ ) if ( count_map [ arr [ i ] ] == k ) return arr [ i ]; return - 1; } int f_filled ( int arr [ ], int n, int k ) {} < n;
i ++ ) count_map [ arr [ i ] ] ++;
for ( int i = 0;
i < n;
i ++ ) if ( count_map [ arr [ i ] ] == 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[] = {2,3,4,4,7,18,20,23,27,30,31,31,32,35,36,43,45,46,49,50,53,55,59,60,64,64,65,68,78,80,80,85,95};
int param0_1[] = {-26,32,36,6,64,24,-28,96};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {38,40,43,70,20,40,95,96,81,82};
int param0_4[] = {-68,-8,-8,16,24,54};
int param0_5[] = {1,0,1,0,0,0,1,0,1,0,0,0,1};
int param0_6[] = {13,18,19,28,31,34,49,49,53,57,58,62,75,76,77,78,80,84,84,85,87,91,98,99};
int param0_7[] = {-4,24,-86,-84,30,-16,12,-92,-68,22};
int param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1};
int param0_9[] = {55,44,75,97,25,65,76,53,20,78,25,59,61,29,81,35,15,78,41,44,31,33,39,93,26,67};
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[] = {30,6,15,9,3,6,20,6,8,23};
int param2[] = {2,3,7,1,2,4,2,5,10,20};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | * | [
"a) *",
"b) (int",
"c) n",
"d) #include",
"e) T"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a [ ], int n, int k ) {
if ( k >= n - 1 ) return n;
int best = 0, times = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( a [ i ] > best ) {
best = a [ i ];
if ( i ) times = 1;
}
else times += 1;
if ( times >= k ) return best;
}
return best;
}
int f_filled ( int a [ ], int n, int k ) {}
( a [ i ] > best ) {
best = a [ i ];
if ( i ) times = 1;
}
else times += 1;
if ( times >= k ) return best;
}
return best;
}
int f_filled ( int a [ ], int n, int k ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,5,5,9,10,10,11,14,23,27,31,32,33,33,33,37,39,41,41,42,42,43,47,60,61,68,73,73,73,78,80,80,82,83,86,87,89,92,94,98};
int param0_1[] = {80,-58,64,48,-16,60,-50,-52,62,-86,-96,52,26,-30,14};
int param0_2[] = {0,0,0,0,0,0,0,0,0,1,1};
int param0_3[] = {90,23,43,42,7,71,79};
int param0_4[] = {-96,-96,-90,-84,-68,-64,-56,-56,-50,-50,-48,-46,-28,-18,0,0,6,32,32,34,42,42,46,50,50,52,64,64,70,76,84,88};
int param0_5[] = {1,1,1};
int param0_6[] = {2,9,15,19,26,29,42,45,46,47,55,60,60,61,62,64,68,69,74,79,96};
int param0_7[] = {-32,12,80,42,80,8,58,-76,-42,-98,22,-90,-16,-4,-62,-32,28,12,78,-52,-84,78,88,-76,-52,68,-34,-16,-4,2,-78,-94,-22,34,6,-62,72};
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[] = {52,19};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {33,14,7,4,28,1,14,26,26,1};
int param2[] = {37,13,6,4,21,2,17,31,14,1};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n, int k ) { if ( k >= n - 1 ) return n; int best = 0, times = 0; [MASK] ( int i = 0; i < n; i ++ ) { if ( a [ i ] > best ) { best = a [ i ]; if ( i ) times = 1; } else times += 1; if ( times >= k ) return best; } return best; } int f_filled ( int a [ ], int n, int k ) {}( a [ i ] > best ) {
best = a [ i ];
if ( i ) times = 1;
}
else times += 1;
if ( times >= k ) return best;
}
return best;
}
int f_filled ( int a [ ], int n, int k ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,5,5,9,10,10,11,14,23,27,31,32,33,33,33,37,39,41,41,42,42,43,47,60,61,68,73,73,73,78,80,80,82,83,86,87,89,92,94,98};
int param0_1[] = {80,-58,64,48,-16,60,-50,-52,62,-86,-96,52,26,-30,14};
int param0_2[] = {0,0,0,0,0,0,0,0,0,1,1};
int param0_3[] = {90,23,43,42,7,71,79};
int param0_4[] = {-96,-96,-90,-84,-68,-64,-56,-56,-50,-50,-48,-46,-28,-18,0,0,6,32,32,34,42,42,46,50,50,52,64,64,70,76,84,88};
int param0_5[] = {1,1,1};
int param0_6[] = {2,9,15,19,26,29,42,45,46,47,55,60,60,61,62,64,68,69,74,79,96};
int param0_7[] = {-32,12,80,42,80,8,58,-76,-42,-98,22,-90,-16,-4,-62,-32,28,12,78,-52,-84,78,88,-76,-52,68,-34,-16,-4,2,-78,-94,-22,34,6,-62,72};
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[] = {52,19};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {33,14,7,4,28,1,14,26,26,1};
int param2[] = {37,13,6,4,21,2,17,31,14,1};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | for | [
"a) 0",
"b) ,",
"c) 1",
"d) i",
"e) for"
] | 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 ans = 0;
for ( int i = 0;
i < n;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) if ( arr [ i ] == arr [ j ] ) ans ++;
return ans;
}
int f_filled ( int arr [ ], int n ) {}
, int n ) {
int ans = 0;
for ( int i = 0;
i < n;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) if ( arr [ i ] == arr [ j ] ) ans ++;
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,6,9,16,16,21,36,41,58,60,62,73,77,81,95};
int param0_1[] = {-86,-72,-26,-34,18,-62,-66};
int param0_2[] = {1};
int param0_3[] = {16};
int param0_4[] = {-88,-80,-72,-68,-64,-26,4,14,16,22,30,32,60,74,82};
int param0_5[] = {0,0,1,1,1,0,1,0,0,0,1};
int param0_6[] = {3,9,10,12,17,23,27,29,42,44,59,61,71,76,78,82,84,84,89,90,93,93,97,97};
int param0_7[] = {68,-40,-46,-20,-64,90};
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};
int param0_9[] = {99,17,94,43,97,17,11,58,75,94,37,22,54,31,41,4,55,69,92,80,45,97,16,33,36,17,43,82,81,64,22,65,85,44,47,14};
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,3,0,0,11,9,15,5,15,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) { [MASK] (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int ans = 0; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( arr [ i ] == arr [ j ] ) ans ++; return ans; } int f_filled ( int arr [ ], int n ) {}, int n ) {
int ans = 0;
for ( int i = 0;
i < n;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) if ( arr [ i ] == arr [ j ] ) ans ++;
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,6,9,16,16,21,36,41,58,60,62,73,77,81,95};
int param0_1[] = {-86,-72,-26,-34,18,-62,-66};
int param0_2[] = {1};
int param0_3[] = {16};
int param0_4[] = {-88,-80,-72,-68,-64,-26,4,14,16,22,30,32,60,74,82};
int param0_5[] = {0,0,1,1,1,0,1,0,0,0,1};
int param0_6[] = {3,9,10,12,17,23,27,29,42,44,59,61,71,76,78,82,84,84,89,90,93,93,97,97};
int param0_7[] = {68,-40,-46,-20,-64,90};
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};
int param0_9[] = {99,17,94,43,97,17,11,58,75,94,37,22,54,31,41,4,55,69,92,80,45,97,16,33,36,17,43,82,81,64,22,65,85,44,47,14};
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,3,0,0,11,9,15,5,15,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) i",
"b) [",
"c) <bits/stdc++.h>",
"d) ans",
"e) return"
] | 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 ) {
if ( N <= 6 ) return N;
int screen [ N ];
int b;
int n;
for ( n = 1;
n <= 6;
n ++ ) screen [ n - 1 ] = n;
for ( n = 7;
n <= N;
n ++ ) {
screen [ n - 1 ] = max ( 2 * screen [ n - 4 ], max ( 3 * screen [ n - 5 ], 4 * screen [ n - 6 ] ) );
}
return screen [ N - 1 ];
}
int f_filled ( int N ) {}
r ( n = 7;
n <= N;
n ++ ) {
screen [ n - 1 ] = max ( 2 * screen [ n - 4 ], max ( 3 * screen [ n - 5 ], 4 * screen [ n - 6 ] ) );
}
return screen [ N - 1 ];
}
int f_filled ( int N ) {}
int main(void) {
int n_success = 0;
int param0[] = {41,94,80,40,76,5,43,67,24,90};
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 ) { if ( N <= 6 ) return N; int screen [ N ]; [MASK] b; int n; for ( n = 1; n <= 6; n ++ ) screen [ n - 1 ] = n; for ( n = 7; n <= N; n ++ ) { screen [ n - 1 ] = max ( 2 * screen [ n - 4 ], max ( 3 * screen [ n - 5 ], 4 * screen [ n - 6 ] ) ); } return screen [ N - 1 ]; } int f_filled ( int N ) {}r ( n = 7;
n <= N;
n ++ ) {
screen [ n - 1 ] = max ( 2 * screen [ n - 4 ], max ( 3 * screen [ n - 5 ], 4 * screen [ n - 6 ] ) );
}
return screen [ N - 1 ];
}
int f_filled ( int N ) {}
int main(void) {
int n_success = 0;
int param0[] = {41,94,80,40,76,5,43,67,24,90};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) }",
"b) (",
"c) k",
"d) arr",
"e) int"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a [ ], int n ) {
sort ( a, a + n, greater < int > ( ) );
int sum = 0;
bool flag = false;
int len;
for ( int i = 0;
i < n;
i ++ ) {
if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( ! flag ) ) {
flag = true;
len = a [ i + 1 ];
i ++;
}
else if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) {
sum = sum + a [ i + 1 ] * len;
flag = false;
i ++;
}
}
return sum;
}
int f_filled ( int a [ ], int n ) {}
== a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) {
sum = sum + a [ i + 1 ] * len;
flag = false;
i ++;
}
}
return sum;
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,11,14,15,22,33,64,81,82,95};
int param0_1[] = {-42,2,84,18,60,84,-12,64,46,60,40,52,-62,-48,60,64,76,50,88,92,42,-82,44,-98,-4};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {50,6,43,82,99,1,20,7,52,18,52,18,45,75,58,48,49,70,69,19,49,35,45,14,52,33,9,31,86,70,77,70,91,56,76,69,68,31,21,72,78,83,76,1};
int param0_4[] = {-92,-76,-70,-62,-46,-36,-36,-32,-26,-8,-2,4,8,14,14,26,34,48,58,68,74,78,84,86};
int param0_5[] = {1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1};
int param0_6[] = {19,20,23,25,26,26,34,43,43,46,49,56,59,59,68,73,93,93};
int param0_7[] = {-82,-80,-68,-98,34,96,-72,22,-30,-92,74,-68,48,92,-26,-32,-8,72,84,-10,60,74,-98,78,-32,84,64,-56,94,24,72,40,-44,2,-18,34};
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,1,1,1,1};
int param0_9[] = {40,32,38,69,56,28,79,29,63,72,4,46,25,32,12,83,59,59,32,1,56,15,62,3,6,85,29,45,88,84,52,62,89,33,48,23,85,54,46,78,7,12};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {9,22,22,32,21,38,10,33,24,26};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n ) { sort ( a, a + n, greater < [MASK] > ( ) ); int sum = 0; bool flag = false; int len; for ( int i = 0; i < n; i ++ ) { if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( ! flag ) ) { flag = true; len = a [ i + 1 ]; i ++; } else if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) { sum = sum + a [ i + 1 ] * len; flag = false; i ++; } } return sum; } int f_filled ( int a [ ], int n ) {} == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) {
sum = sum + a [ i + 1 ] * len;
flag = false;
i ++;
}
}
return sum;
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,11,14,15,22,33,64,81,82,95};
int param0_1[] = {-42,2,84,18,60,84,-12,64,46,60,40,52,-62,-48,60,64,76,50,88,92,42,-82,44,-98,-4};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {50,6,43,82,99,1,20,7,52,18,52,18,45,75,58,48,49,70,69,19,49,35,45,14,52,33,9,31,86,70,77,70,91,56,76,69,68,31,21,72,78,83,76,1};
int param0_4[] = {-92,-76,-70,-62,-46,-36,-36,-32,-26,-8,-2,4,8,14,14,26,34,48,58,68,74,78,84,86};
int param0_5[] = {1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1};
int param0_6[] = {19,20,23,25,26,26,34,43,43,46,49,56,59,59,68,73,93,93};
int param0_7[] = {-82,-80,-68,-98,34,96,-72,22,-30,-92,74,-68,48,92,-26,-32,-8,72,84,-10,60,74,-98,78,-32,84,64,-56,94,24,72,40,-44,2,-18,34};
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,1,1,1,1};
int param0_9[] = {40,32,38,69,56,28,79,29,63,72,4,46,25,32,12,83,59,59,32,1,56,15,62,3,6,85,29,45,88,84,52,62,89,33,48,23,85,54,46,78,7,12};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {9,22,22,32,21,38,10,33,24,26};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) 1",
"b) -",
"c) (",
"d) #include",
"e) int"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a [ ], int n ) {
unordered_map < int, int > cnt;
int ans = 0, pre_sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
ans += ( i * a [ i ] ) - pre_sum;
pre_sum += a [ i ];
if ( cnt [ a [ i ] - 1 ] ) ans -= cnt [ a [ i ] - 1 ];
if ( cnt [ a [ i ] + 1 ] ) ans += cnt [ a [ i ] + 1 ];
cnt [ a [ i ] ] ++;
}
return ans;
}
int f_filled ( int a [ ], int n ) {}
if ( cnt [ a [ i ] - 1 ] ) ans -= cnt [ a [ i ] - 1 ];
if ( cnt [ a [ i ] + 1 ] ) ans += cnt [ a [ i ] + 1 ];
cnt [ a [ i ] ] ++;
}
return ans;
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,8,12,19,23,23,26,39,54,56,57,57,73,78,83,83,89,91};
int param0_1[] = {62,-34,10,-28,-42,-12,4,20,-20,-84,-76,-16,-44,26,-78,-40,50,-10,-56,76,-88,24,64,10,64,-8,-68,-42,26,24,62,36,-68,8,-68,-2,8,38,-18};
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};
int param0_3[] = {23,14,44,29,93,56,22,29,97,71,43,72,74,8,92,40,18,34,78,79,93,63,79,44,35,72,88,83,40,89,66,66,54,56,44,62,72,94,79,79,24,55,72,37,27,55,16,58,83};
int param0_4[] = {-96,-94,-90,-90,-86,-82,-80,-80,-58,-48,-40,-32,-32,-20,-20,-20,-12,-12,-6,-6,-2,0,4,16,16,16,42,48,58,64,68,76,76,76,78,80,82,88,88,88,92,94,96,98};
int param0_5[] = {1,1,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,1};
int param0_6[] = {3,4,4,8,10,10,11,15,19,19,20,24,25,25,27,30,41,43,44,45,47,55,59,59,61,63,63,67,67,69,72,73,75,77,77,78,81,81,83,84,92,94,99};
int param0_7[] = {94,-86,94,54,-52,86,68,64,98,54,-14,-60,-60,-92,80,-16,28,16,-74,68,32,-54,58,-16,-2,-52,-92,-36,96,-18,14,76,16};
int param0_8[] = {0,0,0,0,1,1,1,1};
int param0_9[] = {10,28,63,2,78,12,51,82,89,65,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[] = {15,20,18,25,27,34,31,26,7,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 a [ ], int n ) { unordered_map < int, int > cnt; int ans = 0, pre_sum = 0; for ( int i = 0; i < n; i ++ ) { ans += ( i * a [ i ] ) - pre_sum; pre_sum += a [ i ]; if ( cnt [ a [ i ] - 1 ] ) ans -= cnt [ a [ i [MASK] - 1 ]; if ( cnt [ a [ i ] + 1 ] ) ans += cnt [ a [ i ] + 1 ]; cnt [ a [ i ] ] ++; } return ans; } int f_filled ( int a [ ], int n ) {} if ( cnt [ a [ i ] - 1 ] ) ans -= cnt [ a [ i ] - 1 ];
if ( cnt [ a [ i ] + 1 ] ) ans += cnt [ a [ i ] + 1 ];
cnt [ a [ i ] ] ++;
}
return ans;
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,8,12,19,23,23,26,39,54,56,57,57,73,78,83,83,89,91};
int param0_1[] = {62,-34,10,-28,-42,-12,4,20,-20,-84,-76,-16,-44,26,-78,-40,50,-10,-56,76,-88,24,64,10,64,-8,-68,-42,26,24,62,36,-68,8,-68,-2,8,38,-18};
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};
int param0_3[] = {23,14,44,29,93,56,22,29,97,71,43,72,74,8,92,40,18,34,78,79,93,63,79,44,35,72,88,83,40,89,66,66,54,56,44,62,72,94,79,79,24,55,72,37,27,55,16,58,83};
int param0_4[] = {-96,-94,-90,-90,-86,-82,-80,-80,-58,-48,-40,-32,-32,-20,-20,-20,-12,-12,-6,-6,-2,0,4,16,16,16,42,48,58,64,68,76,76,76,78,80,82,88,88,88,92,94,96,98};
int param0_5[] = {1,1,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,1};
int param0_6[] = {3,4,4,8,10,10,11,15,19,19,20,24,25,25,27,30,41,43,44,45,47,55,59,59,61,63,63,67,67,69,72,73,75,77,77,78,81,81,83,84,92,94,99};
int param0_7[] = {94,-86,94,54,-52,86,68,64,98,54,-14,-60,-60,-92,80,-16,28,16,-74,68,32,-54,58,-16,-2,-52,-92,-36,96,-18,14,76,16};
int param0_8[] = {0,0,0,0,1,1,1,1};
int param0_9[] = {10,28,63,2,78,12,51,82,89,65,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[] = {15,20,18,25,27,34,31,26,7,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) i",
"b) s",
"c) ]",
"d) 0",
"e) <bits/stdc++.h>"
] | 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 dp [ n + 1 ];
dp [ 0 ] = 0;
for ( int i = 1;
i <= n;
i ++ ) {
if ( i >= 1 && i <= 3 ) dp [ i ] = 1;
else if ( i == 4 ) dp [ i ] = 2;
else dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ];
}
return dp [ n ];
}
int f_filled ( int n ) {}
<= n;
i ++ ) {
if ( i >= 1 && i <= 3 ) dp [ i ] = 1;
else if ( i == 4 ) dp [ i ] = 2;
else dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ];
}
return dp [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {61,22,65,57,36,25,16,26,92,5};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int dp [ n + 1 ]; dp [ 0 ] = 0; for ( int i = 1; i <= n; i ++ ) { if ( i >= 1 && i <= [MASK] ) dp [ i ] = 1; else if ( i == 4 ) dp [ i ] = 2; else dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ]; } return dp [ n ]; } int f_filled ( int n ) {}<= n;
i ++ ) {
if ( i >= 1 && i <= 3 ) dp [ i ] = 1;
else if ( i == 4 ) dp [ i ] = 2;
else dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ];
}
return dp [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {61,22,65,57,36,25,16,26,92,5};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | 3 | [
"a) return",
"b) 1",
"c) 1,",
"d) x:",
"e) 3"
] | 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 table [ n + 1 ], i;
for ( int j = 0;
j < n + 1;
j ++ ) table [ j ] = 0;
table [ 0 ] = 1;
for ( i = 3;
i <= n;
i ++ ) table [ i ] += table [ i - 3 ];
for ( i = 5;
i <= n;
i ++ ) table [ i ] += table [ i - 5 ];
for ( i = 10;
i <= n;
i ++ ) table [ i ] += table [ i - 10 ];
return table [ n ];
}
int f_filled ( int n ) {}
[ i - 3 ];
for ( i = 5;
i <= n;
i ++ ) table [ i ] += table [ i - 5 ];
for ( i = 10;
i <= n;
i ++ ) table [ i ] += table [ i - 10 ];
return table [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {83,29,17,12,93,55,97,75,22,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 table [ n + 1 ], i; for ( int j = 0; j < n + 1; j ++ ) table [ j ] = 0; table [ 0 ] = 1; for ( i = 3; i <= n; i ++ ) table [ i ] += [MASK] [ i - 3 ]; for ( i = 5; i <= n; i ++ ) table [ i ] += table [ i - 5 ]; for ( i = 10; i <= n; i ++ ) table [ i ] += table [ i - 10 ]; return table [ n ]; } int f_filled ( int n ) {} [ i - 3 ];
for ( i = 5;
i <= n;
i ++ ) table [ i ] += table [ i - 5 ];
for ( i = 10;
i <= n;
i ++ ) table [ i ] += table [ i - 10 ];
return table [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {83,29,17,12,93,55,97,75,22,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;
} | table | [
"a) table",
"b) javafx.util.Pair;",
"c) (",
"d) void",
"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 x ) {
int m = 1;
while ( x & m ) {
x = x ^ m;
m <<= 1;
}
x = x ^ m;
return x;
}
int f_filled ( int x ) {}
r [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int x ) {
int m = 1;
while ( x & m ) {
x = x ^ m;
m <<= 1;
}
x = x ^ m;
return x;
}
int f_filled ( int x ) {}
int main(void) {
int n_success = 0;
int param0[] = {96,66,67,13,75,78,1,83,27,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 > [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);} int f_gold ( int x ) { int m = 1; while ( x & m ) { x = x ^ m; m <<= 1; } x = x ^ m; return x; } int f_filled ( int x ) {}r [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int x ) {
int m = 1;
while ( x & m ) {
x = x ^ m;
m <<= 1;
}
x = x ^ m;
return x;
}
int f_filled ( int x ) {}
int main(void) {
int n_success = 0;
int param0[] = {96,66,67,13,75,78,1,83,27,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) 4",
"b) return",
"c) int",
"d) posFromRight",
"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 x, int y ) {
int i, j;
int min_dist = INT_MAX;
for ( i = 0;
i < n;
i ++ ) {
for ( j = i + 1;
j < n;
j ++ ) {
if ( ( x == arr [ i ] && y == arr [ j ] || y == arr [ i ] && x == arr [ j ] ) && min_dist > abs ( i - j ) ) {
min_dist = abs ( i - j );
}
}
}
return min_dist;
}
int f_filled ( int arr [ ], int n, int x, int y ) {}
|| y == arr [ i ] && x == arr [ j ] ) && min_dist > abs ( i - j ) ) {
min_dist = abs ( i - j );
}
}
}
return min_dist;
}
int f_filled ( int arr [ ], int n, int x, int y ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,7,7,8,11,14,16,25,34,35,36,36,38,40,41,43,45,47,57,60,64,72,73,74,75,82,83,83,84,84,84,92};
int param0_1[] = {96,70,88,-64,-42,58,92,66,-14,90,-66,12,88,-12,48,-4,90,24,98,14,32,38,98,78,2,26,12,-36,90,80,40,58,88,64,16};
int param0_2[] = {0,0,1};
int param0_3[] = {46,96,82,73,30,36,56,20,5,36,4,7,89,63,54,97,80,56,93,34,90,56,25,27,75,68,14,90};
int param0_4[] = {-96,-88,-82,-66,-62,-52,-52,-46,-46,-40,-40,-28,-24,-12,0,4,10,24,42,46,48,48,50,60,62,64,64,70,92,98};
int param0_5[] = {0,0,1,0,1,1,0,1,1,1,1};
int param0_6[] = {1,2,2,6,10,14,15,18,19,22,23,29,30,37,40,40,41,41,42,42,44,46,46,54,56,72,73,81,83,83,86,88,93};
int param0_7[] = {46,86,-52,18,-32,86,2,38,72,72,-60,70,-58,66,-66,-72,-74,58,52,58,16,64,62,-62,80,-70,-96,-44,-20,-74,-10,14,-32,48,30,76,-16,80,66,-46,-92,26,-86,28,-76,-24,-98,54,50};
int param0_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};
int param0_9[] = {32,65,10,72,17,58,79,28,67,36,18,35};
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,25,1,26,24,10,27,30,38,7};
int param2[] = {7,58,1,54,0,0,1,25,0,10};
int param3[] = {40,70,1,82,4,1,42,45,0,7};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n, int x, int y ) { int i, j; int min_dist = INT_MAX; for ( i = 0; i < n; i ++ ) { for ( j = i + 1; j < n; j ++ ) { if ( ( x == arr [ i ] && y == arr [ j [MASK] || y == arr [ i ] && x == arr [ j ] ) && min_dist > abs ( i - j ) ) { min_dist = abs ( i - j ); } } } return min_dist; } int f_filled ( int arr [ ], int n, int x, int y ) {}|| y == arr [ i ] && x == arr [ j ] ) && min_dist > abs ( i - j ) ) {
min_dist = abs ( i - j );
}
}
}
return min_dist;
}
int f_filled ( int arr [ ], int n, int x, int y ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,7,7,8,11,14,16,25,34,35,36,36,38,40,41,43,45,47,57,60,64,72,73,74,75,82,83,83,84,84,84,92};
int param0_1[] = {96,70,88,-64,-42,58,92,66,-14,90,-66,12,88,-12,48,-4,90,24,98,14,32,38,98,78,2,26,12,-36,90,80,40,58,88,64,16};
int param0_2[] = {0,0,1};
int param0_3[] = {46,96,82,73,30,36,56,20,5,36,4,7,89,63,54,97,80,56,93,34,90,56,25,27,75,68,14,90};
int param0_4[] = {-96,-88,-82,-66,-62,-52,-52,-46,-46,-40,-40,-28,-24,-12,0,4,10,24,42,46,48,48,50,60,62,64,64,70,92,98};
int param0_5[] = {0,0,1,0,1,1,0,1,1,1,1};
int param0_6[] = {1,2,2,6,10,14,15,18,19,22,23,29,30,37,40,40,41,41,42,42,44,46,46,54,56,72,73,81,83,83,86,88,93};
int param0_7[] = {46,86,-52,18,-32,86,2,38,72,72,-60,70,-58,66,-66,-72,-74,58,52,58,16,64,62,-62,80,-70,-96,-44,-20,-74,-10,14,-32,48,30,76,-16,80,66,-46,-92,26,-86,28,-76,-24,-98,54,50};
int param0_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};
int param0_9[] = {32,65,10,72,17,58,79,28,67,36,18,35};
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,25,1,26,24,10,27,30,38,7};
int param2[] = {7,58,1,54,0,0,1,25,0,10};
int param3[] = {40,70,1,82,4,1,42,45,0,7};
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;
} | ] | [
"a) (",
"b) return",
"c) ;",
"d) ]",
"e) n"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int res = INT_MIN;
for ( int i = 0;
i < n;
i ++ ) {
int curr_sum = 0;
for ( int j = 0;
j < n;
j ++ ) {
int index = ( i + j ) % n;
curr_sum += j * arr [ index ];
}
res = max ( res, curr_sum );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
0;
j < n;
j ++ ) {
int index = ( i + j ) % n;
curr_sum += j * arr [ index ];
}
res = max ( res, curr_sum );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {11,12,16,26,29,40,54,59,65,70,71,73,78,81,87,87,88,90,95,97};
int param0_1[] = {-46,-32,54,96,-72,-58,-36,-44,26,-2,-68,42,90,26,-92,-96,88,-42,-18,46,-70,24,0,24,34,34,-52,50,94,-60,64,58};
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,1,1,1};
int param0_3[] = {48,2,79,98,28,17,41,47,61,76,82,5,74,4,80,51,22,45,91,75,91,93,42,45,69,98,76,74,83,17,30,88,53,25,35,19,26};
int param0_4[] = {-88,-84,-82,-74,-44,-34,-32,-20,-20,-14,6,6,10,12,16,24,32,34,38,46,54,54,56,60,82,88,90,94,98};
int param0_5[] = {0,1,1,1,1,0,1,1,1,1,1,1,1};
int param0_6[] = {10,14,14,14,19,20,22,26,35,36,40,53,54,55,55,57,57,67,72,72,77,78,83,84,95,96};
int param0_7[] = {-80,18,-76,48,-52,-38,52,-82,40,-44,-90,86,-86,-36,-32,-2,56,-12,-88,14,-16,8,52,24,46,56,84,-36,84,-60,72,-46,32,-16,-20,68,-86,-62,58,8,78,-52,22,-28,-22,-42,12,-48};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1};
int param0_9[] = {20,94,36,2,50,62,84,50,66,75,1,18,41,48,72,61,86,22,54,6,71,46,92,68,59,51,89,31,58,78,82,84};
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,22,33,20,24,7,16,30,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> [MASK] <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int res = INT_MIN; for ( int i = 0; i < n; i ++ ) { int curr_sum = 0; for ( int j = 0; j < n; j ++ ) { int index = ( i + j ) % n; curr_sum += j * arr [ index ]; } res = max ( res, curr_sum ); } return res; } int f_filled ( int arr [ ], int n ) {} 0;
j < n;
j ++ ) {
int index = ( i + j ) % n;
curr_sum += j * arr [ index ];
}
res = max ( res, curr_sum );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {11,12,16,26,29,40,54,59,65,70,71,73,78,81,87,87,88,90,95,97};
int param0_1[] = {-46,-32,54,96,-72,-58,-36,-44,26,-2,-68,42,90,26,-92,-96,88,-42,-18,46,-70,24,0,24,34,34,-52,50,94,-60,64,58};
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,1,1,1};
int param0_3[] = {48,2,79,98,28,17,41,47,61,76,82,5,74,4,80,51,22,45,91,75,91,93,42,45,69,98,76,74,83,17,30,88,53,25,35,19,26};
int param0_4[] = {-88,-84,-82,-74,-44,-34,-32,-20,-20,-14,6,6,10,12,16,24,32,34,38,46,54,54,56,60,82,88,90,94,98};
int param0_5[] = {0,1,1,1,1,0,1,1,1,1,1,1,1};
int param0_6[] = {10,14,14,14,19,20,22,26,35,36,40,53,54,55,55,57,57,67,72,72,77,78,83,84,95,96};
int param0_7[] = {-80,18,-76,48,-52,-38,52,-82,40,-44,-90,86,-86,-36,-32,-2,56,-12,-88,14,-16,8,52,24,46,56,84,-36,84,-60,72,-46,32,-16,-20,68,-86,-62,58,8,78,-52,22,-28,-22,-42,12,-48};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1};
int param0_9[] = {20,94,36,2,50,62,84,50,66,75,1,18,41,48,72,61,86,22,54,6,71,46,92,68,59,51,89,31,58,78,82,84};
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,22,33,20,24,7,16,30,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 | [
"a) <math.h>",
"b) }",
"c) #include",
"d) java.util.",
"e) 10"
] | 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 ) {
while ( n % 2 == 0 ) {
k --;
n = n / 2;
if ( k == 0 ) return 2;
}
for ( int i = 3;
i <= sqrt ( n );
i = i + 2 ) {
while ( n % i == 0 ) {
if ( k == 1 ) return i;
k --;
n = n / i;
}
}
if ( n > 2 && k == 1 ) return n;
return - 1;
}
int f_filled ( int n, int k ) {}
i = i + 2 ) {
while ( n % i == 0 ) {
if ( k == 1 ) return i;
k --;
n = n / i;
}
}
if ( n > 2 && k == 1 ) return n;
return - 1;
}
int f_filled ( int n, int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {94,99,64,27,24,84,69,69,22,39};
int param1[] = {0,1,3,3,4,6,98,39,60,57};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int k ) { while ( n % 2 == 0 ) { k --; n = n / 2; if ( k == 0 ) return 2; } for ( int i = 3; i <= sqrt ( n ); i = i + 2 ) { while ( n % i == 0 ) { if ( k == 1 ) return i; k --; n = n / i; } } if ( n > 2 && k == 1 ) return n; return - 1; } int [MASK] ( int n, int k ) {} i = i + 2 ) {
while ( n % i == 0 ) {
if ( k == 1 ) return i;
k --;
n = n / i;
}
}
if ( n > 2 && k == 1 ) return n;
return - 1;
}
int f_filled ( int n, int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {94,99,64,27,24,84,69,69,22,39};
int param1[] = {0,1,3,3,4,6,98,39,60,57};
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_filled | [
"a) min",
"b) -",
"c) f_filled",
"d) n",
"e) j"
] | 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 res = 0;
for ( int x = 0;
x * x < n;
x ++ ) for ( int y = 0;
x * x + y * y < n;
y ++ ) res ++;
return res;
}
int f_filled ( int n ) {}
f(int), cmpfunc);}
int f_gold ( int n ) {
int res = 0;
for ( int x = 0;
x * x < n;
x ++ ) for ( int y = 0;
x * x + y * y < n;
y ++ ) res ++;
return res;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {61,45,53,4,82,86,37,48,81,50};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { [MASK] (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (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 = 0; for ( int x = 0; x * x < n; x ++ ) for ( int y = 0; x * x + y * y < n; y ++ ) res ++; return res; } int f_filled ( int n ) {}f(int), cmpfunc);}
int f_gold ( int n ) {
int res = 0;
for ( int x = 0;
x * x < n;
x ++ ) for ( int y = 0;
x * x + y * y < n;
y ++ ) res ++;
return res;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {61,45,53,4,82,86,37,48,81,50};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | return | [
"a) int",
"b) -",
"c) return",
"d) int",
"e) *"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int r ) {
if ( r <= 0 ) return 0;
int result = 4;
for ( int x = 1;
x < r;
x ++ ) {
int ySquare = r * r - x * x;
int y = sqrt ( ySquare );
if ( y * y == ySquare ) result += 4;
}
return result;
}
int f_filled ( int r ) {}
4;
for ( int x = 1;
x < r;
x ++ ) {
int ySquare = r * r - x * x;
int y = sqrt ( ySquare );
if ( y * y == ySquare ) result += 4;
}
return result;
}
int f_filled ( int r ) {}
int main(void) {
int n_success = 0;
int param0[] = {34,56,90,47,36,63,21,76,18,75};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int r ) { if ( r <= 0 ) return 0; int result = 4; for ( int x = 1; x < r; x ++ ) { int ySquare = r * r - x * x; int y = sqrt ( ySquare ); if ( y * y == ySquare ) result += [MASK] } return result; } int f_filled ( int r ) {} 4;
for ( int x = 1;
x < r;
x ++ ) {
int ySquare = r * r - x * x;
int y = sqrt ( ySquare );
if ( y * y == ySquare ) result += 4;
}
return result;
}
int f_filled ( int r ) {}
int main(void) {
int n_success = 0;
int param0[] = {34,56,90,47,36,63,21,76,18,75};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | 4; | [
"a) &",
"b) <vector>",
"c) 4;",
"d) )",
"e) f_gold"
] | 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 ( string & s ) {
int n = strlen(s);
int a [ n ];
for ( int i = n - 1;
i >= 0;
i -- ) {
int back_up = 0;
for ( int j = i;
j < n;
j ++ ) {
if ( j == i ) a [ j ] = 1;
else if ( s [ i ] == s [ j ] ) {
int temp = a [ j ];
a [ j ] = back_up + 2;
back_up = temp;
}
else {
back_up = a [ j ];
a [ j ] = max ( a [ j - 1 ], a [ j ] );
}
}
}
return a [ n - 1 ];
}
int f_filled ( string & s ) {}
2;
back_up = temp;
}
else {
back_up = a [ j ];
a [ j ] = max ( a [ j - 1 ], a [ j ] );
}
}
}
return a [ n - 1 ];
}
int f_filled ( string & s ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {" E","0845591950","00101011","pLSvlwrACvFaoT","7246","1010101100000","obPkcLSFp","914757557818","1","PKvUWIQ"};
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 ( string & s ) { int n = strlen(s); int a [ n ]; for ( int i = n - 1; i >= 0; i -- ) { int back_up = 0; for ( int j = i; j < n; j ++ ) { if ( j == i ) a [ j ] = 1; else if ( s [ i ] == s [ j ] ) { int temp = a [ j ]; a [ j ] = back_up + 2; back_up = temp; } else { back_up = a [ j ]; a [ j ] = max ( a [ j - 1 [MASK] a [ j ] ); } } } return a [ n - 1 ]; } int f_filled ( string & s ) {}2;
back_up = temp;
}
else {
back_up = a [ j ];
a [ j ] = max ( a [ j - 1 ], a [ j ] );
}
}
}
return a [ n - 1 ];
}
int f_filled ( string & s ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {" E","0845591950","00101011","pLSvlwrACvFaoT","7246","1010101100000","obPkcLSFp","914757557818","1","PKvUWIQ"};
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) x:",
"e) x"
] | 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);}
void f_gold ( int arr [ ], int n ) {
int max_ele = arr [ n - 1 ];
int min_ele = arr [ 0 ];
for ( int i = 0;
i < n;
i ++ ) {
if ( i % 2 == 0 ) {
arr [ i ] = max_ele;
max_ele -= 1;
}
else {
arr [ i ] = min_ele;
min_ele += 1;
}
}
}
void f_filled ( int arr [ ], int n ) {}
i ++ ) {
if ( i % 2 == 0 ) {
arr [ i ] = max_ele;
max_ele -= 1;
}
else {
arr [ i ] = min_ele;
min_ele += 1;
}
}
}
void f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,4,8,10,12,14,14,17,18,19,20,25,28,29,30,31,34,35,37,38,40,41,42,45,47,49,54,54,55,58,58,63,65,66,66,67,67,72,74,75,75,80,82,86,92,95,96,99};
int param0_1[] = {45,42,-91,90,-6,49,65,39,-80,-65,-47,75,10,80,36,-96,55,72,68,2,-53,-6,72,-52,-9,80,-16,-32,39,25,-27,-96,-24,-27,-23,-52};
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[] = {12,84,16};
int param0_4[] = {-85,-77,-70,-67,-55,-51,-49,-41,-37,-24,-18,-8,-6,77,87,90};
int param0_5[] = {0,0,1,1,1,1,1,1,1,0,1,1,0,0,0};
int param0_6[] = {5,8,15,16,20,22,25,33,46,48,52,54,55,57,57,61,61,66,72,73,83,87,88,89,98};
int param0_7[] = {31,2,-46,-86,-64,5,-18,-33,-90,-51,11,-35,-43,-73,13,33,-29,-17,-43,20,-7,-85};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {20,75,12,62,18,94,63,84,25,12};
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,23,28,2,13,12,12,13,31,9};
int filled_function_param0_0[] = {3,4,8,10,12,14,14,17,18,19,20,25,28,29,30,31,34,35,37,38,40,41,42,45,47,49,54,54,55,58,58,63,65,66,66,67,67,72,74,75,75,80,82,86,92,95,96,99};
int filled_function_param0_1[] = {45,42,-91,90,-6,49,65,39,-80,-65,-47,75,10,80,36,-96,55,72,68,2,-53,-6,72,-52,-9,80,-16,-32,39,25,-27,-96,-24,-27,-23,-52};
int filled_function_param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int filled_function_param0_3[] = {12,84,16};
int filled_function_param0_4[] = {-85,-77,-70,-67,-55,-51,-49,-41,-37,-24,-18,-8,-6,77,87,90};
int filled_function_param0_5[] = {0,0,1,1,1,1,1,1,1,0,1,1,0,0,0};
int filled_function_param0_6[] = {5,8,15,16,20,22,25,33,46,48,52,54,55,57,57,61,61,66,72,73,83,87,88,89,98};
int filled_function_param0_7[] = {31,2,-46,-86,-64,5,-18,-33,-90,-51,11,-35,-43,-73,13,33,-29,-17,-43,20,-7,-85};
int filled_function_param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int filled_function_param0_9[] = {20,75,12,62,18,94,63,84,25,12};
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[] = {40,23,28,2,13,12,12,13,31,9};
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 [MASK] [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} void f_gold ( int arr [ ], int n ) { int max_ele = arr [ n - 1 ]; int min_ele = arr [ 0 ]; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) { arr [ i ] = max_ele; max_ele -= 1; } else { arr [ i ] = min_ele; min_ele += 1; } } } void f_filled ( int arr [ ], int n ) {}i ++ ) {
if ( i % 2 == 0 ) {
arr [ i ] = max_ele;
max_ele -= 1;
}
else {
arr [ i ] = min_ele;
min_ele += 1;
}
}
}
void f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,4,8,10,12,14,14,17,18,19,20,25,28,29,30,31,34,35,37,38,40,41,42,45,47,49,54,54,55,58,58,63,65,66,66,67,67,72,74,75,75,80,82,86,92,95,96,99};
int param0_1[] = {45,42,-91,90,-6,49,65,39,-80,-65,-47,75,10,80,36,-96,55,72,68,2,-53,-6,72,-52,-9,80,-16,-32,39,25,-27,-96,-24,-27,-23,-52};
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[] = {12,84,16};
int param0_4[] = {-85,-77,-70,-67,-55,-51,-49,-41,-37,-24,-18,-8,-6,77,87,90};
int param0_5[] = {0,0,1,1,1,1,1,1,1,0,1,1,0,0,0};
int param0_6[] = {5,8,15,16,20,22,25,33,46,48,52,54,55,57,57,61,61,66,72,73,83,87,88,89,98};
int param0_7[] = {31,2,-46,-86,-64,5,-18,-33,-90,-51,11,-35,-43,-73,13,33,-29,-17,-43,20,-7,-85};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {20,75,12,62,18,94,63,84,25,12};
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,23,28,2,13,12,12,13,31,9};
int filled_function_param0_0[] = {3,4,8,10,12,14,14,17,18,19,20,25,28,29,30,31,34,35,37,38,40,41,42,45,47,49,54,54,55,58,58,63,65,66,66,67,67,72,74,75,75,80,82,86,92,95,96,99};
int filled_function_param0_1[] = {45,42,-91,90,-6,49,65,39,-80,-65,-47,75,10,80,36,-96,55,72,68,2,-53,-6,72,-52,-9,80,-16,-32,39,25,-27,-96,-24,-27,-23,-52};
int filled_function_param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int filled_function_param0_3[] = {12,84,16};
int filled_function_param0_4[] = {-85,-77,-70,-67,-55,-51,-49,-41,-37,-24,-18,-8,-6,77,87,90};
int filled_function_param0_5[] = {0,0,1,1,1,1,1,1,1,0,1,1,0,0,0};
int filled_function_param0_6[] = {5,8,15,16,20,22,25,33,46,48,52,54,55,57,57,61,61,66,72,73,83,87,88,89,98};
int filled_function_param0_7[] = {31,2,-46,-86,-64,5,-18,-33,-90,-51,11,-35,-43,-73,13,33,-29,-17,-43,20,-7,-85};
int filled_function_param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int filled_function_param0_9[] = {20,75,12,62,18,94,63,84,25,12};
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[] = {40,23,28,2,13,12,12,13,31,9};
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;
} | arr | [
"a) n",
"b) <",
"c) arr",
"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 ( char str [] ) {
int n = strlen(str);
int res = 0;
int count [ 26 ] = {
0 };
for ( int i = 0;
i < n;
i ++ ) count [ str [ i ] - 'a' ] ++;
for ( int i = 0;
i < 26;
i ++ ) if ( count [ i ] % 2 == 1 ) res ++;
return ( res == 0 ) ? 0 : res - 1;
}
int f_filled ( char str [] ) {}
i ++ ) count [ str [ i ] - 'a' ] ++;
for ( int i = 0;
i < 26;
i ++ ) if ( count [ i ] % 2 == 1 ) res ++;
return ( res == 0 ) ? 0 : res - 1;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"geeksforgeeks","58972","1110","JgQvAOhh","33","0110110","ZvxDIS","0936576628","00","cX"};
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 res = 0; int count [ 26 ] = { 0 }; for ( int i = 0; i < n; i ++ ) count [ str [ i ] - 'a' ] ++; for ( int i = 0; i < 26; i ++ ) if ( count [ i ] % 2 == 1 ) res ++; return ( res == 0 ) ? 0 : res - 1; } int [MASK] ( char str [] ) {} i ++ ) count [ str [ i ] - 'a' ] ++;
for ( int i = 0;
i < 26;
i ++ ) if ( count [ i ] % 2 == 1 ) res ++;
return ( res == 0 ) ? 0 : res - 1;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"geeksforgeeks","58972","1110","JgQvAOhh","33","0110110","ZvxDIS","0936576628","00","cX"};
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) pPrev;",
"b) {",
"c) {",
"d) f_filled",
"e) arr"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( char str [] ) {
int n = strlen(str);
return n * ( n + 1 ) / 2;
}
int f_filled ( char str [] ) {}
r)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( char str [] ) {
int n = strlen(str);
return n * ( n + 1 ) / 2;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"gZFGZsHCimLf","505357","011011101","ovfwP Osauz","92132238746026","01100","RaOWYQRfiWKSyC","861330202","001100010","uvpKlGUBLOMba"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const [MASK] * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char str [] ) { int n = strlen(str); return n * ( n + 1 ) / 2; } int f_filled ( char str [] ) {}r)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( char str [] ) {
int n = strlen(str);
return n * ( n + 1 ) / 2;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"gZFGZsHCimLf","505357","011011101","ovfwP Osauz","92132238746026","01100","RaOWYQRfiWKSyC","861330202","001100010","uvpKlGUBLOMba"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | void | [
"a) ++",
"b) void",
"c) ]",
"d) 1",
"e) math.sqrt"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int x ) {
if ( x == 0 || x == 1 ) return x;
int start = 1, end = x, ans;
while ( start <= end ) {
int mid = ( start + end ) / 2;
if ( mid * mid == x ) return mid;
if ( mid * mid < x ) {
start = mid + 1;
ans = mid;
}
else end = mid - 1;
}
return ans;
}
int f_filled ( int x ) {}
t + end ) / 2;
if ( mid * mid == x ) return mid;
if ( mid * mid < x ) {
start = mid + 1;
ans = mid;
}
else end = mid - 1;
}
return ans;
}
int f_filled ( int x ) {}
int main(void) {
int n_success = 0;
int param0[] = {40,10,46,54,1,67,64,10,75,11};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) [MASK] return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int x ) { if ( x == 0 || x == 1 ) return x; int start = 1, end = x, ans; while ( start <= end ) { int mid = ( start + end ) / 2; if ( mid * mid == x ) return mid; if ( mid * mid < x ) { start = mid + 1; ans = mid; } else end = mid - 1; } return ans; } int f_filled ( int x ) {}t + end ) / 2;
if ( mid * mid == x ) return mid;
if ( mid * mid < x ) {
start = mid + 1;
ans = mid;
}
else end = mid - 1;
}
return ans;
}
int f_filled ( int x ) {}
int main(void) {
int n_success = 0;
int param0[] = {40,10,46,54,1,67,64,10,75,11};
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) f_filled",
"b) {",
"c) 1",
"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 ( int num ) {
if ( num < 0 ) return false;
int sum = 0;
for ( int n = 1;
sum <= num;
n ++ ) {
sum = sum + n;
if ( sum == num ) return true;
}
return false;
}
bool f_filled ( int num ) {}
if ( num < 0 ) return false;
int sum = 0;
for ( int n = 1;
sum <= num;
n ++ ) {
sum = sum + n;
if ( sum == num ) return true;
}
return false;
}
bool f_filled ( int num ) {}
int main(void) {
int n_success = 0;
int param0[] = {97,97,32,40,18,14,90,39,1,57};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, [MASK] sizeof(int), cmpfunc);} bool f_gold ( int num ) { if ( num < 0 ) return false; int sum = 0; for ( int n = 1; sum <= num; n ++ ) { sum = sum + n; if ( sum == num ) return true; } return false; } bool f_filled ( int num ) {}
if ( num < 0 ) return false;
int sum = 0;
for ( int n = 1;
sum <= num;
n ++ ) {
sum = sum + n;
if ( sum == num ) return true;
}
return false;
}
bool f_filled ( int num ) {}
int main(void) {
int n_success = 0;
int param0[] = {97,97,32,40,18,14,90,39,1,57};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | n, | [
"a) n,",
"b) -",
"c) ;",
"d) [",
"e) );"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( unsigned int n, unsigned int k ) {
bool oneSeen = false;
while ( n > 0 ) {
int digit = n % k;
if ( digit > 1 ) return false;
if ( digit == 1 ) {
if ( oneSeen ) return false;
oneSeen = true;
}
n /= k;
}
return true;
}
bool f_filled ( unsigned int n, unsigned int k ) {}
git > 1 ) return false;
if ( digit == 1 ) {
if ( oneSeen ) return false;
oneSeen = true;
}
n /= k;
}
return true;
}
bool f_filled ( unsigned int n, unsigned int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {64,16,27,81,1,69,8,31,43,54};
int param1[] = {4,2,3,72,9,17,20,79,81,89};
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 ( unsigned int n, unsigned int k ) { bool oneSeen = false; while ( n > 0 ) { int digit = n % k; if ( digit > 1 [MASK] return false; if ( digit == 1 ) { if ( oneSeen ) return false; oneSeen = true; } n /= k; } return true; } bool f_filled ( unsigned int n, unsigned int k ) {}git > 1 ) return false;
if ( digit == 1 ) {
if ( oneSeen ) return false;
oneSeen = true;
}
n /= k;
}
return true;
}
bool f_filled ( unsigned int n, unsigned int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {64,16,27,81,1,69,8,31,43,54};
int param1[] = {4,2,3,72,9,17,20,79,81,89};
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) java.lang.*;",
"d) (",
"e) )"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int count = 0;
if ( n % 2 == 0 ) {
count ++;
while ( n % 2 == 0 ) n = n / 2;
}
for ( int i = 3;
i <= sqrt ( n );
i = i + 2 ) {
if ( n % i == 0 ) {
count ++;
while ( n % i == 0 ) n = n / i;
}
}
if ( n > 2 ) count ++;
return count;
}
int f_filled ( int n ) {}
3;
i <= sqrt ( n );
i = i + 2 ) {
if ( n % i == 0 ) {
count ++;
while ( n % i == 0 ) n = n / i;
}
}
if ( n > 2 ) count ++;
return count;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {99,33,50,17,18,69,23,18,94,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 [MASK] a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int count = 0; if ( n % 2 == 0 ) { count ++; while ( n % 2 == 0 ) n = n / 2; } for ( int i = 3; i <= sqrt ( n ); i = i + 2 ) { if ( n % i == 0 ) { count ++; while ( n % i == 0 ) n = n / i; } } if ( n > 2 ) count ++; return count; } int f_filled ( int n ) {} 3;
i <= sqrt ( n );
i = i + 2 ) {
if ( n % i == 0 ) {
count ++;
while ( n % i == 0 ) n = n / i;
}
}
if ( n > 2 ) count ++;
return count;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {99,33,50,17,18,69,23,18,94,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) ;",
"d) y",
"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);}
int f_gold ( int n ) {
int x = 0, yCount, res = 0;
for ( yCount = 0;
yCount * yCount < n;
yCount ++ );
while ( yCount != 0 ) {
res += yCount;
x ++;
while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount --;
}
return res;
}
int f_filled ( int n ) {}
++ );
while ( yCount != 0 ) {
res += yCount;
x ++;
while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount --;
}
return res;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {72,75,92,30,45,40,81,17,81,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 ( int n ) { int x = 0, yCount, res = 0; for ( yCount = 0; yCount * yCount < n; yCount ++ ); while ( yCount != 0 ) { res += yCount; [MASK] ++; while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount --; } return res; } int f_filled ( int n ) {}++ );
while ( yCount != 0 ) {
res += yCount;
x ++;
while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount --;
}
return res;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {72,75,92,30,45,40,81,17,81,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;
} | x | [
"a) i",
"b) n",
"c) --",
"d) (",
"e) x"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
char f_gold [] ( char s [], int n ) {
char s1 [] = s;
for ( int i = 1;
i < n;
i ++ ) s += s1;
return s;
}
char f_filled [] ( char s [], int n ) {}
sort (arr, n, sizeof(int), cmpfunc);}
char f_gold [] ( char s [], int n ) {
char s1 [] = s;
for ( int i = 1;
i < n;
i ++ ) s += s1;
return s;
}
char f_filled [] ( char s [], int n ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"LPWsaI","9037515104","00100010010111","SbwipuE","574314109","1101","f","068","000011001","BWbUtIkC"};
int param1[] = {41,72,95,27,5,70,91,50,38,79};
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;
} | [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);} char f_gold [] ( char s [], int n ) { char s1 [] = s; for ( int i = 1; i < n; i ++ ) s += s1; return s; } char f_filled [] ( char s [], int n ) {}sort (arr, n, sizeof(int), cmpfunc);}
char f_gold [] ( char s [], int n ) {
char s1 [] = s;
for ( int i = 1;
i < n;
i ++ ) s += s1;
return s;
}
char f_filled [] ( char s [], int n ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"LPWsaI","9037515104","00100010010111","SbwipuE","574314109","1101","f","068","000011001","BWbUtIkC"};
int param1[] = {41,72,95,27,5,70,91,50,38,79};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include | [
"a) using",
"b) n;",
"c) (",
"d) #include",
"e) 9;"
] | 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 );
int a = 0, b = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( i & 1 ) a = a * 10 + arr [ i ];
else b = b * 10 + arr [ i ];
}
return a + b;
}
int f_filled ( int arr [ ], int n ) {}
;
int a = 0, b = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( i & 1 ) a = a * 10 + arr [ i ];
else b = b * 10 + arr [ i ];
}
return a + b;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,4,5,10,14,16,18,42,43,43,45,46,51,52,53,58,61,66,79,81,82,84};
int param0_1[] = {48,-22,60,32,48,-2,-76,-50,-26,56,-86,98,-30,-22,82,-20,58,40,76,-2,82,-90,8,-46,22,94};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {79,45};
int param0_4[] = {-90,-68,-38,-34,-4,6,10,28,48,52,54,68,88,90};
int param0_5[] = {1,0,0,1,0,1,0,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,1,0};
int param0_6[] = {4,8,8,23,26,27,30,42,44,55,59,64,67,69,74,77,82,82,87,96,97};
int param0_7[] = {0,-18,-98,-36,-62,0,-32,-98,46,72,-18,30,-86,-42,-82,2,-76,-64,-66,-48,-28,52,-46,-76,76,10,70,4,18,94,88,80,-60,-36,62,96,-4,88,50};
int param0_8[] = {0,0,0,0,0,0,1,1,1,1};
int param0_9[] = {8,71,75,58,97,24,56,98,71,69,32,64,54,96,69,22,7,47,45,68,17,36,90,9,71,86,16,61,53,63,9,74,38,87,14,86,42,42,14,43,58,82,72,73,32};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {19,25,23,1,11,22,17,32,6,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 [MASK] arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int a = 0, b = 0; for ( int i = 0; i < n; i ++ ) { if ( i & 1 ) a = a * 10 + arr [ i ]; else b = b * 10 + arr [ i ]; } return a + b; } int f_filled ( int arr [ ], int n ) {};
int a = 0, b = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( i & 1 ) a = a * 10 + arr [ i ];
else b = b * 10 + arr [ i ];
}
return a + b;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,4,5,10,14,16,18,42,43,43,45,46,51,52,53,58,61,66,79,81,82,84};
int param0_1[] = {48,-22,60,32,48,-2,-76,-50,-26,56,-86,98,-30,-22,82,-20,58,40,76,-2,82,-90,8,-46,22,94};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {79,45};
int param0_4[] = {-90,-68,-38,-34,-4,6,10,28,48,52,54,68,88,90};
int param0_5[] = {1,0,0,1,0,1,0,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,1,0};
int param0_6[] = {4,8,8,23,26,27,30,42,44,55,59,64,67,69,74,77,82,82,87,96,97};
int param0_7[] = {0,-18,-98,-36,-62,0,-32,-98,46,72,-18,30,-86,-42,-82,2,-76,-64,-66,-48,-28,52,-46,-76,76,10,70,4,18,94,88,80,-60,-36,62,96,-4,88,50};
int param0_8[] = {0,0,0,0,0,0,1,1,1,1};
int param0_9[] = {8,71,75,58,97,24,56,98,71,69,32,64,54,96,69,22,7,47,45,68,17,36,90,9,71,86,16,61,53,63,9,74,38,87,14,86,42,42,14,43,58,82,72,73,32};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {19,25,23,1,11,22,17,32,6,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;
} | (int | [
"a) int",
"b) (int",
"c) java.lang.*;",
"d) y)",
"e) ."
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int l = 0, sum = 0, ans = 360;
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ];
while ( sum >= 180 ) {
ans = min ( ans, 2 * abs ( 180 - sum ) );
sum -= arr [ l ];
l ++;
}
ans = min ( ans, 2 * abs ( 180 - sum ) );
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
ans = min ( ans, 2 * abs ( 180 - sum ) );
sum -= arr [ l ];
l ++;
}
ans = min ( ans, 2 * abs ( 180 - sum ) );
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,4,5,5,13,14,14,16,19,20,30,31,32,33,35,38,38,42,44,44,48,48,52,58,60,64,65,66,68,69,70,70,71,72,73,79,81,83,83,84,86,87,88,88,91,92,95,95,98};
int param0_1[] = {-56,88,-50,70,20,58,42,-56,-52,-78,98,20,-26,4,20,-66,-46,-58,74,74,-72,2,16,-78,-4,10,58,60,-46,-2,32,-96,24,-6,90,-64,-24,-38,26,66,-42,-86,48,92,28,6,-54,-6};
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};
int param0_3[] = {52,67,62};
int param0_4[] = {-56,-22,32,42,66};
int param0_5[] = {1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1,0};
int param0_6[] = {38,46,58,72};
int param0_7[] = {16,62,90,40,30,-56,-92,-56,60,42,-64,92,-30,-70,42,-48,-54,54,48,94,-44,-46,10,48,22,-24,-62,34,60,24,-60,50,40,34};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {86,43,74,84,86,14,45,7,92,36,79,13,67,18,96,77,13,22,28,36,57,56,99,57,8,48,5,79,65,64,96,6,36,91,53,55,11,12,80,99,50,40,4,9,52,41};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {27,29,25,1,4,10,2,20,37,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);} int f_gold ( int arr [ ], int n ) { int l = 0, sum = 0, ans = 360; for ( int i = 0; i < n; i ++ ) { sum += arr [ i ]; while ( sum >= 180 ) { ans = min [MASK] ans, 2 * abs ( 180 - sum ) ); sum -= arr [ l ]; l ++; } ans = min ( ans, 2 * abs ( 180 - sum ) ); } return ans; } int f_filled ( int arr [ ], int n ) {}
ans = min ( ans, 2 * abs ( 180 - sum ) );
sum -= arr [ l ];
l ++;
}
ans = min ( ans, 2 * abs ( 180 - sum ) );
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,4,5,5,13,14,14,16,19,20,30,31,32,33,35,38,38,42,44,44,48,48,52,58,60,64,65,66,68,69,70,70,71,72,73,79,81,83,83,84,86,87,88,88,91,92,95,95,98};
int param0_1[] = {-56,88,-50,70,20,58,42,-56,-52,-78,98,20,-26,4,20,-66,-46,-58,74,74,-72,2,16,-78,-4,10,58,60,-46,-2,32,-96,24,-6,90,-64,-24,-38,26,66,-42,-86,48,92,28,6,-54,-6};
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};
int param0_3[] = {52,67,62};
int param0_4[] = {-56,-22,32,42,66};
int param0_5[] = {1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1,0};
int param0_6[] = {38,46,58,72};
int param0_7[] = {16,62,90,40,30,-56,-92,-56,60,42,-64,92,-30,-70,42,-48,-54,54,48,94,-44,-46,10,48,22,-24,-62,34,60,24,-60,50,40,34};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {86,43,74,84,86,14,45,7,92,36,79,13,67,18,96,77,13,22,28,36,57,56,99,57,8,48,5,79,65,64,96,6,36,91,53,55,11,12,80,99,50,40,4,9,52,41};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {27,29,25,1,4,10,2,20,37,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) break;",
"d) res;",
"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 neg = 0, pos = 0;
int sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ];
if ( arr [ i ] < 0 ) neg ++;
else pos ++;
}
return ( sum / abs ( neg - pos ) );
}
int f_filled ( int arr [ ], int n ) {}
;
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ];
if ( arr [ i ] < 0 ) neg ++;
else pos ++;
}
return ( sum / abs ( neg - pos ) );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {49,98};
int param0_1[] = {82,66,-68,24,-10};
int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1};
int param0_3[] = {56,3,18,5,20,56,47,29,60,98,60,40,42,2,54,56,91,8,93,14,31,27,61,49,23,12,71};
int param0_4[] = {-94,-94,-92,-86,-50,-48,-6,8,28,40,44,58,62,72,94};
int param0_5[] = {0,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,1};
int param0_6[] = {16,56,56};
int param0_7[] = {74,-90,-92,30,-18,66,-66,22};
int param0_8[] = {0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {21,64,82,78,30,34,35};
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[] = {1,2,8,25,12,36,1,5,7,5};
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 * [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 arr [ ], int n ) { int neg = 0, pos = 0; int sum = 0; for ( int i = 0; i < n; i ++ ) { sum += arr [ i ]; if ( arr [ i ] < 0 ) neg ++; else pos ++; } return ( sum / abs ( neg - pos ) ); } int f_filled ( int arr [ ], int n ) {};
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ];
if ( arr [ i ] < 0 ) neg ++;
else pos ++;
}
return ( sum / abs ( neg - pos ) );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {49,98};
int param0_1[] = {82,66,-68,24,-10};
int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1};
int param0_3[] = {56,3,18,5,20,56,47,29,60,98,60,40,42,2,54,56,91,8,93,14,31,27,61,49,23,12,71};
int param0_4[] = {-94,-94,-92,-86,-50,-48,-6,8,28,40,44,58,62,72,94};
int param0_5[] = {0,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,1};
int param0_6[] = {16,56,56};
int param0_7[] = {74,-90,-92,30,-18,66,-66,22};
int param0_8[] = {0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {21,64,82,78,30,34,35};
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[] = {1,2,8,25,12,36,1,5,7,5};
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;
} | b) | [
"a) i",
"b) 1",
"c) b)",
"d) /",
"e) +"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
return ( n % 2 == 0 );
}
bool f_filled ( int n ) {}
rn ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
return ( n % 2 == 0 );
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {67,90,55,90,83,32,58,38,87,87};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof [MASK] void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int n ) { return ( n % 2 == 0 ); } bool f_filled ( int n ) {}rn ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
return ( n % 2 == 0 );
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {67,90,55,90,83,32,58,38,87,87};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | (arr)[0]));} | [
"a) {",
"b) (arr)[0]));}",
"c) res",
"d) return",
"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 ) {
return 0.6172 * ( pow ( 10, n ) - 1 ) - 0.55 * n;
}
int f_filled ( int n ) {}
sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
return 0.6172 * ( pow ( 10, n ) - 1 ) - 0.55 * n;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {18,81,77,84,87,14,15,3,21,60};
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, [MASK] y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { return 0.6172 * ( pow ( 10, n ) - 1 ) - 0.55 * n; } int f_filled ( int n ) {} sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
return 0.6172 * ( pow ( 10, n ) - 1 ) - 0.55 * n;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {18,81,77,84,87,14,15,3,21,60};
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) Integer",
"b) int",
"c) )",
"d) ]",
"e) max"
] | 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 cum_sum = 0;
for ( int i = 0;
i < n;
i ++ ) cum_sum += arr [ i ];
int curr_val = 0;
for ( int i = 0;
i < n;
i ++ ) curr_val += i * arr [ i ];
int res = curr_val;
for ( int i = 1;
i < n;
i ++ ) {
int next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 );
curr_val = next_val;
res = max ( res, next_val );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 );
curr_val = next_val;
res = max ( res, next_val );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {6,6,13,14,16,20,24,24,24,27,28,36,49,51,55,56,62,69,74,74,76,85,86,90,92,98};
int param0_1[] = {-42,96,68,64,14,-74,76,42,34,-92,-20,28,-80,-34,-22,96,-46,96,10,-82,82,50,-24,48,56,72,-40,-86,84,66,-62,50,-76,34};
int param0_2[] = {0,0,0,0,0,1,1,1,1,1,1};
int param0_3[] = {37,88,70,86,24,62,34,44,37,42,46,34,23,32,55,2,5,70,30,46,40,65,91,4,7,74,46,12,30,22,1,91,89,88,97,6,6,11,33,14,68,24};
int param0_4[] = {-92,-90,-70,-70,-10,2,10,12,14,40,44,46,64,68,68,96};
int param0_5[] = {1,0,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1};
int param0_6[] = {9,15,15,17,19,20,21,23,25,25,25,32,32,33,45,51,54,59,68,71,71,71,72,75,78,80,82,82,88,89,92,93,94,97};
int param0_7[] = {52,-78,-80,32,-56,-98,-36,86,34,-36,42,46,50,0,34,-46,-2,-18,-96,12,-42,62,32,78,66,-8,50,60,10,-18,66,80,-24,-98,8,48,34,44,-80,-34,72,0,-60,52,40,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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {45,35,25,7,24,73,25,86,48,70,47,91,96,15,39,9};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {13,27,10,39,11,15,22,45,33,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 cum_sum = 0; for ( int i = 0; i < n; i ++ ) cum_sum += arr [ i ]; int curr_val = 0; for ( int i = 0; i < n; i ++ ) curr_val += i * arr [ i ]; int res = curr_val; for ( int i = 1; i < n; i ++ ) { int next_val = curr_val - ( cum_sum - [MASK] [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ); curr_val = next_val; res = max ( res, next_val ); } return res; } int f_filled ( int arr [ ], int n ) {}next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 );
curr_val = next_val;
res = max ( res, next_val );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {6,6,13,14,16,20,24,24,24,27,28,36,49,51,55,56,62,69,74,74,76,85,86,90,92,98};
int param0_1[] = {-42,96,68,64,14,-74,76,42,34,-92,-20,28,-80,-34,-22,96,-46,96,10,-82,82,50,-24,48,56,72,-40,-86,84,66,-62,50,-76,34};
int param0_2[] = {0,0,0,0,0,1,1,1,1,1,1};
int param0_3[] = {37,88,70,86,24,62,34,44,37,42,46,34,23,32,55,2,5,70,30,46,40,65,91,4,7,74,46,12,30,22,1,91,89,88,97,6,6,11,33,14,68,24};
int param0_4[] = {-92,-90,-70,-70,-10,2,10,12,14,40,44,46,64,68,68,96};
int param0_5[] = {1,0,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1};
int param0_6[] = {9,15,15,17,19,20,21,23,25,25,25,32,32,33,45,51,54,59,68,71,71,71,72,75,78,80,82,82,88,89,92,93,94,97};
int param0_7[] = {52,-78,-80,32,-56,-98,-36,86,34,-36,42,46,50,0,34,-46,-2,-18,-96,12,-42,62,32,78,66,-8,50,60,10,-18,66,80,-24,-98,8,48,34,44,-80,-34,72,0,-60,52,40,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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {45,35,25,7,24,73,25,86,48,70,47,91,96,15,39,9};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {13,27,10,39,11,15,22,45,33,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;
} | arr | [
"a) arr",
"b) #include",
"c) javafx.util.Pair;",
"d) fibo",
"e) if"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int set [ ], int n, int sum ) {
bool subset [ n + 1 ] [ sum + 1 ];
for ( int i = 0;
i <= n;
i ++ ) subset [ i ] [ 0 ] = true;
for ( int i = 1;
i <= sum;
i ++ ) subset [ 0 ] [ i ] = false;
for ( int i = 1;
i <= n;
i ++ ) {
for ( int j = 1;
j <= sum;
j ++ ) {
if ( j < set [ i - 1 ] ) subset [ i ] [ j ] = subset [ i - 1 ] [ j ];
if ( j >= set [ i - 1 ] ) subset [ i ] [ j ] = subset [ i - 1 ] [ j ] || subset [ i - 1 ] [ j - set [ i - 1 ] ];
}
}
return subset [ n ] [ sum ];
}
bool f_filled ( int set [ ], int n, int sum ) {}
set [ i - 1 ] ) subset [ i ] [ j ] = subset [ i - 1 ] [ j ] || subset [ i - 1 ] [ j - set [ i - 1 ] ];
}
}
return subset [ n ] [ sum ];
}
bool f_filled ( int set [ ], int n, int sum ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,4,4,5,8,11,11,13,14,14,14,14,19,21,24,24,28,31,32,32,34,37,37,38,38,39,43,43,44,47,48,49,58,63,67,72,77,80,81,83,88,92,93,99};
int param0_1[] = {30,-64,6,-8,-8,-36,66,36,30,-14,32,-44,-42,42,-92};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {71,46,18,96,58,19,94,45,71,18,70,65,32,90,28,36,89,19,12,10,72,66,90,33,61,21,5,83,50,11,99,20,43,3,42,45,59,74,72,6,40,7,9};
int param0_4[] = {-96,-78,-72,-22,2,14,18,36,72,76,80};
int param0_5[] = {0,1,1,1,0,0,1,1,0,1,0,0,0,1,0,0,1,1,0,1,0,0,1,1,0,1,1,1,1,1,1,1,0,1,0,0,1,0,0};
int param0_6[] = {2,4,10,10,13,15,15,16,20,21,26,31,32,33,36,37,38,40,42,44,50,55,58,58,59,61,64,66,67,69,71,76,80,82,82,84,86,90,91,96,97,98};
int param0_7[] = {80,-94,96,44,58,-36,78,-88,64,86,-52,86,-66,98,90,0,-98,-38,-70,40,-52,34,-96,32,28,-16,82,-78,4,-72,-22,-78,56,78,48,18,26,-94,32,64,14,58};
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};
int param0_9[] = {82,86,4,32,78,63,59,89,44,24,19,82,98,89,80,31};
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[] = {37,11,24,38,6,20,33,25,28,15};
int param2[] = {29,8,19,28,8,34,36,27,31,10};
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 set [ ], int n, int sum ) { bool subset [ n + 1 ] [ sum + 1 ]; for ( int i = 0; i <= n; i ++ ) subset [ i ] [ 0 ] = true; for ( int i = 1; i <= sum; i ++ ) subset [ 0 ] [ i ] = false; for ( int i = 1; i [MASK] n; i ++ ) { for ( int j = 1; j <= sum; j ++ ) { if ( j < set [ i - 1 ] ) subset [ i ] [ j ] = subset [ i - 1 ] [ j ]; if ( j >= set [ i - 1 ] ) subset [ i ] [ j ] = subset [ i - 1 ] [ j ] || subset [ i - 1 ] [ j - set [ i - 1 ] ]; } } return subset [ n ] [ sum ]; } bool f_filled ( int set [ ], int n, int sum ) {} set [ i - 1 ] ) subset [ i ] [ j ] = subset [ i - 1 ] [ j ] || subset [ i - 1 ] [ j - set [ i - 1 ] ];
}
}
return subset [ n ] [ sum ];
}
bool f_filled ( int set [ ], int n, int sum ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,4,4,5,8,11,11,13,14,14,14,14,19,21,24,24,28,31,32,32,34,37,37,38,38,39,43,43,44,47,48,49,58,63,67,72,77,80,81,83,88,92,93,99};
int param0_1[] = {30,-64,6,-8,-8,-36,66,36,30,-14,32,-44,-42,42,-92};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {71,46,18,96,58,19,94,45,71,18,70,65,32,90,28,36,89,19,12,10,72,66,90,33,61,21,5,83,50,11,99,20,43,3,42,45,59,74,72,6,40,7,9};
int param0_4[] = {-96,-78,-72,-22,2,14,18,36,72,76,80};
int param0_5[] = {0,1,1,1,0,0,1,1,0,1,0,0,0,1,0,0,1,1,0,1,0,0,1,1,0,1,1,1,1,1,1,1,0,1,0,0,1,0,0};
int param0_6[] = {2,4,10,10,13,15,15,16,20,21,26,31,32,33,36,37,38,40,42,44,50,55,58,58,59,61,64,66,67,69,71,76,80,82,82,84,86,90,91,96,97,98};
int param0_7[] = {80,-94,96,44,58,-36,78,-88,64,86,-52,86,-66,98,90,0,-98,-38,-70,40,-52,34,-96,32,28,-16,82,-78,4,-72,-22,-78,56,78,48,18,26,-94,32,64,14,58};
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};
int param0_9[] = {82,86,4,32,78,63,59,89,44,24,19,82,98,89,80,31};
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[] = {37,11,24,38,6,20,33,25,28,15};
int param2[] = {29,8,19,28,8,34,36,27,31,10};
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) result",
"e) if"
] | 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 ans = 0;
for ( int length = 1;
length <= sqrt ( n );
++ length ) for ( int height = length;
height * length <= n;
++ height ) ans ++;
return ans;
}
int f_filled ( int n ) {}
) {
int ans = 0;
for ( int length = 1;
length <= sqrt ( n );
++ length ) for ( int height = length;
height * length <= n;
++ height ) ans ++;
return ans;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {34,49,41,17,67,38,59,64,61,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 ans = 0; for ( int length = 1; length <= sqrt ( n ); ++ length ) for ( int height = length; height * length <= n; ++ height ) ans ++; return ans; } int f_filled ( int n ) [MASK]) {
int ans = 0;
for ( int length = 1;
length <= sqrt ( n );
++ length ) for ( int height = length;
height * length <= n;
++ height ) ans ++;
return ans;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {34,49,41,17,67,38,59,64,61,58};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | {} | [
"a) void",
"b) ]",
"c) ==",
"d) return",
"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 ) {
if ( n == 0 ) return 0;
else return 1 + f_gold ( n & ( n - 1 ) );
}
int f_filled ( int n ) {}
;}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
if ( n == 0 ) return 0;
else return 1 + f_gold ( n & ( n - 1 ) );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {6,58,90,69,15,54,60,51,46,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), [MASK] int f_gold ( int n ) { if ( n == 0 ) return 0; else return 1 + f_gold ( n & ( n - 1 ) ); } int f_filled ( int n ) {};}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
if ( n == 0 ) return 0;
else return 1 + f_gold ( n & ( n - 1 ) );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {6,58,90,69,15,54,60,51,46,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;
} | cmpfunc);} | [
"a) [",
"b) for",
"c) cmpfunc);}",
"d) [",
"e) (arr)[0]));}"
] | 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 first = 0, second = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( s . find ( arr [ i ] ) == s . end ( ) ) {
s . insert ( arr [ i ] );
continue;
}
if ( arr [ i ] > first ) {
second = first;
first = arr [ i ];
}
else if ( arr [ i ] > second ) second = arr [ i ];
}
return ( first * second );
}
int f_filled ( int arr [ ], int n ) {}
] > first ) {
second = first;
first = arr [ i ];
}
else if ( arr [ i ] > second ) second = arr [ i ];
}
return ( first * second );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,6,7,8,12,13,14,15,18,18,19,19,26,26,32,32,33,34,34,36,41,43,47,47,51,51,52,53,55,56,57,60,61,71,74,75,76,77,79,87,87,87,90,95,98,99};
int param0_1[] = {-64,-72,6,-62,54,14,28,60,-96,14,-32,-2,80,8,-56,68,86,64,86,-12,82};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {99,7,14,50,94,24,79,13,19,29,22,2,77,36,38,18,51,15,99,52,17,77,22,54};
int param0_4[] = {-96,-92,-86,-84,-84,-80,-70,-70,-68,-64,-64,-48,-46,-24,-22,-20,-8,-8,0,0,4,8,8,22,28,36,46,50,52,54,60,62,66,70,80,84,86,94,96,96};
int param0_5[] = {1,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,0,0,1,1};
int param0_6[] = {98};
int param0_7[] = {-88,-24,8,20,-46,60,24,26,98,82,-30,16,22,-28,84,12,34,14,-18,-38,-94,-24,6,4,-52,-48,84};
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};
int param0_9[] = {6,30,47,97,20,16,68,34,1,77,48,8,22,68};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {37,12,27,15,25,12,0,21,21,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 - [MASK] );} int len (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 first = 0, second = 0; for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) == s . end ( ) ) { s . insert ( arr [ i ] ); continue; } if ( arr [ i ] > first ) { second = first; first = arr [ i ]; } else if ( arr [ i ] > second ) second = arr [ i ]; } return ( first * second ); } int f_filled ( int arr [ ], int n ) {}] > first ) {
second = first;
first = arr [ i ];
}
else if ( arr [ i ] > second ) second = arr [ i ];
}
return ( first * second );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,6,7,8,12,13,14,15,18,18,19,19,26,26,32,32,33,34,34,36,41,43,47,47,51,51,52,53,55,56,57,60,61,71,74,75,76,77,79,87,87,87,90,95,98,99};
int param0_1[] = {-64,-72,6,-62,54,14,28,60,-96,14,-32,-2,80,8,-56,68,86,64,86,-12,82};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {99,7,14,50,94,24,79,13,19,29,22,2,77,36,38,18,51,15,99,52,17,77,22,54};
int param0_4[] = {-96,-92,-86,-84,-84,-80,-70,-70,-68,-64,-64,-48,-46,-24,-22,-20,-8,-8,0,0,4,8,8,22,28,36,46,50,52,54,60,62,66,70,80,84,86,94,96,96};
int param0_5[] = {1,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,0,0,1,1};
int param0_6[] = {98};
int param0_7[] = {-88,-24,8,20,-46,60,24,26,98,82,-30,16,22,-28,84,12,34,14,-18,-38,-94,-24,6,4,-52,-48,84};
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};
int param0_9[] = {6,30,47,97,20,16,68,34,1,77,48,8,22,68};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {37,12,27,15,25,12,0,21,21,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;
} | *(int*)b | [
"a) ;",
"b) (",
"c) *(int*)b",
"d) 2",
"e) if"
] | 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 [] ) {
int result = 0;
int n = strlen(s);
for ( int i = 0;
i < n;
i ++ ) for ( int j = i;
j < n;
j ++ ) if ( s [ i ] == s [ j ] ) result ++;
return result;
}
int f_filled ( char s [] ) {}
int result = 0;
int n = strlen(s);
for ( int i = 0;
i < n;
i ++ ) for ( int j = i;
j < n;
j ++ ) if ( s [ i ] == s [ j ] ) result ++;
return result;
}
int f_filled ( char s [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"LZIKA","0556979952","110010","kGaYfd","413567670657","01001","EQPuFa","48848378","110","PLehNeP"};
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);} int f_gold ( char s [] ) { int result = 0; int n = strlen(s); for ( int i = 0; i < n; i ++ ) for ( int j = i; j < n; j ++ ) if ( s [ i ] == s [ j ] ) result ++; return result; } int f_filled ( char s [] ) {} int result = 0;
int n = strlen(s);
for ( int i = 0;
i < n;
i ++ ) for ( int j = i;
j < n;
j ++ ) if ( s [ i ] == s [ j ] ) result ++;
return result;
}
int f_filled ( char s [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"LZIKA","0556979952","110010","kGaYfd","413567670657","01001","EQPuFa","48848378","110","PLehNeP"};
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) sizeof(int),",
"b) {",
"c) )",
"d) range(n):",
"e) void"
] | 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 x ) {
int i = 0;
while ( i < n ) {
if ( arr [ i ] == x ) return i;
i = i + abs ( arr [ i ] - x );
}
printf("number is not present!");
return - 1;
}
int f_filled ( int arr [ ], int n, int x ) {}
0;
while ( i < n ) {
if ( arr [ i ] == x ) return i;
i = i + abs ( arr [ i ] - x );
}
printf("number is not present!");
return - 1;
}
int f_filled ( int arr [ ], int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4};
int param0_1[] = {97,35,60,96,3,67,72,95,55,9,69,28,15,91,31,59};
int param0_2[] = {-84,-78,-74,-70,-68,-60,-56,-54,-48,-46,-28,-16,-6,0,0,8,8,8,12,16,26,30,32,34,36,40,46,48,70,70,72,76,78,78,80,84,84,86};
int param0_3[] = {1,0,1,1,1,1,0,1,1,1,1};
int param0_4[] = {55,64,76,79,93,96};
int param0_5[] = {66,-90,98,-50,0,46,42,64,-96,-80,-96,20,-10,-84};
int param0_6[] = {0,0,0,0,0,0,1};
int param0_7[] = {94,4,34,87,32,3,92,68,57,76,24,33,3,4,30,70,49,30,72,82,16,53,6,24,92,96,89,28,21,8,36,9,40,85,51,1,63,68,74,26,40,3,9,32,67,4,6,73};
int *param0[8] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7};
int param1[] = {12,1,6,15,22,5,4,8,6,25};
int param2[] = {3,1,5,9,31,7,4,13,5,25};
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("number is not present!");
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 x ) { int i = 0; [MASK] ( i < n ) { if ( arr [ i ] == x ) return i; i = i + abs ( arr [ i ] - x ); } printf("number is not present!"); return - 1; } int f_filled ( int arr [ ], int n, int x ) {}0;
while ( i < n ) {
if ( arr [ i ] == x ) return i;
i = i + abs ( arr [ i ] - x );
}
printf("number is not present!");
return - 1;
}
int f_filled ( int arr [ ], int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4};
int param0_1[] = {97,35,60,96,3,67,72,95,55,9,69,28,15,91,31,59};
int param0_2[] = {-84,-78,-74,-70,-68,-60,-56,-54,-48,-46,-28,-16,-6,0,0,8,8,8,12,16,26,30,32,34,36,40,46,48,70,70,72,76,78,78,80,84,84,86};
int param0_3[] = {1,0,1,1,1,1,0,1,1,1,1};
int param0_4[] = {55,64,76,79,93,96};
int param0_5[] = {66,-90,98,-50,0,46,42,64,-96,-80,-96,20,-10,-84};
int param0_6[] = {0,0,0,0,0,0,1};
int param0_7[] = {94,4,34,87,32,3,92,68,57,76,24,33,3,4,30,70,49,30,72,82,16,53,6,24,92,96,89,28,21,8,36,9,40,85,51,1,63,68,74,26,40,3,9,32,67,4,6,73};
int *param0[8] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7};
int param1[] = {12,1,6,15,22,5,4,8,6,25};
int param2[] = {3,1,5,9,31,7,4,13,5,25};
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("number is not present!");
return 0;
} | while | [
"a) 1",
"b) while",
"c) )",
"d) 0",
"e) ;"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int ans = 0;
int maxele = * max_element ( arr, arr + n );
for ( int i = 2;
i <= maxele;
++ i ) {
int count = 0;
for ( int j = 0;
j < n;
++ j ) {
if ( arr [ j ] % i == 0 ) ++ count;
}
ans = max ( ans, count );
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
nt count = 0;
for ( int j = 0;
j < n;
++ j ) {
if ( arr [ j ] % i == 0 ) ++ count;
}
ans = max ( ans, count );
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {10,18,22,22,22,29,30,32,33,34,37,39,40,41,44,47,49,50,50,51,53,67,69,70,71,71,73,75,78,80,81,82,91,91,93,97,97,99};
int param0_1[] = {-42,62,6,98,38,-4,-38,72,42,4,-22,-94,78,-90,14};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {89,92,96,71,24,27,18,19,41,1,45,8};
int param0_4[] = {-98,-94,-92,-90,-82,-80,-76,-76,-72,-62,-60,-58,-56,-52,-42,-36,-32,-32,-24,-22,-20,-10,-10,-10,-8,-2,-2,0,2,4,6,6,8,10,14,18,22,26,30,46,46,62,68,74,78,82,86,86};
int param0_5[] = {1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,0,0,0,1,0,1,0,0,0,1};
int param0_6[] = {4,8,10,10,11,17,18,25,32,33,34,37,40,41,44,47,47,52,63,77,85,87,89,89,91,95,96,98};
int param0_7[] = {-86,52,-48,70,10,-94,16,14,38,62};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {95,32,87,37,86,71,30,88,96,52,88,92,79,86,19,5,74,67};
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[] = {35,10,23,7,40,41,23,9,30,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 * [MASK] const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int ans = 0; int maxele = * max_element ( arr, arr + n ); for ( int i = 2; i <= maxele; ++ i ) { int count = 0; for ( int j = 0; j < n; ++ j ) { if ( arr [ j ] % i == 0 ) ++ count; } ans = max ( ans, count ); } return ans; } int f_filled ( int arr [ ], int n ) {}nt count = 0;
for ( int j = 0;
j < n;
++ j ) {
if ( arr [ j ] % i == 0 ) ++ count;
}
ans = max ( ans, count );
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {10,18,22,22,22,29,30,32,33,34,37,39,40,41,44,47,49,50,50,51,53,67,69,70,71,71,73,75,78,80,81,82,91,91,93,97,97,99};
int param0_1[] = {-42,62,6,98,38,-4,-38,72,42,4,-22,-94,78,-90,14};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {89,92,96,71,24,27,18,19,41,1,45,8};
int param0_4[] = {-98,-94,-92,-90,-82,-80,-76,-76,-72,-62,-60,-58,-56,-52,-42,-36,-32,-32,-24,-22,-20,-10,-10,-10,-8,-2,-2,0,2,4,6,6,8,10,14,18,22,26,30,46,46,62,68,74,78,82,86,86};
int param0_5[] = {1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,0,0,0,1,0,1,0,0,0,1};
int param0_6[] = {4,8,10,10,11,17,18,25,32,33,34,37,40,41,44,47,47,52,63,77,85,87,89,89,91,95,96,98};
int param0_7[] = {-86,52,-48,70,10,-94,16,14,38,62};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {95,32,87,37,86,71,30,88,96,52,88,92,79,86,19,5,74,67};
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[] = {35,10,23,7,40,41,23,9,30,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, | [
"a) :",
"b) int",
"c) 1",
"d) a,",
"e) int"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
map < int, int > mp;
int sum = 0;
int count = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] == 0 ) arr [ i ] = - 1;
sum += arr [ i ];
if ( sum == 0 ) count ++;
if ( mp [ sum ] ) count += mp [ sum ];
if ( mp [ sum ] == 0 ) mp [ sum ] = 1;
else mp [ sum ] ++;
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
f ( sum == 0 ) count ++;
if ( mp [ sum ] ) count += mp [ sum ];
if ( mp [ sum ] == 0 ) mp [ sum ] = 1;
else mp [ sum ] ++;
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,6,6,9,9,9,16,18,19,20,21,22,23,26,26,28,39,40,41,43,43,44,44,45,51,51,55,59,60,62,67,67,68,69,70,71,71,72,82,84,88,88,89,89,91,92,92};
int param0_1[] = {-44,74,-52,-96,46,92,54,56,-38,88,40,34,-72,8,58,-14,36,94,34,-90,-42,80,-12,-42,-6,78,-98,34,-88,0,-76,90,40,64,26,18,-84,72,80};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {60,48,42,95,30,22,80,15,62,38,63,42,39,28,69,71,30,48,67,9,33,74,95,95,72,35,9};
int param0_4[] = {-96,-94,-94,-86,-66,-66,-62,-58,-36,-36,-22,-18,-10,2,4,6,10,16,20,24,26,28,28,28,40,42,44,58,76,78,78,80,90,92};
int param0_5[] = {0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,0,1,1,1,0,1,1,0,1,0,1,1,1,0,1,1};
int param0_6[] = {4,5,5,6,7,11,16,16,17,18,19,20,21,22,23,25,26,27,29,31,34,36,37,40,41,45,45,55,65,69,70,71,71,71,73,73,76,79,80,85,85,88,90,97,98,98,99,99};
int param0_7[] = {34,-20,38,-94,2,32,-26,90,94,-36,-94,6,-24,12,4,60,68,64,-60,-72,-54,-10,-64,-48,-88,60,48,64,0,-26,26,74,32,-92,4,84,6,-16,30,-56,-28,-86,-68};
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};
int param0_9[] = {4,99,97,63,65,57,69,39,29,91,68,25,84,82,84,89,59,18,77,29,57,40,78,35,23,91,26,71,19,99,12,91,49,71,49,77,67};
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[] = {44,37,32,18,24,28,31,37,19,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);} int f_gold ( int arr [ ], int n ) { map < int, int > mp; int sum = 0; int count = 0; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] == 0 ) arr [ i ] = - 1; sum += arr [ i ]; [MASK] ( sum == 0 ) count ++; if ( mp [ sum ] ) count += mp [ sum ]; if ( mp [ sum ] == 0 ) mp [ sum ] = 1; else mp [ sum ] ++; } return count; } int f_filled ( int arr [ ], int n ) {}f ( sum == 0 ) count ++;
if ( mp [ sum ] ) count += mp [ sum ];
if ( mp [ sum ] == 0 ) mp [ sum ] = 1;
else mp [ sum ] ++;
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,6,6,9,9,9,16,18,19,20,21,22,23,26,26,28,39,40,41,43,43,44,44,45,51,51,55,59,60,62,67,67,68,69,70,71,71,72,82,84,88,88,89,89,91,92,92};
int param0_1[] = {-44,74,-52,-96,46,92,54,56,-38,88,40,34,-72,8,58,-14,36,94,34,-90,-42,80,-12,-42,-6,78,-98,34,-88,0,-76,90,40,64,26,18,-84,72,80};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {60,48,42,95,30,22,80,15,62,38,63,42,39,28,69,71,30,48,67,9,33,74,95,95,72,35,9};
int param0_4[] = {-96,-94,-94,-86,-66,-66,-62,-58,-36,-36,-22,-18,-10,2,4,6,10,16,20,24,26,28,28,28,40,42,44,58,76,78,78,80,90,92};
int param0_5[] = {0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,0,1,1,1,0,1,1,0,1,0,1,1,1,0,1,1};
int param0_6[] = {4,5,5,6,7,11,16,16,17,18,19,20,21,22,23,25,26,27,29,31,34,36,37,40,41,45,45,55,65,69,70,71,71,71,73,73,76,79,80,85,85,88,90,97,98,98,99,99};
int param0_7[] = {34,-20,38,-94,2,32,-26,90,94,-36,-94,6,-24,12,4,60,68,64,-60,-72,-54,-10,-64,-48,-88,60,48,64,0,-26,26,74,32,-92,4,84,6,-16,30,-56,-28,-86,-68};
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};
int param0_9[] = {4,99,97,63,65,57,69,39,29,91,68,25,84,82,84,89,59,18,77,29,57,40,78,35,23,91,26,71,19,99,12,91,49,71,49,77,67};
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[] = {44,37,32,18,24,28,31,37,19,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;
} | if | [
"a) oneSeen",
"b) :",
"c) if",
"d) int",
"e) javafx.util.Pair;"
] | 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);}
unsigned int f_gold ( unsigned int n ) {
unsigned int p = 1;
if ( n && ! ( n & ( n - 1 ) ) ) return n;
while ( p < n ) p <<= 1;
return p;
}
unsigned int f_filled ( unsigned int n ) {}
;}
unsigned int f_gold ( unsigned int n ) {
unsigned int p = 1;
if ( n && ! ( n & ( n - 1 ) ) ) return n;
while ( p < n ) p <<= 1;
return p;
}
unsigned int f_filled ( unsigned int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {8,79,31,63,18,2,6,85,29,8};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | [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);} unsigned int f_gold ( unsigned int n ) { unsigned int p = 1; if ( n && ! ( n & ( n - 1 ) ) ) return n; while ( p < n ) p <<= 1; return p; } unsigned int f_filled ( unsigned int n ) {};}
unsigned int f_gold ( unsigned int n ) {
unsigned int p = 1;
if ( n && ! ( n & ( n - 1 ) ) ) return n;
while ( p < n ) p <<= 1;
return p;
}
unsigned int f_filled ( unsigned int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {8,79,31,63,18,2,6,85,29,8};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include | [
"a) *(int*)b",
"b) :",
"c) #include",
"d) Vector",
"e) )"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( char s [] ) {
if ( len(s) >= 10 ) return true;
for ( int i = 1;
i < len(s);
i ++ ) {
for ( int j = i + 1;
j < len(s);
j ++ ) {
for ( int k = j + 1;
k < len(s);
k ++ ) {
char s1 [] = s . substr ( 0, i );
char s2 [] = s . substr ( i, j - i );
char s3 [] = s . substr ( j, k - j );
char s4 [] = s . substr ( k, len(s) - k );
if ( s1 != s2 && s1 != s3 && s1 != s4 && s2 != s3 && s2 != s4 && s3 != s4 ) return true;
}
}
}
return false;
}
bool f_filled ( char s [] ) {}
= s . substr ( k, len(s) - k );
if ( s1 != s2 && s1 != s3 && s1 != s4 && s2 != s3 && s2 != s4 && s3 != s4 ) return true;
}
}
}
return false;
}
bool f_filled ( char s [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"WKTj Nw","8235021","0101","BLMhiQsQcFla","00363175722","10000","aqEYWNd bqgye","83","000011110111","E"};
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 s [] ) { if ( len(s) >= 10 ) return true; for ( int i = 1; i < len(s); i ++ ) { for ( int j = i + 1; j < len(s); j ++ ) { for ( int k = j + 1; k < len(s); k ++ ) { char s1 [] = s . substr ( 0, i ); char s2 [] = s [MASK] substr ( i, j - i ); char s3 [] = s . substr ( j, k - j ); char s4 [] = s . substr ( k, len(s) - k ); if ( s1 != s2 && s1 != s3 && s1 != s4 && s2 != s3 && s2 != s4 && s3 != s4 ) return true; } } } return false; } bool f_filled ( char s [] ) {}= s . substr ( k, len(s) - k );
if ( s1 != s2 && s1 != s3 && s1 != s4 && s2 != s3 && s2 != s4 && s3 != s4 ) return true;
}
}
}
return false;
}
bool f_filled ( char s [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"WKTj Nw","8235021","0101","BLMhiQsQcFla","00363175722","10000","aqEYWNd bqgye","83","000011110111","E"};
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) ("
] | 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 ) {
n --;
int sum = 0;
sum += ( n * ( n + 1 ) ) / 2;
sum += ( n * ( n + 1 ) * ( 2 * n + 1 ) ) / 6;
return sum;
}
int f_filled ( int n ) {}
n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
n --;
int sum = 0;
sum += ( n * ( n + 1 ) ) / 2;
sum += ( n * ( n + 1 ) * ( 2 * n + 1 ) ) / 6;
return sum;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {12,89,76,2,81,11,26,35,16,66};
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 [MASK] ) { n --; int sum = 0; sum += ( n * ( n + 1 ) ) / 2; sum += ( n * ( n + 1 ) * ( 2 * n + 1 ) ) / 6; return sum; } int f_filled ( int n ) {}n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
n --;
int sum = 0;
sum += ( n * ( n + 1 ) ) / 2;
sum += ( n * ( n + 1 ) * ( 2 * n + 1 ) ) / 6;
return sum;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {12,89,76,2,81,11,26,35,16,66};
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) 0",
"c) table",
"d) #include",
"e) void"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double s ) {
return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 );
}
double f_filled ( double s ) {}
arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double s ) {
return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 );
}
double f_filled ( double s ) {}
int main(void) {
int n_success = 0;
double param0[] = {1772.6589509256596,-599.737107809315,1074.1765931782,-1182.4087746714795,8083.035797247716,-6126.414356565494,5370.057504189614,-6947.020794285176,2110.5107873533325,-6458.751326919488};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: 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);} double f_gold ( double s ) { return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 ); } double f_filled ( double s ) {}arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double s ) {
return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 );
}
double f_filled ( double s ) {}
int main(void) {
int n_success = 0;
double param0[] = {1772.6589509256596,-599.737107809315,1074.1765931782,-1182.4087746714795,8083.035797247716,-6126.414356565494,5370.057504189614,-6947.020794285176,2110.5107873533325,-6458.751326919488};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | / | [
"a) n",
"b) /",
"c) int",
"d) y)?",
"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 cps [ N + 1 ] [ N + 1 ];
memset ( cps, 0, sizeof ( cps ) );
for ( int i = 0;
i < N;
i ++ ) cps [ i ] [ i ] = 1;
for ( int L = 2;
L <= N;
L ++ ) {
for ( int i = 0;
i < N;
i ++ ) {
int k = L + i - 1;
if ( str [ i ] == str [ k ] ) cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] + 1;
else cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] - cps [ i + 1 ] [ k - 1 ];
}
}
return cps [ 0 ] [ N - 1 ];
}
int f_filled ( char str [] ) {}
ps [ i + 1 ] [ k ] + 1;
else cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] - cps [ i + 1 ] [ k - 1 ];
}
}
return cps [ 0 ] [ N - 1 ];
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"R","2956350","11100111110101","TZTDLIIfAD","98","1100100001","oKwGeatf","19","00010110100","Cyq"};
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 [MASK] int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (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 cps [ N + 1 ] [ N + 1 ]; memset ( cps, 0, sizeof ( cps ) ); for ( int i = 0; i < N; i ++ ) cps [ i ] [ i ] = 1; for ( int L = 2; L <= N; L ++ ) { for ( int i = 0; i < N; i ++ ) { int k = L + i - 1; if ( str [ i ] == str [ k ] ) cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] + 1; else cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] - cps [ i + 1 ] [ k - 1 ]; } } return cps [ 0 ] [ N - 1 ]; } int f_filled ( char str [] ) {}ps [ i + 1 ] [ k ] + 1;
else cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] - cps [ i + 1 ] [ k - 1 ];
}
}
return cps [ 0 ] [ N - 1 ];
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"R","2956350","11100111110101","TZTDLIIfAD","98","1100100001","oKwGeatf","19","00010110100","Cyq"};
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;
} | <stdbool.h> | [
"a) i",
"b) <stdbool.h>",
"c) n",
"d) %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 arr [ ], int n, int key ) {
int i;
for ( i = 0;
i < n;
i ++ ) if ( arr [ i ] == key ) return i;
return - 1;
}
int f_filled ( int arr [ ], int n, int key ) {}
mpfunc);}
int f_gold ( int arr [ ], int n, int key ) {
int i;
for ( i = 0;
i < n;
i ++ ) if ( arr [ i ] == key ) return i;
return - 1;
}
int f_filled ( int arr [ ], int n, int key ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,8,11,23,55,57,73,74,77,79,93};
int param0_1[] = {-88,12,-62,-66,-24,18,12,22,94,30,-50,-42,-94,18,76,-6,-48,-68,48,36,-78,52,-82,76,2,-44,-10,88};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
int param0_3[] = {33,9,93,70,81,70,56,66,72,81,74,32,71,72,3,81,70,22,82,2,75,18,90,29,48};
int param0_4[] = {-98,-70,-62,-60,-60,-54,-48,-48,-46,-44,-34,-26,-18,-6,4,18,28,32,34,40,50,54,56,62,64,64,98};
int param0_5[] = {1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,0,1};
int param0_6[] = {4,6,7,10,10,12,13,18,23,29,29,34,46,54,60,61,63,67,69,70,72,76,79,79,81,82,88,90,99};
int param0_7[] = {94,34,-60,-74,86,80,68,-48,78,-62,-98,-44,-44,92,-94,-86,-36,12,84,-90,52,42,-42,-66,88,76,66};
int param0_8[] = {0,0,0,1};
int param0_9[] = {76,59,38,83,38,93,27,11,17,80,26,28,35,53,88,10,9,75};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {8,27,11,24,18,17,15,21,2,12};
int param2[] = {11,12,0,72,23,16,28,16,3,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) [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 arr [ ], int n, int key ) { int i; for ( i = 0; i < n; i ++ ) if ( arr [ i ] == key ) return i; return - 1; } int f_filled ( int arr [ ], int n, int key ) {}mpfunc);}
int f_gold ( int arr [ ], int n, int key ) {
int i;
for ( i = 0;
i < n;
i ++ ) if ( arr [ i ] == key ) return i;
return - 1;
}
int f_filled ( int arr [ ], int n, int key ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,8,11,23,55,57,73,74,77,79,93};
int param0_1[] = {-88,12,-62,-66,-24,18,12,22,94,30,-50,-42,-94,18,76,-6,-48,-68,48,36,-78,52,-82,76,2,-44,-10,88};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
int param0_3[] = {33,9,93,70,81,70,56,66,72,81,74,32,71,72,3,81,70,22,82,2,75,18,90,29,48};
int param0_4[] = {-98,-70,-62,-60,-60,-54,-48,-48,-46,-44,-34,-26,-18,-6,4,18,28,32,34,40,50,54,56,62,64,64,98};
int param0_5[] = {1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,0,1};
int param0_6[] = {4,6,7,10,10,12,13,18,23,29,29,34,46,54,60,61,63,67,69,70,72,76,79,79,81,82,88,90,99};
int param0_7[] = {94,34,-60,-74,86,80,68,-48,78,-62,-98,-44,-44,92,-94,-86,-36,12,84,-90,52,42,-42,-66,88,76,66};
int param0_8[] = {0,0,0,1};
int param0_9[] = {76,59,38,83,38,93,27,11,17,80,26,28,35,53,88,10,9,75};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {8,27,11,24,18,17,15,21,2,12};
int param2[] = {11,12,0,72,23,16,28,16,3,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) (",
"b) arr",
"c) {",
"d) )",
"e) ;"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a, int b, bool x ) {
int arr [ ] = {
a, b };
return ( arr [ x ] );
}
int f_filled ( int a, int b, bool x ) {}
r [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a, int b, bool x ) {
int arr [ ] = {
a, b };
return ( arr [ x ] );
}
int f_filled ( int a, int b, bool x ) {}
int main(void) {
int n_success = 0;
int param0[] = {21,17,35,23,48,9,18,46,99,61};
int param1[] = {7,49,43,51,30,44,30,91,23,54};
int param2[] = {34,69,18,80,99,64,34,71,35,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) [MASK] ( *(int*)a - *(int*)b );} int len (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, bool x ) { int arr [ ] = { a, b }; return ( arr [ x ] ); } int f_filled ( int a, int b, bool x ) {}r [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a, int b, bool x ) {
int arr [ ] = {
a, b };
return ( arr [ x ] );
}
int f_filled ( int a, int b, bool x ) {}
int main(void) {
int n_success = 0;
int param0[] = {21,17,35,23,48,9,18,46,99,61};
int param1[] = {7,49,43,51,30,44,30,91,23,54};
int param2[] = {34,69,18,80,99,64,34,71,35,5};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | {return | [
"a) 1",
"b) >",
"c) [",
"d) [",
"e) {return"
] | 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 ans = 2 * ( pow ( 3, n ) ) - 1;
return ans;
}
int f_filled ( int n ) {}
sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int ans = 2 * ( pow ( 3, n ) ) - 1;
return ans;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {78,89,46,56,79,71,80,77,48,16};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (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 ans = 2 * ( pow ( 3, n ) ) - 1; return ans; } int f_filled ( int [MASK] ) {} sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int ans = 2 * ( pow ( 3, n ) ) - 1;
return ans;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {78,89,46,56,79,71,80,77,48,16};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | n | [
"a) k",
"b) n",
"c) ((int)",
"d) '0';",
"e) f_filled"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( char s [], char c ) {
bool oneSeen = false;
int i = 0, n = strlen(s);
while ( i < n ) {
if ( s [ i ] == c ) {
if ( oneSeen == true ) return false;
while ( i < n && s [ i ] == c ) i ++;
oneSeen = true;
}
else i ++;
}
return true;
}
bool f_filled ( char s [], char c ) {}
c ) {
if ( oneSeen == true ) return false;
while ( i < n && s [ i ] == c ) i ++;
oneSeen = true;
}
else i ++;
}
return true;
}
bool f_filled ( char s [], char c ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"gILrzLimS","307471222","110","GcAB","113","011110010","wcwob","74571582216153","100000011","ryPErkzY"};
char param1[] = {'m','2','0','v','3','0','w','1','0','q'};
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);} [MASK] f_gold ( char s [], char c ) { bool oneSeen = false; int i = 0, n = strlen(s); while ( i < n ) { if ( s [ i ] == c ) { if ( oneSeen == true ) return false; while ( i < n && s [ i ] == c ) i ++; oneSeen = true; } else i ++; } return true; } bool f_filled ( char s [], char c ) {}c ) {
if ( oneSeen == true ) return false;
while ( i < n && s [ i ] == c ) i ++;
oneSeen = true;
}
else i ++;
}
return true;
}
bool f_filled ( char s [], char c ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"gILrzLimS","307471222","110","GcAB","113","011110010","wcwob","74571582216153","100000011","ryPErkzY"};
char param1[] = {'m','2','0','v','3','0','w','1','0','q'};
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;
} | bool | [
"a) import",
"b) bool",
"c) n",
"d) f_gold",
"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 fw [ n ], bw [ n ];
int cur_max = arr [ 0 ], max_so_far = arr [ 0 ];
fw [ 0 ] = arr [ 0 ];
for ( int i = 1;
i < n;
i ++ ) {
cur_max = max ( arr [ i ], cur_max + arr [ i ] );
max_so_far = max ( max_so_far, cur_max );
fw [ i ] = cur_max;
}
cur_max = max_so_far = bw [ n - 1 ] = arr [ n - 1 ];
for ( int i = n - 2;
i >= 0;
i -- ) {
cur_max = max ( arr [ i ], cur_max + arr [ i ] );
max_so_far = max ( max_so_far, cur_max );
bw [ i ] = cur_max;
}
int fans = max_so_far;
for ( int i = 1;
i < n - 1;
i ++ ) fans = max ( fans, fw [ i - 1 ] + bw [ i + 1 ] );
return fans;
}
int f_filled ( int arr [ ], int n ) {}
bw [ i ] = cur_max;
}
int fans = max_so_far;
for ( int i = 1;
i < n - 1;
i ++ ) fans = max ( fans, fw [ i - 1 ] + bw [ i + 1 ] );
return fans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,8,14,17,19,35,38,45,50,53,55,70,82,88,92,96};
int param0_1[] = {-64,-56,-80,-82,72,62,-8,48,-96,34,64,-38,-60,80,4,-64,-62,34,94,-16,38,62,-84,48,42,-40};
int param0_2[] = {0,0,0,0,1,1,1};
int param0_3[] = {3,7,50,53,72,14,18,74,27,65,41,20,54,17,87,40,63,15,47};
int param0_4[] = {-96,-96,-94,-80,-74,-74,-74,-74,-70,-64,-60,-58,-52,-52,-44,-42,-40,-38,-36,-34,-30,-14,-12,-8,-2,6,12,16,24,24,48,48,66,76,76,84,90};
int param0_5[] = {1,1,0,1,1,1,1,0,0,0,1,0,1,0,0};
int param0_6[] = {4,4,5,9,11,13,13,15,16,21,23,25,27,30,31,35,35,43,43,47,49,50,52,54,55,55,57,57,57,59,62,64,66,68,69,71,73,76,80,84,88,88,90,90,97,97,99};
int param0_7[] = {-86,-60,4,14,6,-6,-50,46,-50,-62,-56,16,-76,90,40,2,36,48,-26,34,78,84,2,-54,94,60,-26,60,84,2,-98,2,-74};
int param0_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
int param0_9[] = {36,99,27,8,90,74,67,77,49,23,43,25,68,56,85,6};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {13,22,6,11,32,8,34,25,9,12};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int fw [ n ], bw [ n ]; int cur_max = arr [ 0 ], max_so_far = arr [ 0 ]; fw [ 0 ] = arr [ 0 ]; for ( [MASK] i = 1; i < n; i ++ ) { cur_max = max ( arr [ i ], cur_max + arr [ i ] ); max_so_far = max ( max_so_far, cur_max ); fw [ i ] = cur_max; } cur_max = max_so_far = bw [ n - 1 ] = arr [ n - 1 ]; for ( int i = n - 2; i >= 0; i -- ) { cur_max = max ( arr [ i ], cur_max + arr [ i ] ); max_so_far = max ( max_so_far, cur_max ); bw [ i ] = cur_max; } int fans = max_so_far; for ( int i = 1; i < n - 1; i ++ ) fans = max ( fans, fw [ i - 1 ] + bw [ i + 1 ] ); return fans; } int f_filled ( int arr [ ], int n ) {}bw [ i ] = cur_max;
}
int fans = max_so_far;
for ( int i = 1;
i < n - 1;
i ++ ) fans = max ( fans, fw [ i - 1 ] + bw [ i + 1 ] );
return fans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,8,14,17,19,35,38,45,50,53,55,70,82,88,92,96};
int param0_1[] = {-64,-56,-80,-82,72,62,-8,48,-96,34,64,-38,-60,80,4,-64,-62,34,94,-16,38,62,-84,48,42,-40};
int param0_2[] = {0,0,0,0,1,1,1};
int param0_3[] = {3,7,50,53,72,14,18,74,27,65,41,20,54,17,87,40,63,15,47};
int param0_4[] = {-96,-96,-94,-80,-74,-74,-74,-74,-70,-64,-60,-58,-52,-52,-44,-42,-40,-38,-36,-34,-30,-14,-12,-8,-2,6,12,16,24,24,48,48,66,76,76,84,90};
int param0_5[] = {1,1,0,1,1,1,1,0,0,0,1,0,1,0,0};
int param0_6[] = {4,4,5,9,11,13,13,15,16,21,23,25,27,30,31,35,35,43,43,47,49,50,52,54,55,55,57,57,57,59,62,64,66,68,69,71,73,76,80,84,88,88,90,90,97,97,99};
int param0_7[] = {-86,-60,4,14,6,-6,-50,46,-50,-62,-56,16,-76,90,40,2,36,48,-26,34,78,84,2,-54,94,60,-26,60,84,2,-98,2,-74};
int param0_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
int param0_9[] = {36,99,27,8,90,74,67,77,49,23,43,25,68,56,85,6};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {13,22,6,11,32,8,34,25,9,12};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) arr",
"b) i",
"c) int",
"d) low",
"e) 3"
] | 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 remainder = 0;
for ( int i = 0;
i < n;
i ++ ) remainder = ( remainder + arr [ i ] ) % 3;
return ( remainder == 0 );
}
bool f_filled ( int arr [ ], int n ) {}
int arr [ ], int n ) {
int remainder = 0;
for ( int i = 0;
i < n;
i ++ ) remainder = ( remainder + arr [ i ] ) % 3;
return ( remainder == 0 );
}
bool f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,4,9,11,12,15,16,19,21,21,23,23,24,30,31,31,32,34,37,41,41,43,45,46,47,54,58,60,62,66,66,74,74,75,75,77,77,85,89,90,92,92,93,95,98};
int param0_1[] = {0,66,92,24,-8,88,-92,86,80,82,42,-20,-56,-2,-84,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,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[] = {99,83,11,99,80,76,32,12,94,66,76};
int param0_4[] = {-88,-84,-80,-80,-80,-80,-72,-68,-64,-62,-60,-52,-48,-44,-36,-24,-20,-18,-14,-8,-6,-6,-4,6,10,14,18,24,26,26,50,50,52,60,76,90,96,98};
int param0_5[] = {0,1,0,0,1,1,0,0,0,1,1,1,0,1,0,0,0,0,0,1,1,0,1};
int param0_6[] = {6,6,8,8,10,24,24,26,27,30,34,34,36,36,39,40,41,44,45,50,52,53,57,62,64,64,70,71,72,78,78,79,80,82,89,95,96};
int param0_7[] = {-28,-84,-14,-20,-14,-26,28,-66,48,82,-46,-10,-94,76,56,-6,72,-92,-32,66,50,-72,64,12,48,88,-36,-12,-6,-18,-36,-34,44,40,-54};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {17,47,89,75,57,69,70,57,83,79,57,49};
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[] = {30,14,29,5,19,14,28,25,19,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 [MASK] { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int arr [ ], int n ) { int remainder = 0; for ( int i = 0; i < n; i ++ ) remainder = ( remainder + arr [ i ] ) % 3; return ( remainder == 0 ); } bool f_filled ( int arr [ ], int n ) {} int arr [ ], int n ) {
int remainder = 0;
for ( int i = 0;
i < n;
i ++ ) remainder = ( remainder + arr [ i ] ) % 3;
return ( remainder == 0 );
}
bool f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,4,9,11,12,15,16,19,21,21,23,23,24,30,31,31,32,34,37,41,41,43,45,46,47,54,58,60,62,66,66,74,74,75,75,77,77,85,89,90,92,92,93,95,98};
int param0_1[] = {0,66,92,24,-8,88,-92,86,80,82,42,-20,-56,-2,-84,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,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[] = {99,83,11,99,80,76,32,12,94,66,76};
int param0_4[] = {-88,-84,-80,-80,-80,-80,-72,-68,-64,-62,-60,-52,-48,-44,-36,-24,-20,-18,-14,-8,-6,-6,-4,6,10,14,18,24,26,26,50,50,52,60,76,90,96,98};
int param0_5[] = {0,1,0,0,1,1,0,0,0,1,1,1,0,1,0,0,0,0,0,1,1,0,1};
int param0_6[] = {6,6,8,8,10,24,24,26,27,30,34,34,36,36,39,40,41,44,45,50,52,53,57,62,64,64,70,71,72,78,78,79,80,82,89,95,96};
int param0_7[] = {-28,-84,-14,-20,-14,-26,28,-66,48,82,-46,-10,-94,76,56,-6,72,-92,-32,66,50,-72,64,12,48,88,-36,-12,-6,-18,-36,-34,44,40,-54};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {17,47,89,75,57,69,70,57,83,79,57,49};
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[] = {30,14,29,5,19,14,28,25,19,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;
} | y) | [
"a) y)",
"b) ]",
"c) (int",
"d) class",
"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 ( char str [] ) {
int checker = 0;
for ( int i = 0;
i < strlen(str);
++ i ) {
int val = ( str [ i ] - 'a' );
if ( ( checker & ( 1 << val ) ) > 0 ) return i;
checker |= ( 1 << val );
}
return - 1;
}
int f_filled ( char str [] ) {}
i < strlen(str);
++ i ) {
int val = ( str [ i ] - 'a' );
if ( ( checker & ( 1 << val ) ) > 0 ) return i;
checker |= ( 1 << val );
}
return - 1;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"XFGfXTDgpIuerN","5621946166","11010110","xL","2575","0100010","SZmmQ","9735892999350","1001101101101","oEXDbOU"};
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 [MASK] / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char str [] ) { int checker = 0; for ( int i = 0; i < strlen(str); ++ i ) { int val = ( str [ i ] - 'a' ); if ( ( checker & ( 1 << val ) ) > 0 ) return i; checker |= ( 1 << val ); } return - 1; } int f_filled ( char str [] ) {}i < strlen(str);
++ i ) {
int val = ( str [ i ] - 'a' );
if ( ( checker & ( 1 << val ) ) > 0 ) return i;
checker |= ( 1 << val );
}
return - 1;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"XFGfXTDgpIuerN","5621946166","11010110","xL","2575","0100010","SZmmQ","9735892999350","1001101101101","oEXDbOU"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | (arr) | [
"a) #include",
"b) <fstream>",
"c) );",
"d) (arr)",
"e) len"
] | 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 result = 0;
for ( int i = 0;
i < n;
i ++ ) {
for ( int j = i + 1;
j < n;
j ++ ) {
int product = arr [ i ] * arr [ j ];
for ( int k = 0;
k < n;
k ++ ) {
if ( arr [ k ] == product ) {
result ++;
break;
}
}
}
}
return result;
}
int f_filled ( int arr [ ], int n ) {}
= 0;
k < n;
k ++ ) {
if ( arr [ k ] == product ) {
result ++;
break;
}
}
}
}
return result;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,7,26,40,46,89,99};
int param0_1[] = {98,42,-24,-60,74,86,6,8,72,-58,38,-20,6,-6,8,48,-34,30,60,66,38,-54,8,-94,-8,0,-64,-94,-94,-72,-84,-36,88,-62,-88,46,-4,88};
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,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[] = {37,97,57,82,29,68,94,38,81,48,13,84,57,5,27,87,11,35,82,53,67,31,15,99,6,93,91,92,3,23,90,27,6,33,78,3,19,19,27};
int param0_4[] = {-80,-74,-72,-72,-66,-66,-62,-50,-44,-44,-28,-24,-24,-22,-16,-10,-6,-4,-2,2,2,4,12,16,16,28,30,32,32,38,38,72,84,86,88,90,96};
int param0_5[] = {0,1,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1};
int param0_6[] = {25,67};
int param0_7[] = {82,74,-82,22,-28,-78,-22,-86,-74,42,-6,54,-88,-92,-14,-50,68,46,-50,46,-18,66,-76,-30,36,12,66};
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};
int param0_9[] = {50,23,56,9};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {5,24,44,36,34,18,1,14,32,3};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int result = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = i + 1; j < n; j ++ ) { int product = arr [ i ] * arr [ j ]; for ( int k = 0; k < n; k ++ ) [MASK] if ( arr [ k ] == product ) { result ++; break; } } } } return result; } int f_filled ( int arr [ ], int n ) {} = 0;
k < n;
k ++ ) {
if ( arr [ k ] == product ) {
result ++;
break;
}
}
}
}
return result;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,7,26,40,46,89,99};
int param0_1[] = {98,42,-24,-60,74,86,6,8,72,-58,38,-20,6,-6,8,48,-34,30,60,66,38,-54,8,-94,-8,0,-64,-94,-94,-72,-84,-36,88,-62,-88,46,-4,88};
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,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[] = {37,97,57,82,29,68,94,38,81,48,13,84,57,5,27,87,11,35,82,53,67,31,15,99,6,93,91,92,3,23,90,27,6,33,78,3,19,19,27};
int param0_4[] = {-80,-74,-72,-72,-66,-66,-62,-50,-44,-44,-28,-24,-24,-22,-16,-10,-6,-4,-2,2,2,4,12,16,16,28,30,32,32,38,38,72,84,86,88,90,96};
int param0_5[] = {0,1,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1};
int param0_6[] = {25,67};
int param0_7[] = {82,74,-82,22,-28,-78,-22,-86,-74,42,-6,54,-88,-92,-14,-50,68,46,-50,46,-18,66,-76,-30,36,12,66};
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};
int param0_9[] = {50,23,56,9};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {5,24,44,36,34,18,1,14,32,3};
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) )",
"c) int",
"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 ( char str [] ) {
char last = str [ 0 ];
int i = 1, counter = 0;
while ( i < len(str) ) {
if ( str [ i ] == '0' && last == '1' ) {
while ( str [ i ] == '0' ) i ++;
if ( str [ i ] == '1' ) counter ++;
}
last = str [ i ];
i ++;
}
return counter;
}
int f_filled ( char str [] ) {}
' && last == '1' ) {
while ( str [ i ] == '0' ) i ++;
if ( str [ i ] == '1' ) counter ++;
}
last = str [ i ];
i ++;
}
return counter;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"fkyso nGZSLfhj","3841","0100001110111","zXZkptcbnQot","4364264685264","10","wDgox","1215572","1","bftZvRTamdUvL"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? [MASK] y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char str [] ) { char last = str [ 0 ]; int i = 1, counter = 0; while ( i < len(str) ) { if ( str [ i ] == '0' && last == '1' ) { while ( str [ i ] == '0' ) i ++; if ( str [ i ] == '1' ) counter ++; } last = str [ i ]; i ++; } return counter; } int f_filled ( char str [] ) {}' && last == '1' ) {
while ( str [ i ] == '0' ) i ++;
if ( str [ i ] == '1' ) counter ++;
}
last = str [ i ];
i ++;
}
return counter;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"fkyso nGZSLfhj","3841","0100001110111","zXZkptcbnQot","4364264685264","10","wDgox","1215572","1","bftZvRTamdUvL"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | x: | [
"a) f_gold",
"b) x:",
"c) ans",
"d) int",
"e) f_gold"
] | 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 digitSum = 0;
for ( int i = 0;
i < n;
i ++ ) digitSum += ( str [ i ] - '0' );
return ( digitSum % 3 == 0 );
}
int f_filled ( char str [] ) {}
char str [] ) {
int n = strlen(str);
int digitSum = 0;
for ( int i = 0;
i < n;
i ++ ) digitSum += ( str [ i ] - '0' );
return ( digitSum % 3 == 0 );
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"Xy","4827182","110011","GdOXZk","8970294","000110","xMRGdAgsGlH","34643260819239","00","DcCK"};
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: [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 ( char str [] ) { int n = strlen(str); int digitSum = 0; for ( int i = 0; i < n; i ++ ) digitSum += ( str [ i ] - '0' ); return ( digitSum % 3 == 0 ); } int f_filled ( char str [] ) {} char str [] ) {
int n = strlen(str);
int digitSum = 0;
for ( int i = 0;
i < n;
i ++ ) digitSum += ( str [ i ] - '0' );
return ( digitSum % 3 == 0 );
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"Xy","4827182","110011","GdOXZk","8970294","000110","xMRGdAgsGlH","34643260819239","00","DcCK"};
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) int",
"b) f_gold",
"c) y;",
"d) f3",
"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 arr1 [ ], int arr2 [ ], int m, int n, int x ) {
int count = 0;
int l = 0, r = n - 1;
while ( l < m && r >= 0 ) {
if ( ( arr1 [ l ] + arr2 [ r ] ) == x ) {
l ++;
r --;
count ++;
}
else if ( ( arr1 [ l ] + arr2 [ r ] ) < x ) l ++;
else r --;
}
return count;
}
int f_filled ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) {}
+;
r --;
count ++;
}
else if ( ( arr1 [ l ] + arr2 [ r ] ) < x ) l ++;
else r --;
}
return count;
}
int f_filled ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,5,7,10,14,14,17,21,32,34,37,40,40,40,46,46,50,50,51,55,57,62,65,67,67,69,70,70,72,73,76,77,77,78,84,85,85,86,87,88,88,89,89,90,93,99};
int param0_1[] = {-84,52,-34,96,16,92,-64,-74};
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,1,1,1,1};
int param0_3[] = {60,92,42,83,55,76,29,62};
int param0_4[] = {-94,-94,-58,-40,-40,-26,-24,-22,-22,-22,-2,0,4,8,12,16,16,18,22,32,42,44,50,58,64,78,80,90};
int param0_5[] = {0,0,1,1,1,0,0,1,1,1};
int param0_6[] = {1,5,7,7,7,14,15,16,17,18,18,19,20,25,27,31,36,42,47,51,56,56,56,58,58,59,63,63,63,65,66,67,76,83,93,94,97};
int param0_7[] = {78,-74,52,56,-8,92,14,56,-72,-92,32,-94,-26,-8,-66,72,-24,36,-84,-4,-68,14,78,40,-82,-10,16,56,6,-16,30,24,-32};
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};
int param0_9[] = {17,50,65,4,19,10,45,70,76,81,28,97,55,70,38,2,40,67,36,33,6,85,25};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {2,5,8,8,10,12,13,15,17,18,20,20,21,27,28,31,34,37,40,46,48,52,53,54,54,58,59,60,66,68,68,69,70,71,72,73,77,77,80,84,84,92,92,95,97,97};
int param1_1[] = {-22,26,-12,-54,66,86,38,76};
int param1_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_3[] = {71,2,74,42,80,71,26,76};
int param1_4[] = {-86,-84,-78,-76,-72,-70,-62,-58,-54,-54,-50,-46,-44,-40,-30,-28,-16,-10,10,36,36,48,70,84,84,90,94,98};
int param1_5[] = {1,1,1,0,1,1,0,0,0,0};
int param1_6[] = {2,3,7,8,9,10,17,18,21,28,29,29,33,35,46,47,47,49,49,49,53,56,58,59,59,60,65,67,70,78,81,85,85,87,90,92,96};
int param1_7[] = {-74,22,-14,-2,36,86,-70,-20,-76,-84,-40,-36,42,22,-60,-94,-18,8,-14,-42,-68,62,-60,2,40,-66,68,96,70,98,-38,-74,-92};
int param1_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 param1_9[] = {78,92,65,23,7,94,18,4,2,53,31,58,98,18,46,16,17,92,80,92,43,70,50};
int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9};
int param2[] = {28,6,37,4,17,5,28,16,25,16};
int param3[] = {29,5,26,7,27,8,34,30,33,22};
int param4[] = {23,7,42,7,17,9,31,24,33,22};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[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 m, int n, int x ) { int count = 0; int l = 0, r = n - 1; while ( l < m && r >= 0 ) { if ( ( arr1 [ l ] + arr2 [ r ] ) == x ) { l ++; r --; count ++; } else if ( ( arr1 [ l ] + arr2 [ r ] ) < x ) l ++; else r --; } return count; } int f_filled ( int arr1 [ ], int arr2 [ ], int m, int n, int [MASK] ) {}+;
r --;
count ++;
}
else if ( ( arr1 [ l ] + arr2 [ r ] ) < x ) l ++;
else r --;
}
return count;
}
int f_filled ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,5,7,10,14,14,17,21,32,34,37,40,40,40,46,46,50,50,51,55,57,62,65,67,67,69,70,70,72,73,76,77,77,78,84,85,85,86,87,88,88,89,89,90,93,99};
int param0_1[] = {-84,52,-34,96,16,92,-64,-74};
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,1,1,1,1};
int param0_3[] = {60,92,42,83,55,76,29,62};
int param0_4[] = {-94,-94,-58,-40,-40,-26,-24,-22,-22,-22,-2,0,4,8,12,16,16,18,22,32,42,44,50,58,64,78,80,90};
int param0_5[] = {0,0,1,1,1,0,0,1,1,1};
int param0_6[] = {1,5,7,7,7,14,15,16,17,18,18,19,20,25,27,31,36,42,47,51,56,56,56,58,58,59,63,63,63,65,66,67,76,83,93,94,97};
int param0_7[] = {78,-74,52,56,-8,92,14,56,-72,-92,32,-94,-26,-8,-66,72,-24,36,-84,-4,-68,14,78,40,-82,-10,16,56,6,-16,30,24,-32};
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};
int param0_9[] = {17,50,65,4,19,10,45,70,76,81,28,97,55,70,38,2,40,67,36,33,6,85,25};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {2,5,8,8,10,12,13,15,17,18,20,20,21,27,28,31,34,37,40,46,48,52,53,54,54,58,59,60,66,68,68,69,70,71,72,73,77,77,80,84,84,92,92,95,97,97};
int param1_1[] = {-22,26,-12,-54,66,86,38,76};
int param1_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_3[] = {71,2,74,42,80,71,26,76};
int param1_4[] = {-86,-84,-78,-76,-72,-70,-62,-58,-54,-54,-50,-46,-44,-40,-30,-28,-16,-10,10,36,36,48,70,84,84,90,94,98};
int param1_5[] = {1,1,1,0,1,1,0,0,0,0};
int param1_6[] = {2,3,7,8,9,10,17,18,21,28,29,29,33,35,46,47,47,49,49,49,53,56,58,59,59,60,65,67,70,78,81,85,85,87,90,92,96};
int param1_7[] = {-74,22,-14,-2,36,86,-70,-20,-76,-84,-40,-36,42,22,-60,-94,-18,8,-14,-42,-68,62,-60,2,40,-66,68,96,70,98,-38,-74,-92};
int param1_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 param1_9[] = {78,92,65,23,7,94,18,4,2,53,31,58,98,18,46,16,17,92,80,92,43,70,50};
int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9};
int param2[] = {28,6,37,4,17,5,28,16,25,16};
int param3[] = {29,5,26,7,27,8,34,30,33,22};
int param4[] = {23,7,42,7,17,9,31,24,33,22};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | x | [
"a) java.lang.*;",
"b) *",
"c) ]",
"d) n",
"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 N ) {
int dp [ N ];
dp [ 0 ] = 1;
dp [ 1 ] = 2;
int i = 2;
do {
dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ];
}
while ( dp [ i ++ ] <= N );
return ( i - 2 );
}
int f_filled ( int N ) {}
{
int dp [ N ];
dp [ 0 ] = 1;
dp [ 1 ] = 2;
int i = 2;
do {
dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ];
}
while ( dp [ i ++ ] <= N );
return ( i - 2 );
}
int f_filled ( int N ) {}
int main(void) {
int n_success = 0;
int param0[] = {73,28,33,23,84,31,48,46,45,90};
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 ]; dp [ 0 ] = 1; dp [ 1 ] = 2; int i = 2; do { dp [ i ] = dp [ i - 1 ] + dp [ i - [MASK] ]; } while ( dp [ i ++ ] <= N ); return ( i - 2 ); } int f_filled ( int N ) {}{
int dp [ N ];
dp [ 0 ] = 1;
dp [ 1 ] = 2;
int i = 2;
do {
dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ];
}
while ( dp [ i ++ ] <= N );
return ( i - 2 );
}
int f_filled ( int N ) {}
int main(void) {
int n_success = 0;
int param0[] = {73,28,33,23,84,31,48,46,45,90};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | 2 | [
"a) ;",
"b) 0;",
"c) x,",
"d) 2",
"e) f_gold"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int a [ n ], 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 a [ n - 1 ] + b [ n - 1 ];
}
int f_filled ( int n ) {}
[ 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 a [ n - 1 ] + b [ n - 1 ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {86,75,14,5,41,35,30,89,84,53};
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 [MASK] < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int 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 a [ n - 1 ] + b [ n - 1 ]; } int f_filled ( int n ) {}[ 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 a [ n - 1 ] + b [ n - 1 ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {86,75,14,5,41,35,30,89,84,53};
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) (int",
"c) )",
"d) k",
"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);}
int f_gold ( int coins [ ], int m, int V ) {
int table [ V + 1 ];
table [ 0 ] = 0;
for ( int i = 1;
i <= V;
i ++ ) table [ i ] = INT_MAX;
for ( int i = 1;
i <= V;
i ++ ) {
for ( int j = 0;
j < m;
j ++ ) if ( coins [ j ] <= i ) {
int sub_res = table [ i - coins [ j ] ];
if ( sub_res != INT_MAX && sub_res + 1 < table [ i ] ) table [ i ] = sub_res + 1;
}
}
return table [ V ];
}
int f_filled ( int coins [ ], int m, int V ) {}
able [ i - coins [ j ] ];
if ( sub_res != INT_MAX && sub_res + 1 < table [ i ] ) table [ i ] = sub_res + 1;
}
}
return table [ V ];
}
int f_filled ( int coins [ ], int m, int V ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,7,9,10,10,15,25,27,38,38,51,52,52,56,56,57,61,61,61,65,67,67,68,69,71,71,81,85,87,88,91,97};
int param0_1[] = {42,-36,26,-46,-96,-98,-62,-10,42,22,50,-74,-20};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {87,49,10,12,82,51,34,92,61,4,70,18,13,14,86,40,36,61,66};
int param0_4[] = {-88,-86,-78,-74,-68,-66,-64,-62,-60,-56,-52,-50,-50,-46,-46,-36,-34,-30,-28,-28,-6,-4,0,2,18,24,30,34,36,36,40,46,46,46,48,56,56,60,62,64,68,68,68,82,86,90,92,92};
int param0_5[] = {1,0,0,1,1,0,1,0,0,0,1,1};
int param0_6[] = {8,24,35,70,79};
int param0_7[] = {66,52,10,-78,98,-26,48,66,74,92,30,-60,-92,-30,-82,-96};
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[] = {15,56,38,50,36,32,27,90,91,77,74,3,90,47,40,36};
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[] = {25,10,20,16,45,11,2,11,22,13};
int param2[] = {20,11,22,15,27,11,2,13,19,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 coins [ ], int m, int V ) { int table [ V + 1 ]; table [ 0 ] = 0; for ( int i = 1; i <= V; i ++ ) table [ i ] = INT_MAX; for ( int i = 1; i <= V; i ++ ) { for ( int j = 0; j < m; j ++ ) if ( coins [ j ] <= i ) { int sub_res = table [ i - coins [ j ] ]; if ( sub_res != INT_MAX && sub_res + 1 < table [ i ] ) table [ i ] = sub_res + 1; } } [MASK] table [ V ]; } int f_filled ( int coins [ ], int m, int V ) {}able [ i - coins [ j ] ];
if ( sub_res != INT_MAX && sub_res + 1 < table [ i ] ) table [ i ] = sub_res + 1;
}
}
return table [ V ];
}
int f_filled ( int coins [ ], int m, int V ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,7,9,10,10,15,25,27,38,38,51,52,52,56,56,57,61,61,61,65,67,67,68,69,71,71,81,85,87,88,91,97};
int param0_1[] = {42,-36,26,-46,-96,-98,-62,-10,42,22,50,-74,-20};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {87,49,10,12,82,51,34,92,61,4,70,18,13,14,86,40,36,61,66};
int param0_4[] = {-88,-86,-78,-74,-68,-66,-64,-62,-60,-56,-52,-50,-50,-46,-46,-36,-34,-30,-28,-28,-6,-4,0,2,18,24,30,34,36,36,40,46,46,46,48,56,56,60,62,64,68,68,68,82,86,90,92,92};
int param0_5[] = {1,0,0,1,1,0,1,0,0,0,1,1};
int param0_6[] = {8,24,35,70,79};
int param0_7[] = {66,52,10,-78,98,-26,48,66,74,92,30,-60,-92,-30,-82,-96};
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[] = {15,56,38,50,36,32,27,90,91,77,74,3,90,47,40,36};
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[] = {25,10,20,16,45,11,2,11,22,13};
int param2[] = {20,11,22,15,27,11,2,13,19,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;
} | return | [
"a) false;",
"b) static",
"c) int",
"d) return",
"e) ("
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int s ) {
int sum = 0;
for ( int n = 1;
sum < s;
n ++ ) {
sum += n * n * n;
if ( sum == s ) return n;
}
return - 1;
}
int f_filled ( int s ) {}
(int), cmpfunc);}
int f_gold ( int s ) {
int sum = 0;
for ( int n = 1;
sum < s;
n ++ ) {
sum += n * n * n;
if ( sum == s ) return n;
}
return - 1;
}
int f_filled ( int s ) {}
int main(void) {
int n_success = 0;
int param0[] = {15,36,39,43,75,49,56,14,62,97};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { 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);} int f_gold ( int s ) { int sum = 0; for ( int n = 1; sum < s; n ++ ) { sum += n * n * n; if ( sum == s ) return n; } return - 1; } int f_filled ( int s ) {}(int), cmpfunc);}
int f_gold ( int s ) {
int sum = 0;
for ( int n = 1;
sum < s;
n ++ ) {
sum += n * n * n;
if ( sum == s ) return n;
}
return - 1;
}
int f_filled ( int s ) {}
int main(void) {
int n_success = 0;
int param0[] = {15,36,39,43,75,49,56,14,62,97};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | y)? | [
"a) y)?",
"b) int",
"c) :",
"d) oneSeen",
"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 x, int y ) {
x = x % 10;
if ( y != 0 ) y = y % 4 + 4;
return ( ( ( int ) ( pow ( x, y ) ) ) % 10 );
}
int f_filled ( int x, int y ) {}
ort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int x, int y ) {
x = x % 10;
if ( y != 0 ) y = y % 4 + 4;
return ( ( ( int ) ( pow ( x, y ) ) ) % 10 );
}
int f_filled ( int x, int y ) {}
int main(void) {
int n_success = 0;
int param0[] = {37,70,26,9,82,95,43,7,19,49};
int param1[] = {17,52,23,96,71,36,40,27,56,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 > [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);} int f_gold ( int x, int y ) { x = x % 10; if ( y != 0 ) y = y % 4 + 4; return ( ( ( int ) ( pow ( x, y ) ) ) % 10 ); } int f_filled ( int x, int y ) {}ort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int x, int y ) {
x = x % 10;
if ( y != 0 ) y = y % 4 + 4;
return ( ( ( int ) ( pow ( x, y ) ) ) % 10 );
}
int f_filled ( int x, int y ) {}
int main(void) {
int n_success = 0;
int param0[] = {37,70,26,9,82,95,43,7,19,49};
int param1[] = {17,52,23,96,71,36,40,27,56,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;
} | y)? | [
"a) ;",
"b) :",
"c) b",
"d) y)?",
"e) min"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( char str [] ) {
int res = str [ 0 ] - '0';
for ( int i = 1;
i < strlen(str);
i ++ ) {
if ( str [ i ] == '0' || str [ i ] == '1' || res < 2 ) res += ( str [ i ] - '0' );
else res *= ( str [ i ] - '0' );
}
return res;
}
int f_filled ( char str [] ) {}
en(str);
i ++ ) {
if ( str [ i ] == '0' || str [ i ] == '1' || res < 2 ) res += ( str [ i ] - '0' );
else res *= ( str [ i ] - '0' );
}
return res;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"pR","9518","1","nNMCIXUCpRMmvO","3170487","0100101010","Z rONcUqWb","00419297","00","r"};
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 res = str [ 0 ] - '0'; for ( int i = 1; i < strlen(str); i ++ ) { if ( str [ i ] == '0' || str [ i ] [MASK] '1' || res < 2 ) res += ( str [ i ] - '0' ); else res *= ( str [ i ] - '0' ); } return res; } int f_filled ( char str [] ) {}en(str);
i ++ ) {
if ( str [ i ] == '0' || str [ i ] == '1' || res < 2 ) res += ( str [ i ] - '0' );
else res *= ( str [ i ] - '0' );
}
return res;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"pR","9518","1","nNMCIXUCpRMmvO","3170487","0100101010","Z rONcUqWb","00419297","00","r"};
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) a,",
"c) ==",
"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 ( int A [ ], int N, int M ) {
int ans = 0;
int h [ M ] = {
0 };
for ( int i = 0;
i < N;
i ++ ) {
A [ i ] = A [ i ] % M;
h [ A [ i ] ] ++;
}
for ( int i = 0;
i < M;
i ++ ) {
for ( int j = i;
j < M;
j ++ ) {
int rem = ( M - ( i + j ) % M ) % M;
if ( rem < j ) continue;
if ( i == j && rem == j ) ans += h [ i ] * ( h [ i ] - 1 ) * ( h [ i ] - 2 ) / 6;
else if ( i == j ) ans += h [ i ] * ( h [ i ] - 1 ) * h [ rem ] / 2;
else if ( i == rem ) ans += h [ i ] * ( h [ i ] - 1 ) * h [ j ] / 2;
else if ( rem == j ) ans += h [ j ] * ( h [ j ] - 1 ) * h [ i ] / 2;
else ans = ans + h [ i ] * h [ j ] * h [ rem ];
}
}
return ans;
}
int f_filled ( int A [ ], int N, int M ) {}
rem == j ) ans += h [ j ] * ( h [ j ] - 1 ) * h [ i ] / 2;
else ans = ans + h [ i ] * h [ j ] * h [ rem ];
}
}
return ans;
}
int f_filled ( int A [ ], int N, int M ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {6,7,13,16,19,20,21,25,28,31,36,38,42,44,50,54,55,56,63,63,63,65,65,65,67,71,73,73,76,78,87,90,91,99};
int param0_1[] = {28,-8,-86,-6,-28,74,82,88,-62,-24,-14,68,36,-54,-16,-52,-78,-24,68,-2,30,-56,30,-86,-54,54,62,-30,-82,66,94,12,10,4,40,-72,20,-2,-90,-90};
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,1,1,1};
int param0_3[] = {45,14,91,37,91};
int param0_4[] = {-88,-78,-74,-50,-44,-34,-26,-22,14,46,48,80,82,86,88};
int param0_5[] = {1,1,0,0,0,0,1,0,0,0,0,0,1,0,1,1,1,1,0,1,1};
int param0_6[] = {9,14,16,18,23,36,37,58,78};
int param0_7[] = {-56,86,58,-58,46,-62,8,-22,80,96,-74,-94,-94,-2,-4};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {62,36,66,84,20,43,93,47,85,70,50,96,3,8,38,96,15,31,97,90,1,69,77,20,68,11,2,92,50,8,23,83,76,6,32,43,92};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {27,29,29,3,13,11,7,13,37,18};
int param2[] = {21,21,43,4,12,15,4,14,34,35};
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 M ) { int ans = 0; int h [ M ] = { 0 }; for ( int i = 0; i < N; i ++ ) { A [ i ] = A [ i ] % M; h [ A [ i ] ] ++; } for ( int i = 0; i < M; i ++ ) { for ( int j = i; j < M; j ++ ) { int rem = ( M - ( i + j ) % M ) % M; if ( rem < j ) continue; if ( i == j && rem == j ) ans += h [ i ] * ( h [ i ] - 1 ) * ( h [ i ] - 2 ) / 6; else if ( i == j ) ans += h [ i ] * ( h [ i ] - 1 ) * h [ rem ] / 2; else if ( i == rem ) ans += h [ i ] * ( h [ i ] - 1 ) * h [ j ] / 2; else [MASK] ( rem == j ) ans += h [ j ] * ( h [ j ] - 1 ) * h [ i ] / 2; else ans = ans + h [ i ] * h [ j ] * h [ rem ]; } } return ans; } int f_filled ( int A [ ], int N, int M ) {} rem == j ) ans += h [ j ] * ( h [ j ] - 1 ) * h [ i ] / 2;
else ans = ans + h [ i ] * h [ j ] * h [ rem ];
}
}
return ans;
}
int f_filled ( int A [ ], int N, int M ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {6,7,13,16,19,20,21,25,28,31,36,38,42,44,50,54,55,56,63,63,63,65,65,65,67,71,73,73,76,78,87,90,91,99};
int param0_1[] = {28,-8,-86,-6,-28,74,82,88,-62,-24,-14,68,36,-54,-16,-52,-78,-24,68,-2,30,-56,30,-86,-54,54,62,-30,-82,66,94,12,10,4,40,-72,20,-2,-90,-90};
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,1,1,1};
int param0_3[] = {45,14,91,37,91};
int param0_4[] = {-88,-78,-74,-50,-44,-34,-26,-22,14,46,48,80,82,86,88};
int param0_5[] = {1,1,0,0,0,0,1,0,0,0,0,0,1,0,1,1,1,1,0,1,1};
int param0_6[] = {9,14,16,18,23,36,37,58,78};
int param0_7[] = {-56,86,58,-58,46,-62,8,-22,80,96,-74,-94,-94,-2,-4};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {62,36,66,84,20,43,93,47,85,70,50,96,3,8,38,96,15,31,97,90,1,69,77,20,68,11,2,92,50,8,23,83,76,6,32,43,92};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {27,29,29,3,13,11,7,13,37,18};
int param2[] = {21,21,43,4,12,15,4,14,34,35};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | if | [
"a) f_gold",
"b) 0",
"c) if",
"d) ==",
"e) void"
] | 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 str [] ) {
int len = len(str);
bool oneSeen = 0;
int count = 0;
for ( int i = 0;
i < len;
i ++ ) {
if ( str [ i ] == '1' && oneSeen == 1 ) if ( str [ i - 1 ] == '0' ) count ++;
if ( str [ i ] == '1' && oneSeen == 0 ) {
oneSeen = 1;
continue;
}
if ( str [ i ] != '0' && str [ i ] != '1' ) oneSeen = 0;
}
return count;
}
int f_filled ( char str [] ) {}
( str [ i ] == '1' && oneSeen == 0 ) {
oneSeen = 1;
continue;
}
if ( str [ i ] != '0' && str [ i ] != '1' ) oneSeen = 0;
}
return count;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"1001ab010abc01001","1001010001","010100010100","DLCu","7072430592","011","pnJpypYOza","1037","111","HxK"};
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, [MASK] void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char str [] ) { int len = len(str); bool oneSeen = 0; int count = 0; for ( int i = 0; i < len; i ++ ) { if ( str [ i ] == '1' && oneSeen == 1 ) if ( str [ i - 1 ] == '0' ) count ++; if ( str [ i ] == '1' && oneSeen == 0 ) { oneSeen = 1; continue; } if ( str [ i ] != '0' && str [ i ] != '1' ) oneSeen = 0; } return count; } int f_filled ( char str [] ) {} ( str [ i ] == '1' && oneSeen == 0 ) {
oneSeen = 1;
continue;
}
if ( str [ i ] != '0' && str [ i ] != '1' ) oneSeen = 0;
}
return count;
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"1001ab010abc01001","1001010001","010100010100","DLCu","7072430592","011","pnJpypYOza","1037","111","HxK"};
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;
} | const | [
"a) 1",
"b) const",
"c) [",
"d) =",
"e) return"
] | 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 x ) {
int i;
for ( i = 0;
i < n - 1;
i ++ ) if ( arr [ i ] > arr [ i + 1 ] ) break;
int l = ( i + 1 ) % n;
int r = i;
int cnt = 0;
while ( l != r ) {
if ( arr [ l ] + arr [ r ] == x ) {
cnt ++;
if ( l == ( r - 1 + n ) % n ) {
return cnt;
}
l = ( l + 1 ) % n;
r = ( r - 1 + n ) % n;
}
else if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n;
else r = ( n + r - 1 ) % n;
}
return cnt;
}
int f_filled ( int arr [ ], int n, int x ) {}
;
r = ( r - 1 + n ) % n;
}
else if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n;
else r = ( n + r - 1 ) % n;
}
return cnt;
}
int f_filled ( int arr [ ], int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {24,54};
int param0_1[] = {68,-30,-18,-6,70,-40,86,98,-24,-48};
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,1,1,1,1,1};
int param0_3[] = {84,44,40,45,2,41,52,17,50,41,5,52,48,90,13,55,34,55,94,44,41,2};
int param0_4[] = {-92,-76,-74,-72,-68,-64,-58,-44,-44,-38,-26,-24,-20,-12,-8,-8,-4,10,10,10,20,20,26,26,28,50,52,54,60,66,72,74,78,78,78,80,86,88};
int param0_5[] = {1,1,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,1};
int param0_6[] = {5,5,15,19,22,24,26,27,28,32,37,39,40,43,49,52,55,56,58,58,59,62,67,68,77,79,79,80,81,87,95,95,96,98,98};
int param0_7[] = {-98,28,54,44,-98,-70,48,-98,56,4,-18,26,-8,-58,30,82,4,-38,42,64,-28};
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};
int param0_9[] = {26,72,74,86,98,86,22,6,95,36,11,82,34,3,50,36,81,94,55,30,62,53,50,95,32,83,9,16};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {1,8,33,18,29,19,28,17,24,19};
int param2[] = {1,8,28,16,30,10,34,14,24,16};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort [MASK] arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n, int x ) { int i; for ( i = 0; i < n - 1; i ++ ) if ( arr [ i ] > arr [ i + 1 ] ) break; int l = ( i + 1 ) % n; int r = i; int cnt = 0; while ( l != r ) { if ( arr [ l ] + arr [ r ] == x ) { cnt ++; if ( l == ( r - 1 + n ) % n ) { return cnt; } l = ( l + 1 ) % n; r = ( r - 1 + n ) % n; } else if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n; else r = ( n + r - 1 ) % n; } return cnt; } int f_filled ( int arr [ ], int n, int x ) {};
r = ( r - 1 + n ) % n;
}
else if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n;
else r = ( n + r - 1 ) % n;
}
return cnt;
}
int f_filled ( int arr [ ], int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {24,54};
int param0_1[] = {68,-30,-18,-6,70,-40,86,98,-24,-48};
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,1,1,1,1,1};
int param0_3[] = {84,44,40,45,2,41,52,17,50,41,5,52,48,90,13,55,34,55,94,44,41,2};
int param0_4[] = {-92,-76,-74,-72,-68,-64,-58,-44,-44,-38,-26,-24,-20,-12,-8,-8,-4,10,10,10,20,20,26,26,28,50,52,54,60,66,72,74,78,78,78,80,86,88};
int param0_5[] = {1,1,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,1};
int param0_6[] = {5,5,15,19,22,24,26,27,28,32,37,39,40,43,49,52,55,56,58,58,59,62,67,68,77,79,79,80,81,87,95,95,96,98,98};
int param0_7[] = {-98,28,54,44,-98,-70,48,-98,56,4,-18,26,-8,-58,30,82,4,-38,42,64,-28};
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};
int param0_9[] = {26,72,74,86,98,86,22,6,95,36,11,82,34,3,50,36,81,94,55,30,62,53,50,95,32,83,9,16};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {1,8,33,18,29,19,28,17,24,19};
int param2[] = {1,8,28,16,30,10,34,14,24,16};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | (int | [
"a) )",
"b) ]",
"c) (int",
"d) =",
"e) n):"
] | 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 dp [ n ];
if ( n == 1 ) return arr [ 0 ];
if ( n == 2 ) return min ( arr [ 0 ], arr [ 1 ] );
if ( n == 3 ) return min ( arr [ 0 ], min ( arr [ 1 ], arr [ 2 ] ) );
if ( n == 4 ) return min ( min ( arr [ 0 ], arr [ 1 ] ), min ( arr [ 2 ], arr [ 3 ] ) );
dp [ 0 ] = arr [ 0 ];
dp [ 1 ] = arr [ 1 ];
dp [ 2 ] = arr [ 2 ];
dp [ 3 ] = arr [ 3 ];
for ( int i = 4;
i < n;
i ++ ) dp [ i ] = arr [ i ] + min ( min ( dp [ i - 1 ], dp [ i - 2 ] ), min ( dp [ i - 3 ], dp [ i - 4 ] ) );
return min ( min ( dp [ n - 1 ], dp [ n - 2 ] ), min ( dp [ n - 4 ], dp [ n - 3 ] ) );
}
int f_filled ( int arr [ ], int n ) {}
[ i - 1 ], dp [ i - 2 ] ), min ( dp [ i - 3 ], dp [ i - 4 ] ) );
return min ( min ( dp [ n - 1 ], dp [ n - 2 ] ), min ( dp [ n - 4 ], dp [ n - 3 ] ) );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,7,11,12,13,14,18,20,22,26,28,29,31,32,33,35,38,38,40,40,41,42,43,44,45,53,54,54,59,62,69,72,74,75,75,76,79,83,84,89,91,96,97,98,99,99};
int param0_1[] = {50,-22,90,-40,46,86,50,44,12,-42,-58,6,52,-16,4,46,44,0,-64,78,-14,-80,30,-66,78,24,28,10,-72,-44,-28,-32,-30,94,-22,26,16,20,-52,-16,-80,2,-56,-70,-76,60,62};
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};
int param0_3[] = {63,18,13,2,1,94,11,49,82,97,75,98,25,20,96,82,60,94,24,15,79,48,40,60,9,62,24,69,31,78,34,83,22,88};
int param0_4[] = {-74,16,96};
int param0_5[] = {0,0,1,0,1,1};
int param0_6[] = {2,5,6,8,10,16,18,19,20,21,24,30,34,36,39,42,52,53,54,55,56,57,70,71,72,73,75,75,77,78,82,85,87,88,89,91};
int param0_7[] = {-40,12,-86,-54,-68,32,10,-24,-46,54,-64,20,22,88,62,-4,-2,-8,-32,88,-4,38,4,86,82,-16,-76,-44,54,-24,-92,74,50,-52,52};
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};
int param0_9[] = {4,53,96,86,69,81,86,95,80,43,25,66,24,72};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {30,40,14,33,1,5,25,22,20,12};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int dp [ n ]; if ( n == 1 ) return arr [ 0 ]; if ( n == 2 ) return min ( arr [ 0 ], arr [ 1 ] ); if ( n == 3 ) return min ( arr [ 0 ], min ( arr [ 1 ], arr [ 2 ] ) ); if ( n == 4 ) return min ( min ( arr [ 0 ], arr [ 1 ] ), min ( arr [ 2 ], arr [ 3 ] ) ); dp [ 0 ] = arr [ 0 ]; dp [ 1 ] = arr [ 1 ]; dp [ 2 ] = arr [ 2 ]; dp [ 3 ] = arr [ 3 ]; for ( int i = 4; i < n; i ++ ) dp [ i ] = arr [ i ] + min ( min ( dp [ i - 1 ], dp [ i - 2 ] ), min ( dp [ i - 3 ], dp [ i - 4 ] ) [MASK] return min ( min ( dp [ n - 1 ], dp [ n - 2 ] ), min ( dp [ n - 4 ], dp [ n - 3 ] ) ); } int f_filled ( int arr [ ], int n ) {} [ i - 1 ], dp [ i - 2 ] ), min ( dp [ i - 3 ], dp [ i - 4 ] ) );
return min ( min ( dp [ n - 1 ], dp [ n - 2 ] ), min ( dp [ n - 4 ], dp [ n - 3 ] ) );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,7,11,12,13,14,18,20,22,26,28,29,31,32,33,35,38,38,40,40,41,42,43,44,45,53,54,54,59,62,69,72,74,75,75,76,79,83,84,89,91,96,97,98,99,99};
int param0_1[] = {50,-22,90,-40,46,86,50,44,12,-42,-58,6,52,-16,4,46,44,0,-64,78,-14,-80,30,-66,78,24,28,10,-72,-44,-28,-32,-30,94,-22,26,16,20,-52,-16,-80,2,-56,-70,-76,60,62};
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};
int param0_3[] = {63,18,13,2,1,94,11,49,82,97,75,98,25,20,96,82,60,94,24,15,79,48,40,60,9,62,24,69,31,78,34,83,22,88};
int param0_4[] = {-74,16,96};
int param0_5[] = {0,0,1,0,1,1};
int param0_6[] = {2,5,6,8,10,16,18,19,20,21,24,30,34,36,39,42,52,53,54,55,56,57,70,71,72,73,75,75,77,78,82,85,87,88,89,91};
int param0_7[] = {-40,12,-86,-54,-68,32,10,-24,-46,54,-64,20,22,88,62,-4,-2,-8,-32,88,-4,38,4,86,82,-16,-76,-44,54,-24,-92,74,50,-52,52};
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};
int param0_9[] = {4,53,96,86,69,81,86,95,80,43,25,66,24,72};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {30,40,14,33,1,5,25,22,20,12};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | ); | [
"a) int",
"b) y2",
"c) );",
"d) //",
"e) bool"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( char str [] ) {
stack < char > Stack;
for ( char ch : str ) {
if ( ch == ')' ) {
char top = Stack . top ( );
Stack . pop ( );
int elementsInside = 0;
while ( top != '(' ) {
elementsInside ++;
top = Stack . top ( );
Stack . pop ( );
}
if ( elementsInside < 1 ) {
return 1;
}
}
else Stack . push ( ch );
}
return false;
}
bool f_filled ( char str [] ) {}
. top ( );
Stack . pop ( );
}
if ( elementsInside < 1 ) {
return 1;
}
}
else Stack . push ( ch );
}
return false;
}
bool f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {
"((a+b)+((c+d)))",
"(((a+(b)))+(c+d))",
"(((a+(b))+c+d))",
"((a+b)+(c+d))",
"(8582007)",
"((a+(b))+(c+d))",
"(PylsShEdKAE)",
"886980680541",
"001",
"jsVmFeOq"};
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 [] ) { stack < char > Stack; for ( char ch : str ) { if ( ch == ')' ) { char top = Stack . top ( ); Stack . pop ( ); int elementsInside = 0; while ( top != '(' ) { elementsInside ++; top = Stack . top ( ); Stack . pop ( ); } if ( elementsInside < 1 ) { return 1; } [MASK] else Stack . push ( ch ); } return false; } bool f_filled ( char str [] ) {} . top ( );
Stack . pop ( );
}
if ( elementsInside < 1 ) {
return 1;
}
}
else Stack . push ( ch );
}
return false;
}
bool f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {
"((a+b)+((c+d)))",
"(((a+(b)))+(c+d))",
"(((a+(b))+c+d))",
"((a+b)+(c+d))",
"(8582007)",
"((a+(b))+(c+d))",
"(PylsShEdKAE)",
"886980680541",
"001",
"jsVmFeOq"};
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) a",
"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_map < int, int > inc, dcr;
int len_inc [ n ], len_dcr [ n ];
int longLen = 0;
for ( int i = 0;
i < n;
i ++ ) {
int len = 0;
if ( inc . find ( arr [ i ] - 1 ) != inc . end ( ) ) len = inc [ arr [ i ] - 1 ];
inc [ arr [ i ] ] = len_inc [ i ] = len + 1;
}
for ( int i = n - 1;
i >= 0;
i -- ) {
int len = 0;
if ( dcr . find ( arr [ i ] - 1 ) != dcr . end ( ) ) len = dcr [ arr [ i ] - 1 ];
dcr [ arr [ i ] ] = len_dcr [ i ] = len + 1;
}
for ( int i = 0;
i < n;
i ++ ) if ( longLen < ( len_inc [ i ] + len_dcr [ i ] - 1 ) ) longLen = len_inc [ i ] + len_dcr [ i ] - 1;
return longLen;
}
int f_filled ( int arr [ ], int n ) {}
for ( int i = 0;
i < n;
i ++ ) if ( longLen < ( len_inc [ i ] + len_dcr [ i ] - 1 ) ) longLen = len_inc [ i ] + len_dcr [ i ] - 1;
return longLen;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {78};
int param0_1[] = {-6,-18,-48,58,-54,76,80,-56,86,58,-86,-86,-88,32,12,58,58,-16,86,-24,84,86,36,18,30,-32,-4,-36,-72,-4,42,94};
int param0_2[] = {0,1};
int param0_3[] = {92,26,72,8,66,28,34,61,28};
int param0_4[] = {-86,-82,-76,-68,-66,-64,-62,-56,-48,-42,-38,-30,-22,-18,-10,-10,-4,-2,4,28,42,44,50,50,56,58,60,76,82,86,86,98};
int param0_5[] = {0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,1,0,0,0,0,1,0};
int param0_6[] = {3,4,8,9,12,13,16,19,23,25,29,31,34,36,38,41,42,47,49,50,51,51,58,63,66,70,73,74,75,75,75,76,76,80,82,83,83,84,86,89,90,91,91,95,96};
int param0_7[] = {4,-76,60,48,-14,72};
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};
int param0_9[] = {66,80,79,72,1,67,20,67,32,40,22,64,58,67,10,21,37,49};
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,18,1,5,25,17,44,3,17,15};
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 > inc, dcr; int len_inc [ n ], len_dcr [ n ]; int longLen = 0; for ( int i = 0; i < n; i ++ ) { int len = 0; if ( inc . find ( arr [ i ] - 1 ) != inc . end ( ) ) len = inc [ arr [ i ] - 1 ]; inc [ arr [ i ] ] = len_inc [ i ] = len + 1; } for ( int i = n - 1; i >= 0; i -- ) { int len = 0; if ( dcr . find ( arr [ i ] - 1 ) != dcr . end ( ) ) len = dcr [MASK] arr [ i ] - 1 ]; dcr [ arr [ i ] ] = len_dcr [ i ] = len + 1; } for ( int i = 0; i < n; i ++ ) if ( longLen < ( len_inc [ i ] + len_dcr [ i ] - 1 ) ) longLen = len_inc [ i ] + len_dcr [ i ] - 1; return longLen; } int f_filled ( int arr [ ], int n ) {} for ( int i = 0;
i < n;
i ++ ) if ( longLen < ( len_inc [ i ] + len_dcr [ i ] - 1 ) ) longLen = len_inc [ i ] + len_dcr [ i ] - 1;
return longLen;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {78};
int param0_1[] = {-6,-18,-48,58,-54,76,80,-56,86,58,-86,-86,-88,32,12,58,58,-16,86,-24,84,86,36,18,30,-32,-4,-36,-72,-4,42,94};
int param0_2[] = {0,1};
int param0_3[] = {92,26,72,8,66,28,34,61,28};
int param0_4[] = {-86,-82,-76,-68,-66,-64,-62,-56,-48,-42,-38,-30,-22,-18,-10,-10,-4,-2,4,28,42,44,50,50,56,58,60,76,82,86,86,98};
int param0_5[] = {0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,1,0,0,0,0,1,0};
int param0_6[] = {3,4,8,9,12,13,16,19,23,25,29,31,34,36,38,41,42,47,49,50,51,51,58,63,66,70,73,74,75,75,75,76,76,80,82,83,83,84,86,89,90,91,91,95,96};
int param0_7[] = {4,-76,60,48,-14,72};
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};
int param0_9[] = {66,80,79,72,1,67,20,67,32,40,22,64,58,67,10,21,37,49};
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,18,1,5,25,17,44,3,17,15};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | [ | [
"a) [",
"b) (",
"c) return",
"d) (",
"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);}
double f_gold ( int side ) {
double volume = ( pow ( side, 3 ) / ( 6 * sqrt ( 2 ) ) );
return volume;
}
double f_filled ( int side ) {}
rr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( int side ) {
double volume = ( pow ( side, 3 ) / ( 6 * sqrt ( 2 ) ) );
return volume;
}
double f_filled ( int side ) {}
int main(void) {
int n_success = 0;
int param0[] = {58,56,35,99,13,45,40,92,7,13};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int [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);} double f_gold ( int side ) { double volume = ( pow ( side, 3 ) / ( 6 * sqrt ( 2 ) ) ); return volume; } double f_filled ( int side ) {}rr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( int side ) {
double volume = ( pow ( side, 3 ) / ( 6 * sqrt ( 2 ) ) );
return volume;
}
double f_filled ( int side ) {}
int main(void) {
int n_success = 0;
int param0[] = {58,56,35,99,13,45,40,92,7,13};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | y) | [
"a) (",
"b) i",
"c) count",
"d) y)",
"e) ;"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int low, int high ) {
if ( high < low ) return 0;
if ( high == low ) return low;
int mid = low + ( high - low ) / 2;
if ( mid < high && arr [ mid + 1 ] < arr [ mid ] ) return ( mid + 1 );
if ( mid > low && arr [ mid ] < arr [ mid - 1 ] ) return mid;
if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr, low, mid - 1 );
return f_gold ( arr, mid + 1, high );
}
int f_filled ( int arr [ ], int low, int high ) {}
arr [ mid - 1 ] ) return mid;
if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr, low, mid - 1 );
return f_gold ( arr, mid + 1, high );
}
int f_filled ( int arr [ ], int low, int high ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,16,38,39,48,74,79};
int param0_1[] = {-46,72,72,-66,96,92,40,8,94,-84,6,-90,38,-6,48,-20,-86,-76,88,-50,-44,-14,54,-6,-2,72,8,-64,-46,44,-88,50,86,38,42,-56};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {48,74,59,57,95,11,25,61,46,54,34,84,7,97,62,57,99,93,76,5,76,93,35,84,37,60,65,16,30,73,42,61,74,77,48,62,84,93,64,57,68,46,28,77};
int param0_4[] = {-72,-68,-66,-66,-62,-62,-52,-48,-42,-42,-42,-38,-30,-22,-20,-20,-16,-16,-14,0,2,2,2,4,12,20,22,26,32,34,46,46,64,64,64,66,68,68,68,74,80,84,84,88,88,90,96,98};
int param0_5[] = {1};
int param0_6[] = {7,11,20,21,22,27,30,30,34,35,36,37,38,60,61,63,63,69,70,75,80,84,88,97};
int param0_7[] = {-2,70,-40};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {71,71,27,10,97,43,55,71,6,6,77,48,77,2,83,51,61,19,2,51,26,70,20,23,54,15,6,92,35,75,8,57,50,49,88,21,36};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {6,32,16,24,29,0,23,2,30,24};
int param2[] = {6,21,29,26,43,0,22,1,17,22};
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 low, int high ) { if ( high < low ) return 0; if ( high == low ) return low; int mid = low + ( high - low ) / 2; if ( mid < high && arr [ mid + 1 ] < arr [ mid ] ) return [MASK] mid + 1 ); if ( mid > low && arr [ mid ] < arr [ mid - 1 ] ) return mid; if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr, low, mid - 1 ); return f_gold ( arr, mid + 1, high ); } int f_filled ( int arr [ ], int low, int high ) {}arr [ mid - 1 ] ) return mid;
if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr, low, mid - 1 );
return f_gold ( arr, mid + 1, high );
}
int f_filled ( int arr [ ], int low, int high ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,16,38,39,48,74,79};
int param0_1[] = {-46,72,72,-66,96,92,40,8,94,-84,6,-90,38,-6,48,-20,-86,-76,88,-50,-44,-14,54,-6,-2,72,8,-64,-46,44,-88,50,86,38,42,-56};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {48,74,59,57,95,11,25,61,46,54,34,84,7,97,62,57,99,93,76,5,76,93,35,84,37,60,65,16,30,73,42,61,74,77,48,62,84,93,64,57,68,46,28,77};
int param0_4[] = {-72,-68,-66,-66,-62,-62,-52,-48,-42,-42,-42,-38,-30,-22,-20,-20,-16,-16,-14,0,2,2,2,4,12,20,22,26,32,34,46,46,64,64,64,66,68,68,68,74,80,84,84,88,88,90,96,98};
int param0_5[] = {1};
int param0_6[] = {7,11,20,21,22,27,30,30,34,35,36,37,38,60,61,63,63,69,70,75,80,84,88,97};
int param0_7[] = {-2,70,-40};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {71,71,27,10,97,43,55,71,6,6,77,48,77,2,83,51,61,19,2,51,26,70,20,23,54,15,6,92,35,75,8,57,50,49,88,21,36};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {6,32,16,24,29,0,23,2,30,24};
int param2[] = {6,21,29,26,43,0,22,1,17,22};
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) x",
"b) static",
"c) :",
"d) (",
"e) side"
] | 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 s [] ) {
int ans = 6;
for ( int i = 0;
i < 10;
++ i ) {
for ( int j = 0;
j < 10;
++ j ) {
for ( int k = 0;
k < 10;
++ k ) {
for ( int l = 0;
l < 10;
++ l ) {
for ( int m = 0;
m < 10;
++ m ) {
for ( int n = 0;
n < 10;
++ n ) {
if ( i + j + k == l + m + n ) {
int c = 0;
if ( i != s [ 0 ] - '0' ) c ++;
if ( j != s [ 1 ] - '0' ) c ++;
if ( k != s [ 2 ] - '0' ) c ++;
if ( l != s [ 3 ] - '0' ) c ++;
if ( m != s [ 4 ] - '0' ) c ++;
if ( n != s [ 5 ] - '0' ) c ++;
if ( c < ans ) ans = c;
}
}
}
}
}
}
}
return ans;
}
int f_filled ( char s [] ) {}
if ( n != s [ 5 ] - '0' ) c ++;
if ( c < ans ) ans = c;
}
}
}
}
}
}
}
return ans;
}
int f_filled ( char s [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"RHn","123635172","10","WqWeJgrVkLU","453745797","0011010110","OGhkmFYf ","96","101001","kN"};
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 s [] ) { int ans = 6; for ( int i = 0; i < 10; ++ i ) [MASK] for ( int j = 0; j < 10; ++ j ) { for ( int k = 0; k < 10; ++ k ) { for ( int l = 0; l < 10; ++ l ) { for ( int m = 0; m < 10; ++ m ) { for ( int n = 0; n < 10; ++ n ) { if ( i + j + k == l + m + n ) { int c = 0; if ( i != s [ 0 ] - '0' ) c ++; if ( j != s [ 1 ] - '0' ) c ++; if ( k != s [ 2 ] - '0' ) c ++; if ( l != s [ 3 ] - '0' ) c ++; if ( m != s [ 4 ] - '0' ) c ++; if ( n != s [ 5 ] - '0' ) c ++; if ( c < ans ) ans = c; } } } } } } } return ans; } int f_filled ( char s [] ) {} if ( n != s [ 5 ] - '0' ) c ++;
if ( c < ans ) ans = c;
}
}
}
}
}
}
}
return ans;
}
int f_filled ( char s [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"RHn","123635172","10","WqWeJgrVkLU","453745797","0011010110","OGhkmFYf ","96","101001","kN"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | { | [
"a) 1",
"b) {",
"c) res",
"d) while",
"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 val [ ], int wt [ ], int n, int W ) {
int mat [ 2 ] [ W + 1 ];
memset ( mat, 0, sizeof ( mat ) );
int i = 0;
while ( i < n ) {
int j = 0;
if ( i % 2 != 0 ) {
while ( ++ j <= W ) {
if ( wt [ i ] <= j ) mat [ 1 ] [ j ] = max ( val [ i ] + mat [ 0 ] [ j - wt [ i ] ], mat [ 0 ] [ j ] );
else mat [ 1 ] [ j ] = mat [ 0 ] [ j ];
}
}
else {
while ( ++ j <= W ) {
if ( wt [ i ] <= j ) mat [ 0 ] [ j ] = max ( val [ i ] + mat [ 1 ] [ j - wt [ i ] ], mat [ 1 ] [ j ] );
else mat [ 0 ] [ j ] = mat [ 1 ] [ j ];
}
}
i ++;
}
return ( n % 2 != 0 ) ? mat [ 0 ] [ W ] : mat [ 1 ] [ W ];
}
int f_filled ( int val [ ], int wt [ ], int n, int W ) {}
else mat [ 0 ] [ j ] = mat [ 1 ] [ j ];
}
}
i ++;
}
return ( n % 2 != 0 ) ? mat [ 0 ] [ W ] : mat [ 1 ] [ W ];
}
int f_filled ( int val [ ], int wt [ ], int n, int W ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,1,3,4,5,6,6,11,13,14,16,18,21,22,22,27,28,32,34,34,37,42,42,48,49,50,53,58,59,60,60,61,65,66,70,74,80,81,81,81,86,90,92,93,93,94,97,99};
int param0_1[] = {82,-18,-62,-4,6,10,22,-36,-8,84,-28,-64,48,92,-64,-76,44,94,-8,10,-24,56,-96,-82,-90,96,-62,42,-22,-16,-66,26,80,-8,82};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {3,65,15,84,86,34,50,33,73,3,2,4,16,54,33,9,57,40,52,82,16,8,87,60,36,3,15,97,82,23,3,30,45,17,58,58,96,57,7,39,78,58,56,15,44,12,8};
int param0_4[] = {-56,-14,20,60,92};
int param0_5[] = {0,0,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,0,1,1,1,1,0,1,0,1,0,1,0,1,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,1,1,0,0};
int param0_6[] = {11,12,13,18,25,27,35,35,36,55,57,58,58,61,63,67,72,76,81,87,89,97};
int param0_7[] = {-68,90,86,40,86,92,46,-26,6,74,-68,-64,-62,-12,-96,16,-80,52,-8,64,-62,-24,-26,82,56,-10,-32,-96,-12,94,66,-46,-4,88,-86,-46,70};
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};
int param0_9[] = {3,47,85,1,45,54,50,79};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {2,2,2,3,5,7,8,9,17,20,20,26,27,32,35,42,42,48,49,49,51,60,61,62,63,66,68,71,76,76,76,78,81,83,83,85,85,86,87,88,88,89,89,89,89,92,96,98};
int param1_1[] = {84,-60,40,-84,92,-62,-36,-62,-52,-52,12,62,-64,-76,-18,74,-4,64,28,-68,60,-54,72,-22,-34,-52,22,10,22,68,94,90,-20,16,44};
int param1_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param1_3[] = {80,41,34,46,88,29,16,5,5,30,50,5,13,99,49,89,50,14,46,90,82,84,34,71,47,60,74,79,81,11,98,91,85,95,50,4,41,59,60,81,62,84,25,87,79,33,19};
int param1_4[] = {-74,-48,-36,-24,62};
int param1_5[] = {0,1,0,0,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,1,1,1,1};
int param1_6[] = {6,11,18,20,22,25,39,42,45,48,55,67,70,74,74,77,78,81,89,91,93,94};
int param1_7[] = {42,78,-64,-34,-34,92,-50,-72,-24,-24,-92,24,64,-80,-30,98,-54,78,30,64,58,-50,92,6,68,-66,14,50,54,78,-60,-50,-16,-10,-38,30,4};
int param1_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,1};
int param1_9[] = {7,63,15,89,67,30,78,68};
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[] = {34,26,13,37,2,39,14,33,18,7};
int param3[] = {33,17,14,31,2,28,20,33,24,6};
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 val [ ], int wt [ ], int n, int W ) { int mat [ 2 ] [ W + 1 ]; memset ( mat, 0, sizeof ( mat ) ); int i = 0; while ( i < n ) { int j = 0; if ( i % 2 != 0 ) { while ( ++ j <= W ) { if ( wt [ i ] <= j ) mat [ 1 ] [MASK] j ] = max ( val [ i ] + mat [ 0 ] [ j - wt [ i ] ], mat [ 0 ] [ j ] ); else mat [ 1 ] [ j ] = mat [ 0 ] [ j ]; } } else { while ( ++ j <= W ) { if ( wt [ i ] <= j ) mat [ 0 ] [ j ] = max ( val [ i ] + mat [ 1 ] [ j - wt [ i ] ], mat [ 1 ] [ j ] ); else mat [ 0 ] [ j ] = mat [ 1 ] [ j ]; } } i ++; } return ( n % 2 != 0 ) ? mat [ 0 ] [ W ] : mat [ 1 ] [ W ]; } int f_filled ( int val [ ], int wt [ ], int n, int W ) {} else mat [ 0 ] [ j ] = mat [ 1 ] [ j ];
}
}
i ++;
}
return ( n % 2 != 0 ) ? mat [ 0 ] [ W ] : mat [ 1 ] [ W ];
}
int f_filled ( int val [ ], int wt [ ], int n, int W ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,1,3,4,5,6,6,11,13,14,16,18,21,22,22,27,28,32,34,34,37,42,42,48,49,50,53,58,59,60,60,61,65,66,70,74,80,81,81,81,86,90,92,93,93,94,97,99};
int param0_1[] = {82,-18,-62,-4,6,10,22,-36,-8,84,-28,-64,48,92,-64,-76,44,94,-8,10,-24,56,-96,-82,-90,96,-62,42,-22,-16,-66,26,80,-8,82};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {3,65,15,84,86,34,50,33,73,3,2,4,16,54,33,9,57,40,52,82,16,8,87,60,36,3,15,97,82,23,3,30,45,17,58,58,96,57,7,39,78,58,56,15,44,12,8};
int param0_4[] = {-56,-14,20,60,92};
int param0_5[] = {0,0,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,0,1,1,1,1,0,1,0,1,0,1,0,1,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,1,1,0,0};
int param0_6[] = {11,12,13,18,25,27,35,35,36,55,57,58,58,61,63,67,72,76,81,87,89,97};
int param0_7[] = {-68,90,86,40,86,92,46,-26,6,74,-68,-64,-62,-12,-96,16,-80,52,-8,64,-62,-24,-26,82,56,-10,-32,-96,-12,94,66,-46,-4,88,-86,-46,70};
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};
int param0_9[] = {3,47,85,1,45,54,50,79};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {2,2,2,3,5,7,8,9,17,20,20,26,27,32,35,42,42,48,49,49,51,60,61,62,63,66,68,71,76,76,76,78,81,83,83,85,85,86,87,88,88,89,89,89,89,92,96,98};
int param1_1[] = {84,-60,40,-84,92,-62,-36,-62,-52,-52,12,62,-64,-76,-18,74,-4,64,28,-68,60,-54,72,-22,-34,-52,22,10,22,68,94,90,-20,16,44};
int param1_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param1_3[] = {80,41,34,46,88,29,16,5,5,30,50,5,13,99,49,89,50,14,46,90,82,84,34,71,47,60,74,79,81,11,98,91,85,95,50,4,41,59,60,81,62,84,25,87,79,33,19};
int param1_4[] = {-74,-48,-36,-24,62};
int param1_5[] = {0,1,0,0,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,1,1,1,1};
int param1_6[] = {6,11,18,20,22,25,39,42,45,48,55,67,70,74,74,77,78,81,89,91,93,94};
int param1_7[] = {42,78,-64,-34,-34,92,-50,-72,-24,-24,-92,24,64,-80,-30,98,-54,78,30,64,58,-50,92,6,68,-66,14,50,54,78,-60,-50,-16,-10,-38,30,4};
int param1_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,1};
int param1_9[] = {7,63,15,89,67,30,78,68};
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[] = {34,26,13,37,2,39,14,33,18,7};
int param3[] = {33,17,14,31,2,28,20,33,24,6};
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;
} | [ | [
"a) i",
"b) arr",
"c) {",
"d) [",
"e) arr"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int invcount = 0;
for ( int i = 1;
i < n - 1;
i ++ ) {
int small = 0;
for ( int j = i + 1;
j < n;
j ++ ) if ( arr [ i ] > arr [ j ] ) small ++;
int great = 0;
for ( int j = i - 1;
j >= 0;
j -- ) if ( arr [ i ] < arr [ j ] ) great ++;
invcount += great * small;
}
return invcount;
}
int f_filled ( int arr [ ], int n ) {}
nt great = 0;
for ( int j = i - 1;
j >= 0;
j -- ) if ( arr [ i ] < arr [ j ] ) great ++;
invcount += great * small;
}
return invcount;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,75,89};
int param0_1[] = {84,-66,-52,34,-28,-6,20,22,-78,-26,14,24,-92,-18,32,-94,-64,-38,56,4,-10,58,-66,-58,-10,-8,-62,-60,-26};
int param0_2[] = {0,0,0,1,1,1,1,1};
int param0_3[] = {18,7,43,57,94,37,38,41,59,64,97,29,51,37,64,91,42,83,13,22,68};
int param0_4[] = {-94,-86,-84,-84,-82,-66,-62,-58,-52,-48,-44,-40,-38,-32,-22,-22,-22,-14,-8,-6,-6,0,2,20,20,26,32,32,52,56,66,74,76,80,80,86,88,94};
int param0_5[] = {0,1,1,0,0,0,0,0,1,0,0};
int param0_6[] = {4,8,15,19,24,31,33,36,38,45,45,52,54,65,73,75,83,84,90,92,93};
int param0_7[] = {80,-30,-44,76,-96,2,22,-30,36,-6,88,-60,-90,-52,78,90,-52};
int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {74,71,28,45,14,31,17,10,82,27,45,73,93,87,57,58};
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[] = {1,26,7,17,34,9,19,10,7,10};
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 = 1; i < n [MASK] 1; i ++ ) { int small = 0; for ( int j = i + 1; j < n; j ++ ) if ( arr [ i ] > arr [ j ] ) small ++; int great = 0; for ( int j = i - 1; j >= 0; j -- ) if ( arr [ i ] < arr [ j ] ) great ++; invcount += great * small; } return invcount; } int f_filled ( int arr [ ], int n ) {}nt great = 0;
for ( int j = i - 1;
j >= 0;
j -- ) if ( arr [ i ] < arr [ j ] ) great ++;
invcount += great * small;
}
return invcount;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,75,89};
int param0_1[] = {84,-66,-52,34,-28,-6,20,22,-78,-26,14,24,-92,-18,32,-94,-64,-38,56,4,-10,58,-66,-58,-10,-8,-62,-60,-26};
int param0_2[] = {0,0,0,1,1,1,1,1};
int param0_3[] = {18,7,43,57,94,37,38,41,59,64,97,29,51,37,64,91,42,83,13,22,68};
int param0_4[] = {-94,-86,-84,-84,-82,-66,-62,-58,-52,-48,-44,-40,-38,-32,-22,-22,-22,-14,-8,-6,-6,0,2,20,20,26,32,32,52,56,66,74,76,80,80,86,88,94};
int param0_5[] = {0,1,1,0,0,0,0,0,1,0,0};
int param0_6[] = {4,8,15,19,24,31,33,36,38,45,45,52,54,65,73,75,83,84,90,92,93};
int param0_7[] = {80,-30,-44,76,-96,2,22,-30,36,-6,88,-60,-90,-52,78,90,-52};
int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {74,71,28,45,14,31,17,10,82,27,45,73,93,87,57,58};
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[] = {1,26,7,17,34,9,19,10,7,10};
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) int",
"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);}
double f_gold ( double a, double b ) {
double mod;
if ( a < 0 ) mod = - a;
else mod = a;
if ( b < 0 ) b = - b;
while ( mod >= b ) mod = mod - b;
if ( a < 0 ) return - mod;
return mod;
}
double f_filled ( double a, double b ) {}
e mod;
if ( a < 0 ) mod = - a;
else mod = a;
if ( b < 0 ) b = - b;
while ( mod >= b ) mod = mod - b;
if ( a < 0 ) return - mod;
return mod;
}
double f_filled ( double a, double b ) {}
int main(void) {
int n_success = 0;
double param0[] = {3243.229719038493,-4362.665881044217,7255.066257575837,-6929.554320261099,3569.942027998315,-6513.849053096595,7333.183189243961,-2856.1752826258803,9787.228111241662,-1722.873699288031};
double param1[] = {5659.926861939672,-9196.507113304497,2623.200060506935,-3009.0234530313287,6920.809419868375,-70.95992406437102,580.3500610971768,-9625.97442825802,2419.6844962423256,-8370.700544254058};
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 ( double a, double b ) { double mod; if ( a < 0 ) [MASK] = - a; else mod = a; if ( b < 0 ) b = - b; while ( mod >= b ) mod = mod - b; if ( a < 0 ) return - mod; return mod; } double f_filled ( double a, double b ) {}e mod;
if ( a < 0 ) mod = - a;
else mod = a;
if ( b < 0 ) b = - b;
while ( mod >= b ) mod = mod - b;
if ( a < 0 ) return - mod;
return mod;
}
double f_filled ( double a, double b ) {}
int main(void) {
int n_success = 0;
double param0[] = {3243.229719038493,-4362.665881044217,7255.066257575837,-6929.554320261099,3569.942027998315,-6513.849053096595,7333.183189243961,-2856.1752826258803,9787.228111241662,-1722.873699288031};
double param1[] = {5659.926861939672,-9196.507113304497,2623.200060506935,-3009.0234530313287,6920.809419868375,-70.95992406437102,580.3500610971768,-9625.97442825802,2419.6844962423256,-8370.700544254058};
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;
} | mod | [
"a) +=",
"b) (int",
"c) int",
"d) <iostream>",
"e) mod"
] | 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 sum = 0;
int leftsum = 0;
for ( int i = 0;
i < n;
++ i ) sum += arr [ i ];
for ( int i = 0;
i < n;
++ i ) {
sum -= arr [ i ];
if ( leftsum == sum ) return i;
leftsum += arr [ i ];
}
return - 1;
}
int f_filled ( int arr [ ], int n ) {}
+= arr [ i ];
for ( int i = 0;
i < n;
++ i ) {
sum -= arr [ i ];
if ( leftsum == sum ) return i;
leftsum += arr [ i ];
}
return - 1;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {24,31,44,52,78,95};
int param0_1[] = {-78,-38,22,58,68,-60,-30,6,58,20,-64,-40,-14,80,-2,-88,-68,-16,-4,78,-38,-74,78,-72,46,-12,82,-76,-98,-28,-32,88,72,72,64,-10,98,-24,-96};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1};
int param0_3[] = {98,69,41,48,40,90,76,61,17,81,74,92,54,16,11,15,8,16,84,86,34,34,75,92,67,54,93,19,31,62,89,26,96,91,32,78,42,84,66,79,29,48,49,5};
int param0_4[] = {-28,42};
int param0_5[] = {1,1,1,1,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1};
int param0_6[] = {18,21,23,24,36,37,39,49,55,68,80,81,88,90};
int param0_7[] = {94,22,42,-42,78,50,96,98,46,74,98,84,-2,-76,48,18,28,-62,78,6,-76,-12,46,62,14,76,44,-26,-92,12,62,-72,-42};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {1,23,18,91,65,2,73,12,91,47,14,48,1,69,95,81,59,36,79,35,9,52,55,73,54,25,8,41,64,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,19,11,27,1,25,11,32,14,19};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int sum = 0; int leftsum = 0; for ( int i = 0; i < n; ++ i ) sum += arr [MASK] i ]; for ( int i = 0; i < n; ++ i ) { sum -= arr [ i ]; if ( leftsum == sum ) return i; leftsum += arr [ i ]; } return - 1; } int f_filled ( int arr [ ], int n ) {}+= arr [ i ];
for ( int i = 0;
i < n;
++ i ) {
sum -= arr [ i ];
if ( leftsum == sum ) return i;
leftsum += arr [ i ];
}
return - 1;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {24,31,44,52,78,95};
int param0_1[] = {-78,-38,22,58,68,-60,-30,6,58,20,-64,-40,-14,80,-2,-88,-68,-16,-4,78,-38,-74,78,-72,46,-12,82,-76,-98,-28,-32,88,72,72,64,-10,98,-24,-96};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1};
int param0_3[] = {98,69,41,48,40,90,76,61,17,81,74,92,54,16,11,15,8,16,84,86,34,34,75,92,67,54,93,19,31,62,89,26,96,91,32,78,42,84,66,79,29,48,49,5};
int param0_4[] = {-28,42};
int param0_5[] = {1,1,1,1,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1};
int param0_6[] = {18,21,23,24,36,37,39,49,55,68,80,81,88,90};
int param0_7[] = {94,22,42,-42,78,50,96,98,46,74,98,84,-2,-76,48,18,28,-62,78,6,-76,-12,46,62,14,76,44,-26,-92,12,62,-72,-42};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {1,23,18,91,65,2,73,12,91,47,14,48,1,69,95,81,59,36,79,35,9,52,55,73,54,25,8,41,64,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,19,11,27,1,25,11,32,14,19};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | [ | [
"a) [",
"b) {",
"c) ;",
"d) namespace",
"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 n ) {
return n * ( 2 * n - 1 );
}
int f_filled ( int n ) {}
n ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
return n * ( 2 * n - 1 );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {38,44,58,10,31,53,94,64,71,59};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void [MASK] (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { return n * ( 2 * n - 1 ); } int f_filled ( int n ) {}n ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
return n * ( 2 * n - 1 );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {38,44,58,10,31,53,94,64,71,59};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | sort | [
"a) arr",
"b) (",
"c) ==",
"d) (sizeof",
"e) sort"
] | 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 pPrevPrev = 1, pPrev = 1, pCurr = 1, pNext = 1;
for ( int i = 3;
i <= n;
i ++ ) {
pNext = pPrevPrev + pPrev;
pPrevPrev = pPrev;
pPrev = pCurr;
pCurr = pNext;
}
return pNext;
}
int f_filled ( int n ) {}
= 1, pNext = 1;
for ( int i = 3;
i <= n;
i ++ ) {
pNext = pPrevPrev + pPrev;
pPrevPrev = pPrev;
pPrev = pCurr;
pCurr = pNext;
}
return pNext;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {1,92,29,52,55,13,83,83,10,67};
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 pPrevPrev = 1, pPrev = 1, pCurr = 1, pNext = 1; for ( int i = 3; i <= n; i ++ ) { pNext = pPrevPrev + [MASK] pPrevPrev = pPrev; pPrev = pCurr; pCurr = pNext; } return pNext; } int f_filled ( int n ) {}= 1, pNext = 1;
for ( int i = 3;
i <= n;
i ++ ) {
pNext = pPrevPrev + pPrev;
pPrevPrev = pPrev;
pPrev = pCurr;
pCurr = pNext;
}
return pNext;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {1,92,29,52,55,13,83,83,10,67};
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;
} | pPrev; | [
"a) int",
"b) <",
"c) pPrev;",
"d) [",
"e) class"
] | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.