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);}
bool f_gold ( char str [], int n ) {
int len = strlen(str);
if ( len >= n ) return true;
return false;
}
bool f_filled ( char str [], int n ) {}
n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( char str [], int n ) {
int len = strlen(str);
if ( len >= n ) return true;
return false;
}
bool f_filled ( char str [], int n ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"ZCoQhuM","7437725","11","buGlvR","9","101101010110","YguiM","8198","11101","hUInqJXNdbfP"};
int param1[] = {2,53,30,1,92,3,18,90,71,4};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( char str [], int n ) { int len = strlen(str); if ( len >= n ) [MASK] true; return false; } bool f_filled ( char str [], int n ) {} n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( char str [], int n ) {
int len = strlen(str);
if ( len >= n ) return true;
return false;
}
bool f_filled ( char str [], int n ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"ZCoQhuM","7437725","11","buGlvR","9","101101010110","YguiM","8198","11101","hUInqJXNdbfP"};
int param1[] = {2,53,30,1,92,3,18,90,71,4};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | return | [
"a) return",
"b) 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);}
int f_gold ( int num ) {
int sum = 0;
for ( int i = 2;
i * i <= num;
i ++ ) {
while ( num % i == 0 ) {
sum += i;
num /= i;
}
}
sum += num;
return sum;
}
int f_filled ( int num ) {}
m ) {
int sum = 0;
for ( int i = 2;
i * i <= num;
i ++ ) {
while ( num % i == 0 ) {
sum += i;
num /= i;
}
}
sum += num;
return sum;
}
int f_filled ( int num ) {}
int main(void) {
int n_success = 0;
int param0[] = {83,88,60,6,26,98,38,90,76,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 num ) { int sum = 0; for ( int i = 2; i * i <= num; i ++ ) { while ( num % i == 0 ) { sum += i; num /= i; } } sum += num; return sum; } int f_filled ( int num ) [MASK]m ) {
int sum = 0;
for ( int i = 2;
i * i <= num;
i ++ ) {
while ( num % i == 0 ) {
sum += i;
num /= i;
}
}
sum += num;
return sum;
}
int f_filled ( int num ) {}
int main(void) {
int n_success = 0;
int param0[] = {83,88,60,6,26,98,38,90,76,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;
} | {} | [
"a) x",
"b) cmpfunc",
"c) {}",
"d) );",
"e) i"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
if ( n < 4 ) return - 1;
int rem = n % 4;
if ( rem == 0 ) return n / 4;
if ( rem == 1 ) {
if ( n < 9 ) return - 1;
return ( n - 9 ) / 4 + 1;
}
if ( rem == 2 ) return ( n - 6 ) / 4 + 1;
if ( rem == 3 ) {
if ( n < 15 ) return - 1;
return ( n - 15 ) / 4 + 2;
}
}
int f_filled ( int n ) {}
- 1;
return ( n - 9 ) / 4 + 1;
}
if ( rem == 2 ) return ( n - 6 ) / 4 + 1;
if ( rem == 3 ) {
if ( n < 15 ) return - 1;
return ( n - 15 ) / 4 + 2;
}
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {55,35,24,75,5,7,50,28,67,59};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { if ( n < 4 ) return - 1; int rem = n % 4; if ( rem == 0 ) return n / 4; if ( rem == 1 ) { if ( n < 9 ) return [MASK] 1; return ( n - 9 ) / 4 + 1; } if ( rem == 2 ) return ( n - 6 ) / 4 + 1; if ( rem == 3 ) { if ( n < 15 ) return - 1; return ( n - 15 ) / 4 + 2; } } int f_filled ( int n ) {}- 1;
return ( n - 9 ) / 4 + 1;
}
if ( rem == 2 ) return ( n - 6 ) / 4 + 1;
if ( rem == 3 ) {
if ( n < 15 ) return - 1;
return ( n - 15 ) / 4 + 2;
}
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {55,35,24,75,5,7,50,28,67,59};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | - | [
"a) std;",
"b) :",
"c) x:",
"d) -",
"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 a, int b ) {
if ( a == b ) return a;
if ( a == 0 ) return b;
if ( b == 0 ) return a;
if ( ~ a & 1 ) {
if ( b & 1 ) return f_gold ( a >> 1, b );
else return f_gold ( a >> 1, b >> 1 ) << 1;
}
if ( ~ b & 1 ) return f_gold ( a, b >> 1 );
if ( a > b ) return f_gold ( ( a - b ) >> 1, b );
return f_gold ( ( b - a ) >> 1, a );
}
int f_filled ( int a, int b ) {}
> 1, b >> 1 ) << 1;
}
if ( ~ b & 1 ) return f_gold ( a, b >> 1 );
if ( a > b ) return f_gold ( ( a - b ) >> 1, b );
return f_gold ( ( b - a ) >> 1, a );
}
int f_filled ( int a, int b ) {}
int main(void) {
int n_success = 0;
int param0[] = {52,36,12,69,45,7,45,62,96,89};
int param1[] = {29,94,6,7,11,51,55,86,63,12};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a, int b ) { if ( a == b ) return a; if ( a == 0 ) return b; if ( b == 0 ) return a; if ( ~ a & 1 ) { if ( b & 1 ) return f_gold ( a >> 1, b ); else return f_gold ( a >> 1, b >> 1 ) << 1; } if ( ~ b & 1 ) return f_gold ( a, b >> [MASK] ); if ( a > b ) return f_gold ( ( a - b ) >> 1, b ); return f_gold ( ( b - a ) >> 1, a ); } int f_filled ( int a, int b ) {}> 1, b >> 1 ) << 1;
}
if ( ~ b & 1 ) return f_gold ( a, b >> 1 );
if ( a > b ) return f_gold ( ( a - b ) >> 1, b );
return f_gold ( ( b - a ) >> 1, a );
}
int f_filled ( int a, int b ) {}
int main(void) {
int n_success = 0;
int param0[] = {52,36,12,69,45,7,45,62,96,89};
int param1[] = {29,94,6,7,11,51,55,86,63,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;
} | 1 | [
"a) 1",
"b) 1;",
"c) }",
"d) }",
"e) }"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int 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 += 2 ) sum += C [ n ] [ i ];
return sum;
}
int f_filled ( int n ) {}
else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
}
}
int sum = 0;
for ( int i = 0;
i <= n;
i += 2 ) sum += C [ n ] [ i ];
return sum;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {18,54,67,17,47,99,26,93,57,98};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (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 ( 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 += 2 ) sum += C [ n ] [ i ]; return sum; } int f_filled ( int n ) {} else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
}
}
int sum = 0;
for ( int i = 0;
i <= n;
i += 2 ) sum += C [ n ] [ i ];
return sum;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {18,54,67,17,47,99,26,93,57,98};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | (arr) | [
"a) {",
"b) (arr)",
"c) ==",
"d) )",
"e) ("
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int p ) {
long long checkNumber = pow ( 2, p ) - 1;
long long nextval = 4 % checkNumber;
for ( int i = 1;
i < p - 1;
i ++ ) nextval = ( nextval * nextval - 2 ) % checkNumber;
return ( nextval == 0 );
}
bool f_filled ( int p ) {}
p ) - 1;
long long nextval = 4 % checkNumber;
for ( int i = 1;
i < p - 1;
i ++ ) nextval = ( nextval * nextval - 2 ) % checkNumber;
return ( nextval == 0 );
}
bool f_filled ( int p ) {}
int main(void) {
int n_success = 0;
int param0[] = {11,27,31,47,3,14,41,72,39,22};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ [MASK] int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int p ) { long long checkNumber = pow ( 2, p ) - 1; long long nextval = 4 % checkNumber; for ( int i = 1; i < p - 1; i ++ ) nextval = ( nextval * nextval - 2 ) % checkNumber; return ( nextval == 0 ); } bool f_filled ( int p ) {}p ) - 1;
long long nextval = 4 % checkNumber;
for ( int i = 1;
i < p - 1;
i ++ ) nextval = ( nextval * nextval - 2 ) % checkNumber;
return ( nextval == 0 );
}
bool f_filled ( int p ) {}
int main(void) {
int n_success = 0;
int param0[] = {11,27,31,47,3,14,41,72,39,22};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | ], | [
"a) count",
"b) unsigned",
"c) (",
"d) profit",
"e) ],"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( char str [] [ ], int n ) {
unordered_map < string, int > m;
for ( int i = 0;
i < n;
i ++ ) m [ str [ i ] ] += 1;
int res = 0;
for ( auto it = m . begin ( );
it != m . end ( );
it ++ ) if ( ( it -> second == 2 ) ) res ++;
return res;
}
int f_filled ( char str [] [ ], int n ) {}
[ str [ i ] ] += 1;
int res = 0;
for ( auto it = m . begin ( );
it != m . end ( );
it ++ ) if ( ( it -> second == 2 ) ) res ++;
return res;
}
int f_filled ( char str [] [ ], int n ) {}
int main(void) {
int n_success = 0;
char param0_0 [][] = {"};
char param0_1 [][] = {"938","074209","0949093096","218622476","71692175","0714","81217924991","74016430795374","52213147","338","939","798161500954","90528060774015","68715","75810","43450","8017","0193164","5945740","212","4589289","2912211026","0","49","8230114","0733435391403","5429","10070"};
char param0_2 [][] = {"00","0","00","0101111010100","110"};
char param0_3 [][] = {"g","h","ok","h","ok","sqozuC","ut","ZwRcG","ok","MR","jHrWyy","qaJlrokgRHuZH","LjPNzDUKszYmCq","g","ZGjLfMnyAGL","kEZoSxOMEWSFpw","IFtqNaDVnG","iJoJXl","vjrQMyWor","FTEHZqbHGlmHph","QeSdzm","nPostKHkigyJt","mOSekk"};
string *param0[4] = {param0_0,param0_1,param0_2,param0_3};
int param1[] = {10,32,6,7,6,12,43,20,4,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 ( char str [] [ ], int n ) { unordered_map < string, int > m; for ( int i = 0; i < n; i ++ ) m [ str [ [MASK] ] ] += 1; int res = 0; for ( auto it = m . begin ( ); it != m . end ( ); it ++ ) if ( ( it -> second == 2 ) ) res ++; return res; } int f_filled ( char str [] [ ], int n ) {} [ str [ i ] ] += 1;
int res = 0;
for ( auto it = m . begin ( );
it != m . end ( );
it ++ ) if ( ( it -> second == 2 ) ) res ++;
return res;
}
int f_filled ( char str [] [ ], int n ) {}
int main(void) {
int n_success = 0;
char param0_0 [][] = {"};
char param0_1 [][] = {"938","074209","0949093096","218622476","71692175","0714","81217924991","74016430795374","52213147","338","939","798161500954","90528060774015","68715","75810","43450","8017","0193164","5945740","212","4589289","2912211026","0","49","8230114","0733435391403","5429","10070"};
char param0_2 [][] = {"00","0","00","0101111010100","110"};
char param0_3 [][] = {"g","h","ok","h","ok","sqozuC","ut","ZwRcG","ok","MR","jHrWyy","qaJlrokgRHuZH","LjPNzDUKszYmCq","g","ZGjLfMnyAGL","kEZoSxOMEWSFpw","IFtqNaDVnG","iJoJXl","vjrQMyWor","FTEHZqbHGlmHph","QeSdzm","nPostKHkigyJt","mOSekk"};
string *param0[4] = {param0_0,param0_1,param0_2,param0_3};
int param1[] = {10,32,6,7,6,12,43,20,4,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;
} | i | [
"a) i",
"b) sizeof(int),",
"c) mid",
"d) }",
"e) import"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int i;
int ans = INT_MIN;
int maxval = 1;
int minval = 1;
int prevMax;
for ( i = 0;
i < n;
i ++ ) {
if ( arr [ i ] > 0 ) {
maxval = maxval * arr [ i ];
minval = min ( 1, minval * arr [ i ] );
}
else if ( arr [ i ] == 0 ) {
minval = 1;
maxval = 0;
}
else if ( arr [ i ] < 0 ) {
prevMax = maxval;
maxval = minval * arr [ i ];
minval = prevMax * arr [ i ];
}
ans = max ( ans, maxval );
if ( maxval <= 0 ) {
maxval = 1;
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
l * arr [ i ];
minval = prevMax * arr [ i ];
}
ans = max ( ans, maxval );
if ( maxval <= 0 ) {
maxval = 1;
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {19,25,34,39,41,51,52,53,54,56,64,67,72,87,92,93,95};
int param0_1[] = {10};
int param0_2[] = {0,0,0,0,0,0,1,1};
int param0_3[] = {84,81,14,15,34,52,54,1,16,65,54,71,15,40,53,35,62,84,81,85,28,90,74,97,64,3,7,38};
int param0_4[] = {-94,-86,-56,-52,-52,-46,-40,-36,-36,-30,-12,18,20,32,44,50,54,64,68,74,74,74,82};
int param0_5[] = {0,0,0,0,1,0,0,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,0,0,0,1,1,0,0,1,0};
int param0_6[] = {2,3,4,8,11,16,16,18,20,22,24,26,26,27,29,31,37,38,45,45,46,50,50,59,59,59,60,61,63,65,68,69,71,74,74,76,79,82,88,88,89,91,93,93,99,99};
int param0_7[] = {2,-24,-8,-82,76,-62,38,6,-92,30,68,98,-68,8,24,-34,-34,64,-4,-2,-56,-30,92,10,-60,88,4,14,90,-44,-54,4,-4,-26,14,-2,0,82};
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};
int param0_9[] = {70,92,76,56,93,55,12,80,56,36,83,14,16,12,70,55,93,28,84,28,49,66,15,49,98};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {15,0,5,14,21,29,45,23,19,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 < [MASK] x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int 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 i; int ans = INT_MIN; int maxval = 1; int minval = 1; int prevMax; for ( i = 0; i < n; i ++ ) { if ( arr [ i ] > 0 ) { maxval = maxval * arr [ i ]; minval = min ( 1, minval * arr [ i ] ); } else if ( arr [ i ] == 0 ) { minval = 1; maxval = 0; } else if ( arr [ i ] < 0 ) { prevMax = maxval; maxval = minval * arr [ i ]; minval = prevMax * arr [ i ]; } ans = max ( ans, maxval ); if ( maxval <= 0 ) { maxval = 1; } } return ans; } int f_filled ( int arr [ ], int n ) {}l * arr [ i ];
minval = prevMax * arr [ i ];
}
ans = max ( ans, maxval );
if ( maxval <= 0 ) {
maxval = 1;
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {19,25,34,39,41,51,52,53,54,56,64,67,72,87,92,93,95};
int param0_1[] = {10};
int param0_2[] = {0,0,0,0,0,0,1,1};
int param0_3[] = {84,81,14,15,34,52,54,1,16,65,54,71,15,40,53,35,62,84,81,85,28,90,74,97,64,3,7,38};
int param0_4[] = {-94,-86,-56,-52,-52,-46,-40,-36,-36,-30,-12,18,20,32,44,50,54,64,68,74,74,74,82};
int param0_5[] = {0,0,0,0,1,0,0,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,0,0,0,1,1,0,0,1,0};
int param0_6[] = {2,3,4,8,11,16,16,18,20,22,24,26,26,27,29,31,37,38,45,45,46,50,50,59,59,59,60,61,63,65,68,69,71,74,74,76,79,82,88,88,89,91,93,93,99,99};
int param0_7[] = {2,-24,-8,-82,76,-62,38,6,-92,30,68,98,-68,8,24,-34,-34,64,-4,-2,-56,-30,92,10,-60,88,4,14,90,-44,-54,4,-4,-26,14,-2,0,82};
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};
int param0_9[] = {70,92,76,56,93,55,12,80,56,36,83,14,16,12,70,55,93,28,84,28,49,66,15,49,98};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {15,0,5,14,21,29,45,23,19,13};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | y)? | [
"a) i",
"b) ]",
"c) y)?",
"d) {}",
"e) counter"
] | 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 num ) {
int result = 0;
for ( int i = 2;
i <= sqrt ( num );
i ++ ) {
if ( num % i == 0 ) {
if ( i == ( num / i ) ) result += i;
else result += ( i + num / i );
}
}
return ( result + 1 );
}
int f_filled ( int num ) {}
qrt ( num );
i ++ ) {
if ( num % i == 0 ) {
if ( i == ( num / i ) ) result += i;
else result += ( i + num / i );
}
}
return ( result + 1 );
}
int f_filled ( int num ) {}
int main(void) {
int n_success = 0;
int param0[] = {2,57,28,43,38,29,45,47,44,3};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) [MASK] (arr, n, sizeof(int), cmpfunc);} int f_gold ( int num ) { int result = 0; for ( int i = 2; i <= sqrt ( num ); i ++ ) { if ( num % i == 0 ) { if ( i == ( num / i ) ) result += i; else result += ( i + num / i ); } } return ( result + 1 ); } int f_filled ( int num ) {}qrt ( num );
i ++ ) {
if ( num % i == 0 ) {
if ( i == ( num / i ) ) result += i;
else result += ( i + num / i );
}
}
return ( result + 1 );
}
int f_filled ( int num ) {}
int main(void) {
int n_success = 0;
int param0[] = {2,57,28,43,38,29,45,47,44,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;
} | {qsort | [
"a) int",
"b) {qsort",
"c) ugly",
"d) 3",
"e) ;"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
return ( ! ( n & 1 ) );
}
bool f_filled ( int n ) {}
n ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
return ( ! ( n & 1 ) );
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,73,79,36,71,23,41,66,46,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) { return [MASK] > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int n ) { return ( ! ( n & 1 ) ); } bool f_filled ( int n ) {}n ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
return ( ! ( n & 1 ) );
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,73,79,36,71,23,41,66,46,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;
} | (x | [
"a) }",
"b) x:",
"c) 4",
"d) (x",
"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 n ) {
int count = 0, ans = 1;
while ( n % 2 == 0 ) {
count ++;
n /= 2;
}
if ( count % 2 ) ans *= 2;
for ( int i = 3;
i <= sqrt ( n );
i += 2 ) {
count = 0;
while ( n % i == 0 ) {
count ++;
n /= i;
}
if ( count % 2 ) ans *= i;
}
if ( n > 2 ) ans *= n;
return ans;
}
int f_filled ( int n ) {}
);
i += 2 ) {
count = 0;
while ( n % i == 0 ) {
count ++;
n /= i;
}
if ( count % 2 ) ans *= i;
}
if ( n > 2 ) ans *= n;
return ans;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {95,48,3,10,82,1,77,99,23,61};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [MASK] ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int count = 0, ans = 1; while ( n % 2 == 0 ) { count ++; n /= 2; } if ( count % 2 ) ans *= 2; for ( int i = 3; i <= sqrt ( n ); i += 2 ) { count = 0; while ( n % i == 0 ) { count ++; n /= i; } if ( count % 2 ) ans *= i; } if ( n > 2 ) ans *= n; return ans; } int f_filled ( int n ) {});
i += 2 ) {
count = 0;
while ( n % i == 0 ) {
count ++;
n /= i;
}
if ( count % 2 ) ans *= i;
}
if ( n > 2 ) ans *= n;
return ans;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {95,48,3,10,82,1,77,99,23,61};
for(int i = 0; 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) <"
] | 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 ) {
int curr_sum, i, j;
for ( i = 0;
i < n;
i ++ ) {
curr_sum = arr [ i ];
for ( j = i + 1;
j <= n;
j ++ ) {
if ( curr_sum == sum ) {
printf("Sum found between indexes ", i, " and ", j - 1);
return 1;
}
if ( curr_sum > sum || j == n ) break;
curr_sum = curr_sum + arr [ j ];
}
}
printf("Sum found between indexes ", i, " and ", j - 1);
return 0;
}
int f_filled ( int arr [ ], int n, int sum ) {}
> sum || j == n ) break;
curr_sum = curr_sum + arr [ j ];
}
}
printf("Sum found between indexes ", i, " and ", j - 1);
return 0;
}
int f_filled ( int arr [ ], int n, int sum ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,8,8,10,15,18,19,22,25,26,30,32,35,36,40,41,43,48,53,57,59,63,64,68,71,76,76,77,78,89,96,97};
int param0_1[] = {-78,16,-16,-10,-2,-38,58,-72,-78,50,-68,-16,-96,82,70,2,-20};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1};
int param0_3[] = {16,10,55,43,46,74,57,65,86,60,28,6,92};
int param0_4[] = {-98,-98,-90,-84,-84,-80,-76,-76,-70,-54,-48,-46,-44,-42,-38,-14,-12,-4,6,8,24,28,32,40,40,42,64,84,98};
int param0_5[] = {0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,1};
int param0_6[] = {2,10,40,45,56,66,66,70,75,83,93,98};
int param0_7[] = {-20,30,56,-68,54,-6,78,-86,88,-66,76,-66,62,78,22,46,-94,-10,18,16,-36,34,-98,-84,-40,98,82,10,12,54,-88};
int param0_8[] = {0,0,1,1};
int param0_9[] = {38,24,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[] = {26,9,9,10,23,12,10,30,2,1};
int param2[] = {23,12,11,6,19,8,10,17,2,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("Sum found between indexes ", i, " and ", j - 1);
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int 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 [ ], [MASK] n, int sum ) { int curr_sum, i, j; for ( i = 0; i < n; i ++ ) { curr_sum = arr [ i ]; for ( j = i + 1; j <= n; j ++ ) { if ( curr_sum == sum ) { printf("Sum found between indexes ", i, " and ", j - 1); return 1; } if ( curr_sum > sum || j == n ) break; curr_sum = curr_sum + arr [ j ]; } } printf("Sum found between indexes ", i, " and ", j - 1); return 0; } int f_filled ( int arr [ ], int n, int sum ) {} > sum || j == n ) break;
curr_sum = curr_sum + arr [ j ];
}
}
printf("Sum found between indexes ", i, " and ", j - 1);
return 0;
}
int f_filled ( int arr [ ], int n, int sum ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,8,8,10,15,18,19,22,25,26,30,32,35,36,40,41,43,48,53,57,59,63,64,68,71,76,76,77,78,89,96,97};
int param0_1[] = {-78,16,-16,-10,-2,-38,58,-72,-78,50,-68,-16,-96,82,70,2,-20};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1};
int param0_3[] = {16,10,55,43,46,74,57,65,86,60,28,6,92};
int param0_4[] = {-98,-98,-90,-84,-84,-80,-76,-76,-70,-54,-48,-46,-44,-42,-38,-14,-12,-4,6,8,24,28,32,40,40,42,64,84,98};
int param0_5[] = {0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,1};
int param0_6[] = {2,10,40,45,56,66,66,70,75,83,93,98};
int param0_7[] = {-20,30,56,-68,54,-6,78,-86,88,-66,76,-66,62,78,22,46,-94,-10,18,16,-36,34,-98,-84,-40,98,82,10,12,54,-88};
int param0_8[] = {0,0,1,1};
int param0_9[] = {38,24,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[] = {26,9,9,10,23,12,10,30,2,1};
int param2[] = {23,12,11,6,19,8,10,17,2,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("Sum found between indexes ", i, " and ", j - 1);
return 0;
} | int | [
"a) 1",
"b) )",
"c) x:",
"d) int",
"e) (x"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double side ) {
return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side );
}
double f_filled ( double side ) {}
ort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double side ) {
return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side );
}
double f_filled ( double side ) {}
int main(void) {
int n_success = 0;
double param0[] = {5859.798616323926,-6381.210375893524,2442.246292006922,-9624.81536339737,8679.436805247444,-2682.3245401089525,7216.9161613024435,-5881.789859815442,2497.776395789202,-9598.912195459263};
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 [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);} double f_gold ( double side ) { return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side ); } double f_filled ( double side ) {}ort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double side ) {
return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side );
}
double f_filled ( double side ) {}
int main(void) {
int n_success = 0;
double param0[] = {5859.798616323926,-6381.210375893524,2442.246292006922,-9624.81536339737,8679.436805247444,-2682.3245401089525,7216.9161613024435,-5881.789859815442,2497.776395789202,-9598.912195459263};
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) =",
"b) a,",
"c) (",
"d) *",
"e) #include"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( char str [ ], int n ) {
int dp [ n ] [ n ];
memset ( dp, 0, sizeof ( dp ) );
bool P [ n ] [ n ];
memset ( P, false, sizeof ( P ) );
for ( int i = 0;
i < n;
i ++ ) P [ i ] [ i ] = true;
for ( int i = 0;
i < n - 1;
i ++ ) {
if ( str [ i ] == str [ i + 1 ] ) {
P [ i ] [ i + 1 ] = true;
dp [ i ] [ i + 1 ] = 1;
}
}
for ( int gap = 2;
gap < n;
gap ++ ) {
for ( int i = 0;
i < n - gap;
i ++ ) {
int j = gap + i;
if ( str [ i ] == str [ j ] && P [ i + 1 ] [ j - 1 ] ) P [ i ] [ j ] = true;
if ( P [ i ] [ j ] == true ) dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] + 1 - dp [ i + 1 ] [ j - 1 ];
else dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] - dp [ i + 1 ] [ j - 1 ];
}
}
return dp [ 0 ] [ n - 1 ];
}
int f_filled ( char str [ ], int n ) {}
[ i + 1 ] [ j - 1 ];
else dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] - dp [ i + 1 ] [ j - 1 ];
}
}
return dp [ 0 ] [ n - 1 ];
}
int f_filled ( char str [ ], int n ) {}
int main(void) {
int n_success = 0;
char param0_0[] = {'E','E','J','P','T','U','X','Y','Z','e','f','h','l','m','n','o','z'};
char param0_1[] = {'8','7','3','4','9','5','3','1','4','0','6','8','2','5','8','3','5','2','8','6','6','3','5','7','5','5','3','7'};
char 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'};
char param0_3[] = {'f','E','e','z','B','o','i','v','K','u','P','C','z','f','k','J','t','R','t','A','f','G','D','X','H','e','p','l','l','k','Z','Y','u','g','H','C','f','J','H','W'};
char param0_4[] = {'0','0','0','1','1','1','1','1','1','2','2','2','3','3','3','3','3','4','4','4','4','4','4','5','5','5','5','6','6','7','7','9','9','9','9','9','9'};
char param0_5[] = {'1','0','1','1','0','0','1','1','1','0','1','0','1','1','0','1','0','1','1','1','1','1','0','1','1','0','1','0','1','1','0','0','1','0','1','0','0','0','0','0','1','1','0','1','0','1'};
char param0_6[] = {'C','C','D','F','L','M','P','X','a','f','i','j','w'};
char param0_7[] = {'7','9','0','2','8','0','7','5','9','4','5','4','8','1','9','5','3','2','4','1','2'};
char param0_8[] = {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'};
char param0_9[] = {'m','X','N','M'};
char *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {11,27,23,27,35,43,9,16,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 ( char str [ ], int n ) { int dp [ n ] [ n ]; memset ( dp, 0, sizeof ( dp ) ); bool P [ n ] [ n ]; memset ( P, false, sizeof ( P ) ); for ( int i = 0; i < n; i ++ ) P [ i ] [ i ] = true; for ( int i = 0; i < n - 1; i ++ ) { if ( str [ i ] == str [ i + 1 ] ) { P [ i ] [ i + 1 ] = true; dp [ i ] [ i + 1 ] = 1; } } for ( int gap = 2; gap < n; gap ++ ) { for ( int i = 0; i < n - gap; i ++ ) { int j = gap + i; if ( str [ i ] == str [ j ] && P [ i + 1 ] [ j - 1 ] ) P [ i ] [ j ] = true; if ( P [ i ] [ j ] == true [MASK] dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] + 1 - dp [ i + 1 ] [ j - 1 ]; else dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] - dp [ i + 1 ] [ j - 1 ]; } } return dp [ 0 ] [ n - 1 ]; } int f_filled ( char str [ ], int n ) {}[ i + 1 ] [ j - 1 ];
else dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] - dp [ i + 1 ] [ j - 1 ];
}
}
return dp [ 0 ] [ n - 1 ];
}
int f_filled ( char str [ ], int n ) {}
int main(void) {
int n_success = 0;
char param0_0[] = {'E','E','J','P','T','U','X','Y','Z','e','f','h','l','m','n','o','z'};
char param0_1[] = {'8','7','3','4','9','5','3','1','4','0','6','8','2','5','8','3','5','2','8','6','6','3','5','7','5','5','3','7'};
char 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'};
char param0_3[] = {'f','E','e','z','B','o','i','v','K','u','P','C','z','f','k','J','t','R','t','A','f','G','D','X','H','e','p','l','l','k','Z','Y','u','g','H','C','f','J','H','W'};
char param0_4[] = {'0','0','0','1','1','1','1','1','1','2','2','2','3','3','3','3','3','4','4','4','4','4','4','5','5','5','5','6','6','7','7','9','9','9','9','9','9'};
char param0_5[] = {'1','0','1','1','0','0','1','1','1','0','1','0','1','1','0','1','0','1','1','1','1','1','0','1','1','0','1','0','1','1','0','0','1','0','1','0','0','0','0','0','1','1','0','1','0','1'};
char param0_6[] = {'C','C','D','F','L','M','P','X','a','f','i','j','w'};
char param0_7[] = {'7','9','0','2','8','0','7','5','9','4','5','4','8','1','9','5','3','2','4','1','2'};
char param0_8[] = {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'};
char param0_9[] = {'m','X','N','M'};
char *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {11,27,23,27,35,43,9,16,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) #include",
"b) (x",
"c) )",
"d) CHECK_VALID_SEQUENCE_DIVISIBLE_M_1{",
"e) table"
] | 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 ) {
return floor ( ( - 1 + sqrt ( 1 + ( 8 * n ) ) ) / 2 );
}
int f_filled ( int a [ ], int n ) {}
ort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a [ ], int n ) {
return floor ( ( - 1 + sqrt ( 1 + ( 8 * n ) ) ) / 2 );
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,2,2,3,5,6,7,8,8,12,15,16,18,18,20,21,21,22,22,24,24,25,30,35,42,49,52,55,55,63,68,70,72,73,77,80,83,87,87,88,88,94,95,97};
int param0_1[] = {48,-72,84,-24,28,94,36,28,32,66,-62,64,6,-68,-12,46,4,98,18,86,-60,76,14,98};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {11,16,84,8,86,44,79,11,73,12,29,62,22,44,28,8,48,92,73,63,59,44,95,66};
int param0_4[] = {-94,-94,-92,-88,-86,-82,-80,-80,-78,-76,-56,-56,-50,-44,-42,-36,-36,-32,-32,-26,-14,-12,-6,12,24,28,34,38,42,42,46,50,56,62,62,74,84,92,94};
int param0_5[] = {0,1,0,1,0,1,1,0,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,0,1,1,1,1,1,0,0};
int param0_6[] = {2,2,3,3,3,4,5,13,16,18,21,22,27,28,32,34,36,37,41,42,43,51,52,52,54,54,61,65,67,67,68,71,75,77,77,78,80,81,81,84,86,90,90,93,93,94,99,99};
int param0_7[] = {54,-86};
int param0_8[] = {0,1};
int param0_9[] = {5,54,49,80,56,62,31,49,60,19,45,94,33,46,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[] = {22,12,25,14,19,24,31,1,1,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> [MASK] min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int 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 ) { return floor ( ( - 1 + sqrt ( 1 + ( 8 * n ) ) ) / 2 ); } int f_filled ( int a [ ], int n ) {}ort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a [ ], int n ) {
return floor ( ( - 1 + sqrt ( 1 + ( 8 * n ) ) ) / 2 );
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,2,2,3,5,6,7,8,8,12,15,16,18,18,20,21,21,22,22,24,24,25,30,35,42,49,52,55,55,63,68,70,72,73,77,80,83,87,87,88,88,94,95,97};
int param0_1[] = {48,-72,84,-24,28,94,36,28,32,66,-62,64,6,-68,-12,46,4,98,18,86,-60,76,14,98};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {11,16,84,8,86,44,79,11,73,12,29,62,22,44,28,8,48,92,73,63,59,44,95,66};
int param0_4[] = {-94,-94,-92,-88,-86,-82,-80,-80,-78,-76,-56,-56,-50,-44,-42,-36,-36,-32,-32,-26,-14,-12,-6,12,24,28,34,38,42,42,46,50,56,62,62,74,84,92,94};
int param0_5[] = {0,1,0,1,0,1,1,0,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,0,1,1,1,1,1,0,0};
int param0_6[] = {2,2,3,3,3,4,5,13,16,18,21,22,27,28,32,34,36,37,41,42,43,51,52,52,54,54,61,65,67,67,68,71,75,77,77,78,80,81,81,84,86,90,90,93,93,94,99,99};
int param0_7[] = {54,-86};
int param0_8[] = {0,1};
int param0_9[] = {5,54,49,80,56,62,31,49,60,19,45,94,33,46,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[] = {22,12,25,14,19,24,31,1,1,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 | [
"a) *;",
"b) arr",
"c) if",
"d) void",
"e) int"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int DP [ n + 1 ];
DP [ 0 ] = 0;
DP [ 1 ] = 1;
for ( int i = 2;
i <= n;
i ++ ) {
if ( i % 2 == 0 ) DP [ i ] = DP [ i / 2 ];
else DP [ i ] = DP [ ( i - 1 ) / 2 ] + DP [ ( i + 1 ) / 2 ];
}
return DP [ n ];
}
int f_filled ( int n ) {}
int i = 2;
i <= n;
i ++ ) {
if ( i % 2 == 0 ) DP [ i ] = DP [ i / 2 ];
else DP [ i ] = DP [ ( i - 1 ) / 2 ] + DP [ ( i + 1 ) / 2 ];
}
return DP [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {37,24,13,56,26,67,82,60,64,65};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; [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 DP [ n + 1 ]; DP [ 0 ] = 0; DP [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) { if ( i % 2 == 0 ) DP [ i ] = DP [ i / 2 ]; else DP [ i ] = DP [ ( i - 1 ) / 2 ] + DP [ ( i + 1 ) / 2 ]; } return DP [ n ]; } int f_filled ( int n ) {} int i = 2;
i <= n;
i ++ ) {
if ( i % 2 == 0 ) DP [ i ] = DP [ i / 2 ];
else DP [ i ] = DP [ ( i - 1 ) / 2 ] + DP [ ( i + 1 ) / 2 ];
}
return DP [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {37,24,13,56,26,67,82,60,64,65};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | } | [
"a) *",
"b) x,",
"c) y;",
"d) }",
"e) if"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > hash;
int maximum = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] < 0 ) hash [ abs ( arr [ i ] ) ] -= 1;
else hash [ arr [ i ] ] += 1;
}
for ( int i = 0;
i < n;
i ++ ) if ( hash [ arr [ i ] ] != 0 ) return arr [ i ];
return - 1;
}
int f_filled ( int arr [ ], int n ) {}
[ i ] ) ] -= 1;
else hash [ arr [ i ] ] += 1;
}
for ( int i = 0;
i < n;
i ++ ) if ( hash [ arr [ i ] ] != 0 ) return arr [ i ];
return - 1;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,7,10,14,15,24,27,32,33,38,39,40,42,42,47,58,75,76,78,79,83,85,89,96};
int param0_1[] = {-36,14,-76,-70,52,18,64};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {35,50,36,50,82,54,10,45,13,22,1,41,13,11,4,43,50,27,94,57};
int param0_4[] = {-88,-86,-84,-80,-80,-74,-72,-48,-46,-46,-44,-34,-32,-24,-22,-14,4,4,8,8,10,12,20,20,24,24,24,28,32,34,36,44,46,54,54,60,62,62,62,70,70,80,88,88,90};
int param0_5[] = {0,0};
int param0_6[] = {1,1,3,6,6,8,12,13,17,27,28,31,40,40,42,43,53,55,58,60,60,61,65,66,72,72,75,80,84,89,96,97,99};
int param0_7[] = {52,-38,-82,30,-66,42,54,-96,-46,-30,18,-50,96,90,4,74,-22,8,34,74,-46,8,-32,88,-96,26,-80,50,92,-80,44,36};
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};
int param0_9[] = {38,20,54,51,11,61,90,28,23,55,65,87,99,70,74,3,68,23,74,53,80,7,57,24,66,8,15,63,18,67,96,31,63,50};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {18,5,17,15,27,1,31,24,16,30};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc [MASK] void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int 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; int maximum = 0; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] < 0 ) hash [ abs ( arr [ i ] ) ] -= 1; else hash [ arr [ i ] ] += 1; } for ( int i = 0; i < n; i ++ ) if ( hash [ arr [ i ] ] != 0 ) return arr [ i ]; return - 1; } int f_filled ( int arr [ ], int n ) {} [ i ] ) ] -= 1;
else hash [ arr [ i ] ] += 1;
}
for ( int i = 0;
i < n;
i ++ ) if ( hash [ arr [ i ] ] != 0 ) return arr [ i ];
return - 1;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,7,10,14,15,24,27,32,33,38,39,40,42,42,47,58,75,76,78,79,83,85,89,96};
int param0_1[] = {-36,14,-76,-70,52,18,64};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {35,50,36,50,82,54,10,45,13,22,1,41,13,11,4,43,50,27,94,57};
int param0_4[] = {-88,-86,-84,-80,-80,-74,-72,-48,-46,-46,-44,-34,-32,-24,-22,-14,4,4,8,8,10,12,20,20,24,24,24,28,32,34,36,44,46,54,54,60,62,62,62,70,70,80,88,88,90};
int param0_5[] = {0,0};
int param0_6[] = {1,1,3,6,6,8,12,13,17,27,28,31,40,40,42,43,53,55,58,60,60,61,65,66,72,72,75,80,84,89,96,97,99};
int param0_7[] = {52,-38,-82,30,-66,42,54,-96,-46,-30,18,-50,96,90,4,74,-22,8,34,74,-46,8,-32,88,-96,26,-80,50,92,-80,44,36};
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};
int param0_9[] = {38,20,54,51,11,61,90,28,23,55,65,87,99,70,74,3,68,23,74,53,80,7,57,24,66,8,15,63,18,67,96,31,63,50};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {18,5,17,15,27,1,31,24,16,30};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | (const | [
"a) ]",
"b) [",
"c) import",
"d) (const",
"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);}
bool f_gold ( int A [ ], int arr_size, int sum ) {
int l, r;
for ( int i = 0;
i < arr_size - 2;
i ++ ) {
for ( int j = i + 1;
j < arr_size - 1;
j ++ ) {
for ( int k = j + 1;
k < arr_size;
k ++ ) {
if ( A [ i ] + A [ j ] + A [ k ] == sum ) {
printf("Triplet is ", A [ i ], ", ", A [ j ], ", ", A [ k ]);
return true;
}
}
}
}
return false;
}
bool f_filled ( int A [ ], int arr_size, int sum ) {}
printf("Triplet is ", A [ i ], ", ", A [ j ], ", ", A [ k ]);
return true;
}
}
}
}
return false;
}
bool f_filled ( int A [ ], int arr_size, int sum ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {15,18,38,47,75,88};
int param0_1[] = {28,-2,62,38,86,-86,56,58,96,6,-28,8,68,-16,-80,-4,98,-92,4,-4,58,-62,46,64};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {19,77,17,91,6,35,22,4,30,23,97,56,78,16,22,23,95,57,43,27,47,44,23,10,3,94,55,22,93,32,89,28,64,22,13,24,38,44,6,1,80};
int param0_4[] = {-98,-98,-94,-88,-80,-74,-68,-68,-64,-44,-36,-24,-10,-8,-8,0,4,6,8,8,12,14,16,38,50,52,54,56,66,68,76,88};
int param0_5[] = {1,1,0,0,1,0,1,1};
int param0_6[] = {7,22,24,30,42,44,49,49,65,70,70,74,74,75,90,95,96};
int param0_7[] = {40,-76,-68,-86,-14,82,-20,54,-26,56,-24,-44,44,60,52,-20,80,-24,-90,-30,-2};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {33,92,6,99,83,97,49,97,85,52};
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,22,27,22,18,4,8,11,15,6};
int param2[] = {4,18,23,29,19,5,13,18,17,7};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("Triplet is ", A [ i ], ", ", A [ j ], ", ", A [ k ]);
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return [MASK] (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int A [ ], int arr_size, int sum ) { int l, r; for ( int i = 0; i < arr_size - 2; i ++ ) { for ( int j = i + 1; j < arr_size - 1; j ++ ) { for ( int k = j + 1; k < arr_size; k ++ ) { if ( A [ i ] + A [ j ] + A [ k ] == sum ) { printf("Triplet is ", A [ i ], ", ", A [ j ], ", ", A [ k ]); return true; } } } } return false; } bool f_filled ( int A [ ], int arr_size, int sum ) {}
printf("Triplet is ", A [ i ], ", ", A [ j ], ", ", A [ k ]);
return true;
}
}
}
}
return false;
}
bool f_filled ( int A [ ], int arr_size, int sum ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {15,18,38,47,75,88};
int param0_1[] = {28,-2,62,38,86,-86,56,58,96,6,-28,8,68,-16,-80,-4,98,-92,4,-4,58,-62,46,64};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {19,77,17,91,6,35,22,4,30,23,97,56,78,16,22,23,95,57,43,27,47,44,23,10,3,94,55,22,93,32,89,28,64,22,13,24,38,44,6,1,80};
int param0_4[] = {-98,-98,-94,-88,-80,-74,-68,-68,-64,-44,-36,-24,-10,-8,-8,0,4,6,8,8,12,14,16,38,50,52,54,56,66,68,76,88};
int param0_5[] = {1,1,0,0,1,0,1,1};
int param0_6[] = {7,22,24,30,42,44,49,49,65,70,70,74,74,75,90,95,96};
int param0_7[] = {40,-76,-68,-86,-14,82,-20,54,-26,56,-24,-44,44,60,52,-20,80,-24,-90,-30,-2};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {33,92,6,99,83,97,49,97,85,52};
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,22,27,22,18,4,8,11,15,6};
int param2[] = {4,18,23,29,19,5,13,18,17,7};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("Triplet is ", A [ i ], ", ", A [ j ], ", ", A [ k ]);
return 0;
} | ((int) | [
"a) )",
"b) false;",
"c) {",
"d) ((int)",
"e) )"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n );
int sum = 0;
for ( int i = 0;
i < n;
i ++ ) sum += ( arr [ i ] * i );
return sum;
}
int f_filled ( int arr [ ], int n ) {}
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n );
int sum = 0;
for ( int i = 0;
i < n;
i ++ ) sum += ( arr [ i ] * i );
return sum;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,3,4,6,7,8,9,11,19,23,24,30,31,31,32,41,43,43,46,47,50,50,51,53,57,63,63,69,73,74,79,80,81,81,85,86,88,92,93,95,98,99};
int param0_1[] = {90,66,-98,-42,-10,90,-6,76,-80,-62,-40,90,-34,-76,90,-42,80,-74,10,-78,-16,32,52,-82,-98,-68,12,92,72,-10,98,76,-52,-58,62,68,20,-58};
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};
int param0_3[] = {79,52,45,58,44,13,14,99,8,44,42,98,47,44};
int param0_4[] = {-90,-88,-68,-66,-46,-42,-40,-20,-16,4,8,8,8,20,28,52,84,98};
int param0_5[] = {1,1,0,0,1,0,1,0,0,0,1,1,1,1,0,1,0,0,0,0,1};
int param0_6[] = {5,6,7,9,11,13,16,19,22,25,26,27,28,29,32,32,32,33,36,40,43,43,47,49,51,51,52,53,59,61,63,65,66,66,67,72,73,73,75,76,80,86,87,89,89,91,96,98,99};
int param0_7[] = {26,34,-26,-14,40,-20,54,48,-20,28,68,-78,-32,-96,-12,70,-24,92,-14,64,64,40,-8,88,-98,-4,-22,52,32,-52,2,6,-66,-38,-90,-48,-6,-30,76,32,96,-34,-12};
int param0_8[] = {0,0,1,1};
int param0_9[] = {84,32,75,21,62,49,88,49,47,20,49,18,71,34,88,44,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[] = {22,24,13,11,14,13,42,39,3,8};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int sum [MASK] 0; for ( int i = 0; i < n; i ++ ) sum += ( arr [ i ] * i ); return sum; } int f_filled ( int arr [ ], int n ) {}
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n );
int sum = 0;
for ( int i = 0;
i < n;
i ++ ) sum += ( arr [ i ] * i );
return sum;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,3,4,6,7,8,9,11,19,23,24,30,31,31,32,41,43,43,46,47,50,50,51,53,57,63,63,69,73,74,79,80,81,81,85,86,88,92,93,95,98,99};
int param0_1[] = {90,66,-98,-42,-10,90,-6,76,-80,-62,-40,90,-34,-76,90,-42,80,-74,10,-78,-16,32,52,-82,-98,-68,12,92,72,-10,98,76,-52,-58,62,68,20,-58};
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};
int param0_3[] = {79,52,45,58,44,13,14,99,8,44,42,98,47,44};
int param0_4[] = {-90,-88,-68,-66,-46,-42,-40,-20,-16,4,8,8,8,20,28,52,84,98};
int param0_5[] = {1,1,0,0,1,0,1,0,0,0,1,1,1,1,0,1,0,0,0,0,1};
int param0_6[] = {5,6,7,9,11,13,16,19,22,25,26,27,28,29,32,32,32,33,36,40,43,43,47,49,51,51,52,53,59,61,63,65,66,66,67,72,73,73,75,76,80,86,87,89,89,91,96,98,99};
int param0_7[] = {26,34,-26,-14,40,-20,54,48,-20,28,68,-78,-32,-96,-12,70,-24,92,-14,64,64,40,-8,88,-98,-4,-22,52,32,-52,2,6,-66,-38,-90,-48,-6,-30,76,32,96,-34,-12};
int param0_8[] = {0,0,1,1};
int param0_9[] = {84,32,75,21,62,49,88,49,47,20,49,18,71,34,88,44,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[] = {22,24,13,11,14,13,42,39,3,8};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | = | [
"a) 2",
"b) );}",
"c) (",
"d) =",
"e) i"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n, int sum ) {
int curr_sum = arr [ 0 ], start = 0, i;
for ( i = 1;
i <= n;
i ++ ) {
while ( curr_sum > sum && start < i - 1 ) {
curr_sum = curr_sum - arr [ start ];
start ++;
}
if ( curr_sum == sum ) {
printf("Sum found between indexes ", start, " and ", i - 1);
return 1;
}
if ( i < n ) curr_sum = curr_sum + arr [ i ];
}
printf("Sum found between indexes ", start, " and ", i - 1);
return 0;
}
int f_filled ( int arr [ ], int n, int sum ) {}
return 1;
}
if ( i < n ) curr_sum = curr_sum + arr [ i ];
}
printf("Sum found between indexes ", start, " and ", i - 1);
return 0;
}
int f_filled ( int arr [ ], int n, int sum ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,7,8,8,23,24,28,32,48,53,56,62,69,77,81,82,84,87,88,90};
int param0_1[] = {-62,-62,-80,-30,-80,44,-12,-76,16,-52,-86,72,32,-60,-70,-62,-78,-96,-18,40,-4,-18,-58,30,-70,6,0,-62,-66,20,92,-64,20,-48,48,-32,64,22,16,26};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {50,25,6,87,55,86,61,97,24,30,51,43,26,1,80,47,19,36,64,62,92,5,48,27,82,76,70,59,1,43,1,36,28,9,52,22,43};
int param0_4[] = {-86,-76,-64,-22,-16,-8,4,6,8,32,38,60,68,74};
int param0_5[] = {0,0,0,0,1,1,0,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,0};
int param0_6[] = {7,7,12,25,25,32,33,34,37,39,39,41,46,48,56,56,57,58,61,62,62,63,65,66,69,72,74,78,78,79,80,85,89,94,95,99};
int param0_7[] = {98,-60};
int param0_8[] = {0,0,0,0,1,1,1,1,1,1};
int param0_9[] = {80,89,83,42,75,30,64,25,95,17,90,6,11,1,77,16,75,86,96,67,27,80,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[] = {16,39,40,29,7,31,22,1,8,16};
int param2[] = {31,44,7,105,2,10,39,98,0,108};
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("Sum found between indexes ", start, " and ", i - 1);
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int 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 ) { int curr_sum = arr [ 0 ], start = 0, i; for ( i = 1; i <= n; i ++ ) { while ( curr_sum > sum && start < i - 1 ) { curr_sum = curr_sum - arr [ start ]; start ++; } if ( curr_sum == sum ) { printf("Sum found between indexes ", start, " and ", i - 1); return 1; } if ( i < n ) curr_sum = curr_sum + arr [ i ]; } printf("Sum found [MASK] indexes ", start, " and ", i - 1); return 0; } int f_filled ( int arr [ ], int n, int sum ) {} return 1;
}
if ( i < n ) curr_sum = curr_sum + arr [ i ];
}
printf("Sum found between indexes ", start, " and ", i - 1);
return 0;
}
int f_filled ( int arr [ ], int n, int sum ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,7,8,8,23,24,28,32,48,53,56,62,69,77,81,82,84,87,88,90};
int param0_1[] = {-62,-62,-80,-30,-80,44,-12,-76,16,-52,-86,72,32,-60,-70,-62,-78,-96,-18,40,-4,-18,-58,30,-70,6,0,-62,-66,20,92,-64,20,-48,48,-32,64,22,16,26};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {50,25,6,87,55,86,61,97,24,30,51,43,26,1,80,47,19,36,64,62,92,5,48,27,82,76,70,59,1,43,1,36,28,9,52,22,43};
int param0_4[] = {-86,-76,-64,-22,-16,-8,4,6,8,32,38,60,68,74};
int param0_5[] = {0,0,0,0,1,1,0,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,0};
int param0_6[] = {7,7,12,25,25,32,33,34,37,39,39,41,46,48,56,56,57,58,61,62,62,63,65,66,69,72,74,78,78,79,80,85,89,94,95,99};
int param0_7[] = {98,-60};
int param0_8[] = {0,0,0,0,1,1,1,1,1,1};
int param0_9[] = {80,89,83,42,75,30,64,25,95,17,90,6,11,1,77,16,75,86,96,67,27,80,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[] = {16,39,40,29,7,31,22,1,8,16};
int param2[] = {31,44,7,105,2,10,39,98,0,108};
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("Sum found between indexes ", start, " and ", i - 1);
return 0;
} | between | [
"a) )",
"b) between",
"c) -",
"d) i",
"e) int"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int answer [ n + 1 ] = {
0 };
answer [ 0 ] = 1;
for ( int i = 1;
i <= n;
i ++ ) answer [ i ] = answer [ i - 1 ] * 3 + 2;
return answer [ n ];
}
int f_filled ( int n ) {}
t answer [ n + 1 ] = {
0 };
answer [ 0 ] = 1;
for ( int i = 1;
i <= n;
i ++ ) answer [ i ] = answer [ i - 1 ] * 3 + 2;
return answer [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {33,72,81,93,8,76,97,91,61,6};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const [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 answer [ n + 1 ] = { 0 }; answer [ 0 ] = 1; for ( int i = 1; i <= n; i ++ ) answer [ i ] = answer [ i - 1 ] * 3 + 2; return answer [ n ]; } int f_filled ( int n ) {}t answer [ n + 1 ] = {
0 };
answer [ 0 ] = 1;
for ( int i = 1;
i <= n;
i ++ ) answer [ i ] = answer [ i - 1 ] * 3 + 2;
return answer [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {33,72,81,93,8,76,97,91,61,6};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | void | [
"a) (",
"b) [",
"c) java.lang.*;",
"d) void",
"e) >="
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int arr [ ], int n ) {
unordered_set < int > us;
for ( int i = 0;
i < n;
i ++ ) us . insert ( arr [ i ] );
int count = 1;
int curr_ele = arr [ 0 ] - 1;
while ( us . find ( curr_ele ) != us . end ( ) ) {
count ++;
curr_ele --;
}
curr_ele = arr [ 0 ] + 1;
while ( us . find ( curr_ele ) != us . end ( ) ) {
count ++;
curr_ele ++;
}
return ( count == ( int ) ( len(us) ) );
}
bool f_filled ( int arr [ ], int n ) {}
r_ele = arr [ 0 ] + 1;
while ( us . find ( curr_ele ) != us . end ( ) ) {
count ++;
curr_ele ++;
}
return ( count == ( int ) ( len(us) ) );
}
bool f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {15,19,38,59,71};
int param0_1[] = {-20,66,-22,-56,-6,94,70,-80,24,-26,-58,-76,-20,-8,-62,18,-56,-20,42,-40,-88,-74,64,-26,-92,66,-18,-64,66,12,24,-8,78,-82,14,-76};
int param0_2[] = {0,0,1,1,1};
int param0_3[] = {40,38,17,50,16,35,34,23,3,12,97,53,75,36,3,73,99,11,70,9,23,3,11,9,64,44,62,94,55,69,44,59,57,99,69,12,27,42,14,83,53,4,4};
int param0_4[] = {-78,-36,-28,-16,-8,-4,4,4,10,14,30,30,32,32,38,46,54,72};
int param0_5[] = {1,0,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1};
int param0_6[] = {7,32,54,70,79,88};
int param0_7[] = {-38,48,-96,-84,10,70,-28,-66,40,-26,-24,-8,28,-6,6,-14,-2,-58,-6,-14,-58,-74,20,32,98,-24,-10,42,-4,-96,-56,-40,74,-98,-86,-94,12,80,10,-54,-44};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1};
int param0_9[] = {49,87,18,19,56,25,64,94,43,97,74,79,13,36,72,46,10,84,2,11,41,87,55,38,89,92,65,57,62,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[] = {3,26,4,26,16,38,5,30,12,21};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int arr [ ], int n ) { unordered_set < int > us; for ( int i = 0; i < n; i ++ ) us . insert ( arr [ i ] ); int count = 1; int curr_ele = arr [ 0 ] - 1; while ( us . find ( curr_ele ) != us . end ( ) ) { count ++; curr_ele --; } curr_ele = arr [ 0 ] + 1; while ( us . find ( curr_ele ) != us . end ( ) ) { count ++; curr_ele ++; } return ( [MASK] == ( int ) ( len(us) ) ); } bool f_filled ( int arr [ ], int n ) {}r_ele = arr [ 0 ] + 1;
while ( us . find ( curr_ele ) != us . end ( ) ) {
count ++;
curr_ele ++;
}
return ( count == ( int ) ( len(us) ) );
}
bool f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {15,19,38,59,71};
int param0_1[] = {-20,66,-22,-56,-6,94,70,-80,24,-26,-58,-76,-20,-8,-62,18,-56,-20,42,-40,-88,-74,64,-26,-92,66,-18,-64,66,12,24,-8,78,-82,14,-76};
int param0_2[] = {0,0,1,1,1};
int param0_3[] = {40,38,17,50,16,35,34,23,3,12,97,53,75,36,3,73,99,11,70,9,23,3,11,9,64,44,62,94,55,69,44,59,57,99,69,12,27,42,14,83,53,4,4};
int param0_4[] = {-78,-36,-28,-16,-8,-4,4,4,10,14,30,30,32,32,38,46,54,72};
int param0_5[] = {1,0,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1};
int param0_6[] = {7,32,54,70,79,88};
int param0_7[] = {-38,48,-96,-84,10,70,-28,-66,40,-26,-24,-8,28,-6,6,-14,-2,-58,-6,-14,-58,-74,20,32,98,-24,-10,42,-4,-96,-56,-40,74,-98,-86,-94,12,80,10,-54,-44};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1};
int param0_9[] = {49,87,18,19,56,25,64,94,43,97,74,79,13,36,72,46,10,84,2,11,41,87,55,38,89,92,65,57,62,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[] = {3,26,4,26,16,38,5,30,12,21};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | count | [
"a) -",
"b) n;",
"c) f_gold",
"d) count",
"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 ) {
long long factorCount [ n + 1 ];
bool prime [ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) {
factorCount [ i ] = 0;
prime [ i ] = true;
}
for ( int i = 2;
i <= n;
i ++ ) {
if ( prime [ i ] == true ) {
factorCount [ i ] = 1;
for ( int j = i * 2;
j <= n;
j += i ) {
factorCount [ j ] ++;
prime [ j ] = false;
}
}
}
int max = factorCount [ m ];
int num = m;
for ( int i = m;
i <= n;
i ++ ) {
if ( factorCount [ i ] > max ) {
max = factorCount [ i ];
num = i;
}
}
return num;
}
int f_filled ( int m, int n ) {}
int num = m;
for ( int i = m;
i <= n;
i ++ ) {
if ( factorCount [ i ] > max ) {
max = factorCount [ i ];
num = i;
}
}
return num;
}
int f_filled ( int m, int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {21,92,1,51,97,74,18,45,31,23};
int param1[] = {6,53,60,85,72,17,37,75,47,87};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len [MASK] arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int m, int n ) { long long factorCount [ n + 1 ]; bool prime [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) { factorCount [ i ] = 0; prime [ i ] = true; } for ( int i = 2; i <= n; i ++ ) { if ( prime [ i ] == true ) { factorCount [ i ] = 1; for ( int j = i * 2; j <= n; j += i ) { factorCount [ j ] ++; prime [ j ] = false; } } } int max = factorCount [ m ]; int num = m; for ( int i = m; i <= n; i ++ ) { if ( factorCount [ i ] > max ) { max = factorCount [ i ]; num = i; } } return num; } int f_filled ( int m, int n ) {} int num = m;
for ( int i = m;
i <= n;
i ++ ) {
if ( factorCount [ i ] > max ) {
max = factorCount [ i ];
num = i;
}
}
return num;
}
int f_filled ( int m, int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {21,92,1,51,97,74,18,45,31,23};
int param1[] = {6,53,60,85,72,17,37,75,47,87};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | (int | [
"a) int",
"b) =",
"c) ((int)",
"d) ]",
"e) (int"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
if ( n == 1 ) return 2;
return 2 * f_gold ( n - 1 );
}
int f_filled ( int n ) {}
of (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
if ( n == 1 ) return 2;
return 2 * f_gold ( n - 1 );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {72,28,45,41,94,97,97,36,91,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> [MASK] <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { if ( n == 1 ) return 2; return 2 * f_gold ( n - 1 ); } int f_filled ( int n ) {}of (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
if ( n == 1 ) return 2;
return 2 * f_gold ( n - 1 );
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {72,28,45,41,94,97,97,36,91,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 | [
"a) unlock_code",
"b) )",
"c) )",
"d) #include",
"e) javafx.util.Pair;"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int arr [ ], int n ) {
if ( n == 0 || n == 1 ) return true;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false;
return true;
}
bool f_filled ( int arr [ ], int n ) {}
[ ], int n ) {
if ( n == 0 || n == 1 ) return true;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false;
return true;
}
bool f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {6,8,8,16,19,19,21,23,26,33,34,36,38,39,41,41,45,47,52,52,55,57,60,60,60,61,69,69,70,70,72,73,73,75,78,81,84,84,85,88,88,89,90,91,97};
int param0_1[] = {2,-90,66,24,-18,70,34,18,84,-62};
int param0_2[] = {1,1};
int param0_3[] = {12,88,65,82,23,39,60,27,57,44,70,28,23,34,25,11,48,65,10,73,26,10,18,60,73,45,26,9,36,15,24,40,2,4,95,20,39,45};
int param0_4[] = {-38,38,40,72};
int param0_5[] = {1,0,0,0,1};
int param0_6[] = {11,15,16,17,17,17,22,23,23,25,27,28,28,31,33,36,38,40,42,44,46,49,51,51,52,60,62,65,67,71,74,77,77,78,78,79,83,83,86,86,87,87,87,88,91,92,97,97,97};
int param0_7[] = {-26,-90,-78,-76,-58,-64,-72,-34,-58,-48,78,-50,-30,26,-60,26};
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};
int param0_9[] = {56,51,63,30,10,88,23,1,48,4,28,44};
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,9,1,23,2,3,44,9,23,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);} bool f_gold ( int arr [ ], int n ) { if ( n == 0 || n == 1 ) return true; for ( int i = [MASK] i < n; i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false; return true; } bool f_filled ( int arr [ ], int n ) {} [ ], int n ) {
if ( n == 0 || n == 1 ) return true;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false;
return true;
}
bool f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {6,8,8,16,19,19,21,23,26,33,34,36,38,39,41,41,45,47,52,52,55,57,60,60,60,61,69,69,70,70,72,73,73,75,78,81,84,84,85,88,88,89,90,91,97};
int param0_1[] = {2,-90,66,24,-18,70,34,18,84,-62};
int param0_2[] = {1,1};
int param0_3[] = {12,88,65,82,23,39,60,27,57,44,70,28,23,34,25,11,48,65,10,73,26,10,18,60,73,45,26,9,36,15,24,40,2,4,95,20,39,45};
int param0_4[] = {-38,38,40,72};
int param0_5[] = {1,0,0,0,1};
int param0_6[] = {11,15,16,17,17,17,22,23,23,25,27,28,28,31,33,36,38,40,42,44,46,49,51,51,52,60,62,65,67,71,74,77,77,78,78,79,83,83,86,86,87,87,87,88,91,92,97,97,97};
int param0_7[] = {-26,-90,-78,-76,-58,-64,-72,-34,-58,-48,78,-50,-30,26,-60,26};
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};
int param0_9[] = {56,51,63,30,10,88,23,1,48,4,28,44};
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,9,1,23,2,3,44,9,23,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;
} | 1; | [
"a) <limits.h>",
"b) 1;",
"c) s",
"d) pro",
"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 n, int k ) {
int p = 1;
if ( k % 2 ) p = - 1;
return ( pow ( n - 1, k ) + p * ( n - 1 ) ) / n;
}
int f_filled ( int n, int k ) {}
) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int k ) {
int p = 1;
if ( k % 2 ) p = - 1;
return ( pow ( n - 1, k ) + p * ( n - 1 ) ) / n;
}
int f_filled ( int n, int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {27,70,77,83,16,90,39,48,56,10};
int param1[] = {59,87,40,26,2,66,72,26,77,47};
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 ) { int p = 1; if ( k % 2 ) p = - 1; return ( pow [MASK] n - 1, k ) + p * ( n - 1 ) ) / n; } int f_filled ( int n, int k ) {}) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int k ) {
int p = 1;
if ( k % 2 ) p = - 1;
return ( pow ( n - 1, k ) + p * ( n - 1 ) ) / n;
}
int f_filled ( int n, int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {27,70,77,83,16,90,39,48,56,10};
int param1[] = {59,87,40,26,2,66,72,26,77,47};
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) #include",
"c) int",
"d) (",
"e) for"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int N, int K ) {
sort ( arr, arr + N );
int res = INT_MAX;
for ( int i = 0;
i <= ( N - K );
i ++ ) {
int curSeqDiff = arr [ i + K - 1 ] - arr [ i ];
res = min ( res, curSeqDiff );
}
return res;
}
int f_filled ( int arr [ ], int N, int K ) {}
( int i = 0;
i <= ( N - K );
i ++ ) {
int curSeqDiff = arr [ i + K - 1 ] - arr [ i ];
res = min ( res, curSeqDiff );
}
return res;
}
int f_filled ( int arr [ ], int N, int K ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,1,4,18,21,35,37,39,76,81,86,92,96};
int param0_1[] = {-8,-6,62,52,-86,2,-94,0,-48,-38,24,-48,34};
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};
int param0_3[] = {23,36,43,50,74,81,94,13,30,57,30,71,10,99,66,94,83,39,37,3,89,34};
int param0_4[] = {-96,-94,-92,-84,-80,-72,-24,-22,-18,-14,6,8,26,28,30,36,50,58,80,84,92,92};
int param0_5[] = {0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,1};
int param0_6[] = {6,7,9,27,30,42,54,55,57,57,59,76,84,84,84};
int param0_7[] = {88,44,-96,-72,-80,0,-64,-64,-68,4,38,4,-38,68,-54,92,-16,62,24,54,0,54,62,-70,80,-12,84,-16,-10,88,-30,-56,48,50,-24,94,40,28,-86,-12};
int param0_8[] = {0,1};
int param0_9[] = {89,18,7,54,67,93,10,61,59,59,69,63,98,8,78,55,6,1,56,97,75,88,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[] = {7,9,16,17,21,21,13,31,1,22};
int param2[] = {6,12,26,20,12,22,14,26,1,14};
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 [ [MASK] int N, int K ) { sort ( arr, arr + N ); int res = INT_MAX; for ( int i = 0; i <= ( N - K ); i ++ ) { int curSeqDiff = arr [ i + K - 1 ] - arr [ i ]; res = min ( res, curSeqDiff ); } return res; } int f_filled ( int arr [ ], int N, int K ) {} ( int i = 0;
i <= ( N - K );
i ++ ) {
int curSeqDiff = arr [ i + K - 1 ] - arr [ i ];
res = min ( res, curSeqDiff );
}
return res;
}
int f_filled ( int arr [ ], int N, int K ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,1,4,18,21,35,37,39,76,81,86,92,96};
int param0_1[] = {-8,-6,62,52,-86,2,-94,0,-48,-38,24,-48,34};
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};
int param0_3[] = {23,36,43,50,74,81,94,13,30,57,30,71,10,99,66,94,83,39,37,3,89,34};
int param0_4[] = {-96,-94,-92,-84,-80,-72,-24,-22,-18,-14,6,8,26,28,30,36,50,58,80,84,92,92};
int param0_5[] = {0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,1};
int param0_6[] = {6,7,9,27,30,42,54,55,57,57,59,76,84,84,84};
int param0_7[] = {88,44,-96,-72,-80,0,-64,-64,-68,4,38,4,-38,68,-54,92,-16,62,24,54,0,54,62,-70,80,-12,84,-16,-10,88,-30,-56,48,50,-24,94,40,28,-86,-12};
int param0_8[] = {0,1};
int param0_9[] = {89,18,7,54,67,93,10,61,59,59,69,63,98,8,78,55,6,1,56,97,75,88,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[] = {7,9,16,17,21,21,13,31,1,22};
int param2[] = {6,12,26,20,12,22,14,26,1,14};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | ], | [
"a) return",
"b) [",
"c) charAt",
"d) a",
"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);}
char f_gold [] ( char str [] ) {
char mx [] = "";
for ( int i = 0;
i < strlen(str);
++ i ) mx = max ( mx, str . substr ( i ) );
return mx;
}
char f_filled [] ( char str [] ) {}
func);}
char f_gold [] ( char str [] ) {
char mx [] = "";
for ( int i = 0;
i < strlen(str);
++ i ) mx = max ( mx, str . substr ( i ) );
return mx;
}
char f_filled [] ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"HCoAefoaan","80336005","01111111110","qIH","4210598472796","10101","imqmKdatcgXjs","950509666021","10111101101","wasqgYFvz"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} char f_gold [] ( char str [] ) { char mx [] = ""; for ( int i = 0; i < strlen(str); ++ i ) mx = max ( mx, str . substr ( i ) ); return mx; } [MASK] f_filled [] ( char str [] ) {}func);}
char f_gold [] ( char str [] ) {
char mx [] = "";
for ( int i = 0;
i < strlen(str);
++ i ) mx = max ( mx, str . substr ( i ) );
return mx;
}
char f_filled [] ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"HCoAefoaan","80336005","01111111110","qIH","4210598472796","10101","imqmKdatcgXjs","950509666021","10111101101","wasqgYFvz"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | char | [
"a) max",
"b) char",
"c) using",
"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);}
long f_gold ( int n, int k ) {
long total = k;
int mod = 1000000007;
int same = 0, diff = k;
for ( int i = 2;
i <= n;
i ++ ) {
same = diff;
diff = total * ( k - 1 );
diff = diff % mod;
total = ( same + diff ) % mod;
}
return total;
}
long f_filled ( int n, int k ) {}
( int i = 2;
i <= n;
i ++ ) {
same = diff;
diff = total * ( k - 1 );
diff = diff % mod;
total = ( same + diff ) % mod;
}
return total;
}
long f_filled ( int n, int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {6,23,89,63,23,44,81,43,9,41};
int param1[] = {30,87,31,36,68,66,18,73,42,98};
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 f_gold ( int n, int k ) { long total = k; int mod = 1000000007; int same = 0, diff = k; for ( int i [MASK] 2; i <= n; i ++ ) { same = diff; diff = total * ( k - 1 ); diff = diff % mod; total = ( same + diff ) % mod; } return total; } long f_filled ( int n, int k ) {} ( int i = 2;
i <= n;
i ++ ) {
same = diff;
diff = total * ( k - 1 );
diff = diff % mod;
total = ( same + diff ) % mod;
}
return total;
}
long f_filled ( int n, int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {6,23,89,63,23,44,81,43,9,41};
int param1[] = {30,87,31,36,68,66,18,73,42,98};
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) #include",
"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 ( char tree [], int k ) {
int level = - 1;
int product = 1;
int n = strlen(tree);
for ( int i = 0;
i < n;
i ++ ) {
if ( tree [ i ] == '(' ) level ++;
else if ( tree [ i ] == ')' ) level --;
else {
if ( level == k ) product *= ( tree [ i ] - '0' );
}
}
return product;
}
int f_filled ( char tree [], int k ) {}
' ) level ++;
else if ( tree [ i ] == ')' ) level --;
else {
if ( level == k ) product *= ( tree [ i ] - '0' );
}
}
return product;
}
int f_filled ( char tree [], int k ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {
"(0(5(6()())(4()(9()())))(7(1()())(3()())))",
"(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))",
"(0(5(6()())(4()(9()())))(7(1()())(3()())))",
"(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))",
"(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))",
"(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))",
"(0(5(6()())(4()(9()())))(7(1()())(3()())))",
"(0(5(6()())(4()(9()())))(7(1()())(3()())))",
"0010",
"kjtdgmy"};
int param1[] = {2,3,1,2,4,100,3,0,12,97};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) [MASK] return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char tree [], int k ) { int level = - 1; int product = 1; int n = strlen(tree); for ( int i = 0; i < n; i ++ ) { if ( tree [ i ] == '(' ) level ++; else if ( tree [ i ] == ')' ) level --; else { if ( level == k ) product *= ( tree [ i ] - '0' ); } } return product; } int f_filled ( char tree [], int k ) {}' ) level ++;
else if ( tree [ i ] == ')' ) level --;
else {
if ( level == k ) product *= ( tree [ i ] - '0' );
}
}
return product;
}
int f_filled ( char tree [], int k ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {
"(0(5(6()())(4()(9()())))(7(1()())(3()())))",
"(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))",
"(0(5(6()())(4()(9()())))(7(1()())(3()())))",
"(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))",
"(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))",
"(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))",
"(0(5(6()())(4()(9()())))(7(1()())(3()())))",
"(0(5(6()())(4()(9()())))(7(1()())(3()())))",
"0010",
"kjtdgmy"};
int param1[] = {2,3,1,2,4,100,3,0,12,97};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | { | [
"a) y)?",
"b) max",
"c) ;",
"d) y)?",
"e) {"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a, int b, int d ) {
int temp = a;
a = min ( a, b );
b = max ( temp, b );
if ( d >= b ) return ( d + b - 1 ) / b;
if ( d == 0 ) return 0;
if ( d == a ) return 1;
return 2;
}
int f_filled ( int a, int b, int d ) {}
= a;
a = min ( a, b );
b = max ( temp, b );
if ( d >= b ) return ( d + b - 1 ) / b;
if ( d == 0 ) return 0;
if ( d == a ) return 1;
return 2;
}
int f_filled ( int a, int b, int d ) {}
int main(void) {
int n_success = 0;
int param0[] = {35,85,22,8,12,58,65,10,23,5};
int param1[] = {8,55,23,43,64,25,4,95,13,50};
int param2[] = {77,33,64,29,11,26,28,55,54,71};
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 );} [MASK] len (int 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 d ) { int temp = a; a = min ( a, b ); b = max ( temp, b ); if ( d >= b ) return ( d + b - 1 ) / b; if ( d == 0 ) return 0; if ( d == a ) return 1; return 2; } int f_filled ( int a, int b, int d ) {}= a;
a = min ( a, b );
b = max ( temp, b );
if ( d >= b ) return ( d + b - 1 ) / b;
if ( d == 0 ) return 0;
if ( d == a ) return 1;
return 2;
}
int f_filled ( int a, int b, int d ) {}
int main(void) {
int n_success = 0;
int param0[] = {35,85,22,8,12,58,65,10,23,5};
int param1[] = {8,55,23,43,64,25,4,95,13,50};
int param2[] = {77,33,64,29,11,26,28,55,54,71};
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) ]",
"c) {",
"d) import",
"e) nextHigherOneBit"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int n, int p ) {
n = n % p;
for ( int x = 2;
x < p;
x ++ ) if ( ( x * x ) % p == n ) return true;
return false;
}
bool f_filled ( int n, int p ) {}
izeof(int), cmpfunc);}
bool f_gold ( int n, int p ) {
n = n % p;
for ( int x = 2;
x < p;
x ++ ) if ( ( x * x ) % p == n ) return true;
return false;
}
bool f_filled ( int n, int p ) {}
int main(void) {
int n_success = 0;
int param0[] = {71,85,4,20,71,72,36,95,83,72};
int param1[] = {78,75,35,99,29,88,54,52,33,13};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int n, int p ) { n = n % p; for ( int x = 2; x < p; x ++ ) if ( ( [MASK] * x ) % p == n ) return true; return false; } bool f_filled ( int n, int p ) {}izeof(int), cmpfunc);}
bool f_gold ( int n, int p ) {
n = n % p;
for ( int x = 2;
x < p;
x ++ ) if ( ( x * x ) % p == n ) return true;
return false;
}
bool f_filled ( int n, int p ) {}
int main(void) {
int n_success = 0;
int param0[] = {71,85,4,20,71,72,36,95,83,72};
int param1[] = {78,75,35,99,29,88,54,52,33,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;
} | x | [
"a) ;",
"b) return",
"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);}
int f_gold ( int num ) {
if ( num < 0 ) return f_gold ( - num );
if ( num == 0 || num == 7 ) return 1;
if ( num < 10 ) return 0;
return f_gold ( num / 10 - 2 * ( num - num / 10 * 10 ) );
}
int f_filled ( int num ) {}
( num < 0 ) return f_gold ( - num );
if ( num == 0 || num == 7 ) return 1;
if ( num < 10 ) return 0;
return f_gold ( num / 10 - 2 * ( num - num / 10 * 10 ) );
}
int f_filled ( int num ) {}
int main(void) {
int n_success = 0;
int param0[] = {0,-21,7,63,84,73,81,-10,47,23};
for(int i = 0; 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 num ) { if ( num < 0 ) return f_gold ( - num ); if ( [MASK] == 0 || num == 7 ) return 1; if ( num < 10 ) return 0; return f_gold ( num / 10 - 2 * ( num - num / 10 * 10 ) ); } int f_filled ( int num ) {} ( num < 0 ) return f_gold ( - num );
if ( num == 0 || num == 7 ) return 1;
if ( num < 10 ) return 0;
return f_gold ( num / 10 - 2 * ( num - num / 10 * 10 ) );
}
int f_filled ( int num ) {}
int main(void) {
int n_success = 0;
int param0[] = {0,-21,7,63,84,73,81,-10,47,23};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | num | [
"a) DIVISIBILITY_BY_7{",
"b) javafx.util.Pair;",
"c) min_len",
"d) num",
"e) 5"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
if ( n <= 0 ) return 0;
int incl = arr [ 0 ];
int excl = 0;
for ( int i = 1;
i < n;
i ++ ) {
int incl_new = arr [ i ] + min ( excl, incl );
int excl_new = incl;
incl = incl_new;
excl = excl_new;
}
return min ( incl, excl );
}
int f_filled ( int arr [ ], int n ) {}
) {
int incl_new = arr [ i ] + min ( excl, incl );
int excl_new = incl;
incl = incl_new;
excl = excl_new;
}
return min ( incl, excl );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,17,25,27,29,30,34,49,72,75,90,93,93,94};
int param0_1[] = {-70,-32,62,0,-10,92,-94,-86,52,6,-26,-92,-10,70,-82,28,86,58,86,-58,84,-80,-18,-92,-34,6,34,36,70,-50,-6,-54,84,22,30,-96,-84,72,2,26,-20,4,48,-98,62,-28,-68};
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[] = {34,40,92,35,29,26,12,66,7,28,86,4,35,79,1,48,41,47,15,75,45,6,3,94,39,50,20,8,58,51,83,44,53,76,19,84,68,54,36,53};
int param0_4[] = {-98,-98,-92,-92,-88,-82,-74,-70,-68,-68,-64,-60,-52,-52,-42,-42,-38,-36,-36,-34,-26,-24,-22,-12,-2,-2,4,6,44,44,48,54,62,62,64,74,78,82,86,86,90,90,94};
int param0_5[] = {1,1,0,0,1,0,0,1,1,1};
int param0_6[] = {9,15,19,29,30,39,40,61};
int param0_7[] = {92,0,46,70,-60,-50,58,-56,8,-90,84,16,40,-62,50,78,26,-42,-40,98,-52,62,16,-62,-76,-70,-60,32,4,-68,52,-64,70,12,-10};
int param0_8[] = {0,0,0,1,1,1,1};
int param0_9[] = {32,96,63,93,53,1,22,19,50,74,6,94,81,85,4,86,88,75,94};
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,36,21,29,36,5,4,21,5,18};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { if ( n <= 0 ) return 0; int incl = arr [ 0 ]; int excl = 0; for ( int i = 1; i < n; i ++ ) { int incl_new = arr [ i ] + min ( excl, incl ); int excl_new = incl; incl = incl_new; excl = excl_new; } return min ( incl, [MASK] ); } int f_filled ( int arr [ ], int n ) {}) {
int incl_new = arr [ i ] + min ( excl, incl );
int excl_new = incl;
incl = incl_new;
excl = excl_new;
}
return min ( incl, excl );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,17,25,27,29,30,34,49,72,75,90,93,93,94};
int param0_1[] = {-70,-32,62,0,-10,92,-94,-86,52,6,-26,-92,-10,70,-82,28,86,58,86,-58,84,-80,-18,-92,-34,6,34,36,70,-50,-6,-54,84,22,30,-96,-84,72,2,26,-20,4,48,-98,62,-28,-68};
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[] = {34,40,92,35,29,26,12,66,7,28,86,4,35,79,1,48,41,47,15,75,45,6,3,94,39,50,20,8,58,51,83,44,53,76,19,84,68,54,36,53};
int param0_4[] = {-98,-98,-92,-92,-88,-82,-74,-70,-68,-68,-64,-60,-52,-52,-42,-42,-38,-36,-36,-34,-26,-24,-22,-12,-2,-2,4,6,44,44,48,54,62,62,64,74,78,82,86,86,90,90,94};
int param0_5[] = {1,1,0,0,1,0,0,1,1,1};
int param0_6[] = {9,15,19,29,30,39,40,61};
int param0_7[] = {92,0,46,70,-60,-50,58,-56,8,-90,84,16,40,-62,50,78,26,-42,-40,98,-52,62,16,-62,-76,-70,-60,32,4,-68,52,-64,70,12,-10};
int param0_8[] = {0,0,0,1,1,1,1};
int param0_9[] = {32,96,63,93,53,1,22,19,50,74,6,94,81,85,4,86,88,75,94};
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,36,21,29,36,5,4,21,5,18};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | excl | [
"a) excl",
"b) 1",
"c) ;",
"d) [",
"e) y;"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n );
int count = 1;
for ( int i = 0;
i < n - 1;
i ++ ) {
if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++;
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
sort ( arr, arr + n );
int count = 1;
for ( int i = 0;
i < n - 1;
i ++ ) {
if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++;
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,7,7,11,14,14,14,16,17,17,21,22,24,27,27,27,31,33,35,36,36,37,38,43,45,49,52,54,57,59,59,60,67,73,74,74,74,75,75,79,83,87,90,93,97};
int param0_1[] = {-28,72,60,62,40,64,50,-36,-24,40,-6,78,-80,-82,2,-30,70,94,-2,-30,92,12,-46,32,-96,-2,36,-40,-42,66,98};
int param0_2[] = {1,1};
int param0_3[] = {96,89,24,28,70,78,78,35,98,65,18,81,35,91,33,88,69,52,66,17,73,79,30,33,78,60,42,8,36,6,47,87,8,98,9,77,78,24,86,91,13,79,50,85,3,7,61,94,86};
int param0_4[] = {-92,-92,-90,-84,-78,-66,-60,-60,-46,-42,-38,-32,-24,-20,-18,-16,-14,-10,0,4,6,12,24,32,34,44,48,50,50,64,66,68,80,84,86,86,88,90,90,90,92,94,96,98,98};
int param0_5[] = {0,1,1,0,1,0,0,1,0,0,1,0,0,1,1,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,0};
int param0_6[] = {8,12,13,14,16,20,20,21,23,23,24,27,29,29,29,29,35,35,38,39,40,46,50,52,60,62,62,65,65,65,70,71,72,73,75,76,80,81,82,83,85,91,95,97,98,98};
int param0_7[] = {-84,92,70,-46,26,-94,-82,-26,-90,-62,52,62,-58,44,-14,-6,58,2,10,76,-34,42,-26,80,26,32,-82,38,2,72,68,44,24,84,-32,54,-96,-8,36,80,-82,32,98,-68};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {64,10,6,3,67,95,72,96,72,30,99,21,46,23,48,38,48,50,53,91,59,58,27,95,63,20,27,22,58,3,11,75,77,64,46,1,67,79,6,46,57,79,49,83,21,36,44};
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[] = {42,24,1,26,42,27,29,25,21,46};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include [MASK] #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int count = 1; for ( int i = 0; i < n - 1; i ++ ) { if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++; } return count; } int f_filled ( int arr [ ], int n ) {}sort ( arr, arr + n );
int count = 1;
for ( int i = 0;
i < n - 1;
i ++ ) {
if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++;
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,7,7,11,14,14,14,16,17,17,21,22,24,27,27,27,31,33,35,36,36,37,38,43,45,49,52,54,57,59,59,60,67,73,74,74,74,75,75,79,83,87,90,93,97};
int param0_1[] = {-28,72,60,62,40,64,50,-36,-24,40,-6,78,-80,-82,2,-30,70,94,-2,-30,92,12,-46,32,-96,-2,36,-40,-42,66,98};
int param0_2[] = {1,1};
int param0_3[] = {96,89,24,28,70,78,78,35,98,65,18,81,35,91,33,88,69,52,66,17,73,79,30,33,78,60,42,8,36,6,47,87,8,98,9,77,78,24,86,91,13,79,50,85,3,7,61,94,86};
int param0_4[] = {-92,-92,-90,-84,-78,-66,-60,-60,-46,-42,-38,-32,-24,-20,-18,-16,-14,-10,0,4,6,12,24,32,34,44,48,50,50,64,66,68,80,84,86,86,88,90,90,90,92,94,96,98,98};
int param0_5[] = {0,1,1,0,1,0,0,1,0,0,1,0,0,1,1,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,0};
int param0_6[] = {8,12,13,14,16,20,20,21,23,23,24,27,29,29,29,29,35,35,38,39,40,46,50,52,60,62,62,65,65,65,70,71,72,73,75,76,80,81,82,83,85,91,95,97,98,98};
int param0_7[] = {-84,92,70,-46,26,-94,-82,-26,-90,-62,52,62,-58,44,-14,-6,58,2,10,76,-34,42,-26,80,26,32,-82,38,2,72,68,44,24,84,-32,54,-96,-8,36,80,-82,32,98,-68};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {64,10,6,3,67,95,72,96,72,30,99,21,46,23,48,38,48,50,53,91,59,58,27,95,63,20,27,22,58,3,11,75,77,64,46,1,67,79,6,46,57,79,49,83,21,36,44};
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[] = {42,24,1,26,42,27,29,25,21,46};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | <stdlib.h> | [
"a) {",
"b) y;",
"c) x",
"d) <stdlib.h>",
"e) return"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int p ) {
int first = 1, second = 1, number = 2, next = 1;
while ( next ) {
next = ( first + second ) % p;
first = second;
second = next;
number ++;
}
return number;
}
int f_filled ( int p ) {}
= 1, second = 1, number = 2, next = 1;
while ( next ) {
next = ( first + second ) % p;
first = second;
second = next;
number ++;
}
return number;
}
int f_filled ( int p ) {}
int main(void) {
int n_success = 0;
int param0[] = {51,40,68,7,8,32,93,75,71,15};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int p ) { int first = 1, second = 1, number = 2, next = [MASK] while ( next ) { next = ( first + second ) % p; first = second; second = next; number ++; } return number; } int f_filled ( int p ) {}= 1, second = 1, number = 2, next = 1;
while ( next ) {
next = ( first + second ) % p;
first = second;
second = next;
number ++;
}
return number;
}
int f_filled ( int p ) {}
int main(void) {
int n_success = 0;
int param0[] = {51,40,68,7,8,32,93,75,71,15};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | 1; | [
"a) 1;",
"b) k,",
"c) 0",
"d) ]",
"e) i"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( string & X, string & Y ) {
int m = strlen(X), n = strlen(Y);
int L [ 2 ] [ n + 1 ];
bool bi;
for ( int i = 0;
i <= m;
i ++ ) {
bi = i & 1;
for ( int j = 0;
j <= n;
j ++ ) {
if ( i == 0 || j == 0 ) L [ bi ] [ j ] = 0;
else if ( X [ i - 1 ] == Y [ j - 1 ] ) L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1;
else L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ], L [ bi ] [ j - 1 ] );
}
}
return L [ bi ] [ n ];
}
int f_filled ( string & X, string & Y ) {}
i ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1;
else L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ], L [ bi ] [ j - 1 ] );
}
}
return L [ bi ] [ n ];
}
int f_filled ( string & X, string & Y ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"YNpjSv","736519","11010000100010","v ","8311172","100011101011","u","3943042","101","MpbfF OsizevaM"};
char param1[][100] = {"qtUkJn","07592","0","qGBQT","157219329531","1000001111","YzkubTqLhP","3859","00010000101010","WgsFGaQwtp"};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( string & X, string & Y ) { int m = strlen(X), n = strlen(Y); int L [ 2 ] [ n + 1 ]; bool bi; for ( int i = 0; i <= m; i ++ ) { bi [MASK] i & 1; for ( int j = 0; j <= n; j ++ ) { if ( i == 0 || j == 0 ) L [ bi ] [ j ] = 0; else if ( X [ i - 1 ] == Y [ j - 1 ] ) L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1; else L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ], L [ bi ] [ j - 1 ] ); } } return L [ bi ] [ n ]; } int f_filled ( string & X, string & Y ) {}i ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1;
else L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ], L [ bi ] [ j - 1 ] );
}
}
return L [ bi ] [ n ];
}
int f_filled ( string & X, string & Y ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"YNpjSv","736519","11010000100010","v ","8311172","100011101011","u","3943042","101","MpbfF OsizevaM"};
char param1[][100] = {"qtUkJn","07592","0","qGBQT","157219329531","1000001111","YzkubTqLhP","3859","00010000101010","WgsFGaQwtp"};
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) b",
"c) =",
"d) return",
"e) int"
] | 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 ) {
if ( n <= 1 ) return false;
for ( int i = 2;
i < n;
i ++ ) if ( n % i == 0 ) return false;
return true;
}
bool f_filled ( int n ) {}
n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
if ( n <= 1 ) return false;
for ( int i = 2;
i < n;
i ++ ) if ( n % i == 0 ) return false;
return true;
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {37,39,73,8,28,66,20,36,6,51};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | [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);} bool f_gold ( int n ) { if ( n <= 1 ) return false; for ( int i = 2; i < n; i ++ ) if ( n % i == 0 ) return false; return true; } bool f_filled ( int n ) {} n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
if ( n <= 1 ) return false;
for ( int i = 2;
i < n;
i ++ ) if ( n % i == 0 ) return false;
return true;
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {37,39,73,8,28,66,20,36,6,51};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include | [
"a) #include",
"b) )",
"c) :",
"d) int",
"e) return"
] | 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 halfSum = 0;
for ( int i = 0;
i < n;
i ++ ) halfSum = halfSum + arr [ i ];
halfSum = halfSum / 2;
sort ( arr, arr + n, greater < int > ( ) );
int res = 0, curr_sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
curr_sum += arr [ i ];
res ++;
if ( curr_sum > halfSum ) return res;
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
0, curr_sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
curr_sum += arr [ i ];
res ++;
if ( curr_sum > halfSum ) return res;
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {48,82};
int param0_1[] = {-28,66,78,70,-24,-20,-76,-42,42,-42,92,50,-26,58,80,32,24,-42,36,96,98,48,96,76,88};
int param0_2[] = {0,0,0,1,1};
int param0_3[] = {55,17,45,65,56,70,52,61,94,61,35};
int param0_4[] = {-54};
int param0_5[] = {1,0,1,0,1,0,0,0,0,1,0,0,0};
int param0_6[] = {8,10,11,13,17,18,21,24,26,32,36,41,46,51,56,58,60,82,90,95,97};
int param0_7[] = {46,-90,12,18,-72,-10,50,2,16,90,42,-22,70,14,-42,50,-74,-12,-20,-14,78,0};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {75,45,8,98,26,21,52,50,24,96,82,26,41,51,16,41,52,57,84,51,59,79,68,40,16,76,35,26,73,80,59,79,84,3,5,40,55,77,48,93,71,53,72,27,73,96,36,36,39};
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,16,4,9,0,12,13,18,19,34};
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 [MASK] = 0; for ( int i = 0; i < n; i ++ ) halfSum = halfSum + arr [ i ]; halfSum = halfSum / 2; sort ( arr, arr + n, greater < int > ( ) ); int res = 0, curr_sum = 0; for ( int i = 0; i < n; i ++ ) { curr_sum += arr [ i ]; res ++; if ( curr_sum > halfSum ) return res; } return res; } int f_filled ( int arr [ ], int n ) {}0, curr_sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
curr_sum += arr [ i ];
res ++;
if ( curr_sum > halfSum ) return res;
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {48,82};
int param0_1[] = {-28,66,78,70,-24,-20,-76,-42,42,-42,92,50,-26,58,80,32,24,-42,36,96,98,48,96,76,88};
int param0_2[] = {0,0,0,1,1};
int param0_3[] = {55,17,45,65,56,70,52,61,94,61,35};
int param0_4[] = {-54};
int param0_5[] = {1,0,1,0,1,0,0,0,0,1,0,0,0};
int param0_6[] = {8,10,11,13,17,18,21,24,26,32,36,41,46,51,56,58,60,82,90,95,97};
int param0_7[] = {46,-90,12,18,-72,-10,50,2,16,90,42,-22,70,14,-42,50,-74,-12,-20,-14,78,0};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {75,45,8,98,26,21,52,50,24,96,82,26,41,51,16,41,52,57,84,51,59,79,68,40,16,76,35,26,73,80,59,79,84,3,5,40,55,77,48,93,71,53,72,27,73,96,36,36,39};
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,16,4,9,0,12,13,18,19,34};
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;
} | halfSum | [
"a) )",
"b) )",
"c) int",
"d) halfSum",
"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 n ) {
int i;
long long int s = 0;
for ( i = 0;
i < n;
i ++ ) s += ( a [ i ] + b [ i ] );
if ( n == 1 ) return a [ 0 ] + b [ 0 ];
if ( s % n != 0 ) return - 1;
int x = s / n;
for ( i = 0;
i < n;
i ++ ) {
if ( a [ i ] > x ) return - 1;
if ( i > 0 ) {
a [ i ] += b [ i - 1 ];
b [ i - 1 ] = 0;
}
if ( a [ i ] == x ) continue;
int y = a [ i ] + b [ i ];
if ( i + 1 < n ) y += b [ i + 1 ];
if ( y == x ) {
a [ i ] = y;
b [ i ] = b [ i + 1 ] = 0;
continue;
}
if ( a [ i ] + b [ i ] == x ) {
a [ i ] += b [ i ];
b [ i ] = 0;
continue;
}
if ( i + 1 < n && a [ i ] + b [ i + 1 ] == x ) {
a [ i ] += b [ i + 1 ];
b [ i + 1 ] = 0;
continue;
}
return - 1;
}
for ( i = 0;
i < n;
i ++ ) if ( b [ i ] != 0 ) return - 1;
return x;
}
int f_filled ( int a [ ], int b [ ], int n ) {}
];
b [ i + 1 ] = 0;
continue;
}
return - 1;
}
for ( i = 0;
i < n;
i ++ ) if ( b [ i ] != 0 ) return - 1;
return x;
}
int f_filled ( int a [ ], int b [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,9,16,18,20,23,24,25,25,26,29,30,35,40,41,43,44,46,53,53,56,56,58,60,62,70,80,80,80,82,86,90,92,92,95};
int param0_1[] = {-24,70,-74,-90,72,50,-94,86,-58,-68,42,0,98,-70,-14,-32,6,74,64,-78,86,-42,-56,2,-34,-46,70,-62,50,-58,-58,42,86,96,-8,8,-22,-14,-14,98,2,98,-28};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_3[] = {98,18,50,36,88,75,2,40,74,19,63,82,77,5,59,97,70,50,71,90,90,61,63,99};
int param0_4[] = {-80,-64,-64,-64,-64,-62,-54,-48,-44,-44,-38,-30,-30,-26,-14,-12,-10,-6,-6,6,22,22,22,26,28,50,52,70,86,86,88,90};
int param0_5[] = {0,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,0,0,1,1,0,0,1};
int param0_6[] = {59,61,64};
int param0_7[] = {98,92,28,42,-74,-36,40,-8,32,-22,-70,-22,-56,74,6,6,-62,46,34,2};
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};
int param0_9[] = {72,97,79,21,83,2,31,59,6,11,79,97};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {3,15,16,16,18,26,30,32,32,35,37,41,42,43,48,49,49,54,55,57,65,66,67,67,68,83,85,89,89,90,91,93,96,97,99};
int param1_1[] = {-26,36,48,48,-38,-86,90,-62,30,-4,82,16,32,-6,58,82,-66,-40,52,-78,94,-70,-80,-68,-58,-26,50,-78,-90,-48,-28,48,56,50,72,-22,-2,8,-94,92,-44,-66,-30};
int param1_2[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
int param1_3[] = {93,25,16,42,55,61,69,68,95,28,40,90,1,86,76,40,13,47,71,4,64,54,84,45};
int param1_4[] = {-96,-94,-80,-74,-64,-56,-52,-32,-30,-24,-12,-12,-8,-2,4,8,16,20,24,24,24,48,50,54,60,64,74,80,88,90,92,92};
int param1_5[] = {1,1,1,0,1,1,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1};
int param1_6[] = {22,59,85};
int param1_7[] = {-62,-84,72,60,10,-18,-44,-22,14,0,76,72,96,-28,-24,52,-74,-30,16,66};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_9[] = {27,71,87,36,73,37,80,34,57,17,88,52};
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[] = {29,34,13,16,22,20,1,18,34,9};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int 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 n ) { int i; long long int s = 0; for ( i = 0; i < n; i ++ ) s += ( a [ i ] + b [ i ] ); if ( n == 1 ) return a [ 0 ] + b [ 0 ]; if ( s % n != 0 ) return - 1; [MASK] x = s / n; for ( i = 0; i < n; i ++ ) { if ( a [ i ] > x ) return - 1; if ( i > 0 ) { a [ i ] += b [ i - 1 ]; b [ i - 1 ] = 0; } if ( a [ i ] == x ) continue; int y = a [ i ] + b [ i ]; if ( i + 1 < n ) y += b [ i + 1 ]; if ( y == x ) { a [ i ] = y; b [ i ] = b [ i + 1 ] = 0; continue; } if ( a [ i ] + b [ i ] == x ) { a [ i ] += b [ i ]; b [ i ] = 0; continue; } if ( i + 1 < n && a [ i ] + b [ i + 1 ] == x ) { a [ i ] += b [ i + 1 ]; b [ i + 1 ] = 0; continue; } return - 1; } for ( i = 0; i < n; i ++ ) if ( b [ i ] != 0 ) return - 1; return x; } int f_filled ( int a [ ], int b [ ], int n ) {} ];
b [ i + 1 ] = 0;
continue;
}
return - 1;
}
for ( i = 0;
i < n;
i ++ ) if ( b [ i ] != 0 ) return - 1;
return x;
}
int f_filled ( int a [ ], int b [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,9,16,18,20,23,24,25,25,26,29,30,35,40,41,43,44,46,53,53,56,56,58,60,62,70,80,80,80,82,86,90,92,92,95};
int param0_1[] = {-24,70,-74,-90,72,50,-94,86,-58,-68,42,0,98,-70,-14,-32,6,74,64,-78,86,-42,-56,2,-34,-46,70,-62,50,-58,-58,42,86,96,-8,8,-22,-14,-14,98,2,98,-28};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_3[] = {98,18,50,36,88,75,2,40,74,19,63,82,77,5,59,97,70,50,71,90,90,61,63,99};
int param0_4[] = {-80,-64,-64,-64,-64,-62,-54,-48,-44,-44,-38,-30,-30,-26,-14,-12,-10,-6,-6,6,22,22,22,26,28,50,52,70,86,86,88,90};
int param0_5[] = {0,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,0,0,1,1,0,0,1};
int param0_6[] = {59,61,64};
int param0_7[] = {98,92,28,42,-74,-36,40,-8,32,-22,-70,-22,-56,74,6,6,-62,46,34,2};
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};
int param0_9[] = {72,97,79,21,83,2,31,59,6,11,79,97};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {3,15,16,16,18,26,30,32,32,35,37,41,42,43,48,49,49,54,55,57,65,66,67,67,68,83,85,89,89,90,91,93,96,97,99};
int param1_1[] = {-26,36,48,48,-38,-86,90,-62,30,-4,82,16,32,-6,58,82,-66,-40,52,-78,94,-70,-80,-68,-58,-26,50,-78,-90,-48,-28,48,56,50,72,-22,-2,8,-94,92,-44,-66,-30};
int param1_2[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
int param1_3[] = {93,25,16,42,55,61,69,68,95,28,40,90,1,86,76,40,13,47,71,4,64,54,84,45};
int param1_4[] = {-96,-94,-80,-74,-64,-56,-52,-32,-30,-24,-12,-12,-8,-2,4,8,16,20,24,24,24,48,50,54,60,64,74,80,88,90,92,92};
int param1_5[] = {1,1,1,0,1,1,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1};
int param1_6[] = {22,59,85};
int param1_7[] = {-62,-84,72,60,10,-18,-44,-22,14,0,76,72,96,-28,-24,52,-74,-30,16,66};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_9[] = {27,71,87,36,73,37,80,34,57,17,88,52};
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[] = {29,34,13,16,22,20,1,18,34,9};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) 1",
"b) <=",
"c) int",
"d) =",
"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 arr [ ], int n ) {
int SubsetSum_1 = 0, SubsetSum_2 = 0;
for ( int i = 0;
i <= n - 1;
i ++ ) {
bool isSingleOccurance = true;
for ( int j = i + 1;
j <= n - 1;
j ++ ) {
if ( arr [ i ] == arr [ j ] ) {
isSingleOccurance = false;
arr [ i ] = arr [ j ] = 0;
break;
}
}
if ( isSingleOccurance ) {
if ( arr [ i ] > 0 ) SubsetSum_1 += arr [ i ];
else SubsetSum_2 += arr [ i ];
}
}
return abs ( SubsetSum_1 - SubsetSum_2 );
}
int f_filled ( int arr [ ], int n ) {}
urance ) {
if ( arr [ i ] > 0 ) SubsetSum_1 += arr [ i ];
else SubsetSum_2 += arr [ i ];
}
}
return abs ( SubsetSum_1 - SubsetSum_2 );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,14,15,21,42,42,42,46,46,48,48,48,52,52,53,60,62,69,69,79,82,86,96};
int param0_1[] = {-54,4,-22,94,58,-28,-12,84,64,4,-34,16,-10,-32,50,-78,68,-52,-64,66,64,-28,-38,-18,-84,-66,-36,64,-12,44,48,8,42};
int param0_2[] = {0,0,0,1};
int param0_3[] = {63,49,18,36,21,30,45,87};
int param0_4[] = {-96,-78,-78,-72,-62,-56,-52,-44,-38,-38,-28,-22,-20,-12,-6,-6,-2,2,2,4,36,44,46,50,50,54,66,92};
int param0_5[] = {0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,1,0,0,1,0,1,0,0,1,1,1,0};
int param0_6[] = {1,2,8,12,13,13,14,17,18,27,28,31,34,37,38,42,43,45,49,52,53,56,56,58,62,66,71,74,87,93,96,99};
int param0_7[] = {30,-28,-30,86,-8,-80,76,-2,28,30,82,84,-32,82,-88,-24,42,16,-32,-8,78,-8,-46,-6,-86,-86,-24,-12,-32,-72,84,-82,76,-84,80,-50,90,-50,-14,-82,78,48,-10,86,34,-20,-76,58};
int param0_8[] = {0,1};
int param0_9[] = {83,86,57,18,98,52,1,37,11,49,10,67,2,60,30,42,8,97,25,55,5,75,9,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[] = {15,28,2,6,18,34,25,28,1,16};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int SubsetSum_1 = 0, SubsetSum_2 = 0; for ( int i = 0; i <= n - 1; i ++ ) { bool isSingleOccurance = true; for ( int j = i + 1; j <= n - 1; j ++ ) { if ( arr [ i ] == arr [ j ] ) { isSingleOccurance = false; arr [ i ] = arr [ j ] = 0; break; } } if ( isSingleOccurance ) { if ( arr [ i ] > 0 ) SubsetSum_1 += arr [ i ]; else SubsetSum_2 += arr [ i ]; } } return [MASK] ( SubsetSum_1 - SubsetSum_2 ); } int f_filled ( int arr [ ], int n ) {}urance ) {
if ( arr [ i ] > 0 ) SubsetSum_1 += arr [ i ];
else SubsetSum_2 += arr [ i ];
}
}
return abs ( SubsetSum_1 - SubsetSum_2 );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,14,15,21,42,42,42,46,46,48,48,48,52,52,53,60,62,69,69,79,82,86,96};
int param0_1[] = {-54,4,-22,94,58,-28,-12,84,64,4,-34,16,-10,-32,50,-78,68,-52,-64,66,64,-28,-38,-18,-84,-66,-36,64,-12,44,48,8,42};
int param0_2[] = {0,0,0,1};
int param0_3[] = {63,49,18,36,21,30,45,87};
int param0_4[] = {-96,-78,-78,-72,-62,-56,-52,-44,-38,-38,-28,-22,-20,-12,-6,-6,-2,2,2,4,36,44,46,50,50,54,66,92};
int param0_5[] = {0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,1,0,0,1,0,1,0,0,1,1,1,0};
int param0_6[] = {1,2,8,12,13,13,14,17,18,27,28,31,34,37,38,42,43,45,49,52,53,56,56,58,62,66,71,74,87,93,96,99};
int param0_7[] = {30,-28,-30,86,-8,-80,76,-2,28,30,82,84,-32,82,-88,-24,42,16,-32,-8,78,-8,-46,-6,-86,-86,-24,-12,-32,-72,84,-82,76,-84,80,-50,90,-50,-14,-82,78,48,-10,86,34,-20,-76,58};
int param0_8[] = {0,1};
int param0_9[] = {83,86,57,18,98,52,1,37,11,49,10,67,2,60,30,42,8,97,25,55,5,75,9,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[] = {15,28,2,6,18,34,25,28,1,16};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | abs | [
"a) {",
"b) *;",
"c) java.lang.*;",
"d) <math.h>",
"e) abs"
] | 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 ) {
if ( x >= arr [ n - 1 ] ) return n - 1;
if ( x < arr [ 0 ] ) return - 1;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i ] > x ) return ( i - 1 );
return - 1;
}
int f_filled ( int arr [ ], int n, int x ) {}
- 1 ] ) return n - 1;
if ( x < arr [ 0 ] ) return - 1;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i ] > x ) return ( i - 1 );
return - 1;
}
int f_filled ( int arr [ ], int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,9,10,11,36,39,50,70,75,99};
int param0_1[] = {-60,96,8,88,-98,56,-46,50,38,-62,46,36,68,88,46,94,16,2,78,-64,74,44,22,96,-52,66,86,-74,60,-4,56,-34,20,62,6,62,78,28,-72,-6,34,70,34,-38,-10,86,-28};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {54,39,73,75,10,12,99,87,99,24,91,15,7,96,97,87,80,9,6,57,29,78,80,91,74,17};
int param0_4[] = {-90,-88,-86,-72,-66,-52,-48,-40,-36,-28,4,6,18,20,22,36,46,56,96};
int param0_5[] = {1};
int param0_6[] = {1,5,10,10,11,11,14,15,18,18,21,23,28,28,29,31,33,34,38,38,42,47,47,48,48,48,51,51,53,56,61,64,64,66,70,71,72,80,82,88,88,90,91,92,92,94,98,98};
int param0_7[] = {-12,18,-92,-68,-48,-96,16,-22,-36,-24,66,-80,60,70,36,6,36,86,-10,-18,-84,2};
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[] = {39,66};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {8,44,37,25,18,0,25,15,26,1};
int param2[] = {5,32,24,22,9,0,24,16,23,1};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int 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 ) { if ( x >= arr [ n - [MASK] ] ) return n - 1; if ( x < arr [ 0 ] ) return - 1; for ( int i = 1; i < n; i ++ ) if ( arr [ i ] > x ) return ( i - 1 ); return - 1; } int f_filled ( int arr [ ], int n, int x ) {} - 1 ] ) return n - 1;
if ( x < arr [ 0 ] ) return - 1;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i ] > x ) return ( i - 1 );
return - 1;
}
int f_filled ( int arr [ ], int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,9,10,11,36,39,50,70,75,99};
int param0_1[] = {-60,96,8,88,-98,56,-46,50,38,-62,46,36,68,88,46,94,16,2,78,-64,74,44,22,96,-52,66,86,-74,60,-4,56,-34,20,62,6,62,78,28,-72,-6,34,70,34,-38,-10,86,-28};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {54,39,73,75,10,12,99,87,99,24,91,15,7,96,97,87,80,9,6,57,29,78,80,91,74,17};
int param0_4[] = {-90,-88,-86,-72,-66,-52,-48,-40,-36,-28,4,6,18,20,22,36,46,56,96};
int param0_5[] = {1};
int param0_6[] = {1,5,10,10,11,11,14,15,18,18,21,23,28,28,29,31,33,34,38,38,42,47,47,48,48,48,51,51,53,56,61,64,64,66,70,71,72,80,82,88,88,90,91,92,92,94,98,98};
int param0_7[] = {-12,18,-92,-68,-48,-96,16,-22,-36,-24,66,-80,60,70,36,6,36,86,-10,-18,-84,2};
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[] = {39,66};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {8,44,37,25,18,0,25,15,26,1};
int param2[] = {5,32,24,22,9,0,24,16,23,1};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | 1 | [
"a) 1",
"b) j",
"c) x",
"d) for",
"e) ,"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int position = 1;
int m = 1;
while ( ! ( n & m ) ) {
m = m << 1;
position ++;
}
return position;
}
int f_filled ( int n ) {}
, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int position = 1;
int m = 1;
while ( ! ( n & m ) ) {
m = m << 1;
position ++;
}
return position;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {17,97,73,68,6,84,72,66,57,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) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int 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 position = 1; int m = 1; while ( ! ( n & m ) ) { m = m << 1; position [MASK] } return position; } int f_filled ( int n ) {}, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int position = 1;
int m = 1;
while ( ! ( n & m ) ) {
m = m << 1;
position ++;
}
return position;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {17,97,73,68,6,84,72,66,57,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) ]",
"b) i",
"c) }",
"d) ++;",
"e) 1"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
long long int f_gold ( int n ) {
long long int sum = 0;
for ( int row = 0;
row < n;
row ++ ) {
sum = sum + ( 1 << row );
}
return sum;
}
long long int f_filled ( int n ) {}
nc);}
long long int f_gold ( int n ) {
long long int sum = 0;
for ( int row = 0;
row < n;
row ++ ) {
sum = sum + ( 1 << row );
}
return sum;
}
long long int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {21,4,31,79,38,75,36,32,23,65};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long int f_gold ( int n ) { long long int sum = 0; for ( int row = 0; row < n; row ++ ) { sum [MASK] sum + ( 1 << row ); } return sum; } long long int f_filled ( int n ) {}nc);}
long long int f_gold ( int n ) {
long long int sum = 0;
for ( int row = 0;
row < n;
row ++ ) {
sum = sum + ( 1 << row );
}
return sum;
}
long long int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {21,4,31,79,38,75,36,32,23,65};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | = | [
"a) +",
"b) }",
"c) y)",
"d) =",
"e) const"
] | 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 len ) {
int count = 1;
if ( len == 1 ) return count;
if ( str [ 0 ] == str [ 1 ] ) count *= 1;
else count *= 2;
for ( int j = 1;
j < len - 1;
j ++ ) {
if ( str [ j ] == str [ j - 1 ] && str [ j ] == str [ j + 1 ] ) count *= 1;
else if ( str [ j ] == str [ j - 1 ] || str [ j ] == str [ j + 1 ] || str [ j - 1 ] == str [ j + 1 ] ) count *= 2;
else count *= 3;
}
if ( str [ len - 1 ] == str [ len - 2 ] ) count *= 1;
else count *= 2;
return count;
}
int f_filled ( char str [ ], int len ) {}
1 ] == str [ j + 1 ] ) count *= 2;
else count *= 3;
}
if ( str [ len - 1 ] == str [ len - 2 ] ) count *= 1;
else count *= 2;
return count;
}
int f_filled ( char str [ ], int len ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"KbctqjpX","36506583562151","01010","Dr","09","110","K","04402109","010","aVHYrYmHjvnj "};
int param1[] = {42,67,6,88,73,4,61,7,92,60};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char str [ ], int len ) { int count = 1; if ( len == 1 ) return count; if ( str [ 0 ] == str [ 1 ] ) count *= 1; else count *= 2; for ( int j = 1; j < len - 1; j ++ ) { if ( [MASK] [ j ] == str [ j - 1 ] && str [ j ] == str [ j + 1 ] ) count *= 1; else if ( str [ j ] == str [ j - 1 ] || str [ j ] == str [ j + 1 ] || str [ j - 1 ] == str [ j + 1 ] ) count *= 2; else count *= 3; } if ( str [ len - 1 ] == str [ len - 2 ] ) count *= 1; else count *= 2; return count; } int f_filled ( char str [ ], int len ) {} 1 ] == str [ j + 1 ] ) count *= 2;
else count *= 3;
}
if ( str [ len - 1 ] == str [ len - 2 ] ) count *= 1;
else count *= 2;
return count;
}
int f_filled ( char str [ ], int len ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"KbctqjpX","36506583562151","01010","Dr","09","110","K","04402109","010","aVHYrYmHjvnj "};
int param1[] = {42,67,6,88,73,4,61,7,92,60};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | str | [
"a) i",
"b) str",
"c) {",
"d) (",
"e) #include"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int high = 0;
for ( int i = 0;
i < n;
i ++ ) high = max ( high, arr [ i ] );
int count [ high + 1 ] = {
0 };
for ( int i = 0;
i < n;
i ++ ) count [ arr [ i ] ] ++;
int counter = 0;
for ( int i = high;
i >= 1;
i -- ) {
int j = i;
counter = 0;
while ( j <= high ) {
if ( count [ j ] >= 2 ) return j;
else if ( count [ j ] == 1 ) counter ++;
j += i;
if ( counter == 2 ) return i;
}
}
}
int f_filled ( int arr [ ], int n ) {}
if ( count [ j ] >= 2 ) return j;
else if ( count [ j ] == 1 ) counter ++;
j += i;
if ( counter == 2 ) return i;
}
}
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,9,9,13,14,26,37,40,44,44,46,46,48,49,52,52,57,58,64,66,71,72,76,76,78,80,85,88,90,90,93,93,97,98};
int param0_1[] = {-56,94,84,14,-6,84,84,-14,-60,-50,38,-20,66,-16};
int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_3[] = {36,38,30,23,73,29,70,35,49,77,98,86};
int param0_4[] = {-88,-88,-70,-70,-68,-68,-68,-64,-58,-50,-42,-36,-34,-32,-32,-30,-28,-24,-18,-8,0,0,10,10,14,14,28,30,32,32,40,40,48,54,56,60,62,72,76,78,86,88,98,98};
int param0_5[] = {0,1,0,1,0,1,0,0};
int param0_6[] = {3,5,5,10,13,25,27,32,35,36,36,38,40,45,53,53,58,59,68,79,79,79,87,98};
int param0_7[] = {28,2,-10,70,50,6,32,-6,48,-28,18,86,-96,64,-92,14,44,-36,-32,92,6,36,76,-68,-22,34,-48,-54,28,-90,34};
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[] = {86,82,57,48,75,17,60,3,91,51};
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[] = {29,8,13,7,34,6,12,17,16,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 high = 0; for ( int i = 0; i < n; i ++ ) high = max ( high, arr [ i ] ); int count [ high + 1 ] = { 0 }; for ( int i = 0; i < n; i ++ ) count [ arr [ i ] ] ++; int counter = 0; for ( int i = high; i >= 1; i -- ) { int j = i; counter = 0; while ( j <= high ) { if ( count [ j ] >= 2 ) return j; else if ( [MASK] [ j ] == 1 ) counter ++; j += i; if ( counter == 2 ) return i; } } } int f_filled ( int arr [ ], int n ) {}if ( count [ j ] >= 2 ) return j;
else if ( count [ j ] == 1 ) counter ++;
j += i;
if ( counter == 2 ) return i;
}
}
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,9,9,13,14,26,37,40,44,44,46,46,48,49,52,52,57,58,64,66,71,72,76,76,78,80,85,88,90,90,93,93,97,98};
int param0_1[] = {-56,94,84,14,-6,84,84,-14,-60,-50,38,-20,66,-16};
int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_3[] = {36,38,30,23,73,29,70,35,49,77,98,86};
int param0_4[] = {-88,-88,-70,-70,-68,-68,-68,-64,-58,-50,-42,-36,-34,-32,-32,-30,-28,-24,-18,-8,0,0,10,10,14,14,28,30,32,32,40,40,48,54,56,60,62,72,76,78,86,88,98,98};
int param0_5[] = {0,1,0,1,0,1,0,0};
int param0_6[] = {3,5,5,10,13,25,27,32,35,36,36,38,40,45,53,53,58,59,68,79,79,79,87,98};
int param0_7[] = {28,2,-10,70,50,6,32,-6,48,-28,18,86,-96,64,-92,14,44,-36,-32,92,6,36,76,-68,-22,34,-48,-54,28,-90,34};
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[] = {86,82,57,48,75,17,60,3,91,51};
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[] = {29,8,13,7,34,6,12,17,16,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;
} | count | [
"a) ]",
"b) }",
"c) <",
"d) count",
"e) i"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int price [ ], int n ) {
int val [ n + 1 ];
val [ 0 ] = 0;
int i, j;
for ( i = 1;
i <= n;
i ++ ) {
int max_val = INT_MIN;
for ( j = 0;
j < i;
j ++ ) max_val = max ( max_val, price [ j ] + val [ i - j - 1 ] );
val [ i ] = max_val;
}
return val [ n ];
}
int f_filled ( int price [ ], int n ) {}
MIN;
for ( j = 0;
j < i;
j ++ ) max_val = max ( max_val, price [ j ] + val [ i - j - 1 ] );
val [ i ] = max_val;
}
return val [ n ];
}
int f_filled ( int price [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,7,15,16,18,22,22,30,34,35,37,41,42,42,43,47,49,52,53,55,58,60,62,62,62,65,65,67,69,73,73,73,75,78,83,84,86,90,91,91,93,94,96};
int param0_1[] = {50,-30,-84,-2,-96,-54,-14,56,-48,70,38,-86,16,-48,66,34,36,40,40,36,-16,-92,30};
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};
int param0_3[] = {79,33,54,12,53,9,29,45,85,20,6,52,8,26,43,42,17,54,8,70,5,71,1,81,42,59,42,63,8,86,29,16,72};
int param0_4[] = {-78,-64,-38,-22,2,8,28,32,58,72,72,90};
int param0_5[] = {1,0,1,1,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0};
int param0_6[] = {1,3,6,7,10,17,18,22,23,24,28,31,37,43,48,54,56,65,70,71,73,74,79,84,87,95,96};
int param0_7[] = {-30,20,-72,-86,-8};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {96,99,20,87,17,13,45,65,33,13,59,77,35,79,20,51,69,71,55,37,23,35,82,70};
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,19,29,22,11,20,21,3,21,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 price [ ], int n ) { int val [ n + 1 ]; val [ 0 ] = 0; int i, j; for ( i = 1; i <= n; i ++ ) { int max_val = INT_MIN; for ( j = 0; j < i; j ++ ) max_val = max ( max_val, price [ [MASK] ] + val [ i - j - 1 ] ); val [ i ] = max_val; } return val [ n ]; } int f_filled ( int price [ ], int n ) {}MIN;
for ( j = 0;
j < i;
j ++ ) max_val = max ( max_val, price [ j ] + val [ i - j - 1 ] );
val [ i ] = max_val;
}
return val [ n ];
}
int f_filled ( int price [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,7,15,16,18,22,22,30,34,35,37,41,42,42,43,47,49,52,53,55,58,60,62,62,62,65,65,67,69,73,73,73,75,78,83,84,86,90,91,91,93,94,96};
int param0_1[] = {50,-30,-84,-2,-96,-54,-14,56,-48,70,38,-86,16,-48,66,34,36,40,40,36,-16,-92,30};
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};
int param0_3[] = {79,33,54,12,53,9,29,45,85,20,6,52,8,26,43,42,17,54,8,70,5,71,1,81,42,59,42,63,8,86,29,16,72};
int param0_4[] = {-78,-64,-38,-22,2,8,28,32,58,72,72,90};
int param0_5[] = {1,0,1,1,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0};
int param0_6[] = {1,3,6,7,10,17,18,22,23,24,28,31,37,43,48,54,56,65,70,71,73,74,79,84,87,95,96};
int param0_7[] = {-30,20,-72,-86,-8};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {96,99,20,87,17,13,45,65,33,13,59,77,35,79,20,51,69,71,55,37,23,35,82,70};
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,19,29,22,11,20,21,3,21,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;
} | j | [
"a) >",
"b) ]",
"c) j",
"d) n",
"e) fibo"
] | 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 n = strlen(s);
int lps [ n ];
lps [ 0 ] = 0;
int len = 0;
int i = 1;
while ( i < n ) {
if ( s [ i ] == s [ len ] ) {
len ++;
lps [ i ] = len;
i ++;
}
else {
if ( len != 0 ) {
len = lps [ len - 1 ];
}
else {
lps [ i ] = 0;
i ++;
}
}
}
int res = lps [ n - 1 ];
return ( res > n / 2 ) ? n / 2 : res;
}
int f_filled ( char s [] ) {}
n = lps [ len - 1 ];
}
else {
lps [ i ] = 0;
i ++;
}
}
}
int res = lps [ n - 1 ];
return ( res > n / 2 ) ? n / 2 : res;
}
int f_filled ( char s [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"aabcdaabc","1372494598","110000100001","abcab","488938","011010101011","aaaa","3356203205","1010","kkXiiTZkGeh"};
for(int i = 0; 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 n = strlen(s); int lps [ n ]; lps [ 0 ] = 0; int len = 0; int i = 1; while ( i < n ) { if ( s [ i ] == s [ len ] ) { len ++; lps [ i ] = len; i ++; } else { if ( len != 0 ) { len = lps [ len [MASK] 1 ]; } else { lps [ i ] = 0; i ++; } } } int res = lps [ n - 1 ]; return ( res > n / 2 ) ? n / 2 : res; } int f_filled ( char s [] ) {}n = lps [ len - 1 ];
}
else {
lps [ i ] = 0;
i ++;
}
}
}
int res = lps [ n - 1 ];
return ( res > n / 2 ) ? n / 2 : res;
}
int f_filled ( char s [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"aabcdaabc","1372494598","110000100001","abcab","488938","011010101011","aaaa","3356203205","1010","kkXiiTZkGeh"};
for(int i = 0; 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) cmpfunc);}",
"b) 0",
"c) #include",
"d) -",
"e) m"
] | 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 ) {
return ( m * n * ( n + 1 ) * ( m + 1 ) ) / 4;
}
int f_filled ( int n, int m ) {}
rr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int m ) {
return ( m * n * ( n + 1 ) * ( m + 1 ) ) / 4;
}
int f_filled ( int n, int m ) {}
int main(void) {
int n_success = 0;
int param0[] = {86,33,3,91,33,13,75,58,50,4};
int param1[] = {70,65,5,12,27,75,36,64,51,44};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int m ) { return ( m * n * ( n + 1 ) * ( m + 1 ) ) / 4; } int f_filled ( int n, int [MASK] ) {}rr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int m ) {
return ( m * n * ( n + 1 ) * ( m + 1 ) ) / 4;
}
int f_filled ( int n, int m ) {}
int main(void) {
int n_success = 0;
int param0[] = {86,33,3,91,33,13,75,58,50,4};
int param1[] = {70,65,5,12,27,75,36,64,51,44};
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;
} | m | [
"a) {return",
"b) s",
"c) *",
"d) m",
"e) return"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n );
int count = 0, max_count = 0, min_count = n;
for ( int i = 0;
i < ( n - 1 );
i ++ ) {
if ( arr [ i ] == arr [ i + 1 ] ) {
count += 1;
continue;
}
else {
max_count = max ( max_count, count );
min_count = min ( min_count, count );
count = 0;
}
}
return ( max_count - min_count );
}
int f_filled ( int arr [ ], int n ) {}
e {
max_count = max ( max_count, count );
min_count = min ( min_count, count );
count = 0;
}
}
return ( max_count - min_count );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,15,19,22,28,29,39,46,46,49,51,55,62,69,72,72,72,74,79,92,92,93,95,96};
int param0_1[] = {-26,-54,92,76,-92,-14,-24,-70,-78,-50,-48,-22,12,2,-34,-60,4,-32,-10,52,-92,-74,18,34,6,-66,42,-10,-6,56,92};
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,1,1,1,1};
int param0_3[] = {59,35,13,79,61,97,92,48,98,38,65,54,31,49,81,22,96,29,65,48,92,66,25,21,26,1,32,73,46,5,40,17,53,93,83,29};
int param0_4[] = {-70,-34,-32,-30,-14,80,86,90};
int param0_5[] = {0,1,0,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0};
int param0_6[] = {9};
int param0_7[] = {94,10,70,42};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {64,76,49,55,92,15,4,8,95,60,90,3,7,79,84,17,96,10,80,26,22,15};
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,30,24,29,4,23,0,2,24,20};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [MASK] ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int count = 0, max_count = 0, min_count = n; for ( int i = 0; i < ( n - 1 ); i ++ ) { if ( arr [ i ] == arr [ i + 1 ] ) { count += 1; continue; } else { max_count = max ( max_count, count ); min_count = min ( min_count, count ); count = 0; } } return ( max_count - min_count ); } int f_filled ( int arr [ ], int n ) {}e {
max_count = max ( max_count, count );
min_count = min ( min_count, count );
count = 0;
}
}
return ( max_count - min_count );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {5,15,19,22,28,29,39,46,46,49,51,55,62,69,72,72,72,74,79,92,92,93,95,96};
int param0_1[] = {-26,-54,92,76,-92,-14,-24,-70,-78,-50,-48,-22,12,2,-34,-60,4,-32,-10,52,-92,-74,18,34,6,-66,42,-10,-6,56,92};
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,1,1,1,1};
int param0_3[] = {59,35,13,79,61,97,92,48,98,38,65,54,31,49,81,22,96,29,65,48,92,66,25,21,26,1,32,73,46,5,40,17,53,93,83,29};
int param0_4[] = {-70,-34,-32,-30,-14,80,86,90};
int param0_5[] = {0,1,0,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0};
int param0_6[] = {9};
int param0_7[] = {94,10,70,42};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {64,76,49,55,92,15,4,8,95,60,90,3,7,79,84,17,96,10,80,26,22,15};
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,30,24,29,4,23,0,2,24,20};
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) void",
"c) 0",
"d) }",
"e) 2"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > mp;
for ( int i = 0;
i < n;
i ++ ) mp [ arr [ i ] ] ++;
int res = 0;
for ( auto x : mp ) res = max ( res, x . second );
return res;
}
int f_filled ( int arr [ ], int n ) {}
int, int > mp;
for ( int i = 0;
i < n;
i ++ ) mp [ arr [ i ] ] ++;
int res = 0;
for ( auto x : mp ) res = max ( res, x . second );
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,6,9,12,15,19,21,23,24,24,25,27,29,35,36,37,41,44,44,47,48,51,56,59,59,59,60,64,64,66,67,68,68,69,73,74,77,78,81,82,83,85,89,94,95,96,98,99};
int param0_1[] = {96,20,-40,74,-44,98,-24,92,58,-84,-76,-14,64,-2,-84,52,-8,38,-26,-10,-62,-30,-76,58};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {35,16,42,3,57,70,4,31,93,60,98,97,81,57,62,98,88,51,5,58,48,14,58,22,40,26,66,41,9,78,62,32,79,88,65,75,80,12,15,93,92,13,83,26};
int param0_4[] = {-62,-44,-36,-18,-16,-6,4,14,22,42,68,90};
int param0_5[] = {1,0,1,0,1,1,1,1,0,1,0,1,0,0,0,0};
int param0_6[] = {20,25,27,29,47,47,49,53,59,66,74,82,86,86,94,94,97};
int param0_7[] = {92,50,76,46,14,40,22};
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};
int param0_9[] = {8,82,92,42,55,4,94,73,57,7,21,71,68,97};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {30,20,31,37,11,12,13,3,27,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 ) { unordered_map < int, int > mp; for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; int res = 0; for ( auto x : [MASK] ) res = max ( res, x . second ); return res; } int f_filled ( int arr [ ], int n ) {}int, int > mp;
for ( int i = 0;
i < n;
i ++ ) mp [ arr [ i ] ] ++;
int res = 0;
for ( auto x : mp ) res = max ( res, x . second );
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,6,9,12,15,19,21,23,24,24,25,27,29,35,36,37,41,44,44,47,48,51,56,59,59,59,60,64,64,66,67,68,68,69,73,74,77,78,81,82,83,85,89,94,95,96,98,99};
int param0_1[] = {96,20,-40,74,-44,98,-24,92,58,-84,-76,-14,64,-2,-84,52,-8,38,-26,-10,-62,-30,-76,58};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {35,16,42,3,57,70,4,31,93,60,98,97,81,57,62,98,88,51,5,58,48,14,58,22,40,26,66,41,9,78,62,32,79,88,65,75,80,12,15,93,92,13,83,26};
int param0_4[] = {-62,-44,-36,-18,-16,-6,4,14,22,42,68,90};
int param0_5[] = {1,0,1,0,1,1,1,1,0,1,0,1,0,0,0,0};
int param0_6[] = {20,25,27,29,47,47,49,53,59,66,74,82,86,86,94,94,97};
int param0_7[] = {92,50,76,46,14,40,22};
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};
int param0_9[] = {8,82,92,42,55,4,94,73,57,7,21,71,68,97};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {30,20,31,37,11,12,13,3,27,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;
} | mp | [
"a) mp",
"b) )",
"c) java.util.stream.*;",
"d) java.util.stream.*;",
"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 [ ], int m, int n ) {
int res = 0;
sort ( X, X + m, greater < int > ( ) );
sort ( Y, Y + n, greater < int > ( ) );
int hzntl = 1, vert = 1;
int i = 0, j = 0;
while ( i < m && j < n ) {
if ( X [ i ] > Y [ j ] ) {
res += X [ i ] * vert;
hzntl ++;
i ++;
}
else {
res += Y [ j ] * hzntl;
vert ++;
j ++;
}
}
int total = 0;
while ( i < m ) total += X [ i ++ ];
res += total * vert;
total = 0;
while ( j < n ) total += Y [ j ++ ];
res += total * hzntl;
return res;
}
int f_filled ( int X [ ], int Y [ ], int m, int n ) {}
m ) total += X [ i ++ ];
res += total * vert;
total = 0;
while ( j < n ) total += Y [ j ++ ];
res += total * hzntl;
return res;
}
int f_filled ( int X [ ], int Y [ ], int m, int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,9,9,16,18,20,22,22,23,25,25,26,28,32,33,33,33,34,37,40,44,46,46,52,53,56,58,58,59,60,61,67,67,69,70,70,73,75,77,83,87,87,87,90,90,93,97,98};
int param0_1[] = {-52,66,66,-4,-74,78,52,-72};
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};
int param0_3[] = {58,78,48,44,63,37,89,76,66,83,52,97,19,28,67,38,54,77,2,96,28,87};
int param0_4[] = {-84,-78,-76,-72,-68,-62,-62,-60,-58,-44,-34,-10,-8,-4,-2,-2,14,16,20,26,26,32,70,78,86,90,96};
int param0_5[] = {0,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,1,0,0,1,1,1,1,0,0,0,1,1,0};
int param0_6[] = {30,75};
int param0_7[] = {70,78,-60,-10,-8,46,38,60,-54,-68,16,10,36,-10,38,-96,-52,-82,-56,22,-56,0,96,-60,24,70,40,62,-20,-36,74,32,44,14,-18,50,58};
int param0_8[] = {0,0,0,1};
int param0_9[] = {81,40,29,74,13,67,10,25,24,81,90};
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,3,9,10,13,16,17,19,20,23,25,27,29,30,30,35,37,39,39,45,47,50,55,55,55,56,59,60,62,63,67,70,70,71,72,73,73,74,77,86,87,88,91,92,95,96,97,99};
int param1_1[] = {-40,30,-34,-76,84,88,-78,72};
int param1_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};
int param1_3[] = {37,36,26,5,83,75,33,33,72,63,91,94,75,92,9,19,79,29,40,47,63,36};
int param1_4[] = {-98,-98,-86,-82,-76,-62,-60,-48,-32,-32,-24,-18,-10,-4,0,16,16,26,36,42,48,50,64,66,78,92,98};
int param1_5[] = {1,0,1,1,1,0,1,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,1,0};
int param1_6[] = {10,39};
int param1_7[] = {64,-42,-50,-76,46,32,-66,86,-6,46,94,70,-62,90,78,4,6,-20,92,-18,-34,-96,92,-24,-90,-94,62,40,-14,-28,80,-86,-86,-56,40,-92,-22};
int param1_8[] = {0,1,1,1};
int param1_9[] = {51,45,23,7,53,14,49,58,25,75,74};
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[] = {25,6,15,13,15,25,1,19,2,8};
int param3[] = {27,7,19,14,24,26,1,19,2,10};
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 [MASK] ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int X [ ], int Y [ ], int m, int n ) { int res = 0; sort ( X, X + m, greater < int > ( ) ); sort ( Y, Y + n, greater < int > ( ) ); int hzntl = 1, vert = 1; int i = 0, j = 0; while ( i < m && j < n ) { if ( X [ i ] > Y [ j ] ) { res += X [ i ] * vert; hzntl ++; i ++; } else { res += Y [ j ] * hzntl; vert ++; j ++; } } int total = 0; while ( i < m ) total += X [ i ++ ]; res += total * vert; total = 0; while ( j < n ) total += Y [ j ++ ]; res += total * hzntl; return res; } int f_filled ( int X [ ], int Y [ ], int m, int n ) {} m ) total += X [ i ++ ];
res += total * vert;
total = 0;
while ( j < n ) total += Y [ j ++ ];
res += total * hzntl;
return res;
}
int f_filled ( int X [ ], int Y [ ], int m, int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,9,9,16,18,20,22,22,23,25,25,26,28,32,33,33,33,34,37,40,44,46,46,52,53,56,58,58,59,60,61,67,67,69,70,70,73,75,77,83,87,87,87,90,90,93,97,98};
int param0_1[] = {-52,66,66,-4,-74,78,52,-72};
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};
int param0_3[] = {58,78,48,44,63,37,89,76,66,83,52,97,19,28,67,38,54,77,2,96,28,87};
int param0_4[] = {-84,-78,-76,-72,-68,-62,-62,-60,-58,-44,-34,-10,-8,-4,-2,-2,14,16,20,26,26,32,70,78,86,90,96};
int param0_5[] = {0,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,1,0,0,1,1,1,1,0,0,0,1,1,0};
int param0_6[] = {30,75};
int param0_7[] = {70,78,-60,-10,-8,46,38,60,-54,-68,16,10,36,-10,38,-96,-52,-82,-56,22,-56,0,96,-60,24,70,40,62,-20,-36,74,32,44,14,-18,50,58};
int param0_8[] = {0,0,0,1};
int param0_9[] = {81,40,29,74,13,67,10,25,24,81,90};
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,3,9,10,13,16,17,19,20,23,25,27,29,30,30,35,37,39,39,45,47,50,55,55,55,56,59,60,62,63,67,70,70,71,72,73,73,74,77,86,87,88,91,92,95,96,97,99};
int param1_1[] = {-40,30,-34,-76,84,88,-78,72};
int param1_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};
int param1_3[] = {37,36,26,5,83,75,33,33,72,63,91,94,75,92,9,19,79,29,40,47,63,36};
int param1_4[] = {-98,-98,-86,-82,-76,-62,-60,-48,-32,-32,-24,-18,-10,-4,0,16,16,26,36,42,48,50,64,66,78,92,98};
int param1_5[] = {1,0,1,1,1,0,1,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,1,0};
int param1_6[] = {10,39};
int param1_7[] = {64,-42,-50,-76,46,32,-66,86,-6,46,94,70,-62,90,78,4,6,-20,92,-18,-34,-96,92,-24,-90,-94,62,40,-14,-28,80,-86,-86,-56,40,-92,-22};
int param1_8[] = {0,1,1,1};
int param1_9[] = {51,45,23,7,53,14,49,58,25,75,74};
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[] = {25,6,15,13,15,25,1,19,2,8};
int param3[] = {27,7,19,14,24,26,1,19,2,10};
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) int",
"c) 1",
"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 ) {
return * max_element ( arr, arr + n );
}
int f_filled ( int arr [ ], int n ) {}
]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
return * max_element ( arr, arr + n );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {10,12,14,16,17,17,20,24,26,28,37,38,41,45,49,50,59,61,63,65,65,66,69,70,70,73,73,74,81,81,83,87,94,97};
int param0_1[] = {-56,38,-22,84,-60,2,68,-78,62,-98,24,26,48,62,-80,-14,-84,12,-54,-12,-20,-82,10,-34,-50,-72,78,16,30,-76,72,34,6,52,44,18,-38,48,-14};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1};
int param0_3[] = {92,5,40,65,86,51,14,29,66,6,62,92,29,13,88,54,15,60,45,2,51,9,33,51,31,11,62,61,77,38,11,4,27,54,72,64,85,46,24,44,39,73,82,85};
int param0_4[] = {-92,-90,-84,-80,-80,-76,-70,-70,-48,-44,-38,-28,-14,-14,-12,-2,2,4,6,10,16,16,20,22,24,26,50,52,56,56,58,58,74,80,82,84,86};
int param0_5[] = {0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,0,1,0};
int param0_6[] = {5,19,20,26,31,32,34,37,39,40,46,46,50,53,58,58,59,65,72,72,75,76,77,78,81,83,83,95,98,99};
int param0_7[] = {32,-84,-84,86,-24,36,-12,82,48,-12,82,-76,84,-20,-12,-18,46,-74,-14,-86};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {95,73,74,14,73,74,19,93,34,53,85,75,80,15,36,57,15,98,51,37,8,9,62,71,28,24,37,53,84,76,22,48,15,19,43,88,58,38,63,68,27,22,37,76,59,66,22};
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[] = {17,25,11,40,33,29,28,14,33,34};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: [MASK] } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { return * max_element ( arr, arr + n ); } int f_filled ( int arr [ ], int n ) {}]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
return * max_element ( arr, arr + n );
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {10,12,14,16,17,17,20,24,26,28,37,38,41,45,49,50,59,61,63,65,65,66,69,70,70,73,73,74,81,81,83,87,94,97};
int param0_1[] = {-56,38,-22,84,-60,2,68,-78,62,-98,24,26,48,62,-80,-14,-84,12,-54,-12,-20,-82,10,-34,-50,-72,78,16,30,-76,72,34,6,52,44,18,-38,48,-14};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1};
int param0_3[] = {92,5,40,65,86,51,14,29,66,6,62,92,29,13,88,54,15,60,45,2,51,9,33,51,31,11,62,61,77,38,11,4,27,54,72,64,85,46,24,44,39,73,82,85};
int param0_4[] = {-92,-90,-84,-80,-80,-76,-70,-70,-48,-44,-38,-28,-14,-14,-12,-2,2,4,6,10,16,16,20,22,24,26,50,52,56,56,58,58,74,80,82,84,86};
int param0_5[] = {0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,0,1,0};
int param0_6[] = {5,19,20,26,31,32,34,37,39,40,46,46,50,53,58,58,59,65,72,72,75,76,77,78,81,83,83,95,98,99};
int param0_7[] = {32,-84,-84,86,-24,36,-12,82,48,-12,82,-76,84,-20,-12,-18,46,-74,-14,-86};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {95,73,74,14,73,74,19,93,34,53,85,75,80,15,36,57,15,98,51,37,8,9,62,71,28,24,37,53,84,76,22,48,15,19,43,88,58,38,63,68,27,22,37,76,59,66,22};
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[] = {17,25,11,40,33,29,28,14,33,34};
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) std;",
"d) const",
"e) y;"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int n ) {
if ( n <= 1 ) return false;
if ( n <= 3 ) return false;
if ( n % 2 == 0 || n % 3 == 0 ) return true;
for ( int i = 5;
i * i <= n;
i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return true;
return false;
}
bool f_filled ( int n ) {}
se;
if ( n % 2 == 0 || n % 3 == 0 ) return true;
for ( int i = 5;
i * i <= n;
i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return true;
return false;
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {62,13,29,72,30,20,10,47,91,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);} bool f_gold ( int n ) { if ( n <= 1 ) return false; if ( n <= 3 ) return false; if ( n % 2 == 0 || n % [MASK] == 0 ) return true; for ( int i = 5; i * i <= n; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return true; return false; } bool f_filled ( int n ) {}se;
if ( n % 2 == 0 || n % 3 == 0 ) return true;
for ( int i = 5;
i * i <= n;
i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return true;
return false;
}
bool f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {62,13,29,72,30,20,10,47,91,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;
} | 3 | [
"a) javafx.util.Pair;",
"b) }",
"c) (",
"d) )",
"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 arr [ ], int n ) {
unordered_map < int, int > hash;
for ( int i = 0;
i < n;
i ++ ) hash [ arr [ i ] ] ++;
int max_count = 0, res = - 1;
for ( auto i : hash ) {
if ( max_count < i . second ) {
res = i . first;
max_count = i . second;
}
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
= 0, res = - 1;
for ( auto i : hash ) {
if ( max_count < i . second ) {
res = i . first;
max_count = i . second;
}
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,5,7,9,9,10,11,15,19,19,29,31,34,34,35,37,41,43,45,47,51,51,55,57,59,61,65,67,73,76,77,77,80,83,83,84,84,92,94};
int param0_1[] = {14,-38,-84,24,82,-68,60,2,-22,54,90,90,-38,-8,-72,68,50,54,-32,-66,-10,-70,-28,18,58,-54,-30,60,-24,-48,22,32,-18,2,-64,-56,70,-92,-38,-70,22,-36,-64};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {76,18,41,46,34,41,56,76,14,82,51,87,1,92,9,2,68,82,43,98,88,62,84,25,7,87,37,7,55,98,60,99,92,56,17,82,28,43,40,1,99,79,38,75,84,61,21,11};
int param0_4[] = {-92,-86,-86,-84,-70,-68,-68,-66,-62,-52,-52,-50,-48,-38,-22,-14,-6,4,8,10,10,16,22,36,38,40,50,50,70,78,80,86,96,96,98};
int param0_5[] = {1,1,0,1,1,0,1,1,1,1,1,0,0,1,1,1,0,0,0,1,0,0,1,1,1,0,0,0};
int param0_6[] = {3,53,56,57,66,73,76,94,97};
int param0_7[] = {12,60,-94,92};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {95,93,82,73,61,24,73,21,47,91,48,42,76,12,89,21,3,30,5,49,26,54,16,70,50,21,58,36,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[] = {24,28,18,37,21,18,8,3,21,25};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { unordered_map < int, int > hash; for ( int i = 0; i < n; i ++ ) hash [ arr [ i ] ] ++; int max_count = 0, res = - 1; for [MASK] auto i : hash ) { if ( max_count < i . second ) { res = i . first; max_count = i . second; } } return res; } int f_filled ( int arr [ ], int n ) {}= 0, res = - 1;
for ( auto i : hash ) {
if ( max_count < i . second ) {
res = i . first;
max_count = i . second;
}
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,5,7,9,9,10,11,15,19,19,29,31,34,34,35,37,41,43,45,47,51,51,55,57,59,61,65,67,73,76,77,77,80,83,83,84,84,92,94};
int param0_1[] = {14,-38,-84,24,82,-68,60,2,-22,54,90,90,-38,-8,-72,68,50,54,-32,-66,-10,-70,-28,18,58,-54,-30,60,-24,-48,22,32,-18,2,-64,-56,70,-92,-38,-70,22,-36,-64};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {76,18,41,46,34,41,56,76,14,82,51,87,1,92,9,2,68,82,43,98,88,62,84,25,7,87,37,7,55,98,60,99,92,56,17,82,28,43,40,1,99,79,38,75,84,61,21,11};
int param0_4[] = {-92,-86,-86,-84,-70,-68,-68,-66,-62,-52,-52,-50,-48,-38,-22,-14,-6,4,8,10,10,16,22,36,38,40,50,50,70,78,80,86,96,96,98};
int param0_5[] = {1,1,0,1,1,0,1,1,1,1,1,0,0,1,1,1,0,0,0,1,0,0,1,1,1,0,0,0};
int param0_6[] = {3,53,56,57,66,73,76,94,97};
int param0_7[] = {12,60,-94,92};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {95,93,82,73,61,24,73,21,47,91,48,42,76,12,89,21,3,30,5,49,26,54,16,70,50,21,58,36,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[] = {24,28,18,37,21,18,8,3,21,25};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | ( | [
"a) 1",
"b) 1;",
"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 a [ ], int n ) {
int zero = 0, two = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( a [ i ] == 0 ) {
zero ++;
}
if ( a [ i ] == 2 ) {
two ++;
}
}
int cnt = ( zero * ( zero - 1 ) ) / 2 + ( two * ( two - 1 ) ) / 2;
return cnt;
}
int f_filled ( int a [ ], int n ) {}
{
zero ++;
}
if ( a [ i ] == 2 ) {
two ++;
}
}
int cnt = ( zero * ( zero - 1 ) ) / 2 + ( two * ( two - 1 ) ) / 2;
return cnt;
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {9,10,20,26,26,28,31,34,35,36,36,37,39,43,44,44,46,49,54,57,58,63,64,64,65,67,70,70,74,75,77,78,79,81,82,83,84,86,95};
int param0_1[] = {0,-10,10,0,68,4,-6,-14,74,-80,56,-4,36,56,10,-16,90,84,-38,-40,40,-86,-36,-16,-48,-76,-72,-18,-14,-40,-82,56,-60};
int param0_2[] = {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[] = {88,20,53,21,29,73,62,91,72,34,47,42,98,9,79,80,94,36,7,67,96,34,99,56,37,70,55,36,10,77,41,51,5,37,57,29,56,74,97,31,96,52,13,29,87,58,28,31};
int param0_4[] = {20};
int param0_5[] = {1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,1,0,1};
int param0_6[] = {2,4,9,16,22,23,25,33,33,36,39,48,49,52,53,60,67,68,76,77,79,84,84,86,89};
int param0_7[] = {-62,42,-88,-44,90,30,52,54,56,-72,-76,90,18,42,62,-84,56,-80,72};
int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {22,15,28,29,32,16,33,83};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {31,19,22,38,0,21,24,13,15,7};
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 [MASK] #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int a [ ], int n ) { int zero = 0, two = 0; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] == 0 ) { zero ++; } if ( a [ i ] == 2 ) { two ++; } } int cnt = ( zero * ( zero - 1 ) ) / 2 + ( two * ( two - 1 ) ) / 2; return cnt; } int f_filled ( int a [ ], int n ) {} {
zero ++;
}
if ( a [ i ] == 2 ) {
two ++;
}
}
int cnt = ( zero * ( zero - 1 ) ) / 2 + ( two * ( two - 1 ) ) / 2;
return cnt;
}
int f_filled ( int a [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {9,10,20,26,26,28,31,34,35,36,36,37,39,43,44,44,46,49,54,57,58,63,64,64,65,67,70,70,74,75,77,78,79,81,82,83,84,86,95};
int param0_1[] = {0,-10,10,0,68,4,-6,-14,74,-80,56,-4,36,56,10,-16,90,84,-38,-40,40,-86,-36,-16,-48,-76,-72,-18,-14,-40,-82,56,-60};
int param0_2[] = {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[] = {88,20,53,21,29,73,62,91,72,34,47,42,98,9,79,80,94,36,7,67,96,34,99,56,37,70,55,36,10,77,41,51,5,37,57,29,56,74,97,31,96,52,13,29,87,58,28,31};
int param0_4[] = {20};
int param0_5[] = {1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,1,0,1};
int param0_6[] = {2,4,9,16,22,23,25,33,33,36,39,48,49,52,53,60,67,68,76,77,79,84,84,86,89};
int param0_7[] = {-62,42,-88,-44,90,30,52,54,56,-72,-76,90,18,42,62,-84,56,-80,72};
int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {22,15,28,29,32,16,33,83};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {31,19,22,38,0,21,24,13,15,7};
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;
} | <limits.h> | [
"a) arr",
"b) templeHeight",
"c) <",
"d) )",
"e) <limits.h>"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int arr [ ], int n ) {
if ( n == 0 || n == 1 ) return true;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false;
return true;
}
bool f_filled ( int arr [ ], int n ) {}
[ ], int n ) {
if ( n == 0 || n == 1 ) return true;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false;
return true;
}
bool f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,3,4,10,11,13,17,19,23,26,28,29,30,34,35,37,38,38,43,49,49,50,52,53,55,55,57,58,58,59,64,66,67,70,72,72,75,77,77,87,89,89,90,91,98,99,99,99};
int param0_1[] = {56,-94,-26,-52,58,-66,-52,-66,-94,44,38,-66,70,-70,-80,-78,-72,-60,-76,68,-50,32,-16,84,74,-42,98,-8,72,26,24,6,24,86,86,78,-92,80,32,-74,26,50,92,4,2,-34,-2,-18,-10};
int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {38,79,76,92,92};
int param0_4[] = {-42,-28,2,32,50,56,86,96,98};
int param0_5[] = {1,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1};
int param0_6[] = {1,9,12,21,21,24,34,55,60,63,67,68,88,89,91,94,98,99};
int param0_7[] = {-96,96,-98,-42,-74,40,42,50,-46,-52,8,-46,48,88,-78,-72,-10,-20,98,-40,-18,36,4,46,52,28,-88,-28,-28,-86};
int param0_8[] = {0,0,0,0,1,1};
int param0_9[] = {66,12,48,82,33,77,99,98,14,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[] = {46,30,13,2,7,11,9,29,3,7};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int arr [ ], int n ) { if ( n == 0 || n == 1 ) [MASK] true; for ( int i = 1; i < n; i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false; return true; } bool f_filled ( int arr [ ], int n ) {} [ ], int n ) {
if ( n == 0 || n == 1 ) return true;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false;
return true;
}
bool f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,3,4,10,11,13,17,19,23,26,28,29,30,34,35,37,38,38,43,49,49,50,52,53,55,55,57,58,58,59,64,66,67,70,72,72,75,77,77,87,89,89,90,91,98,99,99,99};
int param0_1[] = {56,-94,-26,-52,58,-66,-52,-66,-94,44,38,-66,70,-70,-80,-78,-72,-60,-76,68,-50,32,-16,84,74,-42,98,-8,72,26,24,6,24,86,86,78,-92,80,32,-74,26,50,92,4,2,-34,-2,-18,-10};
int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {38,79,76,92,92};
int param0_4[] = {-42,-28,2,32,50,56,86,96,98};
int param0_5[] = {1,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1};
int param0_6[] = {1,9,12,21,21,24,34,55,60,63,67,68,88,89,91,94,98,99};
int param0_7[] = {-96,96,-98,-42,-74,40,42,50,-46,-52,8,-46,48,88,-78,-72,-10,-20,98,-40,-18,36,4,46,52,28,-88,-28,-28,-86};
int param0_8[] = {0,0,0,0,1,1};
int param0_9[] = {66,12,48,82,33,77,99,98,14,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[] = {46,30,13,2,7,11,9,29,3,7};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | return | [
"a) )",
"b) return",
"c) i",
"d) clock_rot",
"e) -"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double side ) {
return ( ( side * side * side ) * ( sqrt ( 2 ) / 3 ) );
}
double f_filled ( double side ) {}
d sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double side ) {
return ( ( side * side * side ) * ( sqrt ( 2 ) / 3 ) );
}
double f_filled ( double side ) {}
int main(void) {
int n_success = 0;
double param0[] = {3355.322051344013,-891.0551553192736,8242.699647177868,-9259.146104439229,7712.806145993083,-4998.858862079315,9771.127582524628,-5415.8106399098115,670.0774772280249,-7068.634369272122};
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 [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);} double f_gold ( double side ) { return ( ( side * side * side ) * ( sqrt ( 2 ) / 3 ) ); } double f_filled ( double side ) {}d sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( double side ) {
return ( ( side * side * side ) * ( sqrt ( 2 ) / 3 ) );
}
double f_filled ( double side ) {}
int main(void) {
int n_success = 0;
double param0[] = {3355.322051344013,-891.0551553192736,8242.699647177868,-9259.146104439229,7712.806145993083,-4998.858862079315,9771.127582524628,-5415.8106399098115,670.0774772280249,-7068.634369272122};
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;
} | void | [
"a) ,",
"b) return",
"c) void",
"d) ((int)",
"e) p2"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int m ) {
return ( n == m ) ? n : 1;
}
int f_filled ( int n, int m ) {}
f (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int m ) {
return ( n == m ) ? n : 1;
}
int f_filled ( int n, int m ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,22,17,74,93,56,5,5,9,98};
int param1[] = {57,22,17,74,22,54,33,68,75,21};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int m [MASK] { return ( n == m ) ? n : 1; } int f_filled ( int n, int m ) {}f (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int m ) {
return ( n == m ) ? n : 1;
}
int f_filled ( int n, int m ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,22,17,74,93,56,5,5,9,98};
int param1[] = {57,22,17,74,22,54,33,68,75,21};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | ) | [
"a) )",
"b) <iostream>",
"c) -",
"d) start",
"e) long"
] | 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 count = 0;
int cummulative_sum = 0;
sort ( arr, arr + n );
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] >= cummulative_sum ) {
count ++;
cummulative_sum += arr [ i ];
}
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
r ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] >= cummulative_sum ) {
count ++;
cummulative_sum += arr [ i ];
}
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,33,34,42,42,45,73};
int param0_1[] = {32,-10,-64,-20,92,-66,6,44,-62,-98,4,-48,44,42,12,-90,52,86,-30,-80,64,94,14};
int param0_2[] = {0,0,0,0,1};
int param0_3[] = {11,85,89,71,82,44};
int param0_4[] = {-96,-92,-78,-72,-68,-58,-52,-50,-50,-48,-42,-32,-20,-18,-4,0,0,2,18,18,20,24,32,34,36,38,38,60,66,68,70,72,72,74,76,96,98};
int param0_5[] = {0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,1,0,0,1};
int param0_6[] = {8,9,10,11,12,15,17,19,20,21,24,30,33,35,36,39,41,41,42,54,62,63,68,70,71,72,77,85,86,86,94,95,97,97};
int param0_7[] = {96,22,-60,4,-94,-16,46,10,76,-90,4,70,-72,60,28,-24,-66,92,-70,72,36};
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[] = {90,63,16,40,28,97,20,63,42,31,57,84,10,12,59,69,47,7,53,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[] = {5,16,2,3,21,16,31,20,13,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 count = 0; int cummulative_sum = 0; sort ( arr, arr + n [MASK] for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] >= cummulative_sum ) { count ++; cummulative_sum += arr [ i ]; } } return count; } int f_filled ( int arr [ ], int n ) {}r ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] >= cummulative_sum ) {
count ++;
cummulative_sum += arr [ i ];
}
}
return count;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,33,34,42,42,45,73};
int param0_1[] = {32,-10,-64,-20,92,-66,6,44,-62,-98,4,-48,44,42,12,-90,52,86,-30,-80,64,94,14};
int param0_2[] = {0,0,0,0,1};
int param0_3[] = {11,85,89,71,82,44};
int param0_4[] = {-96,-92,-78,-72,-68,-58,-52,-50,-50,-48,-42,-32,-20,-18,-4,0,0,2,18,18,20,24,32,34,36,38,38,60,66,68,70,72,72,74,76,96,98};
int param0_5[] = {0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,1,0,0,1};
int param0_6[] = {8,9,10,11,12,15,17,19,20,21,24,30,33,35,36,39,41,41,42,54,62,63,68,70,71,72,77,85,86,86,94,95,97,97};
int param0_7[] = {96,22,-60,4,-94,-16,46,10,76,-90,4,70,-72,60,28,-24,-66,92,-70,72,36};
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[] = {90,63,16,40,28,97,20,63,42,31,57,84,10,12,59,69,47,7,53,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[] = {5,16,2,3,21,16,31,20,13,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) );",
"b) return",
"c) put",
"d) pow",
"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 ( const vector < vector < int > > & matrix ) {
int rows = len(matrix);
if ( rows == 0 ) return false;
int columns = matrix [ 0 ] . size ( );
unordered_map < int, unordered_set < int > > table;
for ( int i = 0;
i < rows;
++ i ) {
for ( int j = 0;
j < columns - 1;
++ j ) {
for ( int k = j + 1;
k < columns;
++ k ) {
if ( matrix [ i ] [ j ] == 1 && matrix [ i ] [ k ] == 1 ) {
if ( table . find ( j ) != table . end ( ) && table [ j ] . find ( k ) != table [ j ] . end ( ) ) return true;
table [ j ] . insert ( k );
}
}
}
}
return false;
}
bool f_filled ( const vector < vector < int > > & matrix ) {}
ind ( k ) != table [ j ] . end ( ) ) return true;
table [ j ] . insert ( k );
}
}
}
}
return false;
}
bool f_filled ( const vector < vector < int > > & matrix ) {}
int main(void) {
int n_success = 0;
vector<vector<vector<int>>> param0 {{{48,25,59,46,32,28,36,78,51,68,32,63,94,45,90,93,95,29,66,1,55,53,49,16,51,17,18,84,42,99,81,70,8,40,38,24,15,69,87,65,62,15,13,34,47,97,25,79,89},{59,6,26,37,34,82,74,80,97,4,74,32,65,10,20,91,19,66,32,12,6,20,61,43,86,65,61,57,20,34,75,83,94,60,18,17,28,64,32,15,64,2,73,25,17,58},{53,73,23,77,38,21,75,40,32,24,71,27,77,18,79,76,40,76,7,32,33,52,19,34,29,64,73,13,6,54,1,27,38,78,68,29,25,29,74,8},{2,64,70,65,78,75,79,86,6,23,42,53,55,41,19,65,85,26,47,78,90,51,43},{63,34,35,15,75,35,20,41,85,7,97,95,11,7,13},{64,9,44,1,49,51,44,6,54,73,37,89,29,73,50,36,15,92,1,51,33,83,89,95,61,50,70,73,75,67,42,81,21,86,80,76,97,47,28,54},{41,2,65,77,25,93,77,12,49,35,56,48,73,75,89,41,52,11,81,5,11,92,22,3,61,99,68,69,31,41,74,9,92,58,53,12,65,93},{76,91,13,62,90,27,53,8,87,71,9,8,96,40,8,24,72,96,50,23,58,49,88,83,60,84,75,49,80,95,29,69,77,24,7,96,72,5,73,6,62,54,42,94,8,97,57},{23,16,32,72,45,56,85,70,14,10,55},{8,51,31,64,57,39,52,31,76,83,69,27,35,35,71,36,87,2,34,99,17,83,60,4,8,5,19,81,96,77,94,73,39,37,2,11,12}},{{1,79,87,97,7,62,65},{6,56,66,48,88,75,72,4,97,12,88,82,26,35,82,94,1,43,57,80,49},{29,75,9,81,88,75,77,18,89,29,9,22,17,52,45,53,30,93,15,76,70,35,33,8,26,29,36,26,94,16,74,89,19,54,89,61,44,33,73,45,72,57,78,64,70,49}},{{92,95,14,97,59,45,51,87,26,68,28,6,91,2,10,45,21,2,75,21,28,95,59,37,13,27,98,66,86,73,5,93,45,91,14,93},{2,44,43,32,58,69,78,77,55,87,7,18,22,65,25,73,52,94},{48,11,61},{94,25,96,99,21,46,6,61,7,81,46},{40,64,19,36,72,69,69,62,88,40,92,57,81,70,80,24,41,90,24,95,30,61,30,59,8,6,5,40,20,80,42,29,20,26,19,27,68,48,81,17,99,63,28,66,10,73,9,89},{9,64,15,86,39,36,9,1,55,66,73,63,66,16,17,76,10,39,93,70},{43,65,31,46,94,41,83,89,95,3,43,12,6,49,8,28,64,42,16,3,95,43,94,76,16,31},{9,56,14,88,77,91,26,49,32,51,89,79,30,77,85,37,69,70,86,20,5,35,29,90,17,97,80,16,13,25,71,31,33,8,21,65,99,24,53,20,20,62},{97,23,62,90,61,89,20,47,83,56,3,34,8},{53,41,27},{94,24,80,16,31,5,31,66,1,13,77,88,40,34,15,90,46,8,26,39,52,22,33,3,30,49,51},{50,39,59,41,79},{75,82,35,14,61,77,79,9,71,25,21,58,40,44,80,92,45,46,80,74,62,71,56,59,46,35,53,31,86,65,33,47,31,20,55,73,9,96,37,51,53,98,73,21},{3,91,78,78,96,77,32,50,59,34,1,28},{50,11},{8,57,96,5,68,47,18,63,62,64,68,2,88,70,68,2,38,39,21,36,37,26,73,85,51,18,88,3,67,9,7,97,7,44,9,13,91,20,83,11,66,43,62,34,40,96,13},{4,37,63,82,19,41,18,75,56,26,44,64,97,25,44,9,72,75,14,44,91,46,2,41,22,66,26,94,73,35,60,28,49,94,73,40,83,52,39,69,4,2,98,90},{81,15,33,85,24,4,76,32,67,63,46,21,31,26,61,77,32,59,89,70,79,68,68,8},{36,36,60,94,41,69,75,36,71,3,22,13,7,74,42,2,81,35,46,44,63,11,94,45,81,10,51,59,72,74,12,55,41,72,87,82,84,19,52,13,52,1,61,59,49},{70,57,5,6,65,66,78,65,61},{2,49,22,44,27,25,1},{56,85,62,45,35,14,97,81,14,27,32,90,73,98,23,35,93,8,40,18,71,12,11,32,92,52,11,89,58,10,74,54,3,67,17,23,61,24,54,12,36,22,88,64,73,89,76,48},{27,63,60,19,6,70,11,1,66,90,29,71,18,25,21,61,52,9,84,28,10,99,42,31,69,49,5,19,28,47,48,27,62},{6,30,86,95,8,8,23,25,50,21,12,76,56,77,82,91,44,2,55,56,18,4,22,35,88,33,66,28,4,84,2,64,59},{23,33,81,16,79,14,15,4,32,77,17,43,18,37,1,13,53,52,5,66,96,30,51,61,29,62,12,55,66},{63,81,85,16,23,90,26,65,49,96,91,55,78,92,50,2,98,44,34,6,5,82},{2,67,52,5,47,22,30,25,90,76,18,15,40,45,48,79,90,24,63,33,90,25,45,93,3,5,76,6,83,76,12,2,88,78,12,7,54,74,61,97,88,90,91,20,46,33,5,12},{28,38,21,36,66,32,87,78,53,57,87,80,79,61,65,4,43,96,13},{57,44,10,43,74,3,59,35,69,25,66,92,66,57,66,3,45,9,16,7,47,50,57,46,53,90,67,89,16,82,48,81,51,80,83,84,90},{1,97,93,55,52,20,3,28,49,38,38,11,59,98,22,87,7,73,18,91,72,26,71,59,50,91},{5,26,37,44,57,84,73,13,18,96,51,33,75,36,21,56,25,99,18},{90,90,26,61},{61,21,32,48,64,48,7,69,40,63,50,63,83,80,16},{51,19,94,14,63,34,21,4,91,96,75,85,7,22,63,48,64,1,63,83,71,8,97,67,84,41,76,40,68,7,94,96,73},{33,21,45,12,24,20,4,97,31,30,17,98,73,79,63,57,28,20,86},{82,86,3,87,17,7,19,63,93,70,99,26,46,37,24,10,77,9,79,39,2,51,79,3,39},{2,77,66,19,22,51,7,28,18,19,37,28,9,69,76,16,60,78,95,77,52,99,66,82,50,37,60},{78,75,87,13,10,11,40,11,17,28,79,26,32},{95,92,17,70,28,20,42,33,60,97,52,81,79,68,32,6,40,46,75,75,84,39},{14,5,34,98,57,38,88,51,5,70,20,6,7,19,47,12,26,53,60,60,34,48,7},{19,63,38,57,85,36,13}},{{52,56,26,61,68,41,84,98,51,57,79,92,33,85,71,78,55,22,96,27,6,55,37,20,62,2,56,41,31,83,81,44,80,4,98,62,83,28},{39,93,63,3,14,44,18,95,42,14,55,54,54,87,85,57,57,27,62,73,9,13,26,14,72,37,90,42,42},{43,26,54,83,96,93,93,16,8,32,17,34,56},{59,95,94,10,62,40,36,10,6,34,7,86,71,45,82,74,96,46,15,73,35,39,76,77,69,59,7,70,75,20,67,27,5},{45,79,16,85,58,19,14,43,35,33,51,28,74,40,69,25,55,28,6,96,38,90,69,27,33,95,68,58,65,56,89,69,98,61,48,83,84,11,5,89,38,57,13,31,99,6,43},{78,61,19,19,68,83,50,72,61,90,13,28,94,79,39,78,97,13,23,54,88},{34,56,16,73,59,66,89,36,62,66,77,19,93,49,16,64,60,19,83},{25,20,66,5,51,14,98,98,57,14,76,96,8,69,91,94,46,26,44,14,67,50,1,56,21,86,36,7,68,25,51,64,27,22,84,7,31,53,71,66},{39,80,18,31,31,7,87,62,71,5,34,87,33,51,53,55,66,11,58,45,92,50,77,50,43,82,16,29,33},{33,15,80,56,82,63,24,41,77,82,19,32,21,24,45,7,70,89,37,79,14,25,51,21,58,52},{77,6,17,14,83,67,37,8,71,21,88,16,72,46,96,98,11,57,99,56,68,65,98,29,59,11,60,36,24,75,23,21,97,58,80,97,40,8,7,5,4,38},{77,26},{75,96,87,50,64,88,66,94,1,19,88,1,18,96,1,91,68,91,85,1,20,99,2,9,68},{11,7,69,96,8,58,95,89,5,87,74,61,19,3,55,72,78,36},{77,13,44,85,54,3,79,23,44,40,70,67,78,28,32,51,12,58,52,2,68,23,38,62,40,85,78,95,72,78,49},{85,42,73},{73,68,18,36,3,24,12,22,77,1,46},{60,34,33,80,37,51,42,3,2,97,7,51,97,26,46,74,31,2,40,2,67,90,43,14,4,51,6,24,26},{58,87,20,27,20,71,36,22,55,6},{16,68,60,55,44,32,99,18,83,29,79,6,45,86,30,17,98,14},{8,45,41,74,35,20,97,30,52,19,87,93,75,25,34,58,27,41,74,14,96,3,21,77,16,5,62,25,14,35,57,24,54},{12,84,26,80,68,70,8,51,2,4,38,52,8,80,14,59,72,53,63,68,61,9,84,63,46,34,31,69,3,32,53,51,61,57,48,81,5,54,3,19,31,50},{85,92,84,94,24,62,90,89,9,90,73,89,22,80,21,88,20,13,48,6,9,78,76,15,50,23,23,42,31,8,86,35,68,59,92,89,92,10,4,32,73},{72,43,43,57,37,28,69,47},{89,32,87,42,68,35,58,53,70,16,47},{73,62,55,45,25,51,77,90,50,6,56,77,81,42,24,97,25,58,91,35,22},{18,45,40,60,53,25,28,23,20,71,57,81,12,64,32,20,41,82,98,78,53,77,96,60,20,3,39,36,74,81},{91,13,77,95,17,60,98,90,92,32,14,51,2,43,78,76,8,62,84,26,42,54,7,38},{63,69,64,80,50,51,77,12,27,49,57,89,2,84,92,67,85,45,14,90,53,33,83,88,86,28,81,17,51,94,64,24,75,11,71,25,67},{13,36,67,30,47,47,51,52,30,44,20,72,53,85,10,13,43,77,6,1,16,77,53,11,23,85,39,7,63,96,32,7},{99,93,66,53,33,80,12,19,6,59,65,34,34,62,27},{85,26,38,18,35,84,24,95,3,42,3,96,37,64},{68},{86,66,83,19,20,49,97,62,84,27,57,83,46,60,92,55,88,41,37,93,41,50,18},{78,81,58,12,78,28,82,20,34,29,22,26,98,87,48,27,14,37,40,94,42,12,43,46,72,7,23,9},{4,22,78,80,32,75,84,1,66,82,73,47,34,98,41,91,67,34,62},{79,21,86,40,17,5,49,93,10,43,99,64,8,56,72,15,10,30,30,14,80,31,27,57,60,33,75,14,92,37,1,6,43,1,51,73,83},{92,57,14,51},{6,31,18,83,40,82,84,36,75,52,93,87,49,16,53,45,87,68,77,79,71,84,27,26,15,5,8,92,92,16,77,39,35,69,61,52,61},{18,91,29,92,26,43,84,31,11,83,67,18,1,54,30,93,40,35,12,31,48,82,99,71,81,22,57,44,55,8,23,45,7,82,63,37,13,98,53},{32,2,97,38,5,17,8,7},{58,94,32,44,32,95,3,16,58,45,73,89,70,64,92,30,17,94,86,5,92,38,6,9,60,83,55,56},{42,19,31,55,51,40,85,81,83,89,62},{99,19,20,28,94},{36,90,94,37,56,29,7,66,75,66,90,8,39,72,43,23,95}},{{49,88,86,47,6,1,20,49,89,17,82,98,57,51,87,75,43},{66,32,51,49,75,33,66,35,91,46,35,52,58,57,71,86,77,50,68,10,11,22,72,48,21,68,77,30,37,66,9,66,98,17,9,24,76,24,15,12},{58,83,35,37,64,27,82,97,91,51,35,39,86,85,22,60,89,14,78,61,60,76,29,21,13,52,79,4,52,96,14,91,26,88,12,54,72,56,27,84,94,23,79,54,6},{95,30,62,38,80,47,92,95,21,51,98,14,68,94,50,51,52,41,37,32,51,53,55,35,7,70,80,12,16,51,13,14,60,45,11,39,60,94},{54,88,92,62,80,72},{25,11,71,39,81,14,43,69,62,18,68,88,22,74,62,78,17,39,40,16,50,98,94,49,40,59,95,89},{48},{29,37,74,25,41,39,11,33,96,85,10,2,23,73,62,93,8,38,61,62,41,59,56,34,34,98,55,82,40,31,13,95},{81,45,51,86,54,85,12},{19,75,88,72,19,52,22,59,57,6,30,55,9,72,36,71},{48,19,30,48,53,12,73,71,45,83,36,92,32,61,28,57,40,11,92,2,41,13,64,81,98,75,96,69,62,17,19,6,52,96,66,72,36,54,6,1,34,62,81},{9,1,27,12,85,33,87,39,62,74,45}},{{80,69,6,27,11,59,18,95,25,93,9,27,26,32,98,17,38,14,76,64,95,93,29,5,12,44,8,37,39,86,82,4,35,16,86,15,92,33,99},{50,22,41,83},{77,41,89,68,74,22,90,11,12,86,37,53,8,95,65,13,84,90,35,82,20,67,29,26,35,38,84,20,57,38,90,16,82,66,23,12,40,54,57,11,16},{27,27,7,39,50,81,9,73,68,92,5,91,97,61,82,7,46,79,88,89,60,14,38,79,52,85,81,25,82,17,99,82,36,27,6},{52,97,39,73,62,35,1,38,84,71,78,84,64,39,61,78,99,20,46,27,3,65,84,40,11,37,83,92,67,2,93,20,24,20,37,49},{26,20,97,14,75,43,99,32,77,73,13,8,84,54,48,67,65,98,75,12,97,42,42,63,35,28,75,75,86,17,70,48,77,31,8,18,50,30,33,40,71,56,5,64,51,33,45,25,97},{41,44,5,95,42,19,71,73,76,32,92,69,48,93,32,30,19,51},{47,36,32,2,28,99,65,84,27,71,83,96,62,21,52,94,27,91,9,85,71,29,24,11,45,40,21,5,15,7,15,81,15,82},{43,67,4,5,90,70,21,72,40,83,24,95,34,4,47,2,93,10,80,15,79,27,60,59,46,49,32,44,45,8,91,85,28,86,64,89,70,94,50},{75,13,2,45,25,44,16,9,48,77,67,63,3,56,84,58,64,34,95,85,82,48,85},{17,74,75,16,65,14,58,60,1,60,23,71,38,37,99,65,34,12,8,25,45,1}},{{91},{14,11,41,41,98,17,76,17,18,65,89,92,17,87,8,41,18,33,7,85,68},{82,59,42,79,36,7,41,36,38,85,94,95,43},{64,55,31,36,78,74,64,36,78,24,84,10,53,75,56,91,31,3,9,19,46,92,11,39,57,63,36,88,99,46,10,71,29,33,62,29,58,98,26},{87,62,3,74,9,3},{36,8,48,42,65,2,32,60,33,55,48,2,69,93,60,49,57,61,78,46,13,40,26,26,71,80,46,65,60,50,89,35,25,19,75,13,80,87,31,93,21,99,74,49,62,65,25},{25},{94,92,53,64,15,57,27,95,4,12,81,49,23,2,50,29,29,19,95,27,77},{27,5,50,22,42,92,98,27,1,3,79,8,57,64,40,6,31,78,91,94,91,31,38,4,30,86,64,92,62,42,8,53,47,56,48,88,6,96,50,61,4,94},{62,80,11},{44,61,44,14,44,3,62,95,69,44,67,29,96,36,88,80,59,35,33,57},{5,96,55,4,54,40,67},{84,76,63,40,53,73,19,94,66,12,46,2,53,42,86,33,83,54,56,49,28,60,84,53,49,53,53,44,50,96},{55,15,82,59,39,39,72,26,57,86,18,32,26,23,37,21,54,10,71,34,95,43,38,85,60,98,28,76,7,49,48,46,59,90,45,30,6,95,15,95,18,55,43,65,76,66},{59,49,3,60,53,36,3,12,67,69,39,89,40,66,78,89,64,86,91,7},{1,95,52},{94,14,8,16,47,59,22,94,74,44,50,4,29,13,26,16,3,45,78,81,70,41,15,82,35,61,89,93,57,7,45,20,85,88,31,33,87,26,73,25,89,10,24,8},{82,90,54,75,16,22,37,57,49,99,83,41,66,75,56,82,55,95,36,74,99,34,70,37,8,39,10,98,20,2,2,45,66},{53,58,37,84,36,26,18,40,67,18,68,17,43,88,40,48,74,59,8,43,93,87,76,35,88,93,75,17,55,21,16,16,24},{85,97,20,99,92,97,55,83,61},{71,3,14,95,1,13,27,7,5,71,78,97,24,25,23,42,55,17,77,28,4,8,3,37,18,24,73,95,48,40,52,76,3,49,16,15,67,55},{82,37,65,71,34},{26,1,83,26,6,99,24,70,94,57,93,88,98,42,42,22,52,56,19,87,16,15,79,51},{2,83,91,20,45,33,5,63,89,17,4,51,12,25,6,73,72,5,26},{32,21,10,56,16,53,11,9,3,42,40,64,1,57,30,49,92,57,19,20,37,35,88,92,88,24},{43,65,42,41},{94,86,30,12,51,64,57,35,20,6,40,86,77,98,90,79,33,31,37,48,13,50,22,53,5,24,12,97,8,10,72,55,99,86,97,18,47},{22,4,24,98,94,9,31,11,64,39,45,37,74,7,6,37,10,43,66,54},{43,73,30,1,66,57,38,76,84,12,22,34,62,8,33,67,20,32,66,91,23,96,14,69,50,66,7,81,65,51,90,92,46,54,66,9,31,63,43,79,73,70,50,40,47,83},{25,40,47,67,93,59,15,6,98,28,49,9,32,97,70,51,20,50,64,40,9,73,61,93,49},{9,86,54,68,29,8,26,74,30,24,62,73,23,98,46,2},{2,34,28,57,29,2,67,78,45,86,23,9,45,63,4,6,1,78,69,46,3,82,68,56,26,7,42,79,98,64,76,6,21,91,68,35,15,50,14,64,20,2},{30,91,56,33,23,48,20,41,98,50,83,21,65,97,30,48,75,17,3,64,22,97,64,99,98,39,6,19,8,98,83,6,12},{98,58,19,21,92,81,71,69,27,39,26,23,65,76,3,4,88,9,46,80,42,45,94,69,24,20,4,94,17,4,99,99,48,38,32,95,63,96,54,87,72,65,49,32,8,42,10,17},{59,84,3,26,22,25,1,61,39,74,94,38,20,5,80,68,80,54,17,33,94,55,28},{62,76,61,55,33,38,86,90,63,72,23,82,42,44,27,87,12,27,79,83,6,25,93,37,40,5,3,53,82,76,81,43,99,79,90,68,96,50,95,40,58,5,96,83,68,72},{70,71,67,68,89,88,47,57,60,48,88,88,54,50,31,62,37,51,44,3,48,42,24,70,92,51},{75,14,18,20,46,3,53,87,48,81,6,80,85,98,88,69,70,18},{79,3,39,97,20,21,82,79,12,93},{21,69,53,54,99,25,12,79,28,40,94,7,48,53,23,6,69,7,21,17,76,47},{50,67,76,80,45,2,97,34,98,70,50,15,60,42,75,47,64,24,77,16},{27,29,77,85,69,51,46,52,69,50,65,83,30,46,56,37,42,59,83,8,29,60,39,79,95,53,26,46,63,42,46,41,24,95,79,74},{30,53,62,3,52,43,20,50,31,40,50,68,41,40,80,66,15,77},{16,42,66,74,37,62,60,45,1,40,59,35,63,12,25,74,63,53,27,37,58,22,12,51,4,2,54,17,48,14,47,45,68,67,83,28,12,39,7,90,75},{45,73,4,90,62,95,57,60,33,13,76,36,24,60,39,5,47,56,92,83,4,6,11,98,51,18,39},{93,85,94,70,30,12,61,71,97,53,94,62,92,42,43,41,94,37,16,87,89,30,16,16,26,44,6,74,53,53,67,58,7,89,31,53,87,87,75,77,5},{42,66,60,49,89,63,51,56,68,74,87,69,5,28,54,3,5,54,89,40,96,36,44,35,4,63,33,78,84,10,86,25}},{{56,83,53,71,33,13,1,84,77,26,59,37,93,34,20},{2,31,43,92,53,5,85,14,13,86,15,78,43,63,34,2,13,2,30,17,32,26,61,58,61,87},{89,95,26,54,50,76,92,86,3,62,86,40,77,32,3,61,12,61,91,78,45,65,32,42,51,62,46,20},{41,8,47,91,48,33,79,48,86},{49,52,28,42,64,32,44,54,4,84,38,52,46,67,70,23,38,53,96,47,99,98,88,54,44,95,65,37,39,91,64,49,81,8,67,70},{62,9,38,62,93,12,29,35,40,64,62,6,40,7,70,83,19,76,38,43,68,82,47,96,71,61,9,82,74,6,84,95,87,24,11,72,90,28,97,75},{60,47,82,39,70,35,93,10,22,67,56,47,11,7,21,48,74,58,9,47,52,8,39,89,64,94,26,62,94,78,8,81,44,58,9,66,21,16,96},{59,23,42,85,84,56,78,56,47,5,37,67,93,7,19,49,62,86,71,42,68,31,46,42,28,42},{62,2,90,86,8,34,20,45,53,71,19,10,53,61,84,13,55,89,79,62,6,5,44,84,4,29,62,63,97,43,66,42,43,35,94,65,8,86,67,12,81,34,55,95,26,77},{25,62},{26,73,20,85,56,2,30,73,94,7,8,86,34,75,59,90,71,62,7,22,12,5,66,63},{22,27,1,54,93,81,58,78,48,48,45,27,80,8,44,74,57,32,85,40,31,2,87,13,51,20,91},{52,80,24,20,66,10,28},{2,33,63,50,88,23,36,38,8,86,92,45},{69,5,59,20,10,58,20,10,50,36,53,29,2,73,15,61,93,26,47,2,82,82,10,3,96,59,42,35},{71,49,46,15,76,7,85,14,59,94,98,54,35,83,53,60,43,73,37,45,6},{17,6,14,10,69,77,43,80,81,54},{27,50,89,67,55,75,49,39,6,19,29,5,71,17,58,55,39,16,71,76,2,23,8,42,55,58,68,12,69,97,71,57,82,55,66,37,67},{54,11,49,78,22,43,23,73,46,51,75,19,80,85,67,68,40,1,22,77,24,15,48,39,7,62,22,44,72,6,6,71,78,57,15,25,26,15,33,9,20,38,9,10},{89,65,67,92,8,53,65,98,56,80,3,83,80,26,96,55,71,34,74},{29,57,95,2,96,41,95,94},{73,93,10,64,5,94,31,53,59,61,2,80,49,3,85,83,59,83,20,46},{86,84,26,57,29,42,15,79,72,89,61,52,58,38,65,23,14,82,61,77,2,40,66,26,20,94,45,78,85,23,29,73,65,76,91,97,41,77,98,66,77,68,70},{41,53,23,59,65,1,18,94,4,28,61,39,81,73,37,44,90},{72,15,95,49,11,56,87,86,79,86,80,39,7,88,54,74,40,31,43,75,51,94,75,60,58,11,20,5,11,10,79,8,57,26,65,13,39,8,82,9,8,48,17,35,71,81},{48,53,33,24,18,93},{94,16,72,19,10,93,84,36,26,38,54,53,87,36,44,20,4,37,9,2,72,77,16,61,2,84,4,56,64,29,25,73,80,62,49,21,14,44,73,47,65,84,33,73,8},{79,10,51,57,62,87,35,83,83,72,59,80,24,6,41,35,82,33,46,99,49,35,31,10,56,14,87,72,12},{3,5,22,51,52,5,81,61,3},{39,72,3,60,30,60,50,66,62,89,54,52,99},{20,79,87,27,69,21,11,34,8,92,23,92,33},{94,87,74,63,4,84,7,87,94,62,56,97,98,52,50,48,24,5,90,32,86,58,3,21,15,22,97,60,39,72,61,72,95,74,10,54,27},{8,48,46,62,49,28,87,10,55,56,48,33,26,54,21,79,87,57,91,84,64,27,56,32,36,47,22,7,32,46,51,74,27,66,13,61,12,52,81,71,50},{81,14,14,8,21,61,31,39,29,51,16,85,44,62,2,71,88,60,78,32,46,17,47,65,78,65,94,18,3,15,9,61,73,3,62,87,1,54,97,61,37,23,65,84,62,33,34,78,23},{3,69,92,41,72,82,69,9,20,32,24,27,15,24,48,54,42,23,91,75,30,15,66,30,93,45,8,94,59,35,94,23,79,84,39,4,24,90,62},{65,19,57,24,78,96,61,40,94,74,33,18,97,68,44,68,82,45,75,44,62,16,65,38,55,61,53,98},{11,90,89,57,89,86,83,87,15,14,76,27,52,22,12,28,4,28,49,67,81,60,29,65,25,2,91,90,34,39,74,91,36,36,11,79,51,15,92,37,27},{96,53,99},{56,55,30,39,79,3,90,99,93,68,16,93,61,76,40,49,87,14,93,90,11,57,81,55,97,17,89,64,96,46,73,38,83,86,14,5,62,39,80,89,16,99},{40,72,2,54,95,50,99,38,16,34,19,50,20,63,1,26,87,79,76,50,54,32,86,26,84,83,45,16,93,90,82,44,81,28,36},{55,78,19,48,3,55,81,47,6,88,8,85,76,94,51,45,3},{68,15,80,27,28,1,40,78,80,85,21,63,27,44,30,60,62,66},{49,42,84,79,26,75,58,2,41,36,85,9,85,6,68,45,63,58,16,87,83,53},{6,21,86,58,48,27,18,73,16,79,51,33,63,26,37,88,48,58,44,32,58,23,31},{87,77,44,15,70,89,36,79,82,3,18,76,37,79,85,97,19,53,17,74,87,58,49,76,10,9,39,36,11,75,99,10,50,70,1,47,36,7},{64,95,33,47,20,98,54,94,1,78,27,75,69,19,73,68},{94,73,97,58,51,89,18,87,72,61,98,24,83,93,13,80,48,78,33,60},{53,81,89,64,14,47,67,85,67,31,45,93,36,54,7,65,5}},{{38,67,78,64,72,89,83,96,92,65,99,92,34,51,57,98,28,57,31,62,49,60,50,81,18,62,6,84,53,52,4,26,54,39,73,75,10,12,99,87,99,24,91,15},{96,97,87,80,9,6,57},{29,78,80,91,74,17,77,10,83,17,53,30,60,61,6,78,59,68,26,24,73,52,36,98,14,32,5,7,74,97,51,65,68,11,80,48,91,66,90,38},{5,88,21,92,18,47,48,56,31,51},{48,88,70,15,82,94,64,98,47,10,14,28,34,18,51,42,33,23,98,38,71,61,72,53,92,28,29,1,11,2,65,86,44,59,4,16,26,2,58,39,32,38,83,10,80},{68,53,68,93,45,41,8,51,53,31,94,54,55,36,46,52,10,35,54,38,41},{12,30,80,25,68,48,8,18,16,88,83,74,53,16,29,43,46,42,46,78,11,10,43,72,69,2,39,66,9},{5,55,58,20,42,42,11,99,42,76,47,67,30,75,5,31,27,45,39,17,86,24,69,95,67,44,28,47,50,40,31,93,63,82},{70,95,37,49,36,56,61,43,25,19,34,21,2,54,63,24,81,3,39,49,4,49,81,78,91,83,97,11,96,14,42,16,69,28,68,98,24,67},{2,18,22,44,77,52,62,24,46,40,44,30,29,49,47,20,85,99,47,16,34,50},{29,42,24,58,44,59,24,48,96,6,88,89,8,86,69,33,79,95,3,2,57,7,91,85,88,79,44,47,98,78,16,15,3,65,41,58,21},{28,8,36,76,17,41,2,67},{67,62,33,39,36,62,95,11,40},{67,38,49,22,76,82,26,78,79,7},{54,6,71,82,1,60,34,89,9,19,97,37,22,37,65,71,21,74,33},{34,1,41,10,87,39,9,70,18,79,41,18,67,28,9,27,81,10,12,66,72,34,99,37},{58,93,24,14,5,35,53,84,61,13,80,22,26,88,87,7,14},{97,9,67,61,4,72,63,91,77,57,14,98,99,20,6,71,66,39,76,80,45,21,82,41,20,88,24,10,11,7,93,38,71,92,40,81,69,15,52,49,54,18,92,33,21,91,21,5},{77,92,26,58,72,55,76,18,13,59,9,12,31,24,36,33,71,87,55,19,42,25,82,66,34},{81,4,22,35,98,59,27,67,72,4,69,88,39,73,55,96,25,56,70,49,88,61,34,20},{66,64,38,47,88,86,78,12,4},{48,13,19,77,49,93,58,15,20,1,98,11,86,96,43,28,87,84,82,16,64,55,99,65,26,85,35,54,17,97,63,12,43,74,65,13},{63,16,94,97,94,85},{5,50,19,79,48,73,85,65,37,95,50,83,33,80,43,87,4,34,96,60,25,44,45,71,25,11,47,5,13,4,90,64,20,98,44,26,61},{20,42,31,16,76,4,88,97,36,81,37,69,43,83},{15,76,8,82,90,32,89,23,24,47,50,61,38,29,27,91,86,78,91,4,79,35,58,25,7,64},{35,71,14,29,11,35,61,21,61,26,27,93,95,77,5,33,94,67,57,61,28,90,60,2,67,94,18,79,62,48,89,61},{93,46,35,32,25,59,87,24,46,98,20,5},{42,77,82,41,35,8,91,12,44,22,91,56,85,79,65,36,3,94,73,75,48,17,96,23,61,6,28,63,33},{75,98,72,69,35,90,42,44,28,64,4,58,76,2,28,33,14,7,98,36,19,52,33,66,35},{88,57,47,21,50,83,48,93,25,25,35,39,34,98,80,22,14,48,64,77,87,56,27,33,15,81,55,72,5,25,2,88,17,73,12,3,92,80,5,8,27,44,50,4,69},{90,94,15,78,79,78,16,22,85,33,39,30,26,22,73,37,25,16,70,62,26,3,30,46,33,68,91,93,26,60,85,45,62,75,2,10,33,7,69,30,29,46,94},{35,58,73,81,93,12,83,37,63,60,89,40,32},{54,63,76,76,77,50,2,53,82,50,46,5,49,37},{77,16,95},{6,66,1,16,10,52,61,28,95,56,49,60,46,75,4,49,9,81,93,5},{93,71,54,16,35,58,91,36,98,76,65,98,45,69,19,1,49,38,85,91,52,9,20,95,38,81,32,1,70,71,50,93,62,3,23,34,35,63,55,62,12,14,3,48,31,35,10,90},{76,14,65,74,49,58,56,26,27,5,22,82,85,18,26,71,71,73,27,9,86,98,78},{97,68,59,18,81,34,52,55,15,59,22,35,64,87,96,23,24,17,30,20,15,16,84,32,32,24,5}},{{2,95,2},{92,62,11,25,66,2,91,54,77,28,94,15,90,63},{1,58,34,7,40,62,94,25,30,33,53,33,92,4,55,4,82,32,62,36,24,84},{54,63,7,55,37,64,44,55,55,28,2,42,97,3,99,99,24,86,84,17,41,87,68,34,17,70,23,84,74,4,78,84,83,48,75},{73,99,81,84,54,2,23,11,8},{75,17,49,12,17,53,58,1,64,83,29,36,96,34,89,62,95,38,41,95,16,31,62,52,2,91,5,90,35,20},{88,82,21,25,94,12,88,85,42,76,59,72,23,20,41,15,5,42,52,45,20},{56,69,48,44,39,97,32,88,70,71,75,39,42,32,45,87,43,9,70,38,39,60,70,19,90,45,57},{80,81,38,79,44,94,9,59,20,31,64,67,70,37,94,68,94,69,26,63,54,2,76,95,27,7,6,32,19,27,44,44,59,81,94,4,92,19,92,14,55,74,2,29,28,98,16,34},{94,5,74,9,55,74,73,32,92,11,90,97},{78,65,56,81,62,51,99,11,94,42,35,94,73,85,75,65,25,27,81,94,3,6,75,5},{10,35,64,71,9,86,93,13,40,23,39,65,48,76,53,5,87,63,62,74,38,90,21,31,38,14,86,61,78,65,96,29,53,81,79,8,36,28,53,60,64,9,35,79,40,69,5,5,56},{63,89,75,22,83,98,97,16,76,2,55,50},{20,98,48,99,69,23,73,99,53,81,74,40,74,71,29,34,51,37,68,96,83,12,97,68,59,34,70},{62,3,97,59,36,26,42,66,92,60,1,80,4,66,9,76,45,41,65,67,87,78,49,60,7,33,53,55},{58,24,52,50,98,4,4,10,32,6,18,71,42,32,27,63,72,18,85,83,45,95,31,97,94,82,39,74,12,85,22,40,34,17,2},{1,48,96,7,6,56,62,88,39,77,5,98,20,69,26,13,57,4,57,64,24,16,27,81,7,49,46,93,13,17,26,13,81,65},{51,47,12,60,89,15,93,53},{21,6,26,25,28,44,73,28,63,27,64,21,50,85,75,44,86,97,34,69,36,27,26,86},{21,3,65,94,90,72,71,83,39,78,41,90,82,70,23,72,99,48,97,87},{56,35,92,24,99,1,5,82,51,68},{72,44,64,59},{77,58,8,45,22,83,81,65,23,56,81},{28,93,96,10,24,13,24,60,37,17,91,54,69,46,8,93,15,96,17,25,75,9,36,76,34,29,8,28,56,8,71,37,20,38,45,47,73,86,52,13,96,90,35,11},{96,29,14,84,59,14,28,52,80,22,10,94,18,67,39,52,72},{17,45,48,54,57,68,56,17,86,24,1,67,87,60,58,98,45,80,32},{84,89,7,59,5,20,40,81,80,5,80}}};
for (int i =0; i < len(param0); i+=2 )
for (int j =0; j < param0[i].size(); ++j )
for (int k =0; k < param0[i][j].size(); ++k )
param0[i][j][k]= param0[i][j][k] %2;
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( const vector < [MASK] < int > > & matrix ) { int rows = len(matrix); if ( rows == 0 ) return false; int columns = matrix [ 0 ] . size ( ); unordered_map < int, unordered_set < int > > table; for ( int i = 0; i < rows; ++ i ) { for ( int j = 0; j < columns - 1; ++ j ) { for ( int k = j + 1; k < columns; ++ k ) { if ( matrix [ i ] [ j ] == 1 && matrix [ i ] [ k ] == 1 ) { if ( table . find ( j ) != table . end ( ) && table [ j ] . find ( k ) != table [ j ] . end ( ) ) return true; table [ j ] . insert ( k ); } } } } return false; } bool f_filled ( const vector < vector < int > > & matrix ) {}ind ( k ) != table [ j ] . end ( ) ) return true;
table [ j ] . insert ( k );
}
}
}
}
return false;
}
bool f_filled ( const vector < vector < int > > & matrix ) {}
int main(void) {
int n_success = 0;
vector<vector<vector<int>>> param0 {{{48,25,59,46,32,28,36,78,51,68,32,63,94,45,90,93,95,29,66,1,55,53,49,16,51,17,18,84,42,99,81,70,8,40,38,24,15,69,87,65,62,15,13,34,47,97,25,79,89},{59,6,26,37,34,82,74,80,97,4,74,32,65,10,20,91,19,66,32,12,6,20,61,43,86,65,61,57,20,34,75,83,94,60,18,17,28,64,32,15,64,2,73,25,17,58},{53,73,23,77,38,21,75,40,32,24,71,27,77,18,79,76,40,76,7,32,33,52,19,34,29,64,73,13,6,54,1,27,38,78,68,29,25,29,74,8},{2,64,70,65,78,75,79,86,6,23,42,53,55,41,19,65,85,26,47,78,90,51,43},{63,34,35,15,75,35,20,41,85,7,97,95,11,7,13},{64,9,44,1,49,51,44,6,54,73,37,89,29,73,50,36,15,92,1,51,33,83,89,95,61,50,70,73,75,67,42,81,21,86,80,76,97,47,28,54},{41,2,65,77,25,93,77,12,49,35,56,48,73,75,89,41,52,11,81,5,11,92,22,3,61,99,68,69,31,41,74,9,92,58,53,12,65,93},{76,91,13,62,90,27,53,8,87,71,9,8,96,40,8,24,72,96,50,23,58,49,88,83,60,84,75,49,80,95,29,69,77,24,7,96,72,5,73,6,62,54,42,94,8,97,57},{23,16,32,72,45,56,85,70,14,10,55},{8,51,31,64,57,39,52,31,76,83,69,27,35,35,71,36,87,2,34,99,17,83,60,4,8,5,19,81,96,77,94,73,39,37,2,11,12}},{{1,79,87,97,7,62,65},{6,56,66,48,88,75,72,4,97,12,88,82,26,35,82,94,1,43,57,80,49},{29,75,9,81,88,75,77,18,89,29,9,22,17,52,45,53,30,93,15,76,70,35,33,8,26,29,36,26,94,16,74,89,19,54,89,61,44,33,73,45,72,57,78,64,70,49}},{{92,95,14,97,59,45,51,87,26,68,28,6,91,2,10,45,21,2,75,21,28,95,59,37,13,27,98,66,86,73,5,93,45,91,14,93},{2,44,43,32,58,69,78,77,55,87,7,18,22,65,25,73,52,94},{48,11,61},{94,25,96,99,21,46,6,61,7,81,46},{40,64,19,36,72,69,69,62,88,40,92,57,81,70,80,24,41,90,24,95,30,61,30,59,8,6,5,40,20,80,42,29,20,26,19,27,68,48,81,17,99,63,28,66,10,73,9,89},{9,64,15,86,39,36,9,1,55,66,73,63,66,16,17,76,10,39,93,70},{43,65,31,46,94,41,83,89,95,3,43,12,6,49,8,28,64,42,16,3,95,43,94,76,16,31},{9,56,14,88,77,91,26,49,32,51,89,79,30,77,85,37,69,70,86,20,5,35,29,90,17,97,80,16,13,25,71,31,33,8,21,65,99,24,53,20,20,62},{97,23,62,90,61,89,20,47,83,56,3,34,8},{53,41,27},{94,24,80,16,31,5,31,66,1,13,77,88,40,34,15,90,46,8,26,39,52,22,33,3,30,49,51},{50,39,59,41,79},{75,82,35,14,61,77,79,9,71,25,21,58,40,44,80,92,45,46,80,74,62,71,56,59,46,35,53,31,86,65,33,47,31,20,55,73,9,96,37,51,53,98,73,21},{3,91,78,78,96,77,32,50,59,34,1,28},{50,11},{8,57,96,5,68,47,18,63,62,64,68,2,88,70,68,2,38,39,21,36,37,26,73,85,51,18,88,3,67,9,7,97,7,44,9,13,91,20,83,11,66,43,62,34,40,96,13},{4,37,63,82,19,41,18,75,56,26,44,64,97,25,44,9,72,75,14,44,91,46,2,41,22,66,26,94,73,35,60,28,49,94,73,40,83,52,39,69,4,2,98,90},{81,15,33,85,24,4,76,32,67,63,46,21,31,26,61,77,32,59,89,70,79,68,68,8},{36,36,60,94,41,69,75,36,71,3,22,13,7,74,42,2,81,35,46,44,63,11,94,45,81,10,51,59,72,74,12,55,41,72,87,82,84,19,52,13,52,1,61,59,49},{70,57,5,6,65,66,78,65,61},{2,49,22,44,27,25,1},{56,85,62,45,35,14,97,81,14,27,32,90,73,98,23,35,93,8,40,18,71,12,11,32,92,52,11,89,58,10,74,54,3,67,17,23,61,24,54,12,36,22,88,64,73,89,76,48},{27,63,60,19,6,70,11,1,66,90,29,71,18,25,21,61,52,9,84,28,10,99,42,31,69,49,5,19,28,47,48,27,62},{6,30,86,95,8,8,23,25,50,21,12,76,56,77,82,91,44,2,55,56,18,4,22,35,88,33,66,28,4,84,2,64,59},{23,33,81,16,79,14,15,4,32,77,17,43,18,37,1,13,53,52,5,66,96,30,51,61,29,62,12,55,66},{63,81,85,16,23,90,26,65,49,96,91,55,78,92,50,2,98,44,34,6,5,82},{2,67,52,5,47,22,30,25,90,76,18,15,40,45,48,79,90,24,63,33,90,25,45,93,3,5,76,6,83,76,12,2,88,78,12,7,54,74,61,97,88,90,91,20,46,33,5,12},{28,38,21,36,66,32,87,78,53,57,87,80,79,61,65,4,43,96,13},{57,44,10,43,74,3,59,35,69,25,66,92,66,57,66,3,45,9,16,7,47,50,57,46,53,90,67,89,16,82,48,81,51,80,83,84,90},{1,97,93,55,52,20,3,28,49,38,38,11,59,98,22,87,7,73,18,91,72,26,71,59,50,91},{5,26,37,44,57,84,73,13,18,96,51,33,75,36,21,56,25,99,18},{90,90,26,61},{61,21,32,48,64,48,7,69,40,63,50,63,83,80,16},{51,19,94,14,63,34,21,4,91,96,75,85,7,22,63,48,64,1,63,83,71,8,97,67,84,41,76,40,68,7,94,96,73},{33,21,45,12,24,20,4,97,31,30,17,98,73,79,63,57,28,20,86},{82,86,3,87,17,7,19,63,93,70,99,26,46,37,24,10,77,9,79,39,2,51,79,3,39},{2,77,66,19,22,51,7,28,18,19,37,28,9,69,76,16,60,78,95,77,52,99,66,82,50,37,60},{78,75,87,13,10,11,40,11,17,28,79,26,32},{95,92,17,70,28,20,42,33,60,97,52,81,79,68,32,6,40,46,75,75,84,39},{14,5,34,98,57,38,88,51,5,70,20,6,7,19,47,12,26,53,60,60,34,48,7},{19,63,38,57,85,36,13}},{{52,56,26,61,68,41,84,98,51,57,79,92,33,85,71,78,55,22,96,27,6,55,37,20,62,2,56,41,31,83,81,44,80,4,98,62,83,28},{39,93,63,3,14,44,18,95,42,14,55,54,54,87,85,57,57,27,62,73,9,13,26,14,72,37,90,42,42},{43,26,54,83,96,93,93,16,8,32,17,34,56},{59,95,94,10,62,40,36,10,6,34,7,86,71,45,82,74,96,46,15,73,35,39,76,77,69,59,7,70,75,20,67,27,5},{45,79,16,85,58,19,14,43,35,33,51,28,74,40,69,25,55,28,6,96,38,90,69,27,33,95,68,58,65,56,89,69,98,61,48,83,84,11,5,89,38,57,13,31,99,6,43},{78,61,19,19,68,83,50,72,61,90,13,28,94,79,39,78,97,13,23,54,88},{34,56,16,73,59,66,89,36,62,66,77,19,93,49,16,64,60,19,83},{25,20,66,5,51,14,98,98,57,14,76,96,8,69,91,94,46,26,44,14,67,50,1,56,21,86,36,7,68,25,51,64,27,22,84,7,31,53,71,66},{39,80,18,31,31,7,87,62,71,5,34,87,33,51,53,55,66,11,58,45,92,50,77,50,43,82,16,29,33},{33,15,80,56,82,63,24,41,77,82,19,32,21,24,45,7,70,89,37,79,14,25,51,21,58,52},{77,6,17,14,83,67,37,8,71,21,88,16,72,46,96,98,11,57,99,56,68,65,98,29,59,11,60,36,24,75,23,21,97,58,80,97,40,8,7,5,4,38},{77,26},{75,96,87,50,64,88,66,94,1,19,88,1,18,96,1,91,68,91,85,1,20,99,2,9,68},{11,7,69,96,8,58,95,89,5,87,74,61,19,3,55,72,78,36},{77,13,44,85,54,3,79,23,44,40,70,67,78,28,32,51,12,58,52,2,68,23,38,62,40,85,78,95,72,78,49},{85,42,73},{73,68,18,36,3,24,12,22,77,1,46},{60,34,33,80,37,51,42,3,2,97,7,51,97,26,46,74,31,2,40,2,67,90,43,14,4,51,6,24,26},{58,87,20,27,20,71,36,22,55,6},{16,68,60,55,44,32,99,18,83,29,79,6,45,86,30,17,98,14},{8,45,41,74,35,20,97,30,52,19,87,93,75,25,34,58,27,41,74,14,96,3,21,77,16,5,62,25,14,35,57,24,54},{12,84,26,80,68,70,8,51,2,4,38,52,8,80,14,59,72,53,63,68,61,9,84,63,46,34,31,69,3,32,53,51,61,57,48,81,5,54,3,19,31,50},{85,92,84,94,24,62,90,89,9,90,73,89,22,80,21,88,20,13,48,6,9,78,76,15,50,23,23,42,31,8,86,35,68,59,92,89,92,10,4,32,73},{72,43,43,57,37,28,69,47},{89,32,87,42,68,35,58,53,70,16,47},{73,62,55,45,25,51,77,90,50,6,56,77,81,42,24,97,25,58,91,35,22},{18,45,40,60,53,25,28,23,20,71,57,81,12,64,32,20,41,82,98,78,53,77,96,60,20,3,39,36,74,81},{91,13,77,95,17,60,98,90,92,32,14,51,2,43,78,76,8,62,84,26,42,54,7,38},{63,69,64,80,50,51,77,12,27,49,57,89,2,84,92,67,85,45,14,90,53,33,83,88,86,28,81,17,51,94,64,24,75,11,71,25,67},{13,36,67,30,47,47,51,52,30,44,20,72,53,85,10,13,43,77,6,1,16,77,53,11,23,85,39,7,63,96,32,7},{99,93,66,53,33,80,12,19,6,59,65,34,34,62,27},{85,26,38,18,35,84,24,95,3,42,3,96,37,64},{68},{86,66,83,19,20,49,97,62,84,27,57,83,46,60,92,55,88,41,37,93,41,50,18},{78,81,58,12,78,28,82,20,34,29,22,26,98,87,48,27,14,37,40,94,42,12,43,46,72,7,23,9},{4,22,78,80,32,75,84,1,66,82,73,47,34,98,41,91,67,34,62},{79,21,86,40,17,5,49,93,10,43,99,64,8,56,72,15,10,30,30,14,80,31,27,57,60,33,75,14,92,37,1,6,43,1,51,73,83},{92,57,14,51},{6,31,18,83,40,82,84,36,75,52,93,87,49,16,53,45,87,68,77,79,71,84,27,26,15,5,8,92,92,16,77,39,35,69,61,52,61},{18,91,29,92,26,43,84,31,11,83,67,18,1,54,30,93,40,35,12,31,48,82,99,71,81,22,57,44,55,8,23,45,7,82,63,37,13,98,53},{32,2,97,38,5,17,8,7},{58,94,32,44,32,95,3,16,58,45,73,89,70,64,92,30,17,94,86,5,92,38,6,9,60,83,55,56},{42,19,31,55,51,40,85,81,83,89,62},{99,19,20,28,94},{36,90,94,37,56,29,7,66,75,66,90,8,39,72,43,23,95}},{{49,88,86,47,6,1,20,49,89,17,82,98,57,51,87,75,43},{66,32,51,49,75,33,66,35,91,46,35,52,58,57,71,86,77,50,68,10,11,22,72,48,21,68,77,30,37,66,9,66,98,17,9,24,76,24,15,12},{58,83,35,37,64,27,82,97,91,51,35,39,86,85,22,60,89,14,78,61,60,76,29,21,13,52,79,4,52,96,14,91,26,88,12,54,72,56,27,84,94,23,79,54,6},{95,30,62,38,80,47,92,95,21,51,98,14,68,94,50,51,52,41,37,32,51,53,55,35,7,70,80,12,16,51,13,14,60,45,11,39,60,94},{54,88,92,62,80,72},{25,11,71,39,81,14,43,69,62,18,68,88,22,74,62,78,17,39,40,16,50,98,94,49,40,59,95,89},{48},{29,37,74,25,41,39,11,33,96,85,10,2,23,73,62,93,8,38,61,62,41,59,56,34,34,98,55,82,40,31,13,95},{81,45,51,86,54,85,12},{19,75,88,72,19,52,22,59,57,6,30,55,9,72,36,71},{48,19,30,48,53,12,73,71,45,83,36,92,32,61,28,57,40,11,92,2,41,13,64,81,98,75,96,69,62,17,19,6,52,96,66,72,36,54,6,1,34,62,81},{9,1,27,12,85,33,87,39,62,74,45}},{{80,69,6,27,11,59,18,95,25,93,9,27,26,32,98,17,38,14,76,64,95,93,29,5,12,44,8,37,39,86,82,4,35,16,86,15,92,33,99},{50,22,41,83},{77,41,89,68,74,22,90,11,12,86,37,53,8,95,65,13,84,90,35,82,20,67,29,26,35,38,84,20,57,38,90,16,82,66,23,12,40,54,57,11,16},{27,27,7,39,50,81,9,73,68,92,5,91,97,61,82,7,46,79,88,89,60,14,38,79,52,85,81,25,82,17,99,82,36,27,6},{52,97,39,73,62,35,1,38,84,71,78,84,64,39,61,78,99,20,46,27,3,65,84,40,11,37,83,92,67,2,93,20,24,20,37,49},{26,20,97,14,75,43,99,32,77,73,13,8,84,54,48,67,65,98,75,12,97,42,42,63,35,28,75,75,86,17,70,48,77,31,8,18,50,30,33,40,71,56,5,64,51,33,45,25,97},{41,44,5,95,42,19,71,73,76,32,92,69,48,93,32,30,19,51},{47,36,32,2,28,99,65,84,27,71,83,96,62,21,52,94,27,91,9,85,71,29,24,11,45,40,21,5,15,7,15,81,15,82},{43,67,4,5,90,70,21,72,40,83,24,95,34,4,47,2,93,10,80,15,79,27,60,59,46,49,32,44,45,8,91,85,28,86,64,89,70,94,50},{75,13,2,45,25,44,16,9,48,77,67,63,3,56,84,58,64,34,95,85,82,48,85},{17,74,75,16,65,14,58,60,1,60,23,71,38,37,99,65,34,12,8,25,45,1}},{{91},{14,11,41,41,98,17,76,17,18,65,89,92,17,87,8,41,18,33,7,85,68},{82,59,42,79,36,7,41,36,38,85,94,95,43},{64,55,31,36,78,74,64,36,78,24,84,10,53,75,56,91,31,3,9,19,46,92,11,39,57,63,36,88,99,46,10,71,29,33,62,29,58,98,26},{87,62,3,74,9,3},{36,8,48,42,65,2,32,60,33,55,48,2,69,93,60,49,57,61,78,46,13,40,26,26,71,80,46,65,60,50,89,35,25,19,75,13,80,87,31,93,21,99,74,49,62,65,25},{25},{94,92,53,64,15,57,27,95,4,12,81,49,23,2,50,29,29,19,95,27,77},{27,5,50,22,42,92,98,27,1,3,79,8,57,64,40,6,31,78,91,94,91,31,38,4,30,86,64,92,62,42,8,53,47,56,48,88,6,96,50,61,4,94},{62,80,11},{44,61,44,14,44,3,62,95,69,44,67,29,96,36,88,80,59,35,33,57},{5,96,55,4,54,40,67},{84,76,63,40,53,73,19,94,66,12,46,2,53,42,86,33,83,54,56,49,28,60,84,53,49,53,53,44,50,96},{55,15,82,59,39,39,72,26,57,86,18,32,26,23,37,21,54,10,71,34,95,43,38,85,60,98,28,76,7,49,48,46,59,90,45,30,6,95,15,95,18,55,43,65,76,66},{59,49,3,60,53,36,3,12,67,69,39,89,40,66,78,89,64,86,91,7},{1,95,52},{94,14,8,16,47,59,22,94,74,44,50,4,29,13,26,16,3,45,78,81,70,41,15,82,35,61,89,93,57,7,45,20,85,88,31,33,87,26,73,25,89,10,24,8},{82,90,54,75,16,22,37,57,49,99,83,41,66,75,56,82,55,95,36,74,99,34,70,37,8,39,10,98,20,2,2,45,66},{53,58,37,84,36,26,18,40,67,18,68,17,43,88,40,48,74,59,8,43,93,87,76,35,88,93,75,17,55,21,16,16,24},{85,97,20,99,92,97,55,83,61},{71,3,14,95,1,13,27,7,5,71,78,97,24,25,23,42,55,17,77,28,4,8,3,37,18,24,73,95,48,40,52,76,3,49,16,15,67,55},{82,37,65,71,34},{26,1,83,26,6,99,24,70,94,57,93,88,98,42,42,22,52,56,19,87,16,15,79,51},{2,83,91,20,45,33,5,63,89,17,4,51,12,25,6,73,72,5,26},{32,21,10,56,16,53,11,9,3,42,40,64,1,57,30,49,92,57,19,20,37,35,88,92,88,24},{43,65,42,41},{94,86,30,12,51,64,57,35,20,6,40,86,77,98,90,79,33,31,37,48,13,50,22,53,5,24,12,97,8,10,72,55,99,86,97,18,47},{22,4,24,98,94,9,31,11,64,39,45,37,74,7,6,37,10,43,66,54},{43,73,30,1,66,57,38,76,84,12,22,34,62,8,33,67,20,32,66,91,23,96,14,69,50,66,7,81,65,51,90,92,46,54,66,9,31,63,43,79,73,70,50,40,47,83},{25,40,47,67,93,59,15,6,98,28,49,9,32,97,70,51,20,50,64,40,9,73,61,93,49},{9,86,54,68,29,8,26,74,30,24,62,73,23,98,46,2},{2,34,28,57,29,2,67,78,45,86,23,9,45,63,4,6,1,78,69,46,3,82,68,56,26,7,42,79,98,64,76,6,21,91,68,35,15,50,14,64,20,2},{30,91,56,33,23,48,20,41,98,50,83,21,65,97,30,48,75,17,3,64,22,97,64,99,98,39,6,19,8,98,83,6,12},{98,58,19,21,92,81,71,69,27,39,26,23,65,76,3,4,88,9,46,80,42,45,94,69,24,20,4,94,17,4,99,99,48,38,32,95,63,96,54,87,72,65,49,32,8,42,10,17},{59,84,3,26,22,25,1,61,39,74,94,38,20,5,80,68,80,54,17,33,94,55,28},{62,76,61,55,33,38,86,90,63,72,23,82,42,44,27,87,12,27,79,83,6,25,93,37,40,5,3,53,82,76,81,43,99,79,90,68,96,50,95,40,58,5,96,83,68,72},{70,71,67,68,89,88,47,57,60,48,88,88,54,50,31,62,37,51,44,3,48,42,24,70,92,51},{75,14,18,20,46,3,53,87,48,81,6,80,85,98,88,69,70,18},{79,3,39,97,20,21,82,79,12,93},{21,69,53,54,99,25,12,79,28,40,94,7,48,53,23,6,69,7,21,17,76,47},{50,67,76,80,45,2,97,34,98,70,50,15,60,42,75,47,64,24,77,16},{27,29,77,85,69,51,46,52,69,50,65,83,30,46,56,37,42,59,83,8,29,60,39,79,95,53,26,46,63,42,46,41,24,95,79,74},{30,53,62,3,52,43,20,50,31,40,50,68,41,40,80,66,15,77},{16,42,66,74,37,62,60,45,1,40,59,35,63,12,25,74,63,53,27,37,58,22,12,51,4,2,54,17,48,14,47,45,68,67,83,28,12,39,7,90,75},{45,73,4,90,62,95,57,60,33,13,76,36,24,60,39,5,47,56,92,83,4,6,11,98,51,18,39},{93,85,94,70,30,12,61,71,97,53,94,62,92,42,43,41,94,37,16,87,89,30,16,16,26,44,6,74,53,53,67,58,7,89,31,53,87,87,75,77,5},{42,66,60,49,89,63,51,56,68,74,87,69,5,28,54,3,5,54,89,40,96,36,44,35,4,63,33,78,84,10,86,25}},{{56,83,53,71,33,13,1,84,77,26,59,37,93,34,20},{2,31,43,92,53,5,85,14,13,86,15,78,43,63,34,2,13,2,30,17,32,26,61,58,61,87},{89,95,26,54,50,76,92,86,3,62,86,40,77,32,3,61,12,61,91,78,45,65,32,42,51,62,46,20},{41,8,47,91,48,33,79,48,86},{49,52,28,42,64,32,44,54,4,84,38,52,46,67,70,23,38,53,96,47,99,98,88,54,44,95,65,37,39,91,64,49,81,8,67,70},{62,9,38,62,93,12,29,35,40,64,62,6,40,7,70,83,19,76,38,43,68,82,47,96,71,61,9,82,74,6,84,95,87,24,11,72,90,28,97,75},{60,47,82,39,70,35,93,10,22,67,56,47,11,7,21,48,74,58,9,47,52,8,39,89,64,94,26,62,94,78,8,81,44,58,9,66,21,16,96},{59,23,42,85,84,56,78,56,47,5,37,67,93,7,19,49,62,86,71,42,68,31,46,42,28,42},{62,2,90,86,8,34,20,45,53,71,19,10,53,61,84,13,55,89,79,62,6,5,44,84,4,29,62,63,97,43,66,42,43,35,94,65,8,86,67,12,81,34,55,95,26,77},{25,62},{26,73,20,85,56,2,30,73,94,7,8,86,34,75,59,90,71,62,7,22,12,5,66,63},{22,27,1,54,93,81,58,78,48,48,45,27,80,8,44,74,57,32,85,40,31,2,87,13,51,20,91},{52,80,24,20,66,10,28},{2,33,63,50,88,23,36,38,8,86,92,45},{69,5,59,20,10,58,20,10,50,36,53,29,2,73,15,61,93,26,47,2,82,82,10,3,96,59,42,35},{71,49,46,15,76,7,85,14,59,94,98,54,35,83,53,60,43,73,37,45,6},{17,6,14,10,69,77,43,80,81,54},{27,50,89,67,55,75,49,39,6,19,29,5,71,17,58,55,39,16,71,76,2,23,8,42,55,58,68,12,69,97,71,57,82,55,66,37,67},{54,11,49,78,22,43,23,73,46,51,75,19,80,85,67,68,40,1,22,77,24,15,48,39,7,62,22,44,72,6,6,71,78,57,15,25,26,15,33,9,20,38,9,10},{89,65,67,92,8,53,65,98,56,80,3,83,80,26,96,55,71,34,74},{29,57,95,2,96,41,95,94},{73,93,10,64,5,94,31,53,59,61,2,80,49,3,85,83,59,83,20,46},{86,84,26,57,29,42,15,79,72,89,61,52,58,38,65,23,14,82,61,77,2,40,66,26,20,94,45,78,85,23,29,73,65,76,91,97,41,77,98,66,77,68,70},{41,53,23,59,65,1,18,94,4,28,61,39,81,73,37,44,90},{72,15,95,49,11,56,87,86,79,86,80,39,7,88,54,74,40,31,43,75,51,94,75,60,58,11,20,5,11,10,79,8,57,26,65,13,39,8,82,9,8,48,17,35,71,81},{48,53,33,24,18,93},{94,16,72,19,10,93,84,36,26,38,54,53,87,36,44,20,4,37,9,2,72,77,16,61,2,84,4,56,64,29,25,73,80,62,49,21,14,44,73,47,65,84,33,73,8},{79,10,51,57,62,87,35,83,83,72,59,80,24,6,41,35,82,33,46,99,49,35,31,10,56,14,87,72,12},{3,5,22,51,52,5,81,61,3},{39,72,3,60,30,60,50,66,62,89,54,52,99},{20,79,87,27,69,21,11,34,8,92,23,92,33},{94,87,74,63,4,84,7,87,94,62,56,97,98,52,50,48,24,5,90,32,86,58,3,21,15,22,97,60,39,72,61,72,95,74,10,54,27},{8,48,46,62,49,28,87,10,55,56,48,33,26,54,21,79,87,57,91,84,64,27,56,32,36,47,22,7,32,46,51,74,27,66,13,61,12,52,81,71,50},{81,14,14,8,21,61,31,39,29,51,16,85,44,62,2,71,88,60,78,32,46,17,47,65,78,65,94,18,3,15,9,61,73,3,62,87,1,54,97,61,37,23,65,84,62,33,34,78,23},{3,69,92,41,72,82,69,9,20,32,24,27,15,24,48,54,42,23,91,75,30,15,66,30,93,45,8,94,59,35,94,23,79,84,39,4,24,90,62},{65,19,57,24,78,96,61,40,94,74,33,18,97,68,44,68,82,45,75,44,62,16,65,38,55,61,53,98},{11,90,89,57,89,86,83,87,15,14,76,27,52,22,12,28,4,28,49,67,81,60,29,65,25,2,91,90,34,39,74,91,36,36,11,79,51,15,92,37,27},{96,53,99},{56,55,30,39,79,3,90,99,93,68,16,93,61,76,40,49,87,14,93,90,11,57,81,55,97,17,89,64,96,46,73,38,83,86,14,5,62,39,80,89,16,99},{40,72,2,54,95,50,99,38,16,34,19,50,20,63,1,26,87,79,76,50,54,32,86,26,84,83,45,16,93,90,82,44,81,28,36},{55,78,19,48,3,55,81,47,6,88,8,85,76,94,51,45,3},{68,15,80,27,28,1,40,78,80,85,21,63,27,44,30,60,62,66},{49,42,84,79,26,75,58,2,41,36,85,9,85,6,68,45,63,58,16,87,83,53},{6,21,86,58,48,27,18,73,16,79,51,33,63,26,37,88,48,58,44,32,58,23,31},{87,77,44,15,70,89,36,79,82,3,18,76,37,79,85,97,19,53,17,74,87,58,49,76,10,9,39,36,11,75,99,10,50,70,1,47,36,7},{64,95,33,47,20,98,54,94,1,78,27,75,69,19,73,68},{94,73,97,58,51,89,18,87,72,61,98,24,83,93,13,80,48,78,33,60},{53,81,89,64,14,47,67,85,67,31,45,93,36,54,7,65,5}},{{38,67,78,64,72,89,83,96,92,65,99,92,34,51,57,98,28,57,31,62,49,60,50,81,18,62,6,84,53,52,4,26,54,39,73,75,10,12,99,87,99,24,91,15},{96,97,87,80,9,6,57},{29,78,80,91,74,17,77,10,83,17,53,30,60,61,6,78,59,68,26,24,73,52,36,98,14,32,5,7,74,97,51,65,68,11,80,48,91,66,90,38},{5,88,21,92,18,47,48,56,31,51},{48,88,70,15,82,94,64,98,47,10,14,28,34,18,51,42,33,23,98,38,71,61,72,53,92,28,29,1,11,2,65,86,44,59,4,16,26,2,58,39,32,38,83,10,80},{68,53,68,93,45,41,8,51,53,31,94,54,55,36,46,52,10,35,54,38,41},{12,30,80,25,68,48,8,18,16,88,83,74,53,16,29,43,46,42,46,78,11,10,43,72,69,2,39,66,9},{5,55,58,20,42,42,11,99,42,76,47,67,30,75,5,31,27,45,39,17,86,24,69,95,67,44,28,47,50,40,31,93,63,82},{70,95,37,49,36,56,61,43,25,19,34,21,2,54,63,24,81,3,39,49,4,49,81,78,91,83,97,11,96,14,42,16,69,28,68,98,24,67},{2,18,22,44,77,52,62,24,46,40,44,30,29,49,47,20,85,99,47,16,34,50},{29,42,24,58,44,59,24,48,96,6,88,89,8,86,69,33,79,95,3,2,57,7,91,85,88,79,44,47,98,78,16,15,3,65,41,58,21},{28,8,36,76,17,41,2,67},{67,62,33,39,36,62,95,11,40},{67,38,49,22,76,82,26,78,79,7},{54,6,71,82,1,60,34,89,9,19,97,37,22,37,65,71,21,74,33},{34,1,41,10,87,39,9,70,18,79,41,18,67,28,9,27,81,10,12,66,72,34,99,37},{58,93,24,14,5,35,53,84,61,13,80,22,26,88,87,7,14},{97,9,67,61,4,72,63,91,77,57,14,98,99,20,6,71,66,39,76,80,45,21,82,41,20,88,24,10,11,7,93,38,71,92,40,81,69,15,52,49,54,18,92,33,21,91,21,5},{77,92,26,58,72,55,76,18,13,59,9,12,31,24,36,33,71,87,55,19,42,25,82,66,34},{81,4,22,35,98,59,27,67,72,4,69,88,39,73,55,96,25,56,70,49,88,61,34,20},{66,64,38,47,88,86,78,12,4},{48,13,19,77,49,93,58,15,20,1,98,11,86,96,43,28,87,84,82,16,64,55,99,65,26,85,35,54,17,97,63,12,43,74,65,13},{63,16,94,97,94,85},{5,50,19,79,48,73,85,65,37,95,50,83,33,80,43,87,4,34,96,60,25,44,45,71,25,11,47,5,13,4,90,64,20,98,44,26,61},{20,42,31,16,76,4,88,97,36,81,37,69,43,83},{15,76,8,82,90,32,89,23,24,47,50,61,38,29,27,91,86,78,91,4,79,35,58,25,7,64},{35,71,14,29,11,35,61,21,61,26,27,93,95,77,5,33,94,67,57,61,28,90,60,2,67,94,18,79,62,48,89,61},{93,46,35,32,25,59,87,24,46,98,20,5},{42,77,82,41,35,8,91,12,44,22,91,56,85,79,65,36,3,94,73,75,48,17,96,23,61,6,28,63,33},{75,98,72,69,35,90,42,44,28,64,4,58,76,2,28,33,14,7,98,36,19,52,33,66,35},{88,57,47,21,50,83,48,93,25,25,35,39,34,98,80,22,14,48,64,77,87,56,27,33,15,81,55,72,5,25,2,88,17,73,12,3,92,80,5,8,27,44,50,4,69},{90,94,15,78,79,78,16,22,85,33,39,30,26,22,73,37,25,16,70,62,26,3,30,46,33,68,91,93,26,60,85,45,62,75,2,10,33,7,69,30,29,46,94},{35,58,73,81,93,12,83,37,63,60,89,40,32},{54,63,76,76,77,50,2,53,82,50,46,5,49,37},{77,16,95},{6,66,1,16,10,52,61,28,95,56,49,60,46,75,4,49,9,81,93,5},{93,71,54,16,35,58,91,36,98,76,65,98,45,69,19,1,49,38,85,91,52,9,20,95,38,81,32,1,70,71,50,93,62,3,23,34,35,63,55,62,12,14,3,48,31,35,10,90},{76,14,65,74,49,58,56,26,27,5,22,82,85,18,26,71,71,73,27,9,86,98,78},{97,68,59,18,81,34,52,55,15,59,22,35,64,87,96,23,24,17,30,20,15,16,84,32,32,24,5}},{{2,95,2},{92,62,11,25,66,2,91,54,77,28,94,15,90,63},{1,58,34,7,40,62,94,25,30,33,53,33,92,4,55,4,82,32,62,36,24,84},{54,63,7,55,37,64,44,55,55,28,2,42,97,3,99,99,24,86,84,17,41,87,68,34,17,70,23,84,74,4,78,84,83,48,75},{73,99,81,84,54,2,23,11,8},{75,17,49,12,17,53,58,1,64,83,29,36,96,34,89,62,95,38,41,95,16,31,62,52,2,91,5,90,35,20},{88,82,21,25,94,12,88,85,42,76,59,72,23,20,41,15,5,42,52,45,20},{56,69,48,44,39,97,32,88,70,71,75,39,42,32,45,87,43,9,70,38,39,60,70,19,90,45,57},{80,81,38,79,44,94,9,59,20,31,64,67,70,37,94,68,94,69,26,63,54,2,76,95,27,7,6,32,19,27,44,44,59,81,94,4,92,19,92,14,55,74,2,29,28,98,16,34},{94,5,74,9,55,74,73,32,92,11,90,97},{78,65,56,81,62,51,99,11,94,42,35,94,73,85,75,65,25,27,81,94,3,6,75,5},{10,35,64,71,9,86,93,13,40,23,39,65,48,76,53,5,87,63,62,74,38,90,21,31,38,14,86,61,78,65,96,29,53,81,79,8,36,28,53,60,64,9,35,79,40,69,5,5,56},{63,89,75,22,83,98,97,16,76,2,55,50},{20,98,48,99,69,23,73,99,53,81,74,40,74,71,29,34,51,37,68,96,83,12,97,68,59,34,70},{62,3,97,59,36,26,42,66,92,60,1,80,4,66,9,76,45,41,65,67,87,78,49,60,7,33,53,55},{58,24,52,50,98,4,4,10,32,6,18,71,42,32,27,63,72,18,85,83,45,95,31,97,94,82,39,74,12,85,22,40,34,17,2},{1,48,96,7,6,56,62,88,39,77,5,98,20,69,26,13,57,4,57,64,24,16,27,81,7,49,46,93,13,17,26,13,81,65},{51,47,12,60,89,15,93,53},{21,6,26,25,28,44,73,28,63,27,64,21,50,85,75,44,86,97,34,69,36,27,26,86},{21,3,65,94,90,72,71,83,39,78,41,90,82,70,23,72,99,48,97,87},{56,35,92,24,99,1,5,82,51,68},{72,44,64,59},{77,58,8,45,22,83,81,65,23,56,81},{28,93,96,10,24,13,24,60,37,17,91,54,69,46,8,93,15,96,17,25,75,9,36,76,34,29,8,28,56,8,71,37,20,38,45,47,73,86,52,13,96,90,35,11},{96,29,14,84,59,14,28,52,80,22,10,94,18,67,39,52,72},{17,45,48,54,57,68,56,17,86,24,1,67,87,60,58,98,45,80,32},{84,89,7,59,5,20,40,81,80,5,80}}};
for (int i =0; i < len(param0); i+=2 )
for (int j =0; j < param0[i].size(); ++j )
for (int k =0; k < param0[i][j].size(); ++k )
param0[i][j][k]= param0[i][j][k] %2;
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | vector | [
"a) using",
"b) res;",
"c) #include",
"d) vector",
"e) import"
] | 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 n ) {
unordered_map < int, int > hash;
for ( int i = 0;
i < n;
i ++ ) {
hash [ A [ i ] ] ++;
hash [ B [ i ] ] ++;
}
int sum = 0;
for ( auto x : hash ) if ( x . second == 1 ) sum += x . first;
return sum;
}
int f_filled ( int A [ ], int B [ ], int n ) {}
hash [ A [ i ] ] ++;
hash [ B [ i ] ] ++;
}
int sum = 0;
for ( auto x : hash ) if ( x . second == 1 ) sum += x . first;
return sum;
}
int f_filled ( int A [ ], int B [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {13,31,63,75,90,92,94,98};
int param0_1[] = {-20};
int param0_2[] = {0,0,0,1,1,1};
int param0_3[] = {47,71,9,64,66,99,7,44,75,84,88,49,95,56,3,90,73,2};
int param0_4[] = {-76,-72,-70,-60,-44,-38,-38,-26,-16,-10,-4,-2,4,18,30,38,54,56,64,66,68,70,72,82,84};
int param0_5[] = {0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,1,1};
int param0_6[] = {3,4,4,6,11,13,14,18,30,30,34,39,40,45,46,50,51,56,60,61,66,68,72,79,79,82,83,87,89,91,91,92,92,93,94};
int param0_7[] = {-14,12,98,34,58,-70,6,52,-50,96,-6};
int param0_8[] = {0,0,0,1,1,1,1,1};
int param0_9[] = {34,85,60,55,38,69,21,43,39,83,10,71,73,15,94,59,83,39,29,31,61,9,11,27,71,90,18,11,4,3,97,43,58,50,35,42,70,33,98,61,32,32,12,29};
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[] = {14,16,20,28,32,55,56,56};
int param1_1[] = {60};
int param1_2[] = {0,0,1,1,1,1};
int param1_3[] = {8,27,21,40,99,8,52,37,72,50,61,82,88,71,27,84,38,35};
int param1_4[] = {-80,-64,-50,-44,-34,-26,-24,-22,-6,-2,2,2,12,24,34,44,48,50,52,70,76,82,86,94,96};
int param1_5[] = {0,0,0,1,1,0,1,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,1,1,0,0};
int param1_6[] = {3,7,15,15,21,23,30,32,35,38,38,41,41,41,44,45,49,52,60,60,63,66,66,70,72,74,74,75,79,81,87,88,89,93,96};
int param1_7[] = {50,-22,-82,40,-80,30,-58,-64,60,6,-28};
int param1_8[] = {0,0,1,1,1,1,1,1};
int param1_9[] = {74,10,95,67,59,17,32,87,87,12,22,45,50,35,25,51,10,86,75,4,74,43,92,63,60,28,32,72,66,61,43,48,20,89,55,59,22,85,73,43,7,65,53,98};
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[] = {6,0,5,16,16,17,22,9,5,34};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int A [ ], int B [ ], int n ) { unordered_map < int, int > hash; for ( int i = 0; i < n; i ++ ) { hash [ A [ i ] ] [MASK] hash [ B [ i ] ] ++; } int sum = 0; for ( auto x : hash ) if ( x . second == 1 ) sum += x . first; return sum; } int f_filled ( int A [ ], int B [ ], int n ) {} hash [ A [ i ] ] ++;
hash [ B [ i ] ] ++;
}
int sum = 0;
for ( auto x : hash ) if ( x . second == 1 ) sum += x . first;
return sum;
}
int f_filled ( int A [ ], int B [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {13,31,63,75,90,92,94,98};
int param0_1[] = {-20};
int param0_2[] = {0,0,0,1,1,1};
int param0_3[] = {47,71,9,64,66,99,7,44,75,84,88,49,95,56,3,90,73,2};
int param0_4[] = {-76,-72,-70,-60,-44,-38,-38,-26,-16,-10,-4,-2,4,18,30,38,54,56,64,66,68,70,72,82,84};
int param0_5[] = {0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,1,1};
int param0_6[] = {3,4,4,6,11,13,14,18,30,30,34,39,40,45,46,50,51,56,60,61,66,68,72,79,79,82,83,87,89,91,91,92,92,93,94};
int param0_7[] = {-14,12,98,34,58,-70,6,52,-50,96,-6};
int param0_8[] = {0,0,0,1,1,1,1,1};
int param0_9[] = {34,85,60,55,38,69,21,43,39,83,10,71,73,15,94,59,83,39,29,31,61,9,11,27,71,90,18,11,4,3,97,43,58,50,35,42,70,33,98,61,32,32,12,29};
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[] = {14,16,20,28,32,55,56,56};
int param1_1[] = {60};
int param1_2[] = {0,0,1,1,1,1};
int param1_3[] = {8,27,21,40,99,8,52,37,72,50,61,82,88,71,27,84,38,35};
int param1_4[] = {-80,-64,-50,-44,-34,-26,-24,-22,-6,-2,2,2,12,24,34,44,48,50,52,70,76,82,86,94,96};
int param1_5[] = {0,0,0,1,1,0,1,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,1,1,0,0};
int param1_6[] = {3,7,15,15,21,23,30,32,35,38,38,41,41,41,44,45,49,52,60,60,63,66,66,70,72,74,74,75,79,81,87,88,89,93,96};
int param1_7[] = {50,-22,-82,40,-80,30,-58,-64,60,6,-28};
int param1_8[] = {0,0,1,1,1,1,1,1};
int param1_9[] = {74,10,95,67,59,17,32,87,87,12,22,45,50,35,25,51,10,86,75,4,74,43,92,63,60,28,32,72,66,61,43,48,20,89,55,59,22,85,73,43,7,65,53,98};
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[] = {6,0,5,16,16,17,22,9,5,34};
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) 3",
"d) ugly",
"e) ]"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int A [ ], int B [ ], int m, int n ) {
sort ( A, A + m );
sort ( B, B + n );
int a = 0, b = 0;
int result = INT_MAX;
while ( a < m && b < n ) {
if ( abs ( A [ a ] - B [ b ] ) < result ) result = abs ( A [ a ] - B [ b ] );
if ( A [ a ] < B [ b ] ) a ++;
else b ++;
}
return result;
}
int f_filled ( int A [ ], int B [ ], int m, int n ) {}
A [ a ] - B [ b ] ) < result ) result = abs ( A [ a ] - B [ b ] );
if ( A [ a ] < B [ b ] ) a ++;
else b ++;
}
return result;
}
int f_filled ( int A [ ], int B [ ], int m, int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,2,11,13,18,18,23,25,28,28,37,39,53,56,67,70,74,74,75,79,80,82,84,89,94,95,95,98,98};
int param0_1[] = {-78,10,-8,30,-70,-94,-48,-4,-22,-40,-36,-48,-4,86,-50,62,-72,-44,-62,22,-30,-72,6,-24,-78,72,-44,56,38,-36,0,-72,-10,-12,-70,-64,-24};
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};
int param0_3[] = {57,82,90,9,61,71,15,2,39,24,28,28,47};
int param0_4[] = {-92,-90,-90,-28,-16,-14,-14,-8,42,52,62,84};
int param0_5[] = {1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,1,0,0,1,0,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,0};
int param0_6[] = {6,7,7,12,15,15,21,24,26,26,28,36,38,42,46,52,55,56,59,62,63,65,65,66,68,71,73,77,77,77,77,85,87,87,88,90,93,94,98};
int param0_7[] = {-68,44,88,-68,22,34,-82,18,-60,30,24,18,78,90,-20,-60,94,70,4,-16,-38};
int param0_8[] = {0,0,1};
int param0_9[] = {14,7,9,71,37,20,85,62,70,67,26,47,61,99,2,90,70,46,53,16,56,7,15,81,85,94,73,40,35,58,21,98,45};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {5,6,11,13,13,16,17,19,23,25,28,31,31,39,41,44,45,52,62,64,70,71,73,78,78,79,85,86,92};
int param1_1[] = {78,-80,-24,-50,-26,-62,26,-12,22,-90,84,10,18,62,26,-68,92,64,-52,76,-84,64,50,36,-24,-98,42,72,-78,-98,-24,86,2,60,-30,14,-42};
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};
int param1_3[] = {85,92,84,27,54,77,26,49,47,51,70,11,41};
int param1_4[] = {-98,-98,-58,-6,14,16,18,46,52,52,52,56};
int param1_5[] = {0,1,1,1,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,1};
int param1_6[] = {1,3,4,4,6,7,8,8,15,17,18,18,20,23,23,24,25,25,26,33,39,43,46,54,59,67,69,69,69,69,76,76,81,81,85,86,86,91,95};
int param1_7[] = {-18,-30,-74,-50,98,-44,-62,-20,18,84,62,-64,-2,62,-32,-34,-14,-52,-36,-60,-68};
int param1_8[] = {0,0,1};
int param1_9[] = {99,72,29,55,88,1,88,19,7,80,79,18,28,41,48,49,67,27,24,94,86,14,45,84,37,71,92,98,16,64,67,44,29};
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,23,14,7,11,35,30,16,2,20};
int param3[] = {14,33,16,8,6,33,20,12,1,25};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int 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 A [ ], int B [ ], int m, int n ) { sort ( A, A + m ); sort ( B, B + n ); int a = 0, b = 0; int result = INT_MAX; while ( a < m && b < n ) { if ( abs ( A [ a ] - B [ b ] ) < result ) result = abs ( A [ a ] - B [ b ] ); if ( A [ a ] < B [ b ] ) a ++; else b ++; } return result; } int f_filled ( int A [ ], int B [ ], int m, int n ) {} A [ a ] - B [ b ] ) < result ) result = abs ( A [ a ] - B [ b ] );
if ( A [ a ] < B [ b ] ) a ++;
else b ++;
}
return result;
}
int f_filled ( int A [ ], int B [ ], int m, int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,2,11,13,18,18,23,25,28,28,37,39,53,56,67,70,74,74,75,79,80,82,84,89,94,95,95,98,98};
int param0_1[] = {-78,10,-8,30,-70,-94,-48,-4,-22,-40,-36,-48,-4,86,-50,62,-72,-44,-62,22,-30,-72,6,-24,-78,72,-44,56,38,-36,0,-72,-10,-12,-70,-64,-24};
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};
int param0_3[] = {57,82,90,9,61,71,15,2,39,24,28,28,47};
int param0_4[] = {-92,-90,-90,-28,-16,-14,-14,-8,42,52,62,84};
int param0_5[] = {1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,1,0,0,1,0,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,0};
int param0_6[] = {6,7,7,12,15,15,21,24,26,26,28,36,38,42,46,52,55,56,59,62,63,65,65,66,68,71,73,77,77,77,77,85,87,87,88,90,93,94,98};
int param0_7[] = {-68,44,88,-68,22,34,-82,18,-60,30,24,18,78,90,-20,-60,94,70,4,-16,-38};
int param0_8[] = {0,0,1};
int param0_9[] = {14,7,9,71,37,20,85,62,70,67,26,47,61,99,2,90,70,46,53,16,56,7,15,81,85,94,73,40,35,58,21,98,45};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {5,6,11,13,13,16,17,19,23,25,28,31,31,39,41,44,45,52,62,64,70,71,73,78,78,79,85,86,92};
int param1_1[] = {78,-80,-24,-50,-26,-62,26,-12,22,-90,84,10,18,62,26,-68,92,64,-52,76,-84,64,50,36,-24,-98,42,72,-78,-98,-24,86,2,60,-30,14,-42};
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};
int param1_3[] = {85,92,84,27,54,77,26,49,47,51,70,11,41};
int param1_4[] = {-98,-98,-58,-6,14,16,18,46,52,52,52,56};
int param1_5[] = {0,1,1,1,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,1};
int param1_6[] = {1,3,4,4,6,7,8,8,15,17,18,18,20,23,23,24,25,25,26,33,39,43,46,54,59,67,69,69,69,69,76,76,81,81,85,86,86,91,95};
int param1_7[] = {-18,-30,-74,-50,98,-44,-62,-20,18,84,62,-64,-2,62,-32,-34,-14,-52,-36,-60,-68};
int param1_8[] = {0,0,1};
int param1_9[] = {99,72,29,55,88,1,88,19,7,80,79,18,28,41,48,49,67,27,24,94,86,14,45,84,37,71,92,98,16,64,67,44,29};
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,23,14,7,11,35,30,16,2,20};
int param3[] = {14,33,16,8,6,33,20,12,1,25};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | y)? | [
"a) /",
"b) arr",
"c) y)",
"d) y)?",
"e) return"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int val [ ], int wt [ ], int n, int W ) {
int dp [ W + 1 ];
memset ( dp, 0, sizeof ( dp ) );
for ( int i = 0;
i < n;
i ++ ) for ( int j = W;
j >= wt [ i ];
j -- ) dp [ j ] = max ( dp [ j ], val [ i ] + dp [ j - wt [ i ] ] );
return dp [ W ];
}
int f_filled ( int val [ ], int wt [ ], int n, int W ) {}
n;
i ++ ) for ( int j = W;
j >= wt [ i ];
j -- ) dp [ j ] = max ( dp [ j ], val [ i ] + dp [ j - wt [ i ] ] );
return dp [ W ];
}
int f_filled ( int val [ ], int wt [ ], int n, int W ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {11,25,72,90,95};
int param0_1[] = {70,84,-24,-34,50,-10,-12,-98,6,-6,-34,34,80,-70,-72,-54,8,-84,8,-28,68,4,-88,94,-44,0,-24,-40,62,46,84,8,42,-8,-44,-66,-4,-12,20};
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};
int param0_3[] = {32,49,97,60,46,68,94,41,81,67,13,18,87,99,97,51,36,81,34,12,5,48,91,40,13,26,14,96,11,38,80,57,22,16,77,76,82,29,82,2,54,2,3,93,56,72,11};
int param0_4[] = {-60,-44,-30,-26,8,40,44,60,90};
int param0_5[] = {0,0,1,0,0,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,1,1};
int param0_6[] = {19,25,31,35,56,75,79,81,88,96,99};
int param0_7[] = {-98,-4,-50,-52,-6,68,88,38};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {33,19,16,99,11};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {10,28,50,60,66};
int param1_1[] = {20,-90,38,56,40,-86,6,-66,18,-82,90,-56,-10,46,18,60,96,-74,66,-76,-28,-80,-68,84,-62,-88,-92,-40,90,-8,-46,-10,70,-26,-82,22,-30,-6,-58};
int param1_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_3[] = {76,32,4,9,88,56,16,81,86,71,10,93,36,24,64,56,78,78,89,22,52,50,47,23,96,90,91,76,83,19,52,34,96,29,61,85,35,5,76,7,41,2,89,10,44,70,91};
int param1_4[] = {-82,-78,-54,-40,-36,-16,76,84,84};
int param1_5[] = {0,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,1,0,0,1,1,1,1,0};
int param1_6[] = {1,8,10,26,34,47,50,58,63,81,87};
int param1_7[] = {34,-36,-66,22,38,-78,-24,36};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_9[] = {75,74,98,69,87};
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[] = {4,35,21,25,6,13,7,6,24,4};
int param3[] = {2,24,21,32,7,23,10,6,29,2};
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 dp [ W + 1 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 0; i < n; i ++ ) for ( int j = W; j >= wt [ i ]; j -- ) dp [ j ] = max ( dp [ j ], val [ i ] + dp [ j - wt [MASK] i ] ] ); return dp [ W ]; } int f_filled ( int val [ ], int wt [ ], int n, int W ) {}n;
i ++ ) for ( int j = W;
j >= wt [ i ];
j -- ) dp [ j ] = max ( dp [ j ], val [ i ] + dp [ j - wt [ i ] ] );
return dp [ W ];
}
int f_filled ( int val [ ], int wt [ ], int n, int W ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {11,25,72,90,95};
int param0_1[] = {70,84,-24,-34,50,-10,-12,-98,6,-6,-34,34,80,-70,-72,-54,8,-84,8,-28,68,4,-88,94,-44,0,-24,-40,62,46,84,8,42,-8,-44,-66,-4,-12,20};
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};
int param0_3[] = {32,49,97,60,46,68,94,41,81,67,13,18,87,99,97,51,36,81,34,12,5,48,91,40,13,26,14,96,11,38,80,57,22,16,77,76,82,29,82,2,54,2,3,93,56,72,11};
int param0_4[] = {-60,-44,-30,-26,8,40,44,60,90};
int param0_5[] = {0,0,1,0,0,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,1,1};
int param0_6[] = {19,25,31,35,56,75,79,81,88,96,99};
int param0_7[] = {-98,-4,-50,-52,-6,68,88,38};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {33,19,16,99,11};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1_0[] = {10,28,50,60,66};
int param1_1[] = {20,-90,38,56,40,-86,6,-66,18,-82,90,-56,-10,46,18,60,96,-74,66,-76,-28,-80,-68,84,-62,-88,-92,-40,90,-8,-46,-10,70,-26,-82,22,-30,-6,-58};
int param1_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_3[] = {76,32,4,9,88,56,16,81,86,71,10,93,36,24,64,56,78,78,89,22,52,50,47,23,96,90,91,76,83,19,52,34,96,29,61,85,35,5,76,7,41,2,89,10,44,70,91};
int param1_4[] = {-82,-78,-54,-40,-36,-16,76,84,84};
int param1_5[] = {0,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,1,0,0,1,1,1,1,0};
int param1_6[] = {1,8,10,26,34,47,50,58,63,81,87};
int param1_7[] = {34,-36,-66,22,38,-78,-24,36};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param1_9[] = {75,74,98,69,87};
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[] = {4,35,21,25,6,13,7,6,24,4};
int param3[] = {2,24,21,32,7,23,10,6,29,2};
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) max",
"b) [",
"c) n",
"d) :",
"e) -"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int difference = 0;
int ans = 0;
int hash_positive [ n + 1 ], hash_negative [ n + 1 ];
fill_n ( hash_positive, n + 1, 0 );
fill_n ( hash_negative, n + 1, 0 );
hash_positive [ 0 ] = 1;
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] & 1 == 1 ) difference ++;
else difference --;
if ( difference < 0 ) {
ans += hash_negative [ - difference ];
hash_negative [ - difference ] ++;
}
else {
ans += hash_positive [ difference ];
hash_positive [ difference ] ++;
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
h_negative [ - difference ] ++;
}
else {
ans += hash_positive [ difference ];
hash_positive [ difference ] ++;
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,8,12,13,14,19,20,22,28,30,31,31,32,34,34,39,39,43,45,46,47,62,63,63,65,66,69,69,71,76,79,82,83,88,89,92,93,95,97,97};
int param0_1[] = {20,-98,-44,-82,28,20,-76,-16,42,0,-88,74,56,6,-68,-30,28,88,58,-78,46,2};
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,1,1};
int param0_3[] = {44,4,29,83,28,75,58,89,40,38,29,45,21,87,97,42,95,20,48,38,15,67,23,81,50,53,64,67,30,13,52,56,87,10,80,38,31,19};
int param0_4[] = {-94,-94,-94,-90,-88,-86,-86,-82,-78,-76,-74,-68,-64,-62,-62,-60,-52,-48,-48,-46,-44,-44,-32,-28,-22,-12,-12,-8,-8,-4,4,6,10,14,28,40,42,52,56,60,60,60,64,68,70,82,82,84,96};
int param0_5[] = {1,0,0,0,1,0,1,1,1,0,0,0,1,0,0,1,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,0,0,1,1,1,1};
int param0_6[] = {6,16,21,26,34,35,44,46,46,86};
int param0_7[] = {86,12,80,46,-12,6};
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,1,1,1,1};
int param0_9[] = {71,94,91,19,85,5,87,96,66,17,95,5,32,17,93,48,46,24};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {26,15,24,23,48,27,7,4,15,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 difference = 0; int ans = 0; int hash_positive [ n + 1 ], hash_negative [ n + 1 ]; fill_n ( hash_positive, n + 1, 0 ); fill_n ( hash_negative, n + 1, 0 ); hash_positive [ 0 ] = 1; for ( int i [MASK] 0; i < n; i ++ ) { if ( arr [ i ] & 1 == 1 ) difference ++; else difference --; if ( difference < 0 ) { ans += hash_negative [ - difference ]; hash_negative [ - difference ] ++; } else { ans += hash_positive [ difference ]; hash_positive [ difference ] ++; } } return ans; } int f_filled ( int arr [ ], int n ) {}h_negative [ - difference ] ++;
}
else {
ans += hash_positive [ difference ];
hash_positive [ difference ] ++;
}
}
return ans;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {7,8,12,13,14,19,20,22,28,30,31,31,32,34,34,39,39,43,45,46,47,62,63,63,65,66,69,69,71,76,79,82,83,88,89,92,93,95,97,97};
int param0_1[] = {20,-98,-44,-82,28,20,-76,-16,42,0,-88,74,56,6,-68,-30,28,88,58,-78,46,2};
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,1,1};
int param0_3[] = {44,4,29,83,28,75,58,89,40,38,29,45,21,87,97,42,95,20,48,38,15,67,23,81,50,53,64,67,30,13,52,56,87,10,80,38,31,19};
int param0_4[] = {-94,-94,-94,-90,-88,-86,-86,-82,-78,-76,-74,-68,-64,-62,-62,-60,-52,-48,-48,-46,-44,-44,-32,-28,-22,-12,-12,-8,-8,-4,4,6,10,14,28,40,42,52,56,60,60,60,64,68,70,82,82,84,96};
int param0_5[] = {1,0,0,0,1,0,1,1,1,0,0,0,1,0,0,1,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,0,0,1,1,1,1};
int param0_6[] = {6,16,21,26,34,35,44,46,46,86};
int param0_7[] = {86,12,80,46,-12,6};
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,1,1,1,1};
int param0_9[] = {71,94,91,19,85,5,87,96,66,17,95,5,32,17,93,48,46,24};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {26,15,24,23,48,27,7,4,15,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) =",
"c) <limits.h>",
"d) ]",
"e) <string>"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int k ) {
return k * k * k;
}
int f_filled ( int k ) {}
) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int k ) {
return k * k * k;
}
int f_filled ( int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,96,14,64,24,74,85,27,78,1};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include [MASK] #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int k ) { return k * k * k; } int f_filled ( int k ) {}) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int k ) {
return k * k * k;
}
int f_filled ( int k ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,96,14,64,24,74,85,27,78,1};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | <math.h> | [
"a) )",
"b) )",
"c) <math.h>",
"d) (",
"e) i"
] | 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 > hM;
int sum = 0;
int max_len = 0;
int ending_index = - 1;
for ( int i = 0;
i < n;
i ++ ) arr [ i ] = ( arr [ i ] == 0 ) ? - 1 : 1;
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ];
if ( sum == 0 ) {
max_len = i + 1;
ending_index = i;
}
if ( hM . find ( sum + n ) != hM . end ( ) ) {
if ( max_len < i - hM [ sum + n ] ) {
max_len = i - hM [ sum + n ];
ending_index = i;
}
}
else hM [ sum + n ] = i;
}
for ( int i = 0;
i < n;
i ++ ) arr [ i ] = ( arr [ i ] == - 1 ) ? 0 : 1;
printf ( "%d to %d\n", ending_index - max_len + 1, ending_index );
return max_len;
}
int f_filled ( int arr [ ], int n ) {}
i = 0;
i < n;
i ++ ) arr [ i ] = ( arr [ i ] == - 1 ) ? 0 : 1;
printf ( "%d to %d\n", ending_index - max_len + 1, ending_index );
return max_len;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,6,16,16,18,19,22,39,40,42,60,66,69,70,70,73,74,80,99};
int param0_1[] = {-88,-66};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {85,98,67,27,98,13,96,32,26,44,32};
int param0_4[] = {-96,-94,-90,-88,-86,-66,-64,-52,-46,-46,-42,-40,-38,-32,-28,-22,-16,-10,-8,-8,-4,2,10,26,26,28,28,40,40,42,50,60,66,68,72,74,86,92,94};
int param0_5[] = {1,1,1,1,1,1,0,0,0};
int param0_6[] = {25,64,86};
int param0_7[] = {-4,78,-76,12,4,-38,-98,-26,-8,-98,56,0,-34,36,-90,-36,54,-68,12,-44,62,60,-34,-52,18};
int param0_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1};
int param0_9[] = {2,25,45,98,71,8,58,94,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[] = {9,1,19,8,34,4,1,17,9,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 ) { unordered_map < int, int > hM; int sum = 0; int max_len = 0; int ending_index = - 1; for ( int i = 0; i < n; i ++ ) arr [ i ] = ( arr [ i ] == 0 ) ? - 1 : 1; for ( int i = 0; i < n; i ++ ) { sum += arr [ i ]; if ( sum == 0 ) { max_len = i + 1; ending_index = i; } if ( hM . find ( sum + n ) != hM . end ( ) ) { if ( max_len < i - hM [ sum + [MASK] ] ) { max_len = i - hM [ sum + n ]; ending_index = i; } } else hM [ sum + n ] = i; } for ( int i = 0; i < n; i ++ ) arr [ i ] = ( arr [ i ] == - 1 ) ? 0 : 1; printf ( "%d to %d\n", ending_index - max_len + 1, ending_index ); return max_len; } int f_filled ( int arr [ ], int n ) {} i = 0;
i < n;
i ++ ) arr [ i ] = ( arr [ i ] == - 1 ) ? 0 : 1;
printf ( "%d to %d\n", ending_index - max_len + 1, ending_index );
return max_len;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,6,16,16,18,19,22,39,40,42,60,66,69,70,70,73,74,80,99};
int param0_1[] = {-88,-66};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {85,98,67,27,98,13,96,32,26,44,32};
int param0_4[] = {-96,-94,-90,-88,-86,-66,-64,-52,-46,-46,-42,-40,-38,-32,-28,-22,-16,-10,-8,-8,-4,2,10,26,26,28,28,40,40,42,50,60,66,68,72,74,86,92,94};
int param0_5[] = {1,1,1,1,1,1,0,0,0};
int param0_6[] = {25,64,86};
int param0_7[] = {-4,78,-76,12,4,-38,-98,-26,-8,-98,56,0,-34,36,-90,-36,54,-68,12,-44,62,60,-34,-52,18};
int param0_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1};
int param0_9[] = {2,25,45,98,71,8,58,94,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[] = {9,1,19,8,34,4,1,17,9,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;
} | n | [
"a) ,",
"b) sizeof",
"c) y;",
"d) n",
"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 n ) {
int i, j, max = 0;
int msis [ n ];
for ( i = 0;
i < n;
i ++ ) msis [ i ] = arr [ i ];
for ( i = 1;
i < n;
i ++ ) for ( j = 0;
j < i;
j ++ ) if ( arr [ i ] > arr [ j ] && msis [ i ] < msis [ j ] + arr [ i ] ) msis [ i ] = msis [ j ] + arr [ i ];
for ( i = 0;
i < n;
i ++ ) if ( max < msis [ i ] ) max = msis [ i ];
return max;
}
int f_filled ( int arr [ ], int n ) {}
] < msis [ j ] + arr [ i ] ) msis [ i ] = msis [ j ] + arr [ i ];
for ( i = 0;
i < n;
i ++ ) if ( max < msis [ i ] ) max = msis [ i ];
return max;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,5,7,12,23,31,31,45,47,60,67,70,84,85,91,96};
int param0_1[] = {-88,-38,-50,-14,36,-32,0,-8,-12,-62,-46,66,-46,-26,6,-44,14,-74,-84,52,-28};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {85,42,7,35,35,21,97,59,88,50,12,44,85,22,38,23,42,61,44,63,23,69,28,17,73,20,71,80,15,42,28,10,56,77,43};
int param0_4[] = {-92,-82,-82,-74,-72,-68,-68,-66,-60,-54,-42,-38,-36,-32,-30,-16,-14,-12,-10,14,24,28,34,34,38,42,44,52,70,72,80,84,86,94};
int param0_5[] = {0,1,1,1,1,1,0,1,1,0,1,0,0,0};
int param0_6[] = {33};
int param0_7[] = {76,86,46,-70,92,6,70,-66,64,46,86,-42,-46,-24,8,76,4,-96,-86,18,70,-72,-56,-88,-96,62,22,20,42};
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};
int param0_9[] = {25,46,41,61,93,29,65,24,10,89,22,51,18,65,70,59,87,82,97,99,15,64,20,97,12,23,76};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {11,18,39,26,32,8,0,21,24,20};
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 i, j, max = 0; int msis [ n ]; for ( i = 0; i < n; i ++ ) msis [ i ] = arr [ i ]; for ( i = 1; i < n; i ++ ) for ( j = 0; j < i; j ++ ) if ( arr [ i ] > arr [ [MASK] ] && msis [ i ] < msis [ j ] + arr [ i ] ) msis [ i ] = msis [ j ] + arr [ i ]; for ( i = 0; i < n; i ++ ) if ( max < msis [ i ] ) max = msis [ i ]; return max; } int f_filled ( int arr [ ], int n ) {}] < msis [ j ] + arr [ i ] ) msis [ i ] = msis [ j ] + arr [ i ];
for ( i = 0;
i < n;
i ++ ) if ( max < msis [ i ] ) max = msis [ i ];
return max;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,5,7,12,23,31,31,45,47,60,67,70,84,85,91,96};
int param0_1[] = {-88,-38,-50,-14,36,-32,0,-8,-12,-62,-46,66,-46,-26,6,-44,14,-74,-84,52,-28};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {85,42,7,35,35,21,97,59,88,50,12,44,85,22,38,23,42,61,44,63,23,69,28,17,73,20,71,80,15,42,28,10,56,77,43};
int param0_4[] = {-92,-82,-82,-74,-72,-68,-68,-66,-60,-54,-42,-38,-36,-32,-30,-16,-14,-12,-10,14,24,28,34,34,38,42,44,52,70,72,80,84,86,94};
int param0_5[] = {0,1,1,1,1,1,0,1,1,0,1,0,0,0};
int param0_6[] = {33};
int param0_7[] = {76,86,46,-70,92,6,70,-66,64,46,86,-42,-46,-24,8,76,4,-96,-86,18,70,-72,-56,-88,-96,62,22,20,42};
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};
int param0_9[] = {25,46,41,61,93,29,65,24,10,89,22,51,18,65,70,59,87,82,97,99,15,64,20,97,12,23,76};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {11,18,39,26,32,8,0,21,24,20};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | j | [
"a) )",
"b) max",
"c) j",
"d) r",
"e) i"
] | 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 prevPrev = 1, prev = 2, curr = 3;
while ( n > 0 ) {
prevPrev = prev;
prev = curr;
curr = prevPrev + prev;
n = n - ( curr - prev - 1 );
}
n = n + ( curr - prev - 1 );
return prev + n;
}
int f_filled ( int n ) {}
le ( n > 0 ) {
prevPrev = prev;
prev = curr;
curr = prevPrev + prev;
n = n - ( curr - prev - 1 );
}
n = n + ( curr - prev - 1 );
return prev + n;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {76,91,62,65,83,57,76,6,2,86};
for(int i = 0; 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 prevPrev = 1, prev = 2, curr = 3; while ( n > 0 ) { prevPrev = prev; prev = curr; curr = prevPrev + prev; n = n - ( curr - prev - 1 ); } n = n + ( curr - prev - 1 ); return prev + n; } int f_filled ( [MASK] n ) {}le ( n > 0 ) {
prevPrev = prev;
prev = curr;
curr = prevPrev + prev;
n = n - ( curr - prev - 1 );
}
n = n + ( curr - prev - 1 );
return prev + n;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {76,91,62,65,83,57,76,6,2,86};
for(int i = 0; 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) int",
"c) =",
"d) java.util.",
"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 ) {
unordered_map < int, int > mp;
int max_dist = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( mp . find ( arr [ i ] ) == mp . end ( ) ) mp [ arr [ i ] ] = i;
else max_dist = max ( max_dist, i - mp [ arr [ i ] ] );
}
return max_dist;
}
int f_filled ( int arr [ ], int n ) {}
if ( mp . find ( arr [ i ] ) == mp . end ( ) ) mp [ arr [ i ] ] = i;
else max_dist = max ( max_dist, i - mp [ arr [ i ] ] );
}
return max_dist;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,20,25,28,29,31,34,35,38,39,41,43,46,55,56,60,65,66,74,77,79,80,81,83,84,88,88,88,90,91,99};
int param0_1[] = {26,14,56,84,-56,-84,-98,12,-78,18,-42,58,46,-66,-46,66,98,34,-16,8,-20,66,74,26,42,-84,38,86,14,86,26,-42,-30,6,-54,-76,-66,18,58,66,74,-62,8,-42,62,-14,-90,98,-24};
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[] = {69,87};
int param0_4[] = {-98,-88,-86,-62,-52,-26,-24,-20,-12,6,8,26,36,40,42,54,68,72,84,92,94,98,98};
int param0_5[] = {1,1,1,1,0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0};
int param0_6[] = {11,16,17,19,20,21,21,22,27,37,45,49,64,77,81,85,96};
int param0_7[] = {-20,0,18,-96};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {54,5,98,71,9,34,60,28,58,66,28,45,4};
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,34,11,1,12,29,9,2,22,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 ) { unordered_map < int, int > mp; int max_dist = 0; for ( int i = 0; i < n; i ++ ) { if ( mp . find ( arr [ i ] ) == mp . end ( ) ) mp [ arr [ i ] ] = i; else max_dist = max ( max_dist, i - mp [ arr [ i ] ] ); } return max_dist; } int f_filled ( int arr [ ], int n ) [MASK] if ( mp . find ( arr [ i ] ) == mp . end ( ) ) mp [ arr [ i ] ] = i;
else max_dist = max ( max_dist, i - mp [ arr [ i ] ] );
}
return max_dist;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,20,25,28,29,31,34,35,38,39,41,43,46,55,56,60,65,66,74,77,79,80,81,83,84,88,88,88,90,91,99};
int param0_1[] = {26,14,56,84,-56,-84,-98,12,-78,18,-42,58,46,-66,-46,66,98,34,-16,8,-20,66,74,26,42,-84,38,86,14,86,26,-42,-30,6,-54,-76,-66,18,58,66,74,-62,8,-42,62,-14,-90,98,-24};
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[] = {69,87};
int param0_4[] = {-98,-88,-86,-62,-52,-26,-24,-20,-12,6,8,26,36,40,42,54,68,72,84,92,94,98,98};
int param0_5[] = {1,1,1,1,0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0};
int param0_6[] = {11,16,17,19,20,21,21,22,27,37,45,49,64,77,81,85,96};
int param0_7[] = {-20,0,18,-96};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {54,5,98,71,9,34,60,28,58,66,28,45,4};
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,34,11,1,12,29,9,2,22,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) digit",
"b) ++",
"c) (",
"d) javafx.util.Pair;",
"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 arr [ ], int low, int high, int key ) {
if ( high < low ) return - 1;
int mid = ( low + high ) / 2;
if ( key == arr [ mid ] ) return mid;
if ( key > arr [ mid ] ) return f_gold ( arr, ( mid + 1 ), high, key );
return f_gold ( arr, low, ( mid - 1 ), key );
}
int f_filled ( int arr [ ], int low, int high, int key ) {}
return mid;
if ( key > arr [ mid ] ) return f_gold ( arr, ( mid + 1 ), high, key );
return f_gold ( arr, low, ( mid - 1 ), key );
}
int f_filled ( int arr [ ], int low, int high, int key ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,10,73,91,98};
int param0_1[] = {30,24,24,-8,64,50,46,-76,26,8,-92,-78,40,-86,96,14,60,38,6,-72,-6,-20,26,-26,0,2};
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};
int param0_3[] = {30,79,3,76,18};
int param0_4[] = {-96,-90,-88,-84,-78,-78,-70,-68,-66,-66,-64,-64,-58,-56,-52,-42,-40,-38,-36,-30,-30,-28,-14,-8,0,14,16,22,24,26,36,40,40,48,48,50,52,54,54,58,64,74,82,88,94};
int param0_5[] = {1,1,0,0,0,1,1,1,0,0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,0,1};
int param0_6[] = {2,8,8,14,15,16,17,17,18,18,24,25,25,26,36,37,39,39,40,44,46,47,51,54,56,57,57,61,61,67,68,69,72,76,77,81,82,82,82,85,85,87,94,94,98,99};
int param0_7[] = {-4,84,20,-84,-6,-78,20,56,40,0,98,80,-94,36,-6,-98,50,66,-12,-58,-34,68,-80,-30,-82,-76,-38,-60,92,94,48,-84,20,-66,-32,-92,16,-96,-68,94,-46,30,32,-34,96,-92,-96,-86,-22};
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[] = {71,70,13,18,70,62,88,27,17,44,89,28,74,41,20,91,95,79,40,43,38,20,5};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {2,20,30,3,35,25,33,34,19,21};
int param2[] = {4,13,27,2,30,26,40,27,13,22};
int param3[] = {4,21,29,2,40,30,26,34,19,22};
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> [MASK] <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int low, int high, int key ) { if ( high < low ) return - 1; int mid = ( low + high ) / 2; if ( key == arr [ mid ] ) return mid; if ( key > arr [ mid ] ) return f_gold ( arr, ( mid + 1 ), high, key ); return f_gold ( arr, low, ( mid - 1 ), key ); } int f_filled ( int arr [ ], int low, int high, int key ) {}return mid;
if ( key > arr [ mid ] ) return f_gold ( arr, ( mid + 1 ), high, key );
return f_gold ( arr, low, ( mid - 1 ), key );
}
int f_filled ( int arr [ ], int low, int high, int key ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,10,73,91,98};
int param0_1[] = {30,24,24,-8,64,50,46,-76,26,8,-92,-78,40,-86,96,14,60,38,6,-72,-6,-20,26,-26,0,2};
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};
int param0_3[] = {30,79,3,76,18};
int param0_4[] = {-96,-90,-88,-84,-78,-78,-70,-68,-66,-66,-64,-64,-58,-56,-52,-42,-40,-38,-36,-30,-30,-28,-14,-8,0,14,16,22,24,26,36,40,40,48,48,50,52,54,54,58,64,74,82,88,94};
int param0_5[] = {1,1,0,0,0,1,1,1,0,0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,0,1};
int param0_6[] = {2,8,8,14,15,16,17,17,18,18,24,25,25,26,36,37,39,39,40,44,46,47,51,54,56,57,57,61,61,67,68,69,72,76,77,81,82,82,82,85,85,87,94,94,98,99};
int param0_7[] = {-4,84,20,-84,-6,-78,20,56,40,0,98,80,-94,36,-6,-98,50,66,-12,-58,-34,68,-80,-30,-82,-76,-38,-60,92,94,48,-84,20,-66,-32,-92,16,-96,-68,94,-46,30,32,-34,96,-92,-96,-86,-22};
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[] = {71,70,13,18,70,62,88,27,17,44,89,28,74,41,20,91,95,79,40,43,38,20,5};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {2,20,30,3,35,25,33,34,19,21};
int param2[] = {4,13,27,2,30,26,40,27,13,22};
int param3[] = {4,21,29,2,40,30,26,34,19,22};
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 | [
"a) .",
"b) (",
"c) )",
"d) #include",
"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);}
char f_gold [] ( char str [] ) {
int n = strlen(str);
int LCSRe [ n + 1 ] [ n + 1 ];
memset ( LCSRe, 0, sizeof ( LCSRe ) );
char res [];
int res_length = 0;
int i, index = 0;
for ( i = 1;
i <= n;
i ++ ) {
for ( int j = i + 1;
j <= n;
j ++ ) {
if ( str [ i - 1 ] == str [ j - 1 ] && LCSRe [ i - 1 ] [ j - 1 ] < ( j - i ) ) {
LCSRe [ i ] [ j ] = LCSRe [ i - 1 ] [ j - 1 ] + 1;
if ( LCSRe [ i ] [ j ] > res_length ) {
res_length = LCSRe [ i ] [ j ];
index = max ( i, index );
}
}
else LCSRe [ i ] [ j ] = 0;
}
}
if ( res_length > 0 ) for ( i = index - res_length + 1;
i <= index;
i ++ ) res . push_back ( str [ i - 1 ] );
return res;
}
char f_filled [] ( char str [] ) {}
[ i ] [ j ] = 0;
}
}
if ( res_length > 0 ) for ( i = index - res_length + 1;
i <= index;
i ++ ) res . push_back ( str [ i - 1 ] );
return res;
}
char f_filled [] ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"fbfHTjE","09285256323","0011000101110","ue JkVZTt","48387612426300","010","ddRrUz","1049162633793","100011","iJfadiVaQqv"};
for(int i = 0; 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);} char f_gold [] ( char str [] ) { int n = strlen(str); int LCSRe [ n + 1 ] [ n + 1 ]; memset ( LCSRe, 0, sizeof ( LCSRe ) ); char res []; int res_length = 0; int i, index = 0; for ( i = 1; i <= n; i ++ ) { for ( int j = i + 1; j <= n; j ++ ) { if ( str [ i - 1 ] == str [ j - 1 ] && LCSRe [ i - 1 ] [ j - 1 ] < ( j - i ) ) { LCSRe [ i ] [ j ] = LCSRe [ i - 1 ] [ j - 1 ] + 1; if ( LCSRe [ i ] [ j ] > res_length ) { res_length = LCSRe [ i ] [ j ]; index = max ( i, index ); } } else LCSRe [ i ] [ j ] = 0; } } if ( res_length > 0 ) for ( i = index - res_length + 1; i <= index; i ++ ) res . push_back ( str [ i - 1 ] ); return res; } char f_filled [] ( char str [] ) {} [ i ] [ j ] = 0;
}
}
if ( res_length > 0 ) for ( i = index - res_length + 1;
i <= index;
i ++ ) res . push_back ( str [ i - 1 ] );
return res;
}
char f_filled [] ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"fbfHTjE","09285256323","0011000101110","ue JkVZTt","48387612426300","010","ddRrUz","1049162633793","100011","iJfadiVaQqv"};
for(int i = 0; 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) const",
"b) int",
"c) {",
"d) import",
"e) a"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int N, int K ) {
int ans = 0;
for ( int i = 1;
i <= N;
i ++ ) ans += ( i % K );
return ans;
}
int f_filled ( int N, int K ) {}
t n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int N, int K ) {
int ans = 0;
for ( int i = 1;
i <= N;
i ++ ) ans += ( i % K );
return ans;
}
int f_filled ( int N, int K ) {}
int main(void) {
int n_success = 0;
int param0[] = {11,36,71,74,66,38,2,73,79,30};
int param1[] = {5,69,28,1,84,14,11,87,11,55};
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 [MASK] int K ) { int ans = 0; for ( int i = 1; i <= N; i ++ ) ans += ( i % K ); return ans; } int f_filled ( int N, int K ) {}t n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int N, int K ) {
int ans = 0;
for ( int i = 1;
i <= N;
i ++ ) ans += ( i % K );
return ans;
}
int f_filled ( int N, int K ) {}
int main(void) {
int n_success = 0;
int param0[] = {11,36,71,74,66,38,2,73,79,30};
int param1[] = {5,69,28,1,84,14,11,87,11,55};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | N, | [
"a) return",
"b) N,",
"c) <string>",
"d) if",
"e) for"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n, int a = 0, int b = 1 ) {
if ( n == 0 ) return a;
if ( n == 1 ) return b;
return f_gold ( n - 1, b, a + b );
}
int f_filled ( int n, int a = 0, int b = 1 ) {}
cmpfunc);}
int f_gold ( int n, int a = 0, int b = 1 ) {
if ( n == 0 ) return a;
if ( n == 1 ) return b;
return f_gold ( n - 1, b, a + b );
}
int f_filled ( int n, int a = 0, int b = 1 ) {}
int main(void) {
int n_success = 0;
int param0[] = {4,60,92,73,58,82,53,57,47,83};
int param1[] = {43,48,21,79,38,26,10,37,91,3};
int param2[] = {24,98,69,38,30,12,17,26,99,64};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n, int a = 0, int b = 1 ) { if ( n == 0 ) return a; if ( n == 1 ) return b; [MASK] f_gold ( n - 1, b, a + b ); } int f_filled ( int n, int a = 0, int b = 1 ) {}cmpfunc);}
int f_gold ( int n, int a = 0, int b = 1 ) {
if ( n == 0 ) return a;
if ( n == 1 ) return b;
return f_gold ( n - 1, b, a + b );
}
int f_filled ( int n, int a = 0, int b = 1 ) {}
int main(void) {
int n_success = 0;
int param0[] = {4,60,92,73,58,82,53,57,47,83};
int param1[] = {43,48,21,79,38,26,10,37,91,3};
int param2[] = {24,98,69,38,30,12,17,26,99,64};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | return | [
"a) return",
"b) void",
"c) =",
"d) else",
"e) end"
] | 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 k = n;
int imin = 1;
int ans = 0;
while ( imin <= n ) {
int imax = n / k;
ans += k * ( imax - imin + 1 );
imin = imax + 1;
k = n / imin;
}
return ans;
}
int f_filled ( int n ) {}
int imin = 1;
int ans = 0;
while ( imin <= n ) {
int imax = n / k;
ans += k * ( imax - imin + 1 );
imin = imax + 1;
k = n / imin;
}
return ans;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {17,72,43,55,62,22,17,68,20,29};
for(int i = 0; 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: [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 k = n; int imin = 1; int ans = 0; while ( imin <= n ) { int imax = n / k; ans += k * ( imax - imin + 1 ); imin = imax + 1; k = n / imin; } return ans; } int f_filled ( int n ) {}int imin = 1;
int ans = 0;
while ( imin <= n ) {
int imax = n / k;
ans += k * ( imax - imin + 1 );
imin = imax + 1;
k = n / imin;
}
return ans;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {17,72,43,55,62,22,17,68,20,29};
for(int i = 0; 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) n",
"b) y;",
"c) )",
"d) <",
"e) ["
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
int dp [ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) {
if ( i <= 2 ) dp [ i ] = i;
else dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ];
}
return dp [ n ];
}
int f_filled ( int n ) {}
[ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) {
if ( i <= 2 ) dp [ i ] = i;
else dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ];
}
return dp [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {99,62,87,87,61,88,73,62,98,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, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { int dp [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) { if ( i <= 2 ) dp [ i ] = i; else [MASK] [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ]; } return dp [ n ]; } int f_filled ( int n ) {} [ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) {
if ( i <= 2 ) dp [ i ] = i;
else dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ];
}
return dp [ n ];
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {99,62,87,87,61,88,73,62,98,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;
} | dp | [
"a) if",
"b) ,",
"c) j",
"d) dp",
"e) 1"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
double f_gold ( int a, int b ) {
double AM, GM, HM;
AM = ( a + b ) / 2;
GM = sqrt ( a * b );
HM = ( GM * GM ) / AM;
return HM;
}
double f_filled ( int a, int b ) {}
of(int), cmpfunc);}
double f_gold ( int a, int b ) {
double AM, GM, HM;
AM = ( a + b ) / 2;
GM = sqrt ( a * b );
HM = ( GM * GM ) / AM;
return HM;
}
double f_filled ( int a, int b ) {}
int main(void) {
int n_success = 0;
int param0[] = {54,42,63,19,41,7,39,11,96,15};
int param1[] = {83,56,12,76,50,26,42,64,81,54};
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) [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);} double f_gold ( int a, int b ) { double AM, GM, HM; AM = ( a + b ) / 2; GM = sqrt ( a * b ); HM = ( GM * GM ) / AM; return HM; } double f_filled ( int a, int b ) {}of(int), cmpfunc);}
double f_gold ( int a, int b ) {
double AM, GM, HM;
AM = ( a + b ) / 2;
GM = sqrt ( a * b );
HM = ( GM * GM ) / AM;
return HM;
}
double f_filled ( int a, int b ) {}
int main(void) {
int n_success = 0;
int param0[] = {54,42,63,19,41,7,39,11,96,15};
int param1[] = {83,56,12,76,50,26,42,64,81,54};
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;
} | {return | [
"a) i",
"b) ;",
"c) {return",
"d) <",
"e) -"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int n ) {
return ( n & 1 ) ? - 1 : 1;
}
int f_filled ( int 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 & 1 ) ? - 1 : 1;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {67,2,58,6,42,17,37,44,23,40};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> [MASK] <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int n ) { return ( n & 1 ) ? - 1 : 1; } int f_filled ( int 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 & 1 ) ? - 1 : 1;
}
int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {67,2,58,6,42,17,37,44,23,40};
for(int i = 0; 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) sort",
"b) <vector>",
"c) (int",
"d) #include",
"e) i"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int high [ ], int low [ ], int n ) {
if ( n <= 0 ) return 0;
return max ( high [ n - 1 ] + f_gold ( high, low, ( n - 2 ) ), low [ n - 1 ] + f_gold ( high, low, ( n - 1 ) ) );
}
int f_filled ( int high [ ], int low [ ], int n ) {}
if ( n <= 0 ) return 0;
return max ( high [ n - 1 ] + f_gold ( high, low, ( n - 2 ) ), low [ n - 1 ] + f_gold ( high, low, ( n - 1 ) ) );
}
int f_filled ( int high [ ], int low [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,3,9,10,13,14,15,15,17,22,23,28,30,31,37,42,45,62,62,68,68,68,78,79,82,84,87,90,99};
int param0_1[] = {-78,-12,26,80,50,4,-80,86,12,-2,18,-50,-90,56,-50,88,-62,96,-44,-82,56};
int param0_2[] = {1};
int param0_3[] = {21,28,13,48,26,49,16,70,81,35,74,12,97,61,10,84,94,78,40,30,30,84,41,4,95,79,38,29,9};
int param0_4[] = {-80,-36,-32,-20,-14,-12,10,12,72};
int param0_5[] = {1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1};
int param0_6[] = {1,7,9,10,13,14,15,20,23,24,24,24,26,27,29,31,32,33,34,35,46,48,49,51,51,53,53,56,56,60,62,64,64,70,73,73,73,74,77,78,79,79,79,80,86,89,89,92,98};
int param0_7[] = {56,48,40,-56,44,-86,-28,-32,-34,4,-94,-14,28,-74};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1};
int param0_9[] = {85,13,35,57,8,48,65,54,88,7,66,30,47,51};
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[] = {5,10,11,14,16,22,24,30,34,35,37,37,39,41,42,42,43,55,57,63,71,76,83,83,85,90,91,97,99};
int param1_1[] = {-44,-14,14,0,30,78,40,-12,-44,-16,60,-12,-50,-66,70,-98,-56,48,-82,94,14};
int param1_2[] = {1};
int param1_3[] = {49,88,25,93,24,56,47,44,33,27,86,57,21,25,64,44,37,99,36,54,17,29,37,17,26,43,61,27,21};
int param1_4[] = {-76,-54,-50,-28,0,58,70,78,90};
int param1_5[] = {0,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,0,1};
int param1_6[] = {1,3,3,4,8,8,10,10,10,12,12,15,15,22,23,28,28,30,31,33,34,35,36,36,36,42,44,44,51,54,57,58,59,59,63,65,66,68,69,71,73,76,77,78,79,79,86,87,93};
int param1_7[] = {82,-40,-16,-64,12,-6,60,48,-58,-4,42,-28,24,-58};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1};
int param1_9[] = {1,42,42,89,3,21,49,98,4,59,26,85,53,34};
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[] = {18,16,0,25,4,24,31,8,16,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 [MASK] (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int high [ ], int low [ ], int n ) { if ( n <= 0 ) return 0; return max ( high [ n - 1 ] + f_gold ( high, low, ( n - 2 ) ), low [ n - 1 ] + f_gold ( high, low, ( n - 1 ) ) ); } int f_filled ( int high [ ], int low [ ], int n ) {} if ( n <= 0 ) return 0;
return max ( high [ n - 1 ] + f_gold ( high, low, ( n - 2 ) ), low [ n - 1 ] + f_gold ( high, low, ( n - 1 ) ) );
}
int f_filled ( int high [ ], int low [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,3,9,10,13,14,15,15,17,22,23,28,30,31,37,42,45,62,62,68,68,68,78,79,82,84,87,90,99};
int param0_1[] = {-78,-12,26,80,50,4,-80,86,12,-2,18,-50,-90,56,-50,88,-62,96,-44,-82,56};
int param0_2[] = {1};
int param0_3[] = {21,28,13,48,26,49,16,70,81,35,74,12,97,61,10,84,94,78,40,30,30,84,41,4,95,79,38,29,9};
int param0_4[] = {-80,-36,-32,-20,-14,-12,10,12,72};
int param0_5[] = {1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1};
int param0_6[] = {1,7,9,10,13,14,15,20,23,24,24,24,26,27,29,31,32,33,34,35,46,48,49,51,51,53,53,56,56,60,62,64,64,70,73,73,73,74,77,78,79,79,79,80,86,89,89,92,98};
int param0_7[] = {56,48,40,-56,44,-86,-28,-32,-34,4,-94,-14,28,-74};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1};
int param0_9[] = {85,13,35,57,8,48,65,54,88,7,66,30,47,51};
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[] = {5,10,11,14,16,22,24,30,34,35,37,37,39,41,42,42,43,55,57,63,71,76,83,83,85,90,91,97,99};
int param1_1[] = {-44,-14,14,0,30,78,40,-12,-44,-16,60,-12,-50,-66,70,-98,-56,48,-82,94,14};
int param1_2[] = {1};
int param1_3[] = {49,88,25,93,24,56,47,44,33,27,86,57,21,25,64,44,37,99,36,54,17,29,37,17,26,43,61,27,21};
int param1_4[] = {-76,-54,-50,-28,0,58,70,78,90};
int param1_5[] = {0,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,0,1};
int param1_6[] = {1,3,3,4,8,8,10,10,10,12,12,15,15,22,23,28,28,30,31,33,34,35,36,36,36,42,44,44,51,54,57,58,59,59,63,65,66,68,69,71,73,76,77,78,79,79,86,87,93};
int param1_7[] = {82,-40,-16,-64,12,-6,60,48,-58,-4,42,-28,24,-58};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1};
int param1_9[] = {1,42,42,89,3,21,49,98,4,59,26,85,53,34};
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[] = {18,16,0,25,4,24,31,8,16,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;
} | sort | [
"a) for",
"b) if",
"c) public",
"d) sort",
"e) i"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int set [ ], int n ) {
if ( n <= 2 ) return n;
int L [ n ] [ n ];
int llap = 2;
for ( int i = 0;
i < n;
i ++ ) L [ i ] [ n - 1 ] = 2;
for ( int j = n - 2;
j >= 1;
j -- ) {
int i = j - 1, k = j + 1;
while ( i >= 0 && k <= n - 1 ) {
if ( set [ i ] + set [ k ] < 2 * set [ j ] ) k ++;
else if ( set [ i ] + set [ k ] > 2 * set [ j ] ) {
L [ i ] [ j ] = 2, i --;
}
else {
L [ i ] [ j ] = L [ j ] [ k ] + 1;
llap = max ( llap, L [ i ] [ j ] );
i --;
k ++;
}
}
while ( i >= 0 ) {
L [ i ] [ j ] = 2;
i --;
}
}
return llap;
}
int f_filled ( int set [ ], int n ) {}
ax ( llap, L [ i ] [ j ] );
i --;
k ++;
}
}
while ( i >= 0 ) {
L [ i ] [ j ] = 2;
i --;
}
}
return llap;
}
int f_filled ( int set [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,4,4,7,8,19,21,22,25,27,28,29,38,40,41,42,43,46,50,50,53,53,54,55,60,64,64,69,70,75,77,81,81,82,86,87,87,88,91,94,97};
int param0_1[] = {40,-6,50,-18,42,78,38,-90,-44,-42,-86,78,-68,2,-32,-20,-44,54,80,54,70,26,82,-14,-74,-20,74,82};
int param0_2[] = {0,0,0,0,1,1,1};
int param0_3[] = {76,80};
int param0_4[] = {-92,-90,-88,-76,-76,-60,-46,-40,-24,-8,-8,-6,2,12,36,38,58,76,80};
int param0_5[] = {1,1,1,0,0,0,0,1,1,1,0,0,0,1,0,1,1};
int param0_6[] = {5,8,11,27,27,32,32,37,50,51,55,61,62,68,73,83};
int param0_7[] = {52,-74,-32,-64,-52,-60,-70,36,70,40,40,-18,90,-70,-82,-64,-8,-6,36,4,-58,62,-96,78,36,90,-70,-6,-84,24,84,32,-90,36,70,-60,-56,78,48,34,-16,80,82,58,14,-6,-8,76};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {11,21,76,45,8,49,97,66,17,11,87,4,34,89,79,88,6,91,19,56,91,25,17,90,26,59,34,32,43,17,98,39,72,78,93,43};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {27,21,5,1,13,15,8,29,27,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 set [ ], int n ) { if ( n <= 2 ) return n; int L [ n ] [ n ]; int llap = 2; for ( int i = 0; i < n; i ++ ) L [ i ] [ n - 1 ] = 2; for ( int j = n - 2; j >= 1; j -- ) { int i = j - 1, k = j + 1; while ( i >= 0 && k <= n - 1 ) { if ( set [ i ] + set [ k ] < 2 * set [ j ] ) k ++; else if [MASK] set [ i ] + set [ k ] > 2 * set [ j ] ) { L [ i ] [ j ] = 2, i --; } else { L [ i ] [ j ] = L [ j ] [ k ] + 1; llap = max ( llap, L [ i ] [ j ] ); i --; k ++; } } while ( i >= 0 ) { L [ i ] [ j ] = 2; i --; } } return llap; } int f_filled ( int set [ ], int n ) {}ax ( llap, L [ i ] [ j ] );
i --;
k ++;
}
}
while ( i >= 0 ) {
L [ i ] [ j ] = 2;
i --;
}
}
return llap;
}
int f_filled ( int set [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,4,4,7,8,19,21,22,25,27,28,29,38,40,41,42,43,46,50,50,53,53,54,55,60,64,64,69,70,75,77,81,81,82,86,87,87,88,91,94,97};
int param0_1[] = {40,-6,50,-18,42,78,38,-90,-44,-42,-86,78,-68,2,-32,-20,-44,54,80,54,70,26,82,-14,-74,-20,74,82};
int param0_2[] = {0,0,0,0,1,1,1};
int param0_3[] = {76,80};
int param0_4[] = {-92,-90,-88,-76,-76,-60,-46,-40,-24,-8,-8,-6,2,12,36,38,58,76,80};
int param0_5[] = {1,1,1,0,0,0,0,1,1,1,0,0,0,1,0,1,1};
int param0_6[] = {5,8,11,27,27,32,32,37,50,51,55,61,62,68,73,83};
int param0_7[] = {52,-74,-32,-64,-52,-60,-70,36,70,40,40,-18,90,-70,-82,-64,-8,-6,36,4,-58,62,-96,78,36,90,-70,-6,-84,24,84,32,-90,36,70,-60,-56,78,48,34,-16,80,82,58,14,-6,-8,76};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {11,21,76,45,8,49,97,66,17,11,87,4,34,89,79,88,6,91,19,56,91,25,17,90,26,59,34,32,43,17,98,39,72,78,93,43};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {27,21,5,1,13,15,8,29,27,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;
} | ( | [
"a) (",
"b) java.util.stream.*;",
"c) #include",
"d) f_gold",
"e) %"
] | a |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int a [ ], int b [ ], int n, int k ) {
int diff = 0, res = 0;
int temp;
for ( int i = 0;
i < n;
i ++ ) {
int pro = a [ i ] * b [ i ];
res = res + pro;
if ( pro < 0 && b [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ];
else if ( pro < 0 && a [ i ] < 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ];
else if ( pro > 0 && a [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ];
else if ( pro > 0 && a [ i ] > 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ];
int d = abs ( pro - temp );
if ( d > diff ) diff = d;
}
return res - diff;
}
int f_filled ( int a [ ], int b [ ], int n, int k ) {}
a [ i ] > 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ];
int d = abs ( pro - temp );
if ( d > diff ) diff = d;
}
return res - diff;
}
int f_filled ( int a [ ], int b [ ], int n, int k ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {8,9,9,16,19,21,24,26,26,27,31,33,36,44,46,47,69,71,72,74,74,74,74,76,76,77,89,91,91};
int param0_1[] = {-64,-58,26,-42,-18,-52,26,-70,0,-68,38,-98,-14,-92,-74,-90,86,-76,-8,-80,-80,54,-26,-56,48,86,-60};
int param0_2[] = {0,0,0,0,1,1,1,1};
int param0_3[] = {62,73,67,96,95,31,58,13,63,13,29,97,7,36,13,54,67,8,9,36,6,29,92,7,82,5,27,65,80,20,22,1,11,67,23,31,86,27,53,87,39,99,69};
int param0_4[] = {-86,-82,-42,-30,-12,-4,14,16,20,20,22,26,30,40,46,48,48,50,60,60,66,70,74,76,90,96,96,98};
int param0_5[] = {1,1,1,0,1,0,0,1,1,1,1,1,0,1,1,0,1,1,1,0,0,0,1,0,1,1,1,1,1,0,0,1};
int param0_6[] = {4,7,14,14,30,38,44,49,51,53,54,56,58,62,67,76,86,86,88,91,95};
int param0_7[] = {2,90,-92,58,56,94,12,-2,86,-70,46,-80,42,-6,72,-52,4,96,-42,50,-28,42,8,26,46,70,-2,-24,-36,50,26,70,74,-52,34,-88,-66,74,52,62,-24,-80,40,42,90};
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};
int param0_9[] = {61,96,7,59,86,74,7,95,13,52,18,77,25,97,74,18};
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[] = {1,8,10,10,12,16,17,19,20,20,23,33,37,38,58,66,69,70,70,76,79,80,83,84,84,86,87,87,93};
int param1_1[] = {90,-2,-8,12,-58,46,-54,-40,-10,-76,-62,66,42,-66,4,-6,50,8,-18,92,-42,30,-34,74,-86,-56,52};
int param1_2[] = {0,0,0,0,0,1,1,1};
int param1_3[] = {88,64,94,64,4,23,6,85,92,68,78,53,96,88,69,28,12,34,92,67,39,68,72,64,10,14,26,61,96,1,79,87,45,9,16,70,63,84,79,63,11,85,46};
int param1_4[] = {-98,-78,-68,-68,-64,-40,-38,-38,-26,-12,-6,0,2,8,18,34,52,58,64,64,70,72,76,82,84,90,96,96};
int param1_5[] = {1,0,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,1,0,1,0,0,1,0,1,1,0,0,0};
int param1_6[] = {2,2,7,19,20,21,22,26,42,45,46,46,59,63,63,72,73,74,77,83,89};
int param1_7[] = {98,62,-52,-92,-14,-92,62,86,20,36,-80,-12,-38,70,-28,-28,42,-10,94,-16,-72,-96,76,-14,-18,-12,38,14,46,16,-90,10,-34,-6,-34,-62,96,14,0,-10,32,-6,96,-72,-2};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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[] = {56,38,75,57,82,30,38,79,39,73,74,73,36,10,80,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[] = {20,20,7,23,14,20,11,25,46,13};
int param3[] = {28,16,5,23,14,16,17,25,33,12};
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 a [ ], int b [ ], int n, int k ) { int diff = 0, res = 0; int temp; for ( int i = 0; i < n; i ++ ) { int pro = a [ i ] * b [ i ]; res = res + pro; if ( pro < 0 && b [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ]; else if ( [MASK] < 0 && a [ i ] < 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ]; else if ( pro > 0 && a [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ]; else if ( pro > 0 && a [ i ] > 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ]; int d = abs ( pro - temp ); if ( d > diff ) diff = d; } return res - diff; } int f_filled ( int a [ ], int b [ ], int n, int k ) {}a [ i ] > 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ];
int d = abs ( pro - temp );
if ( d > diff ) diff = d;
}
return res - diff;
}
int f_filled ( int a [ ], int b [ ], int n, int k ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {8,9,9,16,19,21,24,26,26,27,31,33,36,44,46,47,69,71,72,74,74,74,74,76,76,77,89,91,91};
int param0_1[] = {-64,-58,26,-42,-18,-52,26,-70,0,-68,38,-98,-14,-92,-74,-90,86,-76,-8,-80,-80,54,-26,-56,48,86,-60};
int param0_2[] = {0,0,0,0,1,1,1,1};
int param0_3[] = {62,73,67,96,95,31,58,13,63,13,29,97,7,36,13,54,67,8,9,36,6,29,92,7,82,5,27,65,80,20,22,1,11,67,23,31,86,27,53,87,39,99,69};
int param0_4[] = {-86,-82,-42,-30,-12,-4,14,16,20,20,22,26,30,40,46,48,48,50,60,60,66,70,74,76,90,96,96,98};
int param0_5[] = {1,1,1,0,1,0,0,1,1,1,1,1,0,1,1,0,1,1,1,0,0,0,1,0,1,1,1,1,1,0,0,1};
int param0_6[] = {4,7,14,14,30,38,44,49,51,53,54,56,58,62,67,76,86,86,88,91,95};
int param0_7[] = {2,90,-92,58,56,94,12,-2,86,-70,46,-80,42,-6,72,-52,4,96,-42,50,-28,42,8,26,46,70,-2,-24,-36,50,26,70,74,-52,34,-88,-66,74,52,62,-24,-80,40,42,90};
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};
int param0_9[] = {61,96,7,59,86,74,7,95,13,52,18,77,25,97,74,18};
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[] = {1,8,10,10,12,16,17,19,20,20,23,33,37,38,58,66,69,70,70,76,79,80,83,84,84,86,87,87,93};
int param1_1[] = {90,-2,-8,12,-58,46,-54,-40,-10,-76,-62,66,42,-66,4,-6,50,8,-18,92,-42,30,-34,74,-86,-56,52};
int param1_2[] = {0,0,0,0,0,1,1,1};
int param1_3[] = {88,64,94,64,4,23,6,85,92,68,78,53,96,88,69,28,12,34,92,67,39,68,72,64,10,14,26,61,96,1,79,87,45,9,16,70,63,84,79,63,11,85,46};
int param1_4[] = {-98,-78,-68,-68,-64,-40,-38,-38,-26,-12,-6,0,2,8,18,34,52,58,64,64,70,72,76,82,84,90,96,96};
int param1_5[] = {1,0,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,1,0,1,0,0,1,0,1,1,0,0,0};
int param1_6[] = {2,2,7,19,20,21,22,26,42,45,46,46,59,63,63,72,73,74,77,83,89};
int param1_7[] = {98,62,-52,-92,-14,-92,62,86,20,36,-80,-12,-38,70,-28,-28,42,-10,94,-16,-72,-96,76,-14,-18,-12,38,14,46,16,-90,10,-34,-6,-34,-62,96,14,0,-10,32,-6,96,-72,-2};
int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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[] = {56,38,75,57,82,30,38,79,39,73,74,73,36,10,80,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[] = {20,20,7,23,14,20,11,25,46,13};
int param3[] = {28,16,5,23,14,16,17,25,33,12};
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;
} | pro | [
"a) n",
"b) ;",
"c) ,",
"d) <",
"e) pro"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( char num [] ) {
int length = len(num);
if ( length == 1 && num [ 0 ] == '0' ) return true;
if ( length % 3 == 1 ) {
num += "00";
length += 2;
}
else if ( length % 3 == 2 ) {
num += "0";
length += 1;
}
int sum = 0, p = 1;
for ( int i = length - 1;
i >= 0;
i -- ) {
int group = 0;
group += num [ i -- ] - '0';
group += ( num [ i -- ] - '0' ) * 10;
group += ( num [ i ] - '0' ) * 100;
sum = sum + group * p;
p *= ( - 1 );
}
sum = abs ( sum );
return ( sum % 13 == 0 );
}
bool f_filled ( char num [] ) {}
[ i -- ] - '0' ) * 10;
group += ( num [ i ] - '0' ) * 100;
sum = sum + group * p;
p *= ( - 1 );
}
sum = abs ( sum );
return ( sum % 13 == 0 );
}
bool f_filled ( char num [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"vzTUaItpCpLnjY","33855","0011110101011","MMQ","439340517954","000000000","UugAuRRJbjEgl","6406553695441","011001","yjFqEEvgiNjEX"};
for(int i = 0; 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);} bool f_gold ( char num [] ) { int length = len(num); if ( length == 1 && num [ 0 ] == '0' ) return true; if ( length % 3 == 1 ) { num += "00"; length += 2; } else if ( length % 3 == 2 ) { num += "0"; length += 1; } int sum = 0, p = 1; for ( int i = length - 1; i >= 0; i -- ) { int group = 0; group += num [ i -- ] - '0'; group += ( num [ i -- ] - '0' ) * 10; group += ( num [ i ] - '0' ) * 100; sum = sum + group * p; p *= ( - 1 ); } sum = abs ( sum ); return ( sum % 13 == 0 ); } bool f_filled ( char num [] ) {}[ i -- ] - '0' ) * 10;
group += ( num [ i ] - '0' ) * 100;
sum = sum + group * p;
p *= ( - 1 );
}
sum = abs ( sum );
return ( sum % 13 == 0 );
}
bool f_filled ( char num [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"vzTUaItpCpLnjY","33855","0011110101011","MMQ","439340517954","000000000","UugAuRRJbjEgl","6406553695441","011001","yjFqEEvgiNjEX"};
for(int i = 0; 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) 0",
"b) [",
"c) (int",
"d) False",
"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);}
long long int f_gold ( int n ) {
return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24;
}
long long int f_filled ( int n ) {}
sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
long long int f_gold ( int n ) {
return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24;
}
long long int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,18,97,9,42,67,71,66,69,18};
for(int i = 0; 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);} long long int f_gold ( int n ) { return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24; } long long int f_filled ( int n ) {} sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
long long int f_gold ( int n ) {
return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24;
}
long long int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {57,18,97,9,42,67,71,66,69,18};
for(int i = 0; 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) #include",
"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 arr [ ], int n, int k ) {
unordered_map < int, int > um;
int sum [ n ], curr_rem;
int maxSum = 0;
sum [ 0 ] = arr [ 0 ];
for ( int i = 1;
i < n;
i ++ ) sum [ i ] = sum [ i - 1 ] + arr [ i ];
for ( int i = 0;
i < n;
i ++ ) {
curr_rem = sum [ i ] % k;
if ( curr_rem == 0 ) {
if ( maxSum < sum [ i ] ) maxSum = sum [ i ];
}
else if ( um . find ( curr_rem ) == um . end ( ) ) um [ curr_rem ] = i;
else if ( maxSum < ( sum [ i ] - sum [ um [ curr_rem ] ] ) ) maxSum = sum [ i ] - sum [ um [ curr_rem ] ];
}
return ( maxSum / k );
}
int f_filled ( int arr [ ], int n, int k ) {}
] = i;
else if ( maxSum < ( sum [ i ] - sum [ um [ curr_rem ] ] ) ) maxSum = sum [ i ] - sum [ um [ curr_rem ] ];
}
return ( maxSum / k );
}
int f_filled ( int arr [ ], int n, int k ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,3,8,8,12,14,23,25,25,27,27,29,40,42,49,52,52,54,56,57,61,68,74,77,81,82,83,84,85,85,85,87,87,88,88,90,92,96,96};
int param0_1[] = {-90,-34,26,-20,-12,-42,28,12,-6,58,-46,4,-30,-28,-14};
int param0_2[] = {0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {58,81,36,2,51,71,77,34,91,82,47,4,91,83,26,96,3,6};
int param0_4[] = {-92,-86,-82,-68,-60,-46,-40,-28,-26,-24,-2,-2,2,2,10,10,10,16,16,18,20,20,22,30,34,38,56,56,60,62,62,68,82,94,94,98};
int param0_5[] = {0,1,0};
int param0_6[] = {3,8,15,19,21,26,28,31,31,42,45,48,57,75,75,78,79,85,91,99};
int param0_7[] = {-38,42,40,-60,-16,-36,44,60,-86,-38,30,-22,-30,-96,-66};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
int param0_9[] = {95,38,91,75,43,95,23,36,51,4,38,53,52,58,55,3,19,22,84,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[] = {27,8,7,16,20,2,17,12,13,14};
int param2[] = {32,14,9,12,31,2,16,10,16,19};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > um; int sum [ n ], curr_rem; int maxSum = 0; sum [ 0 ] = arr [ 0 ]; for ( int i = 1; i < n; i ++ ) sum [ i ] = sum [ i - 1 ] + arr [ i ]; for ( int i = 0; i < n; i ++ ) { curr_rem = sum [ i ] % k; if ( [MASK] == 0 ) { if ( maxSum < sum [ i ] ) maxSum = sum [ i ]; } else if ( um . find ( curr_rem ) == um . end ( ) ) um [ curr_rem ] = i; else if ( maxSum < ( sum [ i ] - sum [ um [ curr_rem ] ] ) ) maxSum = sum [ i ] - sum [ um [ curr_rem ] ]; } return ( maxSum / k ); } int f_filled ( int arr [ ], int n, int k ) {} ] = i;
else if ( maxSum < ( sum [ i ] - sum [ um [ curr_rem ] ] ) ) maxSum = sum [ i ] - sum [ um [ curr_rem ] ];
}
return ( maxSum / k );
}
int f_filled ( int arr [ ], int n, int k ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,3,8,8,12,14,23,25,25,27,27,29,40,42,49,52,52,54,56,57,61,68,74,77,81,82,83,84,85,85,85,87,87,88,88,90,92,96,96};
int param0_1[] = {-90,-34,26,-20,-12,-42,28,12,-6,58,-46,4,-30,-28,-14};
int param0_2[] = {0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {58,81,36,2,51,71,77,34,91,82,47,4,91,83,26,96,3,6};
int param0_4[] = {-92,-86,-82,-68,-60,-46,-40,-28,-26,-24,-2,-2,2,2,10,10,10,16,16,18,20,20,22,30,34,38,56,56,60,62,62,68,82,94,94,98};
int param0_5[] = {0,1,0};
int param0_6[] = {3,8,15,19,21,26,28,31,31,42,45,48,57,75,75,78,79,85,91,99};
int param0_7[] = {-38,42,40,-60,-16,-36,44,60,-86,-38,30,-22,-30,-96,-66};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
int param0_9[] = {95,38,91,75,43,95,23,36,51,4,38,53,52,58,55,3,19,22,84,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[] = {27,8,7,16,20,2,17,12,13,14};
int param2[] = {32,14,9,12,31,2,16,10,16,19};
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;
} | curr_rem | [
"a) if",
"b) l",
"c) int",
"d) int",
"e) curr_rem"
] | e |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
bool f_gold ( int pre [ ], int n ) {
stack < int > s;
int root = INT_MIN;
for ( int i = 0;
i < n;
i ++ ) {
if ( pre [ i ] < root ) return false;
while ( ! s . empty ( ) && s . top ( ) < pre [ i ] ) {
root = s . top ( );
s . pop ( );
}
s . push ( pre [ i ] );
}
return true;
}
bool f_filled ( int pre [ ], int n ) {}
while ( ! s . empty ( ) && s . top ( ) < pre [ i ] ) {
root = s . top ( );
s . pop ( );
}
s . push ( pre [ i ] );
}
return true;
}
bool f_filled ( int pre [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,9,21,25,33,36,44,48,55,55,56,58,66,66,66,66,78,92,96,97};
int param0_1[] = {-16,80,70,72,-86,-28,42,28,-28,56,-32,40,-78,32,22,-52,-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};
int param0_3[] = {10,85,45,52,98,9,59,58,61,91,4,90,43,48,47};
int param0_4[] = {-92,-90,-88,-50,-48,-48,-44,-42,-40,-34,-28,-26,-26,-24,-8,-6,4,8,12,20,32,36,38,40,46,52,58,88,92};
int param0_5[] = {1,0,1,1,1};
int param0_6[] = {1,2,3,4,14,16,17,18,19,19,21,21,22,25,25,28,29,33,34,40,41,42,44,50,52,58,61,62,67,70,74,74,75,75,76,77,77,77,81,83,87,90,90,90,96,98,99,99};
int param0_7[] = {-98,40,84,-8,42,-52,2,16,-68,-28,-54,88,8,-4,-98,-40,-32,-64,54,32,-76,-10,-48,-88,80,32,-2,-94,-26,-54,30,-56};
int param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {9,35,62,78,55,29,55,36,77,89,73,31,53,94,22,23,87,96,7,15,71,61,25,61,99,34,1,87,21,14,58,69,61,49,54,7,89,52,78,97,11,78,27,37,56,19,20,21};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {18,16,35,8,17,2,30,26,17,34};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} bool f_gold ( int pre [ ], int [MASK] ) { stack < int > s; int root = INT_MIN; for ( int i = 0; i < n; i ++ ) { if ( pre [ i ] < root ) return false; while ( ! s . empty ( ) && s . top ( ) < pre [ i ] ) { root = s . top ( ); s . pop ( ); } s . push ( pre [ i ] ); } return true; } bool f_filled ( int pre [ ], int n ) {} while ( ! s . empty ( ) && s . top ( ) < pre [ i ] ) {
root = s . top ( );
s . pop ( );
}
s . push ( pre [ i ] );
}
return true;
}
bool f_filled ( int pre [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {4,9,21,25,33,36,44,48,55,55,56,58,66,66,66,66,78,92,96,97};
int param0_1[] = {-16,80,70,72,-86,-28,42,28,-28,56,-32,40,-78,32,22,-52,-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};
int param0_3[] = {10,85,45,52,98,9,59,58,61,91,4,90,43,48,47};
int param0_4[] = {-92,-90,-88,-50,-48,-48,-44,-42,-40,-34,-28,-26,-26,-24,-8,-6,4,8,12,20,32,36,38,40,46,52,58,88,92};
int param0_5[] = {1,0,1,1,1};
int param0_6[] = {1,2,3,4,14,16,17,18,19,19,21,21,22,25,25,28,29,33,34,40,41,42,44,50,52,58,61,62,67,70,74,74,75,75,76,77,77,77,81,83,87,90,90,90,96,98,99,99};
int param0_7[] = {-98,40,84,-8,42,-52,2,16,-68,-28,-54,88,8,-4,-98,-40,-32,-64,54,32,-76,-10,-48,-88,80,32,-2,-94,-26,-54,30,-56};
int param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {9,35,62,78,55,29,55,36,77,89,73,31,53,94,22,23,87,96,7,15,71,61,25,61,99,34,1,87,21,14,58,69,61,49,54,7,89,52,78,97,11,78,27,37,56,19,20,21};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {18,16,35,8,17,2,30,26,17,34};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | n | [
"a) (",
"b) =",
"c) bool",
"d) n",
"e) String"
] | 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 poly [ ], int n, int x ) {
int result = poly [ 0 ];
for ( int i = 1;
i < n;
i ++ ) result = result * x + poly [ i ];
return result;
}
int f_filled ( int poly [ ], int n, int x ) {}
int poly [ ], int n, int x ) {
int result = poly [ 0 ];
for ( int i = 1;
i < n;
i ++ ) result = result * x + poly [ i ];
return result;
}
int f_filled ( int poly [ ], int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,18,22,27,31,33,36,36,37,37,40,48,49,49,50,58,66,71,75,85,89,91};
int param0_1[] = {42,-88,28,8,30,-8,-16,86,50,84,12,-20,-70,-40,-54,-76,84,90,-40,-68,-40,36,-34,14,94,-44,70,58,-48,-72,14,-70,32};
int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1};
int param0_3[] = {66,72,27,72,71,75,94,49,47,21,21,71,84,61,14,20,5,31,62,12,56,56,12,66,26,68,30,98,20};
int param0_4[] = {-96,-96,-94,-82,-72,-54,-54,-46,-34,-30,-28,-18,-2,2,6,8,10,16,18,24,26,28,44,48,48,52,56,58,58,70,70,82,84,88,94};
int param0_5[] = {0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,1,1,0,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,1};
int param0_6[] = {2,3,8,13,15,17,18,18,25,29,29,31,36,37,42,42,42,51,52,52,54,54,58,64,70,70,74,75,78,80,83,85,86,88,95,96,97,98,99};
int param0_7[] = {-56,-12,-92,-48,-98,-80,-96,-42,-50,74,88,20,78,-74,-20,-32,-30,58,-22,-16,68,72,-50,-72,66,72,74,-98,-22,-40,-90,88,42,24};
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};
int param0_9[] = {86,62,30,27,98,75,93,37,70,16,20,74,46,74,25,59,86,32,17,90,80,10,17};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {16,31,10,15,25,20,19,29,20,12};
int param2[] = {16,20,8,26,34,25,32,23,23,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 poly [ ], int n, int x ) { int result = poly [ 0 [MASK] for ( int i = 1; i < n; i ++ ) result = result * x + poly [ i ]; return result; } int f_filled ( int poly [ ], int n, int x ) {} int poly [ ], int n, int x ) {
int result = poly [ 0 ];
for ( int i = 1;
i < n;
i ++ ) result = result * x + poly [ i ];
return result;
}
int f_filled ( int poly [ ], int n, int x ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {3,18,22,27,31,33,36,36,37,37,40,48,49,49,50,58,66,71,75,85,89,91};
int param0_1[] = {42,-88,28,8,30,-8,-16,86,50,84,12,-20,-70,-40,-54,-76,84,90,-40,-68,-40,36,-34,14,94,-44,70,58,-48,-72,14,-70,32};
int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1};
int param0_3[] = {66,72,27,72,71,75,94,49,47,21,21,71,84,61,14,20,5,31,62,12,56,56,12,66,26,68,30,98,20};
int param0_4[] = {-96,-96,-94,-82,-72,-54,-54,-46,-34,-30,-28,-18,-2,2,6,8,10,16,18,24,26,28,44,48,48,52,56,58,58,70,70,82,84,88,94};
int param0_5[] = {0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,1,1,0,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,1};
int param0_6[] = {2,3,8,13,15,17,18,18,25,29,29,31,36,37,42,42,42,51,52,52,54,54,58,64,70,70,74,75,78,80,83,85,86,88,95,96,97,98,99};
int param0_7[] = {-56,-12,-92,-48,-98,-80,-96,-42,-50,74,88,20,78,-74,-20,-32,-30,58,-22,-16,68,72,-50,-72,66,72,74,-98,-22,-40,-90,88,42,24};
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};
int param0_9[] = {86,62,30,27,98,75,93,37,70,16,20,74,46,74,25,59,86,32,17,90,80,10,17};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {16,31,10,15,25,20,19,29,20,12};
int param2[] = {16,20,8,26,34,25,32,23,23,12};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | ]; | [
"a) [",
"b) javafx.util.Pair;",
"c) ;",
"d) ];",
"e) import"
] | 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 left, int right ) {
if ( left <= right ) {
int mid = ( left + right ) / 2;
if ( arr [ mid - 1 ] < arr [ mid ] && arr [ mid ] > arr [ mid + 1 ] ) return mid;
if ( arr [ mid ] < arr [ mid + 1 ] ) return f_gold ( arr, mid + 1, right );
else return f_gold ( arr, left, mid - 1 );
}
return - 1;
}
int f_filled ( int arr [ ], int left, int right ) {}
if ( arr [ mid ] < arr [ mid + 1 ] ) return f_gold ( arr, mid + 1, right );
else return f_gold ( arr, left, mid - 1 );
}
return - 1;
}
int f_filled ( int arr [ ], int left, int right ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,10,33,44,50,50,53,58,64,68,76,83,90,98};
int param0_1[] = {-96,-20,20,4,-76,-96,-44,64,-30,-12,48,-84,-16,-28,84};
int param0_2[] = {0,0,0,0,1,1};
int param0_3[] = {46,24,32,6,23,66,21,78,11,97,35,51,3,56,14,5,43,19,67,15,87,28,28,97,52,91,70,72,97,73,67,48,68,33,50,34,78,75};
int param0_4[] = {-88,-6,38,44,44,46,50};
int param0_5[] = {1};
int param0_6[] = {7,7,10,13,15,17,18,25,26,30,40,41,42,45,47,47,55,61,62,62,63,64,66,67,69,79,79,82,82,88,91,94,97};
int param0_7[] = {-18,-4,-66,-38,-68,-80,40,62,0,92,86,62,8,-22,72,-12,18,-72,-86,-84,70,-78,46,72,72,46,42,70,12,20,46,46};
int param0_8[] = {0,0,0,0,0,1,1,1,1,1};
int param0_9[] = {11,36,74,82,70,8,7,78,91,59,86,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[] = {8,11,4,30,6,0,26,22,6,11};
int param2[] = {9,14,4,28,6,0,32,25,7,7};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], [MASK] n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int left, int right ) { if ( left <= right ) { int mid = ( left + right ) / 2; if ( arr [ mid - 1 ] < arr [ mid ] && arr [ mid ] > arr [ mid + 1 ] ) return mid; if ( arr [ mid ] < arr [ mid + 1 ] ) return f_gold ( arr, mid + 1, right ); else return f_gold ( arr, left, mid - 1 ); } return - 1; } int f_filled ( int arr [ ], int left, int right ) {}if ( arr [ mid ] < arr [ mid + 1 ] ) return f_gold ( arr, mid + 1, right );
else return f_gold ( arr, left, mid - 1 );
}
return - 1;
}
int f_filled ( int arr [ ], int left, int right ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,10,33,44,50,50,53,58,64,68,76,83,90,98};
int param0_1[] = {-96,-20,20,4,-76,-96,-44,64,-30,-12,48,-84,-16,-28,84};
int param0_2[] = {0,0,0,0,1,1};
int param0_3[] = {46,24,32,6,23,66,21,78,11,97,35,51,3,56,14,5,43,19,67,15,87,28,28,97,52,91,70,72,97,73,67,48,68,33,50,34,78,75};
int param0_4[] = {-88,-6,38,44,44,46,50};
int param0_5[] = {1};
int param0_6[] = {7,7,10,13,15,17,18,25,26,30,40,41,42,45,47,47,55,61,62,62,63,64,66,67,69,79,79,82,82,88,91,94,97};
int param0_7[] = {-18,-4,-66,-38,-68,-80,40,62,0,92,86,62,8,-22,72,-12,18,-72,-86,-84,70,-78,46,72,72,46,42,70,12,20,46,46};
int param0_8[] = {0,0,0,0,0,1,1,1,1,1};
int param0_9[] = {11,36,74,82,70,8,7,78,91,59,86,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[] = {8,11,4,30,6,0,26,22,6,11};
int param2[] = {9,14,4,28,6,0,32,25,7,7};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) mp",
"b) int",
"c) [",
"d) 1",
"e) for"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int arr [ ], int n ) {
int min_ending_here = INT_MAX;
int min_so_far = INT_MAX;
for ( int i = 0;
i < n;
i ++ ) {
if ( min_ending_here > 0 ) min_ending_here = arr [ i ];
else min_ending_here += arr [ i ];
min_so_far = min ( min_so_far, min_ending_here );
}
return min_so_far;
}
int f_filled ( int arr [ ], int n ) {}
e > 0 ) min_ending_here = arr [ i ];
else min_ending_here += arr [ i ];
min_so_far = min ( min_so_far, min_ending_here );
}
return min_so_far;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,9,13,14,15,18,19,19,25,26,29,29,29,30,31,36,37,37,38,39,39,40,40,42,42,46,50,53,58,60,62,64,65,67,68,69,72,77,78,83,85,89,90,93,95,95,97};
int param0_1[] = {14,-58,8,78,-26,-20,-60,42,-64,-12};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_3[] = {44,88,20,47,69,42,26,49,71,91,18,95,9,66,60,37,47,29,98,63,15,9,80,66,1,9,57,56,20,2,1};
int param0_4[] = {-78,-64,-62,-60,-52,4,8,46,72,74};
int param0_5[] = {0,0,1,0,0,0,0,1,1,0,0,1,1,0,1,1};
int param0_6[] = {3,7,16,17,23,23,23,28,29,30,34,38,40,41,43,43,44,46,51,51,51,55,57,58,61,62,66,66,67,69,70,73,75,77,79,80,85,85,87,87,93,96};
int param0_7[] = {80,22,38,26,62,-48,-48,46,-54,4,76,46,48,40,-92,-98,-88,12,-42,-94,76,-16,-82,62,18,-24};
int param0_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1};
int param0_9[] = {85,44,1,97,50,74,62,90,3,78,8,48,96,41,36,91,57,97,85,90,78,43,28,92,85,59,29,38,34,65,20,26,27,23,71,22,47,99,68,93,67,66,69,82,98,15,44,51,65};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {24,6,8,26,8,11,38,22,13,45};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( int arr [ ], int n ) { int min_ending_here = INT_MAX; int min_so_far = INT_MAX; for ( int i = 0; i < n; i [MASK] ) { if ( min_ending_here > 0 ) min_ending_here = arr [ i ]; else min_ending_here += arr [ i ]; min_so_far = min ( min_so_far, min_ending_here ); } return min_so_far; } int f_filled ( int arr [ ], int n ) {}e > 0 ) min_ending_here = arr [ i ];
else min_ending_here += arr [ i ];
min_so_far = min ( min_so_far, min_ending_here );
}
return min_so_far;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,9,13,14,15,18,19,19,25,26,29,29,29,30,31,36,37,37,38,39,39,40,40,42,42,46,50,53,58,60,62,64,65,67,68,69,72,77,78,83,85,89,90,93,95,95,97};
int param0_1[] = {14,-58,8,78,-26,-20,-60,42,-64,-12};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_3[] = {44,88,20,47,69,42,26,49,71,91,18,95,9,66,60,37,47,29,98,63,15,9,80,66,1,9,57,56,20,2,1};
int param0_4[] = {-78,-64,-62,-60,-52,4,8,46,72,74};
int param0_5[] = {0,0,1,0,0,0,0,1,1,0,0,1,1,0,1,1};
int param0_6[] = {3,7,16,17,23,23,23,28,29,30,34,38,40,41,43,43,44,46,51,51,51,55,57,58,61,62,66,66,67,69,70,73,75,77,79,80,85,85,87,87,93,96};
int param0_7[] = {80,22,38,26,62,-48,-48,46,-54,4,76,46,48,40,-92,-98,-88,12,-42,-94,76,-16,-82,62,18,-24};
int param0_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1};
int param0_9[] = {85,44,1,97,50,74,62,90,3,78,8,48,96,41,36,91,57,97,85,90,78,43,28,92,85,59,29,38,34,65,20,26,27,23,71,22,47,99,68,93,67,66,69,82,98,15,44,51,65};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {24,6,8,26,8,11,38,22,13,45};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | ++ | [
"a) public",
"b) l",
"c) s",
"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 arr [ ], int n ) {
int min_prefix_sum = 0;
int res = numeric_limits < int > :: min ( );
int prefix_sum [ n ];
prefix_sum [ 0 ] = arr [ 0 ];
for ( int i = 1;
i < n;
i ++ ) prefix_sum [ i ] = prefix_sum [ i - 1 ] + arr [ i ];
for ( int i = 0;
i < n;
i ++ ) {
res = max ( res, prefix_sum [ i ] - min_prefix_sum );
min_prefix_sum = min ( min_prefix_sum, prefix_sum [ i ] );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
< n;
i ++ ) {
res = max ( res, prefix_sum [ i ] - min_prefix_sum );
min_prefix_sum = min ( min_prefix_sum, prefix_sum [ i ] );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {8,9,11,17,18,19,23,24,27,30,31,31,35,44,46,47,49,51,55,58,59,61,65,67,71,71,71,71,78,78,82,91,98};
int param0_1[] = {-82,-28,-66,-52,-36,36,-88,52,-62,46,42,26,-60,18,-52,38,94,-68,44,-94,14,36,-70};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {28,36,42,42,5,52,74,86,55,82,59,81,4,90,24,34,20,99,86,25,52,48,62,5,67,83,60,72,80,73,38,55,8,70,95};
int param0_4[] = {-92,-52,-24,36,56};
int param0_5[] = {0,1,1,1,0,1,0,1,0,0,1,1,0,1,1,0,0,0};
int param0_6[] = {1,1,4,4,7,7,17,18,20,26,26,32,37,38,42,44,44,46,50,53,57,58,58,60,61,61,64,74,75,77,83,83,84,84,85,87,88,90,95,96,97,98,99,99};
int param0_7[] = {-86,2,26,54,-16,16,48,24,50,-10,-32,-62,48,-12,-66};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {58,14,79,11,31,28,61,86,25,27,75,78,32,55,86,48,15,51,6,78,23,82,16,62,35,51,91,16,79,38,97,30,23,58,95,57,82,35,57,43,22,41,58,69,25,65,13,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[] = {20,15,19,19,3,13,25,13,14,39};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const 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);} int f_gold ( int arr [ ], int n ) { int min_prefix_sum = 0; int res = numeric_limits < int > :: min ( ); int prefix_sum [ n ]; prefix_sum [ 0 ] = arr [ 0 ]; for ( int i = 1; i < n; i ++ ) prefix_sum [ i ] = prefix_sum [ i - 1 ] + arr [ i ]; for ( int i = 0; i < n; i ++ ) { res = max ( res, prefix_sum [ i ] - min_prefix_sum ); min_prefix_sum = min ( min_prefix_sum, prefix_sum [ i ] ); } return res; } int f_filled ( int arr [ ], int n ) {}< n;
i ++ ) {
res = max ( res, prefix_sum [ i ] - min_prefix_sum );
min_prefix_sum = min ( min_prefix_sum, prefix_sum [ i ] );
}
return res;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {8,9,11,17,18,19,23,24,27,30,31,31,35,44,46,47,49,51,55,58,59,61,65,67,71,71,71,71,78,78,82,91,98};
int param0_1[] = {-82,-28,-66,-52,-36,36,-88,52,-62,46,42,26,-60,18,-52,38,94,-68,44,-94,14,36,-70};
int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {28,36,42,42,5,52,74,86,55,82,59,81,4,90,24,34,20,99,86,25,52,48,62,5,67,83,60,72,80,73,38,55,8,70,95};
int param0_4[] = {-92,-52,-24,36,56};
int param0_5[] = {0,1,1,1,0,1,0,1,0,0,1,1,0,1,1,0,0,0};
int param0_6[] = {1,1,4,4,7,7,17,18,20,26,26,32,37,38,42,44,44,46,50,53,57,58,58,60,61,61,64,74,75,77,83,83,84,84,85,87,88,90,95,96,97,98,99,99};
int param0_7[] = {-86,2,26,54,-16,16,48,24,50,-10,-32,-62,48,-12,-66};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {58,14,79,11,31,28,61,86,25,27,75,78,32,55,86,48,15,51,6,78,23,82,16,62,35,51,91,16,79,38,97,30,23,58,95,57,82,35,57,43,22,41,58,69,25,65,13,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[] = {20,15,19,19,3,13,25,13,14,39};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | (arr)[0]));} | [
"a) )",
"b) (arr)[0]));}",
"c) n",
"d) ,",
"e) <stdlib.h>"
] | b |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
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 % 9 == 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 % 9 == 0 );
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"69354","43347276812854","0111111111","9999918","333","1011011101","1","2284737","011001","cc"};
for(int i = 0; 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 [] ) { int n = strlen(str); int digitSum = 0; for ( int i = 0; i < n; i ++ ) digitSum += ( str [ i ] - '0' ); return ( digitSum % 9 == 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 % 9 == 0 );
}
int f_filled ( char str [] ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"69354","43347276812854","0111111111","9999918","333","1011011101","1","2284737","011001","cc"};
for(int i = 0; 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) false;",
"b) arr",
"c) (const",
"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);}
int f_gold ( int arr [ ], int n ) {
int * jumps = new int [ n ];
int i, j;
if ( n == 0 || arr [ 0 ] == 0 ) return INT_MAX;
jumps [ 0 ] = 0;
for ( i = 1;
i < n;
i ++ ) {
jumps [ i ] = INT_MAX;
for ( j = 0;
j < i;
j ++ ) {
if ( i <= j + arr [ j ] && jumps [ j ] != INT_MAX ) {
jumps [ i ] = min ( jumps [ i ], jumps [ j ] + 1 );
break;
}
}
}
return jumps [ n - 1 ];
}
int f_filled ( int arr [ ], int n ) {}
[ j ] && jumps [ j ] != INT_MAX ) {
jumps [ i ] = min ( jumps [ i ], jumps [ j ] + 1 );
break;
}
}
}
return jumps [ n - 1 ];
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,5,9,9,12,13,13,13,15,16,17,18,20,20,20,25,28,30,30,33,34,34,37,42,45,49,50,52,52,54,65,68,72,74,75,82,85,87,91,91,94,95};
int param0_1[] = {-28,90,30,-80,-10,26,-12,24,12,44,-38,20,26,38,-8,-40,88,26};
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[] = {74,37,37,71,85,89,44,72,55,8,5,98,54,37,7,76,93,74,84,51,18,37};
int param0_4[] = {-68,14,76};
int param0_5[] = {0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,1};
int param0_6[] = {3,4,6,6,7,14,28,36,37,44,46,47,50,51,52,55,55,61,68,69,70,73,74,77,86,90,90,91,98,99};
int param0_7[] = {-4,-24,-84,-76};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {78,88,1,98,26,31,56,12,71};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {22,9,37,20,1,27,23,2,32,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 * jumps = new int [ n ]; int i, j; if ( n == 0 || arr [ 0 ] == 0 ) return INT_MAX; jumps [ 0 ] [MASK] 0; for ( i = 1; i < n; i ++ ) { jumps [ i ] = INT_MAX; for ( j = 0; j < i; j ++ ) { if ( i <= j + arr [ j ] && jumps [ j ] != INT_MAX ) { jumps [ i ] = min ( jumps [ i ], jumps [ j ] + 1 ); break; } } } return jumps [ n - 1 ]; } int f_filled ( int arr [ ], int n ) {}[ j ] && jumps [ j ] != INT_MAX ) {
jumps [ i ] = min ( jumps [ i ], jumps [ j ] + 1 );
break;
}
}
}
return jumps [ n - 1 ];
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {2,5,9,9,12,13,13,13,15,16,17,18,20,20,20,25,28,30,30,33,34,34,37,42,45,49,50,52,52,54,65,68,72,74,75,82,85,87,91,91,94,95};
int param0_1[] = {-28,90,30,-80,-10,26,-12,24,12,44,-38,20,26,38,-8,-40,88,26};
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[] = {74,37,37,71,85,89,44,72,55,8,5,98,54,37,7,76,93,74,84,51,18,37};
int param0_4[] = {-68,14,76};
int param0_5[] = {0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,1};
int param0_6[] = {3,4,6,6,7,14,28,36,37,44,46,47,50,51,52,55,55,61,68,69,70,73,74,77,86,90,90,91,98,99};
int param0_7[] = {-4,-24,-84,-76};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_9[] = {78,88,1,98,26,31,56,12,71};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {22,9,37,20,1,27,23,2,32,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) java.lang.*;",
"b) j",
"c) templeHeight",
"d) bool",
"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 side ) {
int area = side * side;
return area;
}
int f_filled ( int side ) {}
rr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int side ) {
int area = side * side;
return area;
}
int f_filled ( int side ) {}
int main(void) {
int n_success = 0;
int param0[] = {50,64,92,23,38,55,67,56,60,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> [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 side ) { int area = side * side; return area; } int f_filled ( int side ) {}rr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( int side ) {
int area = side * side;
return area;
}
int f_filled ( int side ) {}
int main(void) {
int n_success = 0;
int param0[] = {50,64,92,23,38,55,67,56,60,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 | [
"a) res",
"b) #include",
"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 x ) {
int i = 1;
int fact = 1;
for ( i = 1;
i < x;
i ++ ) {
fact = fact * i;
if ( fact % x == 0 ) break;
}
return i;
}
int f_filled ( int x ) {}
cmpfunc);}
int f_gold ( int x ) {
int i = 1;
int fact = 1;
for ( i = 1;
i < x;
i ++ ) {
fact = fact * i;
if ( fact % x == 0 ) break;
}
return i;
}
int f_filled ( int x ) {}
int main(void) {
int n_success = 0;
int param0[] = {67,47,57,89,67,40,16,83,93,43};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, [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 x ) { int i = 1; int fact = 1; for ( i = 1; i < x; i ++ ) { fact = fact * i; if ( fact % x == 0 ) break; } return i; } int f_filled ( int x ) {}cmpfunc);}
int f_gold ( int x ) {
int i = 1;
int fact = 1;
for ( i = 1;
i < x;
i ++ ) {
fact = fact * i;
if ( fact % x == 0 ) break;
}
return i;
}
int f_filled ( int x ) {}
int main(void) {
int n_success = 0;
int param0[] = {67,47,57,89,67,40,16,83,93,43};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) *",
"b) #include",
"c) i",
"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);}
float f_gold ( float a ) {
float area;
area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4;
return area;
}
float f_filled ( float a ) {}
{qsort (arr, n, sizeof(int), cmpfunc);}
float f_gold ( float a ) {
float area;
area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4;
return area;
}
float f_filled ( float a ) {}
int main(void) {
int n_success = 0;
float param0[] = {2009.019461888707F,-1480.5131394215787F,357.7870347569567F,-8040.293697508038F,3821.882657293133F,-6840.635072240347F,1623.036598830132F,-9714.00706195298F,3916.454769669618F,-669.068424712943F};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001F)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} float f_gold ( float a ) { float area; area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4; return area; } float f_filled ( float [MASK] ) {} {qsort (arr, n, sizeof(int), cmpfunc);}
float f_gold ( float a ) {
float area;
area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4;
return area;
}
float f_filled ( float a ) {}
int main(void) {
int n_success = 0;
float param0[] = {2009.019461888707F,-1480.5131394215787F,357.7870347569567F,-8040.293697508038F,3821.882657293133F,-6840.635072240347F,1623.036598830132F,-9714.00706195298F,3916.454769669618F,-669.068424712943F};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001F)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | a | [
"a) #include",
"b) [",
"c) a",
"d) x:",
"e) :"
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
float f_gold ( float l, float b, float h ) {
float volume = ( l * b * h ) / 2;
return volume;
}
float f_filled ( float l, float b, float h ) {}
int n) {qsort (arr, n, sizeof(int), cmpfunc);}
float f_gold ( float l, float b, float h ) {
float volume = ( l * b * h ) / 2;
return volume;
}
float f_filled ( float l, float b, float h ) {}
int main(void) {
int n_success = 0;
float param0[] = {8448.900678262902F,-1849.728957491451F,412.667844022232F,-5954.835911765373F,8437.913444665008F,-7183.181663518317F,2340.7905920227954F,-7281.157547371143F,471.3930826982504F,-7550.426360065503F};
float param1[] = {8135.461799983198F,-4240.89241631363F,9798.083992381831F,-661.8872499003203F,8182.675681595904F,-6846.746446198541F,5479.00956987109F,-615.8705455524116F,1357.3753126091392F,-2693.2262997056355F};
float param2[] = {6577.239053611328F,-9953.518310747193F,1449.9204200270522F,-8049.6051526695055F,9863.296545513396F,-971.2199894221352F,7073.449591910562F,-3343.0245192607968F,1907.815700915636F,-9110.64755244532F};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i],param2[i])) )/ (abs(f_filled(param0[i],param1[i],param2[i])) + 0.0000001)) < 0.001F)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void [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);} float f_gold ( float l, float b, float h ) { float volume = ( l * b * h ) / 2; return volume; } float f_filled ( float l, float b, float h ) {}int n) {qsort (arr, n, sizeof(int), cmpfunc);}
float f_gold ( float l, float b, float h ) {
float volume = ( l * b * h ) / 2;
return volume;
}
float f_filled ( float l, float b, float h ) {}
int main(void) {
int n_success = 0;
float param0[] = {8448.900678262902F,-1849.728957491451F,412.667844022232F,-5954.835911765373F,8437.913444665008F,-7183.181663518317F,2340.7905920227954F,-7281.157547371143F,471.3930826982504F,-7550.426360065503F};
float param1[] = {8135.461799983198F,-4240.89241631363F,9798.083992381831F,-661.8872499003203F,8182.675681595904F,-6846.746446198541F,5479.00956987109F,-615.8705455524116F,1357.3753126091392F,-2693.2262997056355F};
float param2[] = {6577.239053611328F,-9953.518310747193F,1449.9204200270522F,-8049.6051526695055F,9863.296545513396F,-971.2199894221352F,7073.449591910562F,-3343.0245192607968F,1907.815700915636F,-9110.64755244532F};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i],param2[i])) )/ (abs(f_filled(param0[i],param1[i],param2[i])) + 0.0000001)) < 0.001F)
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | * | [
"a) return",
"b) 2",
"c) y)?",
"d) *",
"e) i"
] | d |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
long long int f_gold ( int n ) {
long long int dp [ 10 ] [ n + 1 ];
memset ( dp, 0, sizeof dp );
for ( int i = 0;
i < 10;
i ++ ) dp [ i ] [ 1 ] = 1;
for ( int digit = 0;
digit <= 9;
digit ++ ) {
for ( int len = 2;
len <= n;
len ++ ) {
for ( int x = 0;
x <= digit;
x ++ ) dp [ digit ] [ len ] += dp [ x ] [ len - 1 ];
}
}
long long int count = 0;
for ( int i = 0;
i < 10;
i ++ ) count += dp [ i ] [ n ];
return count;
}
long long int f_filled ( int n ) {}
digit ] [ len ] += dp [ x ] [ len - 1 ];
}
}
long long int count = 0;
for ( int i = 0;
i < 10;
i ++ ) count += dp [ i ] [ n ];
return count;
}
long long int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {21,40,83,93,43,98,35,86,76,88};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ [MASK] {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} long long int f_gold ( int n ) { long long int dp [ 10 ] [ n + 1 ]; memset ( dp, 0, sizeof dp ); for ( int i = 0; i < 10; i ++ ) dp [ i ] [ 1 ] = 1; for ( int digit = 0; digit <= 9; digit ++ ) { for ( int len = 2; len <= n; len ++ ) { for ( int x = 0; x <= digit; x ++ ) dp [ digit ] [ len ] += dp [ x ] [ len - 1 ]; } } long long int count = 0; for ( int i = 0; i < 10; i ++ ) count += dp [ i ] [ n ]; return count; } long long int f_filled ( int n ) {} digit ] [ len ] += dp [ x ] [ len - 1 ];
}
}
long long int count = 0;
for ( int i = 0;
i < 10;
i ++ ) count += dp [ i ] [ n ];
return count;
}
long long int f_filled ( int n ) {}
int main(void) {
int n_success = 0;
int param0[] = {21,40,83,93,43,98,35,86,76,88};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | ]) | [
"a) ])",
"b) ans",
"c) i",
"d) >=",
"e) b;"
] | 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, pair < int, int > > mp;
for ( int i = 0;
i < n - 1;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) mp [ arr [ i ] + arr [ j ] ] = {
i, j };
int d = INT_MIN;
for ( int i = 0;
i < n - 1;
i ++ ) {
for ( int j = i + 1;
j < n;
j ++ ) {
int abs_diff = abs ( arr [ i ] - arr [ j ] );
if ( mp . find ( abs_diff ) != mp . end ( ) ) {
pair < int, int > p = mp [ abs_diff ];
if ( p . first != i && p . first != j && p . second != i && p . second != j ) d = max ( d, max ( arr [ i ], arr [ j ] ) );
}
}
}
return d;
}
int f_filled ( int arr [ ], int n ) {}
irst != i && p . first != j && p . second != i && p . second != j ) d = max ( d, max ( arr [ i ], arr [ j ] ) );
}
}
}
return d;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,1,5,7,10,35,35,45,49,50,57,58,60,64,69,83,83,87,88,89,93,94};
int param0_1[] = {94,90,88,0,-90,-68,94,-2,-50,-92,66,32,10,8,-14,-96,80,-60,48,-96,46,24,64,2,-30,28};
int param0_2[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {83,72,91,22,96,38,71,18,58,39,7,8,65,67};
int param0_4[] = {-96,-92,-88,-86,-82,-80,-78,-76,-74,-72,-62,-54,-42,-40,-38,-36,-36,-34,-32,-32,-26,-26,-22,-14,-14,2,16,24,26,32,32,34,48,48,64,66,70,74,82,90};
int param0_5[] = {1,0,0,1,0,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,1,1};
int param0_6[] = {2,2,4,10,11,13,15,20,32,33,33,42,46,46,50,54,55,55,56,57,58,63,68,79,87,94};
int param0_7[] = {58,78,28,54,-10,46,-78,-68,-44,64,78,80,-54,-38,-54,60,26,96};
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};
int param0_9[] = {54,55,98,18,11,55,2,95,84,14,75,12,43,54,78,34,69,24,82,65,11,49,34,60,99,71,1,17,88,12,45,46,56,28,70,34,7,55,40,12,38,56,54,53,28};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {12,15,17,7,28,29,18,13,28,24};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | #include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> int min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; [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, pair < int, int > > mp; for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; j < n; j ++ ) mp [ arr [ i ] + arr [ j ] ] = { i, j }; int d = INT_MIN; for ( int i = 0; i < n - 1; i ++ ) { for ( int j = i + 1; j < n; j ++ ) { int abs_diff = abs ( arr [ i ] - arr [ j ] ); if ( mp . find ( abs_diff ) != mp . end ( ) ) { pair < int, int > p = mp [ abs_diff ]; if ( p . first != i && p . first != j && p . second != i && p . second != j ) d = max ( d, max ( arr [ i ], arr [ j ] ) ); } } } return d; } int f_filled ( int arr [ ], int n ) {}irst != i && p . first != j && p . second != i && p . second != j ) d = max ( d, max ( arr [ i ], arr [ j ] ) );
}
}
}
return d;
}
int f_filled ( int arr [ ], int n ) {}
int main(void) {
int n_success = 0;
int param0_0[] = {1,1,5,7,10,35,35,45,49,50,57,58,60,64,69,83,83,87,88,89,93,94};
int param0_1[] = {94,90,88,0,-90,-68,94,-2,-50,-92,66,32,10,8,-14,-96,80,-60,48,-96,46,24,64,2,-30,28};
int param0_2[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {83,72,91,22,96,38,71,18,58,39,7,8,65,67};
int param0_4[] = {-96,-92,-88,-86,-82,-80,-78,-76,-74,-72,-62,-54,-42,-40,-38,-36,-36,-34,-32,-32,-26,-26,-22,-14,-14,2,16,24,26,32,32,34,48,48,64,66,70,74,82,90};
int param0_5[] = {1,0,0,1,0,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,1,1};
int param0_6[] = {2,2,4,10,11,13,15,20,32,33,33,42,46,46,50,54,55,55,56,57,58,63,68,79,87,94};
int param0_7[] = {58,78,28,54,-10,46,-78,-68,-44,64,78,80,-54,-38,-54,60,26,96};
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};
int param0_9[] = {54,55,98,18,11,55,2,95,84,14,75,12,43,54,78,34,69,24,82,65,11,49,34,60,99,71,1,17,88,12,45,46,56,28,70,34,7,55,40,12,38,56,54,53,28};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {12,15,17,7,28,29,18,13,28,24};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | } | [
"a) excl",
"b) res",
"c) }",
"d) SUM_SERIES_0_6_0_06_0_006_0_0006_N_TERMS{",
"e) ="
] | c |
c |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
int f_gold ( char s [ ], int n ) {
int invalidOpenBraces = 0;
int invalidCloseBraces = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( s [ i ] == '(' ) {
invalidOpenBraces ++;
}
else {
if ( invalidOpenBraces == 0 ) {
invalidCloseBraces ++;
}
else {
invalidOpenBraces --;
}
}
}
return ( n - ( invalidOpenBraces + invalidCloseBraces ) );
}
int f_filled ( char s [ ], int n ) {}
invalidCloseBraces ++;
}
else {
invalidOpenBraces --;
}
}
}
return ( n - ( invalidOpenBraces + invalidCloseBraces ) );
}
int f_filled ( char s [ ], int n ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"()()(()))()","(()(()))","(())()()","(())()))()","((()))(((","kjbcwkjebc","KZPNX","82050","010)()fkhj","ndPKtu"};
int param1[] = {11,8,8,10,9,10,5,5,10,6};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),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> [MASK] min(int x, int y) { return (x < y)? x: y; } int max(int x, int y) { return (x > y)? x: y; } int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );} int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));} void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);} int f_gold ( char s [ ], int n ) { int invalidOpenBraces = 0; int invalidCloseBraces = 0; for ( int i = 0; i < n; i ++ ) { if ( s [ i ] == '(' ) { invalidOpenBraces ++; } else { if ( invalidOpenBraces == 0 ) { invalidCloseBraces ++; } else { invalidOpenBraces --; } } } return ( n - ( invalidOpenBraces + invalidCloseBraces ) ); } int f_filled ( char s [ ], int n ) {} invalidCloseBraces ++;
}
else {
invalidOpenBraces --;
}
}
}
return ( n - ( invalidOpenBraces + invalidCloseBraces ) );
}
int f_filled ( char s [ ], int n ) {}
int main(void) {
int n_success = 0;
char param0[][100] = {"()()(()))()","(()(()))","(())()()","(())()))()","((()))(((","kjbcwkjebc","KZPNX","82050","010)()fkhj","ndPKtu"};
int param1[] = {11,8,8,10,9,10,5,5,10,6};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
} | int | [
"a) int",
"b) (",
"c) y)",
"d) <=",
"e) <stdbool.h>"
] | a |
cpp |
#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include <bits/stdc++.h>
using namespace std;
bool f_gold ( int n, int i = 2 ) {
if ( n <= 2 ) return ( n == 2 ) ? true : false;
if ( n % i == 0 ) return false;
if ( i * i > n ) return true;
return f_gold ( n, i + 1 );
}
amespace std;
bool f_gold ( int n, int i = 2 ) {
if ( n <= 2 ) return ( n == 2 ) ? true : false;
if ( n % i == 0 ) return false;
if ( i * i > n ) return true;
return f_gold ( n, i + 1 );
}
//TOFILL
int main() {
int n_success = 0;
vector<int> param0 {3,7,89,97,41,73,95,69,20,30};
vector<int> param1 {2,2,2,2,2,2,2,2,2,2};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
}
| #include <iostream> #include [MASK] #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; bool f_gold ( int n, int i = 2 ) { if ( n <= 2 ) return ( n == 2 ) ? true : false; if ( n % i == 0 ) return false; if ( i * i > n ) return true; return f_gold ( n, i + 1 ); }amespace std;
bool f_gold ( int n, int i = 2 ) {
if ( n <= 2 ) return ( n == 2 ) ? true : false;
if ( n % i == 0 ) return false;
if ( i * i > n ) return true;
return f_gold ( n, i + 1 );
}
//TOFILL
int main() {
int n_success = 0;
vector<int> param0 {3,7,89,97,41,73,95,69,20,30};
vector<int> param1 {2,2,2,2,2,2,2,2,2,2};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
}
| <cstdlib> | [
"a) 1",
"b) ++",
"c) <cstdlib>",
"d) [",
"e) <stdbool.h>"
] | c |
cpp |
#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include <bits/stdc++.h>
using namespace std;
long f_gold ( int f, int d, int s ) {
long mem [ d + 1 ] [ s + 1 ];
memset ( mem, 0, sizeof mem );
mem [ 0 ] [ 0 ] = 1;
for ( int i = 1;
i <= d;
i ++ ) {
for ( int j = i;
j <= s;
j ++ ) {
mem [ i ] [ j ] = mem [ i ] [ j - 1 ] + mem [ i - 1 ] [ j - 1 ];
if ( j - f - 1 >= 0 ) mem [ i ] [ j ] -= mem [ i - 1 ] [ j - f - 1 ];
}
}
return mem [ d ] [ s ];
}
j ++ ) {
mem [ i ] [ j ] = mem [ i ] [ j - 1 ] + mem [ i - 1 ] [ j - 1 ];
if ( j - f - 1 >= 0 ) mem [ i ] [ j ] -= mem [ i - 1 ] [ j - f - 1 ];
}
}
return mem [ d ] [ s ];
}
//TOFILL
int main() {
int n_success = 0;
vector<int> param0 {57,58,38,5,91,76,38,97,97,99};
vector<int> param1 {5,45,89,39,90,56,43,26,90,2};
vector<int> param2 {33,4,9,30,47,46,84,52,90,26};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} | #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; long f_gold ( int f, int d, int s ) { long mem [ d + 1 ] [ s + 1 ]; memset ( mem, 0, sizeof mem ); mem [ 0 ] [ 0 ] = 1; for ( int i = 1; i [MASK] d; i ++ ) { for ( int j = i; j <= s; j ++ ) { mem [ i ] [ j ] = mem [ i ] [ j - 1 ] + mem [ i - 1 ] [ j - 1 ]; if ( j - f - 1 >= 0 ) mem [ i ] [ j ] -= mem [ i - 1 ] [ j - f - 1 ]; } } return mem [ d ] [ s ]; } j ++ ) {
mem [ i ] [ j ] = mem [ i ] [ j - 1 ] + mem [ i - 1 ] [ j - 1 ];
if ( j - f - 1 >= 0 ) mem [ i ] [ j ] -= mem [ i - 1 ] [ j - f - 1 ];
}
}
return mem [ d ] [ s ];
}
//TOFILL
int main() {
int n_success = 0;
vector<int> param0 {57,58,38,5,91,76,38,97,97,99};
vector<int> param1 {5,45,89,39,90,56,43,26,90,2};
vector<int> param2 {33,4,9,30,47,46,84,52,90,26};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} | <= | [
"a) javafx.util.Pair;",
"b) [",
"c) <=",
"d) const",
"e) static"
] | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.