dataset_name
stringclasses 1
value | src_lang
stringclasses 1
value | entry_func
stringclasses 1
value | prefix
stringlengths 65
1.25k
⌀ | import_str
sequencelengths 0
1
| suffix
null | demos
sequencelengths 0
0
| data_id
stringlengths 9
106
| doc_string
stringclasses 1
value | tgt_lang
stringclasses 1
value | compare_func
sequencelengths 0
0
| solution
stringlengths 40
1.94k
| task_name
stringclasses 1
value | test_cases
sequencelengths 10
11
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 );
}
| [] | null | [] | EULERIAN_NUMBER_1 | python | [] | def f_gold ( n , m ) :
dp = [ [ 0 for x in range ( m + 1 ) ] for y in range ( n + 1 ) ]
for i in range ( 1 , n + 1 ) :
for j in range ( 0 , m + 1 ) :
if ( i > j ) :
if ( j == 0 ) :
dp [ i ] [ j ] = 1
else :
dp [ i ] [ j ] = ( ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ) )
return dp [ n ] [ m ]
| code_translation | [
[
"27, 7",
"940744845942385425654976"
],
[
"77, 34",
"6659628962352540071013461802622903732181448311622532437589102727552487005433977695399091580931215833915283931140"
],
[
"35, 22",
"35713299412878610033189961245712022360"
],
[
"26, 20",
"131921922645609200622"
],
[
"6, 10",
"0"
],
[
"66, 47",
"221859117810481349493305127684600387619569922020324586026515826232579975082496996060"
],
[
"44, 29",
"256901182650534135593685383141946368285073503385000"
],
[
"26, 33",
"0"
],
[
"74, 86",
"0"
],
[
"65, 97",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int x ) {
if ( x == 0 || x == 1 ) return x;
int start = 1, end = x, ans;
while ( start <= end ) {
int mid = ( start + end ) / 2;
if ( mid * mid == x ) return mid;
if ( mid * mid < x ) {
start = mid + 1;
ans = mid;
}
else end = mid - 1;
}
return ans;
}
| [] | null | [] | MINIMUM_SWAPS_REQUIRED_BRING_ELEMENTS_LESS_EQUAL_K_TOGETHER | python | [] | def f_gold ( arr , n , k ) :
count = 0
for i in range ( 0 , n ) :
if ( arr [ i ] <= k ) :
count = count + 1
bad = 0
for i in range ( 0 , count ) :
if ( arr [ i ] > k ) :
bad = bad + 1
ans = bad
j = count
for i in range ( 0 , n ) :
if ( j == n ) :
break
if ( arr [ i ] > k ) :
bad = bad - 1
if ( arr [ j ] > k ) :
bad = bad + 1
ans = min ( ans , bad )
j = j + 1
return ans
| code_translation | [
[
"[7, 12, 15, 30, 33, 34, 53, 66, 73, 74, 76, 77, 85, 90], 9, 8",
"0"
],
[
"[-62, -20, -26, -24, 92, 66, -74, -4, 18, -82, -36, 92, -4, 92, -80, 56, -24, 4, -48, -10, -14, -46, -16, -58, -58, -6, -68, -22, -82, -16, 76, -30, -86, -38, -66, 28, 58, 30, -44, -56], 24, 28",
"4"
],
[
"[0, 0, 0, 0, 0, 1, 1], 5, 6",
"0"
],
[
"[8, 48, 64, 77, 61, 60, 96, 95, 41, 68, 9, 67, 10, 66, 16, 59, 83, 21, 47, 16, 13, 85, 52, 11, 48, 31, 99, 57, 57, 44, 66, 93, 80, 69, 23, 2, 55, 90], 36, 24",
"5"
],
[
"[-80, -58, -40, -34, 14, 36, 48, 56, 58, 60, 84, 90, 92, 92], 7, 8",
"0"
],
[
"[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1], 26, 23",
"0"
],
[
"[4, 4, 8, 9, 13, 17, 18, 19, 21, 22, 22, 23, 27, 28, 30, 44, 46, 48, 53, 53, 55, 60, 61, 62, 68, 70, 70, 71, 73, 80, 82, 82, 85, 88, 90, 93, 99], 28, 36",
"0"
],
[
"[-28, 50, 82, -32, 32, -78, 12, 50, 38, 34, -10, 6, 86, -56, -2], 13, 9",
"3"
],
[
"[0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 9, 8",
"0"
],
[
"[37, 88, 83, 91, 11, 39, 98, 70, 93, 74, 24, 90, 66, 3, 6, 28], 12, 12",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n ) {
unordered_map < int, int > cnt;
int ans = 0, pre_sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
ans += ( i * a [ i ] ) - pre_sum;
pre_sum += a [ i ];
if ( cnt [ a [ i ] - 1 ] ) ans -= cnt [ a [ i ] - 1 ];
if ( cnt [ a [ i ] + 1 ] ) ans += cnt [ a [ i ] + 1 ];
cnt [ a [ i ] ] ++;
}
return ans;
}
| [] | null | [] | MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS | python | [] | def f_gold ( ar , n ) :
res = 0
ar.sort ( )
for i in range ( 0 , n ) :
count = 1
for i in range ( n - 1 ) :
if ar [ i ] == ar [ i + 1 ] :
count += 1
else :
break
res = max ( res , count )
return res
| code_translation | [
[
"[1, 2, 5, 8, 16, 21, 21, 22, 23, 26, 26, 27, 27, 29, 31, 33, 36, 37, 37, 38, 42, 45, 47, 50, 57, 58, 60, 60, 62, 63, 66, 66, 76, 84, 84, 88, 96, 99], 25",
"1"
],
[
"[-96, -96, -94, -94, -82, -82, -62, -60, -46, -46, -38, -36, -36, -30, -24, -22, -18, -14, -10, 2, 4, 4, 4, 8, 8, 12, 24, 34, 46, 50, 52, 70, 78, 78, 80, 80, 82, 82, 82, 86, 92, 94], 35",
"2"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 34",
"27"
],
[
"[16, 38, 38, 41, 47, 48, 48, 48, 49, 62, 84, 92, 99], 6",
"1"
],
[
"[-88, -64, -40, -38, -38, -16, 16, 20, 28, 40, 56, 58, 60, 68, 74, 92], 12",
"1"
],
[
"[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], 29",
"22"
],
[
"[14, 24, 82, 87, 95], 3",
"1"
],
[
"[-90, -88, -84, -80, -80, -76, -68, -64, -58, -58, -58, -46, -40, -34, -18, -14, -10, 2, 2, 4, 8, 12, 14, 22, 40, 40, 46, 50, 52, 62, 62, 64, 68, 76, 90, 94], 34",
"1"
],
[
"[0, 1, 1, 1], 3",
"1"
],
[
"[5, 6, 17, 41, 43, 68, 68, 86, 89, 90], 7",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int n ) {
if ( n == 0 || n == 9 ) return true;
if ( n < 9 ) return false;
return f_gold ( ( int ) ( n >> 3 ) - ( int ) ( n & 7 ) );
}
| [] | null | [] | ELEMENTS_TO_BE_ADDED_SO_THAT_ALL_ELEMENTS_OF_A_RANGE_ARE_PRESENT_IN_ARRAY_1 | python | [] | def f_gold ( arr , n ) :
s = dict ( )
count , maxm , minm = 0 , - 10 ** 9 , 10 ** 9
for i in range ( n ) :
s [ arr [ i ] ] = 1
if ( arr [ i ] < minm ) :
minm = arr [ i ]
if ( arr [ i ] > maxm ) :
maxm = arr [ i ]
for i in range ( minm , maxm + 1 ) :
if i not in s.keys ( ) :
count += 1
return count
| code_translation | [
[
"[1, 4, 5, 5, 11, 11, 12, 14, 16, 20, 23, 23, 25, 27, 29, 33, 33, 35, 37, 39, 39, 44, 44, 45, 47, 51, 51, 53, 55, 65, 73, 73, 75, 78, 79, 79, 80, 82, 86, 86, 87, 87, 88, 90, 91, 91, 94], 26",
"31"
],
[
"[-38, 20, -94, -68, -96, 36, 48, 32, 44, -56, 72, -28, -6, 22, -54, -46, 58, -60, -80, 28, -34, 60, -12, -26, -32, 28, 72, -50, 66, -36, 28, 30, 10, 14, 0, -78, 94, -24, -42, -60, 66, -12, 92, 54, -34, -58, 56], 31",
"141"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 20",
"0"
],
[
"[73, 69, 12, 82, 65, 55, 93, 93, 88, 52, 33, 94, 62, 75, 61, 81, 48, 43, 29, 8, 28, 60, 60, 58, 54, 44, 25, 36, 46, 88, 54, 36, 83, 46, 34, 44, 71, 90, 68, 75, 42], 31",
"60"
],
[
"[-98, -94, -88, -80, -74, -70, -70, -56, -50, -48, -40, -24, -22, -14, 0, 2, 2, 6, 12, 22, 30, 32, 32, 40, 48, 52, 52, 58, 64, 66, 66, 68, 70, 72, 74, 76, 78, 94, 98, 98], 22",
"111"
],
[
"[1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1], 18",
"0"
],
[
"[1, 2, 3, 4, 7, 11, 12, 13, 14, 15, 20, 21, 22, 25, 25, 28, 32, 32, 35, 36, 37, 38, 42, 42, 45, 48, 48, 48, 54, 67, 70, 70, 71, 74, 80, 81, 82, 82, 85, 94], 24",
"21"
],
[
"[-90, 92, 28, -32, 76, 94, 48, 80, 52, -12, -6, 22, 40, 26, -18, -84, 90, 16, -76, 52, 10, -56, 6], 11",
"174"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 14",
"0"
],
[
"[4, 21, 34, 35, 71, 10, 88, 44, 82, 13, 79, 92, 35, 73, 28, 91, 33, 9, 12, 76, 40, 91, 4, 22, 90, 53, 98, 7, 30], 17",
"73"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string s ) {
int n = s . length ( );
int sub_count = n * ( n + 1 ) / 2;
string arr [ sub_count ];
int index = 0;
for ( int i = 0;
i < n;
i ++ ) for ( int len = 1;
len <= n - i;
len ++ ) arr [ index ++ ] = s . substr ( i, len );
sort ( arr, arr + sub_count );
string res = "";
for ( int i = 0;
i < sub_count;
i ++ ) res += arr [ i ];
return res;
}
| [] | null | [] | FIND_PERIMETER_CYLINDER | python | [] | def f_gold ( diameter , height ) :
return 2 * ( diameter + height )
| code_translation | [
[
"70, 78",
"296"
],
[
"97, 46",
"286"
],
[
"49, 26",
"150"
],
[
"56, 61",
"234"
],
[
"87, 79",
"332"
],
[
"64, 21",
"170"
],
[
"75, 93",
"336"
],
[
"90, 16",
"212"
],
[
"55, 16",
"142"
],
[
"73, 29",
"204"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [
"import sys"
] | null | [] | REMOVE_MINIMUM_ELEMENTS_EITHER_SIDE_2MIN_MAX | python | [] | import sys
def f_gold ( arr , n ) :
longest_start = - 1 ;
longest_end = 0 ;
for start in range ( n ) :
min = sys.maxsize ;
max = - sys.maxsize ;
for end in range ( start , n ) :
val = arr [ end ] ;
if ( val < min ) :
min = val ;
if ( val > max ) :
max = val ;
if ( 2 * min <= max ) :
break ;
if ( end - start > longest_end - longest_start or longest_start == - 1 ) :
longest_start = start ;
longest_end = end ;
if ( longest_start == - 1 ) :
return n ;
return ( n - ( longest_end - longest_start + 1 ) ) ;
| code_translation | [
[
"[32, 50, 66, 73, 76, 87], 5",
"1"
],
[
"[68, 74, 16, 40, 6, -44, -36, 94, 6, -24, -4, -58, -16, 24], 11",
"9"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11",
"9"
],
[
"[91, 22], 1",
"0"
],
[
"[-84, -80, -78, -76, -58, -54, -52, -48, -42, -42, -40, -38, -34, -32, -28, -24, -6, 2, 2, 4, 10, 14, 16, 18, 26, 26, 36, 40, 50, 52, 62, 64, 72, 74, 84, 90, 94, 96, 98], 35",
"28"
],
[
"[1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1], 13",
"10"
],
[
"[10, 19, 25, 29, 32, 37, 40, 43, 43, 44, 46, 51, 51, 54, 56, 58, 63, 79, 83, 86, 87, 97, 97], 11",
"2"
],
[
"[-48, -28, 10, 30, 78, -72, 78, 52, -52, -68, 56, 42, 8, -42, 16, -56, 2, -90, -26, -28, -56, -2, 80, -50, 98, -64, -96, 10, -10, 44, 98, -48, -88, 42, 30, 24, 38, -26, -52, -12, 0, 34, -82, -80, 0, -84, -20], 25",
"23"
],
[
"[0, 0, 1, 1, 1, 1, 1, 1], 6",
"2"
],
[
"[25, 82], 1",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string s ) {
int aCount = 0;
int bCount = 0;
int cCount = 0;
for ( unsigned int i = 0;
i < s . size ( );
i ++ ) {
if ( s [ i ] == 'a' ) aCount = ( 1 + 2 * aCount );
else if ( s [ i ] == 'b' ) bCount = ( aCount + 2 * bCount );
else if ( s [ i ] == 'c' ) cCount = ( bCount + 2 * cCount );
}
return cCount;
}
| [] | null | [] | COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4 | python | [] | def f_gold ( n ) :
DP = [ 0 for i in range ( 0 , n + 1 ) ]
DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1
DP [ 3 ] = 2
for i in range ( 4 , n + 1 ) :
DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ]
return DP [ n ]
| code_translation | [
[
"44",
"821223649"
],
[
"9",
"40"
],
[
"19",
"4895"
],
[
"10",
"64"
],
[
"78",
"10472279279564025"
],
[
"94",
"23112315624967704576"
],
[
"70",
"222915410843904"
],
[
"81",
"44361286907595736"
],
[
"81",
"44361286907595736"
],
[
"49",
"9107509825"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | SUM_BINOMIAL_COEFFICIENTS | python | [] | def f_gold ( n ) :
C = [ [ 0 ] * ( n + 2 ) for i in range ( 0 , n + 2 ) ]
for i in range ( 0 , n + 1 ) :
for j in range ( 0 , min ( i , n ) + 1 ) :
if ( j == 0 or j == i ) :
C [ i ] [ j ] = 1
else :
C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ]
sum = 0
for i in range ( 0 , n + 1 ) :
sum += C [ n ] [ i ]
return sum
| code_translation | [
[
"8",
"256"
],
[
"39",
"549755813888"
],
[
"25",
"33554432"
],
[
"44",
"17592186044416"
],
[
"72",
"4722366482869645213696"
],
[
"6",
"64"
],
[
"72",
"4722366482869645213696"
],
[
"62",
"4611686018427387904"
],
[
"48",
"281474976710656"
],
[
"39",
"549755813888"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int low, int high, int x ) {
int mid;
if ( x <= arr [ low ] ) return low;
if ( x > arr [ high ] ) return - 1;
mid = ( low + high ) / 2;
if ( arr [ mid ] == x ) return mid;
else if ( arr [ mid ] < x ) {
if ( mid + 1 <= high && x <= arr [ mid + 1 ] ) return mid + 1;
else return f_gold ( arr, mid + 1, high, x );
}
else {
if ( mid - 1 >= low && x > arr [ mid - 1 ] ) return mid;
else return f_gold ( arr, low, mid - 1, x );
}
}
| [] | null | [] | FIBONACCI_MODULO_P | python | [] | def f_gold ( p ) :
first = 1
second = 1
number = 2
next = 1
while ( next ) :
next = ( first + second ) % p
first = second
second = next
number = number + 1
return number
| code_translation | [
[
"51",
"36"
],
[
"40",
"30"
],
[
"68",
"18"
],
[
"7",
"8"
],
[
"8",
"6"
],
[
"32",
"24"
],
[
"93",
"60"
],
[
"75",
"100"
],
[
"71",
"70"
],
[
"15",
"20"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int res = INT_MIN;
for ( int i = 0;
i < n;
i ++ ) {
int prefix_sum = arr [ i ];
for ( int j = 0;
j < i;
j ++ ) prefix_sum += arr [ j ];
int suffix_sum = arr [ i ];
for ( int j = n - 1;
j > i;
j -- ) suffix_sum += arr [ j ];
if ( prefix_sum == suffix_sum ) res = max ( res, prefix_sum );
}
return res;
}
| [] | null | [] | NTH_EVEN_LENGTH_PALINDROME | python | [] | def f_gold ( n ) :
res = n
for j in range ( len ( n ) - 1 , - 1 , - 1 ) :
res += n [ j ]
return res
| code_translation | [
[
"'lSUhEvxcgfI'",
"'lSUhEvxcgfIIfgcxvEhUSl'"
],
[
"'77329283'",
"'7732928338292377'"
],
[
"'010111111'",
"'010111111111111010'"
],
[
"'Stazb'",
"'StazbbzatS'"
],
[
"'0702'",
"'07022070'"
],
[
"'01111111'",
"'0111111111111110'"
],
[
"'a'",
"'aa'"
],
[
"'359118754930'",
"'359118754930039457811953'"
],
[
"'11011010010'",
"'1101101001001001011011'"
],
[
"'rznb'",
"'rznbbnzr'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int low, int high ) {
int f1 = 0, f2 = 1, f3 = 1;
int result = 0;
while ( f1 <= high ) {
if ( f1 >= low ) result ++;
f1 = f2;
f2 = f3;
f3 = f1 + f2;
}
return result;
}
| [] | null | [] | COUNT_TRAILING_ZEROES_FACTORIAL_NUMBER | python | [] | def f_gold ( n ) :
count = 0
i = 5
while ( n / i >= 1 ) :
count += int ( n / i )
i *= 5
return int ( count )
| code_translation | [
[
"9",
"1"
],
[
"43",
"9"
],
[
"50",
"12"
],
[
"32",
"7"
],
[
"37",
"8"
],
[
"51",
"12"
],
[
"33",
"7"
],
[
"49",
"10"
],
[
"1",
"0"
],
[
"75",
"18"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int x ) {
int curr_sum = 0, min_len = n + 1;
int start = 0, end = 0;
while ( end < n ) {
while ( curr_sum <= x && end < n ) {
if ( curr_sum <= 0 && x > 0 ) {
start = end;
curr_sum = 0;
}
curr_sum += arr [ end ++ ];
}
while ( curr_sum > x && start < n ) {
if ( end - start < min_len ) min_len = end - start;
curr_sum -= arr [ start ++ ];
}
}
return min_len;
}
| [] | null | [] | NUMBER_OF_PAIRS_IN_AN_ARRAY_HAVING_SUM_EQUAL_TO_PRODUCT | python | [] | def f_gold ( a , n ) :
zero = 0
two = 0
for i in range ( n ) :
if a [ i ] == 0 :
zero += 1
if a [ i ] == 2 :
two += 1
cnt = ( zero * ( zero - 1 ) ) // 2 + \
( two * ( two - 1 ) ) // 2
return cnt
| code_translation | [
[
"[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], 31",
"0"
],
[
"[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], 19",
"1"
],
[
"[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], 22",
"21"
],
[
"[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], 38",
"0"
],
[
"[20], 0",
"0"
],
[
"[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], 21",
"15"
],
[
"[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], 24",
"0"
],
[
"[-62, 42, -88, -44, 90, 30, 52, 54, 56, -72, -76, 90, 18, 42, 62, -84, 56, -80, 72], 13",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 15",
"15"
],
[
"[22, 15, 28, 29, 32, 16, 33, 83], 7",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int arr [ ], int n, int k ) {
int count;
for ( int i = 0;
i < n;
i ++ ) {
count = 0;
for ( int j = 0;
j < n;
j ++ ) {
if ( arr [ j ] == arr [ i ] ) count ++;
if ( count > 2 * k ) return false;
}
}
return true;
}
| [] | null | [] | GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8 | python | [] | def f_gold ( st ) :
l = len ( st )
arr = [ 0 ] * l
for i in range ( 0 , l ) :
for j in range ( i , l ) :
for k in range ( j , l ) :
if ( arr [ i ] % 8 == 0 ) :
return True
elif ( ( arr [ i ] * 10 + arr [ j ] ) % 8 == 0 and i != j ) :
return True
elif ( ( arr [ i ] * 100 + arr [ j ] * 10 + arr [ k ] ) % 8 == 0 and i != j and j != k and i != k ) :
return True
return False
| code_translation | [
[
"'1787075866'",
"True"
],
[
"'8'",
"True"
],
[
"'1110101110111'",
"True"
],
[
"'6673177113'",
"True"
],
[
"'7'",
"True"
],
[
"'000001'",
"True"
],
[
"'dbxMF'",
"True"
],
[
"'71733'",
"True"
],
[
"'01101101100'",
"True"
],
[
"''",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int array [ ], int start, int end ) {
if ( start > end ) return end + 1;
if ( start != array [ start ] ) return start;
int mid = ( start + end ) / 2;
if ( array [ mid ] == mid ) return f_gold ( array, mid + 1, end );
return f_gold ( array, start, mid );
}
| [] | null | [] | TAIL_RECURSION_FIBONACCI | python | [] | def f_gold ( n , a = 0 , b = 1 ) :
if n == 0 :
return a
if n == 1 :
return b
return f_gold ( n - 1 , b , a + b ) ;
| code_translation | [
[
"4, 43, 24",
"158"
],
[
"60, 48, 98",
"197627515330128"
],
[
"92, 21, 69",
"618128831345384040090"
],
[
"73, 79, 38",
"70025457194338790"
],
[
"58, 38, 30",
"31625143150526"
],
[
"82, 26, 12",
"1720785110361080648"
],
[
"53, 10, 17",
"1235889750931"
],
[
"57, 37, 26",
"17857820747741"
],
[
"47, 91, 99",
"461254675400"
],
[
"83, 3, 64",
"6532387970229186581"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( unsigned int x, unsigned int p1, unsigned int p2, unsigned int n ) {
unsigned int set1 = ( x >> p1 ) & ( ( 1U << n ) - 1 );
unsigned int set2 = ( x >> p2 ) & ( ( 1U << n ) - 1 );
unsigned int Xor = ( set1 ^ set2 );
Xor = ( Xor << p1 ) | ( Xor << p2 );
unsigned int result = x ^ Xor;
return result;
}
| [] | null | [] | DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS | python | [] | def f_gold ( x , y ) :
return ( ( x ^ y ) < 0 ) ;
| code_translation | [
[
"59, -99",
"True"
],
[
"-20, -21",
"False"
],
[
"-100, 79",
"True"
],
[
"54, -49",
"True"
],
[
"-16, 16",
"True"
],
[
"-23, -68",
"False"
],
[
"93, 37",
"False"
],
[
"24, -61",
"True"
],
[
"-8, 69",
"True"
],
[
"29, 10",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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;
}
| [] | null | [] | COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1 | python | [] | def f_gold ( n ) :
x = 0
res = 0
yCount = 0
while ( yCount * yCount < n ) :
yCount = yCount + 1
while ( yCount != 0 ) :
res = res + yCount
x = x + 1
while ( yCount != 0 and ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) :
yCount = yCount - 1
return res
| code_translation | [
[
"72",
"64"
],
[
"75",
"69"
],
[
"92",
"83"
],
[
"30",
"30"
],
[
"45",
"41"
],
[
"40",
"37"
],
[
"81",
"71"
],
[
"17",
"17"
],
[
"81",
"71"
],
[
"99",
"86"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int x [ ], int y [ ], int n ) {
int sum = 0;
for ( int i = 0;
i < n;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) sum += ( abs ( x [ i ] - x [ j ] ) + abs ( y [ i ] - y [ j ] ) );
return sum;
}
| [] | null | [] | MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES | python | [] | def f_gold ( a , n ) :
result = 1
for i in range ( 1 , n ) :
y = ( i * ( i + 1 ) ) / 2
if ( y < n ) :
result = i
else :
break
return result
| code_translation | [
[
"[8, 10, 11, 14, 14, 17, 20, 20, 22, 22, 22, 23, 25, 30, 33, 39, 39, 41, 43, 45, 46, 46, 46, 50, 51, 53, 57, 59, 60, 64, 64, 66, 72, 72, 75, 77, 85, 85, 87, 88, 90, 91, 93, 94, 94, 95], 38",
"8"
],
[
"[-44, -90, 20, 4, -56, -50, -80, 74, -82, 20, 62, -26, -10, -14, -76, 82, -88, 92, 30, 44, -62, -86, -20, -96, -60, -88, -78, -40, -48, -92, 62, 58, 94, 68, 68, 44, 80, 4, 48, -92, 30, -76, -46, -20, 4], 36",
"7"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 28",
"6"
],
[
"[8, 34, 48, 10, 5, 12, 80, 7, 67, 1, 79, 59, 63, 13, 16, 23, 62, 56, 99, 89, 7, 80], 12",
"4"
],
[
"[-88, -46, -40, -40, 38], 3",
"1"
],
[
"[1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1], 44",
"8"
],
[
"[8, 15, 35, 39, 49, 81, 86, 91], 7",
"3"
],
[
"[-24, 56, -74, -76, -80, 86, 90, 0, -26, 18, 72, 78, -66, -28, 22, 22, 72, 78, -50, -12, 20, 12, -68, -2, -58, -44, 28, -58, 90, -28, 32, -70, -48, -66, -94, -50, 18, -12, 80, 12, 82, 56, -64, 10, -22], 36",
"7"
],
[
"[0, 0], 1",
"1"
],
[
"[62, 93, 69, 40, 26, 2, 29, 83, 66, 68, 67, 73, 12, 65, 89, 57, 38, 99, 42, 27, 38, 24, 43, 4, 4, 54, 72, 47, 52, 46, 53, 24, 3, 41, 64, 33, 88, 3, 1, 7, 17, 31, 20, 33, 69, 21, 9, 24, 59], 26",
"6"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
float fibo = 2.078087 * log ( n ) + 1.672276;
return round ( fibo );
}
| [] | null | [] | COUNT_BINARY_STRINGS_K_TIMES_APPEARING_ADJACENT_TWO_SET_BITS | python | [] | def f_gold ( n , k ) :
dp = [ [ [ 0 , 0 ] for __ in range ( k + 1 ) ] for _ in range ( n + 1 ) ]
dp [ 1 ] [ 0 ] [ 0 ] = 1
dp [ 1 ] [ 0 ] [ 1 ] = 1
for i in range ( 2 , n + 1 ) :
for j in range ( k + 1 ) :
dp [ i ] [ j ] [ 0 ] = ( dp [ i - 1 ] [ j ] [ 0 ] + dp [ i - 1 ] [ j ] [ 1 ] )
dp [ i ] [ j ] [ 1 ] = dp [ i - 1 ] [ j ] [ 0 ]
if j >= 1 :
dp [ i ] [ j ] [ 1 ] += dp [ i - 1 ] [ j - 1 ] [ 1 ]
return dp [ n ] [ k ] [ 0 ] + dp [ n ] [ k ] [ 1 ]
| code_translation | [
[
"29, 85",
"0"
],
[
"47, 29",
"3615434154"
],
[
"77, 96",
"0"
],
[
"9, 91",
"0"
],
[
"29, 80",
"0"
],
[
"94, 85",
"4221018"
],
[
"51, 87",
"0"
],
[
"46, 62",
"0"
],
[
"18, 96",
"0"
],
[
"86, 86",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | FORM_SMALLEST_NUMBER_USING_ONE_SWAP_OPERATION | python | [] | def f_gold ( num ) :
num = list ( num )
n = len ( num )
rightMin = [ 0 ] * n
right = 0
rightMin [ n - 1 ] = - 1 ;
right = n - 1 ;
for i in range ( n - 2 , 0 , - 1 ) :
if num [ i ] > num [ right ] :
rightMin [ i ] = right
else :
rightMin [ i ] = - 1
right = i
small = - 1
for i in range ( 1 , n ) :
if num [ i ] != '0' :
if small == - 1 :
if num [ i ] < num [ 0 ] :
small = i
elif num [ i ] < num [ small ] :
small = i
if small != - 1 :
num [ 0 ] , num [ small ] = num [ small ] , num [ 0 ]
else :
for i in range ( 1 , n ) :
if rightMin [ i ] != - 1 :
num [ i ] , num [ rightMin [ i ] ] = num [ rightMin [ i ] ] , num [ i ]
break
return ''.join ( num )
| code_translation | [
[
"'ncYltuhSxEfG'",
"'EcYltuhSxnfG'"
],
[
"'26615541616459'",
"'16625541616459'"
],
[
"'0101'",
"'0011'"
],
[
"'hK'",
"'Kh'"
],
[
"'422162103899'",
"'122462103899'"
],
[
"'0010'",
"'0001'"
],
[
"'zfcSh'",
"'Sfczh'"
],
[
"'92'",
"'29'"
],
[
"'0'",
"'0'"
],
[
"'v'",
"'v'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_set < int > S;
int ans = 0;
for ( int i = 0;
i < n;
i ++ ) S . insert ( arr [ i ] );
for ( int i = 0;
i < n;
i ++ ) {
if ( S . find ( arr [ i ] - 1 ) == S . end ( ) ) {
int j = arr [ i ];
while ( S . find ( j ) != S . end ( ) ) j ++;
ans = max ( ans, j - arr [ i ] );
}
}
return ans;
}
| [] | null | [] | COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S | python | [] | def f_gold ( n ) :
a = [ 0 for i in range ( n ) ]
b = [ 0 for i in range ( n ) ]
a [ 0 ] = b [ 0 ] = 1
for i in range ( 1 , n ) :
a [ i ] = a [ i - 1 ] + b [ i - 1 ]
b [ i ] = a [ i - 1 ]
return a [ n - 1 ] + b [ n - 1 ]
| code_translation | [
[
"86",
"1100087778366101931"
],
[
"75",
"5527939700884757"
],
[
"14",
"987"
],
[
"5",
"13"
],
[
"41",
"433494437"
],
[
"35",
"24157817"
],
[
"30",
"2178309"
],
[
"89",
"4660046610375530309"
],
[
"84",
"420196140727489673"
],
[
"53",
"139583862445"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
long int f_gold ( int n ) {
if ( n == 1 ) return 1;
long int z;
float e = 2.71;
z = sqrt ( 2 * 3.14 * n ) * pow ( ( n / e ), n );
return z;
}
| [
"import math"
] | null | [] | CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES | python | [] | import math
def f_gold ( r , R , r1 , x1 , y1 ) :
dis = int ( math.sqrt ( x1 * x1 + y1 * y1 ) )
return ( dis - r1 >= R and dis + r1 <= r )
| code_translation | [
[
"8, 4, 2, 6, 0",
"True"
],
[
"400, 1, 10, 74, 38",
"True"
],
[
"1, 400, 10, 74, 38",
"False"
],
[
"61, 40, 2, 50, 0",
"True"
],
[
"60, 49, 68, 77, 71",
"False"
],
[
"88, 10, 69, 71, 26",
"False"
],
[
"60, 79, 92, 29, 38",
"False"
],
[
"26, 88, 75, 84, 10",
"False"
],
[
"33, 65, 57, 21, 61",
"False"
],
[
"70, 57, 77, 52, 87",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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;
}
}
| [] | null | [] | COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1 | python | [] | def f_gold ( a , b ) :
return ( a // 2 ) + ( b // 2 ) + ( ( a % 2 + b % 2 ) // 2 )
| code_translation | [
[
"9, 81",
"45"
],
[
"68, 79",
"73"
],
[
"51, 2",
"26"
],
[
"31, 49",
"40"
],
[
"14, 10",
"12"
],
[
"73, 9",
"41"
],
[
"51, 13",
"32"
],
[
"75, 67",
"71"
],
[
"98, 51",
"74"
],
[
"83, 74",
"78"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( char s [ ], char t [ ] ) {
int count = 0;
for ( int i = 0;
i < strlen ( t );
i ++ ) {
if ( count == strlen ( s ) ) break;
if ( t [ i ] == s [ count ] ) count ++;
}
return count;
}
| [] | null | [] | PROGRAM_AREA_SQUARE | python | [] | def f_gold ( side ) :
area = side * side
return area
| code_translation | [
[
"50",
"2500"
],
[
"64",
"4096"
],
[
"92",
"8464"
],
[
"23",
"529"
],
[
"38",
"1444"
],
[
"55",
"3025"
],
[
"67",
"4489"
],
[
"56",
"3136"
],
[
"60",
"3600"
],
[
"90",
"8100"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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;
}
| [] | null | [] | MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE | python | [] | def f_gold ( arr , N , K ) :
arr.sort ( )
dp = [ 0 ] * N
dp [ 0 ] = 0
for i in range ( 1 , N ) :
dp [ i ] = dp [ i - 1 ]
if ( arr [ i ] - arr [ i - 1 ] < K ) :
if ( i >= 2 ) :
dp [ i ] = max ( dp [ i ] , dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ) ;
else :
dp [ i ] = max ( dp [ i ] , arr [ i ] + arr [ i - 1 ] ) ;
return dp [ N - 1 ]
| code_translation | [
[
"[48, 53, 67, 78, 78, 93, 95], 6, 4",
"156"
],
[
"[-70, -32, -2, 18, 30, 32, 52, 70, 72, 88], 8, 8",
"62"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 37, 31",
"10"
],
[
"[2, 3, 5, 5, 6, 10, 12, 13, 13, 16, 23, 23, 34, 36, 39, 40, 42, 45, 45, 47, 51, 51, 52, 56, 57, 58, 60, 60, 60, 60, 61, 63, 67, 68, 71, 73, 75, 80, 80, 82, 84, 86, 86, 86, 86, 89, 90, 98, 99], 31, 37",
"1083"
],
[
"[-84, -56, 68, 78], 3, 3",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 14, 9",
"5"
],
[
"[1, 2, 3, 9, 12, 12, 16, 17, 18, 19, 20, 21, 21, 26, 29, 42, 44, 45, 48, 48, 48, 54, 54, 55, 60, 63, 63, 64, 64, 67, 67, 68, 69, 74, 78, 78, 79, 83, 95, 95, 95, 96, 97, 99], 27, 42",
"849"
],
[
"[-92, -58, -56, -48, -42, -16, -14, 28, 40, 42, 54, 60, 64], 9, 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], 21, 19",
"9"
],
[
"[25, 64, 96], 1, 1",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int n ) {
return ( ! ( n & 1 ) );
}
| [
"import math"
] | null | [] | AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT | python | [] | import math
def f_gold ( a ) :
area = ( math.pi * a * a ) / 4
return area
| code_translation | [
[
"77",
"4656.625710783471"
],
[
"18",
"254.46900494077323"
],
[
"83",
"5410.607947645021"
],
[
"39",
"1194.5906065275187"
],
[
"68",
"3631.6811075498013"
],
[
"28",
"615.7521601035994"
],
[
"71",
"3959.192141686537"
],
[
"14",
"153.93804002589985"
],
[
"21",
"346.36059005827474"
],
[
"73",
"4185.386812745001"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int b [ ], int n ) {
sort ( a, a + n );
sort ( b, b + n );
int result = 0;
for ( int i = 0;
i < n;
++ i ) {
result = result + abs ( a [ i ] - b [ i ] );
}
return result;
}
| [] | null | [] | MULTIPLY_AN_INTEGER_WITH_3_5 | python | [] | def f_gold ( x ) :
return ( x << 1 ) + x + ( x >> 1 )
| code_translation | [
[
"58",
"203"
],
[
"16",
"56"
],
[
"82",
"287"
],
[
"33",
"115"
],
[
"88",
"308"
],
[
"51",
"178"
],
[
"81",
"283"
],
[
"38",
"133"
],
[
"79",
"276"
],
[
"89",
"311"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int num, int divisor ) {
while ( num >= divisor ) num -= divisor;
return num;
}
| [] | null | [] | MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS | python | [] | def f_gold ( arr , N , k ) :
MS = [ 0 for i in range ( N ) ]
MS [ N - 1 ] = arr [ N - 1 ]
for i in range ( N - 2 , - 1 , - 1 ) :
if ( i + k + 1 >= N ) :
MS [ i ] = max ( arr [ i ] , MS [ i + 1 ] )
else :
MS [ i ] = max ( arr [ i ] + MS [ i + k + 1 ] , MS [ i + 1 ] )
return MS [ 0 ]
| code_translation | [
[
"[3, 5, 20, 21, 23, 26, 27, 31, 33, 38, 39, 41, 48, 48, 50, 51, 56, 57, 64, 68, 69, 70, 71, 74, 76, 86, 97], 23, 15",
"98"
],
[
"[32, 34, -40, 90, -82, -70, 30, 26, -76, -46, -84, 76, -76], 9, 10",
"90"
],
[
"[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], 22, 34",
"0"
],
[
"[96, 15, 30, 25, 83], 2, 3",
"96"
],
[
"[-90, -82, -80, -76, -62, -58, -50, -48, -46, -38, -38, -38, -38, -38, -34, -32, -24, -22, -16, -16, -4, -2, 10, 10, 20, 26, 26, 32, 38, 38, 44, 44, 46, 48, 58, 62, 64, 66, 76, 78, 78, 82, 92, 96, 96, 98], 27, 30",
"26"
],
[
"[1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0], 9, 9",
"1"
],
[
"[1, 2, 9, 17, 24, 31, 31, 33, 56, 57, 61, 71, 73, 74, 76, 77, 79, 83, 86, 95, 99], 12, 10",
"72"
],
[
"[-12, 52, -44, 80, -66, 34, 42, -46, 8, 12, -22, -56, 74, -98, -44, 2, -24, -14, -54, -56, -26, -18, -72], 13, 19",
"80"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13, 13",
"1"
],
[
"[65, 1, 34, 38, 15, 6, 55, 21, 32, 90, 39, 25, 43, 48, 64, 66, 88, 70, 82, 75, 25, 56, 23, 27, 41, 33, 33, 55, 60, 90, 41, 58, 42, 53, 38, 90, 7, 15], 37, 33",
"155"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n );
return arr [ n - 1 ] + arr [ n - 2 ] + arr [ n - 3 ];
}
| [
"import sys"
] | null | [] | DYNAMIC_PROGRAMMING_SET_28_MINIMUM_INSERTIONS_TO_FORM_A_PALINDROME | python | [] | import sys
def f_gold ( str , l , h ) :
if ( l > h ) :
return sys.maxsize
if ( l == h ) :
return 0
if ( l == h - 1 ) :
return 0 if ( str [ l ] == str [ h ] ) else 1
if ( str [ l ] == str [ h ] ) :
return f_gold ( str , l + 1 , h - 1 )
else :
return ( min ( f_gold ( str , l , h - 1 ) , f_gold ( str , l + 1 , h ) ) + 1 )
| code_translation | [
[
"['F', 'F', 'J', 'K', 'K', 'L', 'P', 'S', 'T', 'V', 'W', 'Y', 'b', 'd', 'j', 'l', 't', 'u', 'x', 'y'], 11, 11",
"0"
],
[
"['0', '1', '8', '8', '8', '4', '4', '3', '9', '6', '5', '2', '8', '2', '0', '2', '6', '0', '7', '7', '3', '2', '4', '5', '9', '7', '2', '4', '1', '8', '7', '9', '8', '0', '8', '5', '4', '2', '3'], 19, 22",
"3"
],
[
"['1'], 0, 0",
"0"
],
[
"['g', 'y', 'r', 'M', 'v', 'z', ' ', 'k', 'S', 'P', 'x', 'p', 'E', 'z', 'T', 'K', 'k', 'B', 's', 'P', 'p', 'e', 'G', 't', 'r', 'M', 'p', ' ', 'H', 'a'], 24, 27",
"3"
],
[
"['0', '1', '1', '1', '1', '1', '1', '2', '2', '2', '2', '3', '3', '3', '3', '3', '4', '4', '4', '5', '5', '5', '5', '5', '6', '6', '6', '6', '6', '6', '6', '7', '8', '8', '8', '9', '9'], 33, 34",
"0"
],
[
"['1', '1', '0', '1', '0', '1', '0', '1', '0', '1', '1', '1', '1', '1', '1', '0'], 13, 8",
"9223372036854775807"
],
[
"[' ', ' ', ' ', 'B', 'C', 'C', 'D', 'I', 'K', 'O', 'P', 'R', 'T', 'V', 'W', 'a', 'b', 'd', 'j', 'y'], 16, 14",
"9223372036854775807"
],
[
"['5', '0', '8', '6', '9', '3', '0', '3', '2', '0', '6', '2', '3', '7', '8', '9', '2', '0', '1', '9', '4', '1', '3', '1', '9', '2', '3', '4', '1', '2', '3', '8', '1'], 31, 25",
"9223372036854775807"
],
[
"['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'], 37, 35",
"9223372036854775807"
],
[
"['X', 'B', 'E', 'v', 'K', 't', 'k', 'K', 'Q', 's', 'V', 'N', 'l', 'k', 'T', 'N', 'J', 'z', 'f', 'p', 'J', 'g', 'S', 'P', 'M', 'b', 'H', 'L', 'v', 'E', 'A', 'n', 'D', 'U', 'c', 's', 'M', 'Q', 'P', 'g', 'g', ' '], 26, 27",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int ans = 0;
for ( int i = 0;
i < n;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) if ( arr [ i ] == arr [ j ] ) ans ++;
return ans;
}
| [] | null | [] | SUM_SERIES_555555_N_TERMS | python | [] | def f_gold ( n ) :
return ( int ) ( 0.6172 * ( pow ( 10 , n ) - 1 ) - 0.55 * n )
| code_translation | [
[
"18",
"617200000000000000"
],
[
"81",
"617199999999999917125494104322701119480482791516235510304887841509964568007278592"
],
[
"77",
"61720000000000002223209770321473706212913932736699901607714125885487833939968"
],
[
"84",
"617199999999999978627872438760098151064610958779767984539623555430645540524889473024"
],
[
"87",
"617199999999999903571380917412716962711640956517116189133813483077691753132438539206656"
],
[
"14",
"61719999999991"
],
[
"15",
"617199999999991"
],
[
"3",
"614"
],
[
"21",
"617200000000000000000"
],
[
"60",
"617199999999999931367850356457935560962869301220704123879424"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n, int m, int k ) {
if ( m <= n - k + 1 ) return m + k - 1;
m = m - ( n - k + 1 );
return ( m % n == 0 ) ? n : ( m % n );
}
| [] | null | [] | SUM_SUBSETS_SET_FORMED_FIRST_N_NATURAL_NUMBERS | python | [] | def f_gold ( n ) :
return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) )
| code_translation | [
[
"76",
"1.1054115463101266e+26"
],
[
"26",
"11777605632.0"
],
[
"45",
"1.820791255597056e+16"
],
[
"35",
"10823317585920.0"
],
[
"34",
"5111011082240.0"
],
[
"22",
"530579456.0"
],
[
"3",
"24.0"
],
[
"25",
"5452595200.0"
],
[
"22",
"530579456.0"
],
[
"78",
"4.6558755627908406e+26"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
unsigned int f_gold ( unsigned int n ) {
if ( n == 0 ) return 1;
return n * f_gold ( n - 1 );
}
| [] | null | [] | PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_1 | python | [] | def f_gold ( num , divisor ) :
if ( divisor == 0 ) :
return False
if ( divisor < 0 ) :
divisor = - divisor
if ( num < 0 ) :
num = - num
i = 1
product = 0
while ( product <= num ) :
product = divisor * i
i += 1
return num - ( product - divisor )
| code_translation | [
[
"34, 55",
"34"
],
[
"63, 22",
"19"
],
[
"15, 26",
"15"
],
[
"56, 58",
"56"
],
[
"63, 94",
"63"
],
[
"28, 45",
"28"
],
[
"54, 97",
"54"
],
[
"2, 58",
"2"
],
[
"94, 91",
"3"
],
[
"82, 40",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
unsigned int f_gold ( unsigned int n, unsigned int d ) {
return ( n & ( d - 1 ) );
}
| [] | null | [] | COMPOSITE_NUMBER | python | [] | def f_gold ( n ) :
if ( n <= 1 ) :
return False
if ( n <= 3 ) :
return False
if ( n % 2 == 0 or n % 3 == 0 ) :
return True
i = 5
while ( i * i <= n ) :
if ( n % i == 0 or n % ( i + 2 ) == 0 ) :
return True
i = i + 6
return False
| code_translation | [
[
"62",
"True"
],
[
"13",
"False"
],
[
"29",
"False"
],
[
"72",
"True"
],
[
"30",
"True"
],
[
"20",
"True"
],
[
"10",
"True"
],
[
"47",
"False"
],
[
"91",
"True"
],
[
"52",
"True"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b, int c ) {
int x = a - b;
int y = b - c;
int z = a - c;
if ( x * y > 0 ) return b;
else if ( x * z > 0 ) return c;
else return a;
}
| [
"from queue import Queue"
] | null | [] | PROGRAM_PAGE_REPLACEMENT_ALGORITHMS_SET_2_FIFO | python | [] | from queue import Queue
def f_gold ( pages , n , capacity ) :
s = set ( )
indexes = Queue ( )
page_faults = 0
for i in range ( n ) :
if ( len ( s ) < capacity ) :
if ( pages [ i ] not in s ) :
s.add ( pages [ i ] )
page_faults += 1
indexes.put ( pages [ i ] )
else :
if ( pages [ i ] not in s ) :
val = indexes.queue [ 0 ]
indexes.get ( )
s.remove ( val )
s.add ( pages [ i ] )
indexes.put ( pages [ i ] )
page_faults += 1
return page_faults
| code_translation | [
[
"[4, 4, 6, 7, 8, 11, 13, 18, 26, 35, 36, 37, 45, 46, 46, 47, 48, 49, 51, 52, 53, 56, 61, 74, 75, 77, 80, 83, 85, 86, 87, 90, 93, 95, 97, 98, 99, 99], 36, 37",
"34"
],
[
"[78, -48, 50, -20, -6, 58, -8, 66, 72, 68, 4, 80, 58, -26, -82, -56, 92, 76, 20, 82, -46, 86, 38, 60, -62, -48, 76, 8, -66, -4, -98, -96, -52, 92], 33, 23",
"30"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 19, 13",
"2"
],
[
"[98, 78, 94, 42, 62, 83, 7, 62, 60, 94, 16, 28, 50, 15, 18, 71, 86, 47, 62, 89], 15, 11",
"13"
],
[
"[-82, -70, -68, -56, -50, -44, 4, 18, 28, 30, 30, 42, 66, 78, 80], 9, 11",
"9"
],
[
"[1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0], 25, 25",
"2"
],
[
"[4, 5, 13, 15, 18, 28, 32, 40, 46, 46, 55, 57, 61, 63, 65, 68, 77, 79, 79, 96], 17, 18",
"16"
],
[
"[-2, 82, 2, -74, -6, -24, 54, -74, -98, 8, -94, -60, -42, -38, 36, -38, -58, -70, -28, -34, 70, -6, -2, -76, -40, -4, 0, -4, 76, 48, -34, -26, -48, -58, -88, -44, 20, -22, 78], 31, 24",
"25"
],
[
"[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], 26, 24",
"2"
],
[
"[4, 90, 28, 71, 69, 45, 92, 63, 72, 76, 47, 85, 36, 59, 88, 46, 28, 19, 50, 31, 63, 13], 15, 12",
"15"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int N ) {
int lis [ N ];
for ( int i = 0;
i < N;
i ++ ) lis [ i ] = 1;
for ( int i = 1;
i < N;
i ++ ) for ( int j = 0;
j < i;
j ++ ) if ( arr [ i ] >= arr [ j ] && lis [ i ] < lis [ j ] + 1 ) lis [ i ] = lis [ j ] + 1;
int max = 0;
for ( int i = 0;
i < N;
i ++ ) if ( max < lis [ i ] ) max = lis [ i ];
return ( N - max );
}
| [] | null | [] | MAXIMUM_TRIPLET_SUM_ARRAY_2 | python | [] | def f_gold ( arr , n ) :
maxA = - 100000000
maxB = - 100000000
maxC = - 100000000
for i in range ( 0 , n ) :
if ( arr [ i ] > maxA ) :
maxC = maxB
maxB = maxA
maxA = arr [ i ]
elif ( arr [ i ] > maxB ) :
maxC = maxB
maxB = arr [ i ]
elif ( arr [ i ] > maxC ) :
maxC = arr [ i ]
return ( maxA + maxB + maxC )
| code_translation | [
[
"[4, 7, 12, 21, 22, 25, 27, 28, 28, 31, 32, 32, 41, 45, 47, 51, 53, 60, 61, 61, 63, 71, 74, 82, 83, 85, 88, 92, 96, 96], 28",
"265"
],
[
"[-52, 26, 74, -62, -76], 2",
"-100000026"
],
[
"[0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11",
"3"
],
[
"[63, 71, 15, 28, 31, 84, 8, 17, 24, 42, 66, 95, 30], 6",
"218"
],
[
"[-94, -92, -92, -90, -88, -88, -86, -82, -80, -78, -66, -54, -52, -52, -46, -46, -42, -36, -32, -24, -24, -14, -14, -14, -12, -10, 0, 6, 8, 20, 24, 24, 28, 38, 38, 52, 54, 56, 64, 74, 74, 76, 82, 94, 94], 31",
"52"
],
[
"[0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0], 30",
"3"
],
[
"[15, 19, 80], 2",
"-99999966"
],
[
"[4, 80, 18, 74, 36, -30, -72, -28, -32, -16, -8, 38, 78, -48, 98, -64, 86, -60, -44, 84, -98, 40, 14, 30, 44, 90, -30, -42, 24, -28, 24, 40, -96, 98, 90, -68, -54, -52, 62, 34, -98, 68, -56, -94, -78, -12, 28], 41",
"286"
],
[
"[0, 1, 1, 1, 1, 1], 3",
"2"
],
[
"[2, 18, 96, 7, 99, 83, 3, 88, 23, 77, 6, 28, 55, 49, 69, 55, 48, 76, 43, 11, 43, 44, 17, 74, 27, 64, 76, 77, 53, 26, 73, 12, 19, 62, 18, 34, 13, 31, 97, 96, 85, 27, 30, 97, 89, 25], 41",
"292"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [
"import math"
] | null | [] | PROGRAM_CALCULATE_AREA_OCTAGON | python | [] | import math
def f_gold ( side ) :
return ( 2 * ( 1 + ( math.sqrt ( 2 ) ) ) * side * side )
| code_translation | [
[
"5859.798616323926",
"165794860.15449765"
],
[
"-6381.210375893524",
"196612808.27272156"
],
[
"2442.246292006922",
"28799476.852711495"
],
[
"-9624.81536339737",
"447291345.3087225"
],
[
"8679.436805247444",
"363738081.5089271"
],
[
"-2682.3245401089525",
"34739881.027797274"
],
[
"7216.9161613024435",
"251483213.5426547"
],
[
"-5881.789859815442",
"167041618.6125096"
],
[
"2497.776395789202",
"30124010.84898392"
],
[
"-9598.912195459263",
"444887003.7391194"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr1 [ ], int arr2 [ ], int n ) {
for ( int i = 0;
i < n;
i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return i;
return n;
}
| [
"import math"
] | null | [] | PROGRAM_CALCULATE_VOLUME_OCTAHEDRON | python | [] | import math
def f_gold ( side ) :
return ( ( side * side * side ) * ( math.sqrt ( 2 ) / 3 ) )
| code_translation | [
[
"3355.322051344013",
"17807230335.375374"
],
[
"-891.0551553192736",
"-333508958.9649689"
],
[
"8242.699647177868",
"263998930936.71603"
],
[
"-9259.146104439229",
"-374202387762.81836"
],
[
"7712.806145993083",
"216287285897.3415"
],
[
"-4998.858862079315",
"-58885228987.99368"
],
[
"9771.127582524628",
"439772223071.1617"
],
[
"-5415.8106399098115",
"-74883158892.28471"
],
[
"670.0774772280249",
"141830229.25431916"
],
[
"-7068.634369272122",
"-166494655500.3635"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY | python | [] | def f_gold ( arr , low , high , key ) :
if ( high < low ) :
return - 1
mid = ( low + high ) / 2
if ( key == arr [ int ( mid ) ] ) :
return mid
if ( key > arr [ int ( mid ) ] ) :
return f_gold ( arr , ( mid + 1 ) , high , key )
return ( f_gold ( arr , low , ( mid - 1 ) , key ) )
| code_translation | [
[
"[2, 10, 73, 91, 98], 2, 4, 4",
"-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], 20, 13, 21",
"-1"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 30, 27, 29",
"-1"
],
[
"[30, 79, 3, 76, 18], 3, 2, 2",
"-1"
],
[
"[-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], 35, 30, 40",
"-1"
],
[
"[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], 25, 26, 30",
"-1"
],
[
"[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], 33, 40, 26",
"-1"
],
[
"[-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], 34, 27, 34",
"-1"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 19, 13, 19",
"-1"
],
[
"[71, 70, 13, 18, 70, 62, 88, 27, 17, 44, 89, 28, 74, 41, 20, 91, 95, 79, 40, 43, 38, 20, 5], 21, 22, 22",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int res = 0;
for ( int i = 0;
i < n - 1;
i ++ ) res = res ^ ( i + 1 ) ^ arr [ i ];
res = res ^ arr [ n - 1 ];
return res;
}
| [] | null | [] | MAXIMUM_NUMBER_SEGMENTS_LENGTHS_B_C | python | [] | def f_gold ( n , a , b , c ) :
dp = [ - 1 ] * ( n + 10 )
dp [ 0 ] = 0
for i in range ( 0 , n ) :
if ( dp [ i ] != - 1 ) :
if ( i + a <= n ) :
dp [ i + a ] = max ( dp [ i ] + 1 , dp [ i + a ] )
if ( i + b <= n ) :
dp [ i + b ] = max ( dp [ i ] + 1 , dp [ i + b ] )
if ( i + c <= n ) :
dp [ i + c ] = max ( dp [ i ] + 1 , dp [ i + c ] )
return dp [ n ]
| code_translation | [
[
"23, 16, 23, 18",
"1"
],
[
"62, 76, 81, 97",
"-1"
],
[
"32, 46, 1, 78",
"32"
],
[
"82, 48, 72, 58",
"-1"
],
[
"94, 99, 62, 38",
"-1"
],
[
"44, 21, 46, 60",
"-1"
],
[
"4, 57, 2, 77",
"2"
],
[
"53, 23, 80, 5",
"7"
],
[
"9, 55, 26, 85",
"-1"
],
[
"23, 15, 73, 42",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( int n ) {
if ( n == 0 ) return "0";
string bin = "";
while ( n > 0 ) {
bin = ( ( n & 1 ) == 0 ? '0' : '1' ) + bin;
n >>= 1;
}
return bin;
}
| [] | null | [] | COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1 | python | [] | def f_gold ( dist ) :
count = [ 0 ] * ( dist + 1 )
count [ 0 ] = 1
count [ 1 ] = 1
count [ 2 ] = 2
for i in range ( 3 , dist + 1 ) :
count [ i ] = ( count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ] )
return count [ dist ] ;
| code_translation | [
[
"37",
"3831006429"
],
[
"82",
"3108406708580377597810"
],
[
"87",
"65431225571591367370292"
],
[
"80",
"918838005896863447985"
],
[
"92",
"1377311813149359327046015"
],
[
"58",
"1383410902447554"
],
[
"98",
"53324762928098149064722658"
],
[
"53",
"65720971788709"
],
[
"11",
"504"
],
[
"58",
"1383410902447554"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string str ) {
int zeros = 0, ones = 0;
for ( char ch : str ) ( ch == '0' ) ? ++ zeros : ++ ones;
return ( zeros == 1 || ones == 1 );
}
| [] | null | [] | MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1 | python | [] | def f_gold ( a , b , c ) :
if a > b :
if ( b > c ) :
return b
elif ( a > c ) :
return c
else :
return a
else :
if ( a > c ) :
return a
elif ( b > c ) :
return c
else :
return b
| code_translation | [
[
"43, 24, 7",
"24"
],
[
"76, 54, 66",
"66"
],
[
"57, 5, 40",
"40"
],
[
"10, 13, 4",
"10"
],
[
"59, 47, 56",
"56"
],
[
"92, 14, 50",
"50"
],
[
"49, 62, 65",
"62"
],
[
"16, 95, 12",
"16"
],
[
"33, 41, 90",
"41"
],
[
"66, 63, 46",
"63"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int position = 1;
int m = 1;
while ( ! ( n & m ) ) {
m = m << 1;
position ++;
}
return position;
}
| [] | null | [] | MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS | python | [] | def f_gold(str):
N = len(str)
dp = [[0 for x in range(N + 1)] for y in range(N + 1)]
for l in range(1, N + 1):
i = 0
j = l - 1
while j < N:
if (l == 1):
dp[i][j] = 1
else:
dp[i][j] = 1 + dp[i + 1][j]
if (str[i] == str[i + 1]):
dp[i][j] = min(1 + dp[i + 2][j], dp[i][j])
for K in range(i + 2, j + 1):
if (str[i] == str[K]):
dp[i][j] = min(dp[i + 1][K - 1] +
dp[K + 1][j], dp[i][j])
i += 1
j += 1
return dp[0][N - 1]
| code_translation | [
[
"'YCtLQtHLwr'",
"8"
],
[
"'47713514383248'",
"7"
],
[
"'0100101001111'",
"3"
],
[
"'XfdIYVn'",
"7"
],
[
"'45499225407'",
"5"
],
[
"'000100111001'",
"2"
],
[
"'ZoUQhQwoap'",
"6"
],
[
"'18579027952'",
"7"
],
[
"'00000001111'",
"2"
],
[
"'JD'",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string str ) {
int n = str . length ( );
if ( n == 0 ) return false;
if ( n == 1 ) return ( ( str [ 0 ] - '0' ) % 4 == 0 );
int last = str [ n - 1 ] - '0';
int second_last = str [ n - 2 ] - '0';
return ( ( second_last * 10 + last ) % 4 == 0 );
}
| [] | null | [] | DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM | python | [] | def f_gold ( high , low , 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 ) ) ) ;
| code_translation | [
[
"[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], [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], 18",
"537"
],
[
"[-78, -12, 26, 80, 50, 4, -80, 86, 12, -2, 18, -50, -90, 56, -50, 88, -62, 96, -44, -82, 56], [-44, -14, 14, 0, 30, 78, 40, -12, -44, -16, 60, -12, -50, -66, 70, -98, -56, 48, -82, 94, 14], 16",
"452"
],
[
"[1], [1], 0",
"0"
],
[
"[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], [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], 25",
"1261"
],
[
"[-80, -36, -32, -20, -14, -12, 10, 12, 72], [-76, -54, -50, -28, 0, 58, 70, 78, 90], 4",
"-56"
],
[
"[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], [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], 24",
"15"
],
[
"[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], [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], 31",
"784"
],
[
"[56, 48, 40, -56, 44, -86, -28, -32, -34, 4, -94, -14, 28, -74], [82, -40, -16, -64, 12, -6, 60, 48, -58, -4, 42, -28, 24, -58], 8",
"268"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], 16",
"5"
],
[
"[85, 13, 35, 57, 8, 48, 65, 54, 88, 7, 66, 30, 47, 51], [1, 42, 42, 89, 3, 21, 49, 98, 4, 59, 26, 85, 53, 34], 8",
"453"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string str ) {
int n = str . length ( );
return n * ( n + 1 ) / 2;
}
| [] | null | [] | FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER_1 | python | [] | def f_gold ( N , K ) :
ans = 0 ;
y = N / K ;
x = N % K ;
ans = ( ( K * ( K - 1 ) / 2 ) * y + ( x * ( x + 1 ) ) / 2 ) ;
return int ( ans ) ;
| code_translation | [
[
"40, 90",
"2600"
],
[
"46, 64",
"2530"
],
[
"97, 20",
"1074"
],
[
"63, 1",
"0"
],
[
"92, 52",
"3166"
],
[
"60, 35",
"1345"
],
[
"67, 40",
"1684"
],
[
"61, 62",
"3751"
],
[
"74, 61",
"2311"
],
[
"67, 41",
"1691"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int leftMax [ n ];
leftMax [ 0 ] = INT_MIN;
for ( int i = 1;
i < n;
i ++ ) leftMax [ i ] = max ( leftMax [ i - 1 ], arr [ i - 1 ] );
int rightMin = INT_MAX;
for ( int i = n - 1;
i >= 0;
i -- ) {
if ( leftMax [ i ] < arr [ i ] && rightMin > arr [ i ] ) return i;
rightMin = min ( rightMin, arr [ i ] );
}
return - 1;
}
| [
"import math"
] | null | [] | MINIMUM_PERIMETER_N_BLOCKS | python | [] | import math
def f_gold ( n ) :
l = math.sqrt ( n )
sq = l * l
if ( sq == n ) :
return l * 4
else :
row = n / l
perimeter = 2 * ( l + row )
if ( n % l != 0 ) :
perimeter += 2
return perimeter
| code_translation | [
[
"45",
"28.832815729997478"
],
[
"80",
"37.77708763999664"
],
[
"54",
"29.393876913398138"
],
[
"48",
"29.712812921102035"
],
[
"83",
"36.4417343165772"
],
[
"68",
"32.984845004941285"
],
[
"32",
"24.62741699796952"
],
[
"20",
"19.88854381999832"
],
[
"68",
"32.984845004941285"
],
[
"66",
"34.49615361854384"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int sum = 0;
while ( n > 0 ) {
sum += ( n % 10 );
n /= 10;
}
if ( sum == 1 ) return 10;
return sum;
}
| [] | null | [] | TURN_OFF_THE_RIGHTMOST_SET_BIT | python | [] | def f_gold ( n ) :
return n & ( n - 1 )
| code_translation | [
[
"9",
"8"
],
[
"54",
"52"
],
[
"60",
"56"
],
[
"32",
"0"
],
[
"41",
"40"
],
[
"64",
"0"
],
[
"4",
"0"
],
[
"51",
"50"
],
[
"57",
"56"
],
[
"92",
"88"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n, int m ) {
int dp [ n + 1 ] [ m + 1 ];
memset ( dp, 0, sizeof ( dp ) );
for ( int i = 1;
i <= n;
i ++ ) {
for ( int j = 0;
j <= m;
j ++ ) {
if ( i > j ) {
if ( j == 0 ) dp [ i ] [ j ] = 1;
else dp [ i ] [ j ] = ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] );
}
}
}
return dp [ n ] [ m ];
}
| [] | null | [] | FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING | python | [] | def f_gold ( s ) :
p = - 1
for i in range ( len ( s ) ) :
for j in range ( i + 1 , len ( s ) ) :
if ( s [ i ] == s [ j ] ) :
p = i
break
if ( p != - 1 ) :
break
return p
| code_translation | [
[
"'ORXMflacQFBv'",
"-1"
],
[
"'39977638567848'",
"0"
],
[
"'011110011011'",
"0"
],
[
"'fYjfNy'",
"0"
],
[
"'222280492'",
"0"
],
[
"'11'",
"0"
],
[
"'UjntBg'",
"-1"
],
[
"'6866190138212'",
"0"
],
[
"'0000'",
"0"
],
[
"'FWz PWEQgVlRZ'",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY | python | [] | def f_gold ( arr , n ) :
ans = - 2147483648
for i in range ( n ) :
curr_xor = 0
for j in range ( i , n ) :
curr_xor = curr_xor ^ arr [ j ]
ans = max ( ans , curr_xor )
return ans
| code_translation | [
[
"[1, 7, 7, 11, 12, 18, 20, 23, 27, 30, 44, 47, 53, 53, 55, 57, 57, 58, 61, 62, 67, 74, 76, 80, 86, 86], 13",
"63"
],
[
"[-34, -4, 68, -82, 54, 20, 6, -18, -70, 98, -40, 80, -28, 78, 28, 56, 26, 2, 2, -56, -66, 44, 0, -72, 12, 54, -40, 18, 28, -48, -56, 72, 84, 60, 76, 26, -8, 62], 21",
"126"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 12",
"1"
],
[
"[33, 98], 1",
"33"
],
[
"[-92, -80, -76, -76, -74, -58, -44, -38, -34, -32, -30, -24, -20, -18, -4, -2, 2, 8, 44, 52, 52, 56, 70, 72, 80, 80, 98], 15",
"126"
],
[
"[0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0], 33",
"1"
],
[
"[1, 2, 3, 6, 9, 15, 15, 18, 19, 25, 31, 31, 33, 37, 39, 47, 49, 51, 51, 52, 52, 54, 58, 59, 59, 61, 62, 62, 65, 66, 66, 66, 66, 67, 71, 76, 77, 78, 79, 80, 83, 86, 87, 92, 97, 97, 98, 99], 38",
"127"
],
[
"[34, -90, 64, 88, -46, -4, -96, 76, -32, 10, -8, -24, 32, -4, 86, -20, -86, -88, -72, 64, 12, 66, -96, -84, 16, -58, -48, 80, -80, 70, -94, -84, 56, 8, -14, 86, 72, -16, -18, 74, 40, 34, 20, 80], 35",
"126"
],
[
"[1, 1], 1",
"1"
],
[
"[57, 76, 2, 30, 24, 12, 49, 12, 5, 75, 55, 17, 62, 87, 21, 91, 88, 10, 20, 49, 46, 79, 51, 33, 94, 59, 48, 97, 70, 49], 25",
"127"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int ar [ ], int n ) {
int res = 0;
sort ( ar, ar + n );
for ( int i = 0;
i < n;
i ++ ) {
int count = 1;
for (;
i < n - 1;
i ++ ) {
if ( ar [ i ] == ar [ i + 1 ] ) count ++;
else break;
}
res = max ( res, count );
}
return res;
}
| [] | null | [] | STRING_CONTAINING_FIRST_LETTER_EVERY_WORD_GIVEN_STRING_SPACES | python | [] | def f_gold ( str ) :
result = ""
v = True
for i in range ( len ( str ) ) :
if ( str [ i ] == ' ' ) :
v = True
elif ( str [ i ] != ' ' and v == True ) :
result += ( str [ i ] )
v = False
return result
| code_translation | [
[
"'t a'",
"'ta'"
],
[
"'77 78 2 600 7'",
"'77267'"
],
[
"'011 10 10'",
"'011'"
],
[
"'kV Co O iR'",
"'kCOi'"
],
[
"'2'",
"'2'"
],
[
"'0 11'",
"'01'"
],
[
"'Y sT wgheC'",
"'Ysw'"
],
[
"'58 824 6'",
"'586'"
],
[
"'00 100 001 0111'",
"'0100'"
],
[
"'Q'",
"'Q'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY | python | [] | def f_gold ( arr , n ) :
SubsetSum_1 = 0
SubsetSum_2 = 0
for i in range ( 0 , n ) :
isSingleOccurance = True
for j in range ( i + 1 , n ) :
if ( arr [ i ] == arr [ j ] ) :
isSingleOccurance = False
arr [ i ] = arr [ j ] = 0
break
if ( isSingleOccurance == True ) :
if ( arr [ i ] > 0 ) :
SubsetSum_1 += arr [ i ]
else :
SubsetSum_2 += arr [ i ]
return abs ( SubsetSum_1 - SubsetSum_2 )
| code_translation | [
[
"[5, 14, 15, 21, 0, 0, 42, 0, 0, 0, 0, 48, 0, 0, 53, 60, 62, 69, 69, 79, 82, 86, 96], 15",
"198"
],
[
"[-54, 0, -22, 94, 58, 0, -12, 84, 0, 0, -34, 16, -10, -32, 50, -78, 68, -52, -64, 66, 0, 0, -38, -18, -84, -66, -36, 64, -12, 44, 48, 8, 42], 28",
"1100"
],
[
"[0, 0, 0, 1], 2",
"0"
],
[
"[63, 49, 18, 36, 21, 30, 45, 87], 6",
"217"
],
[
"[-96, 0, 0, -72, -62, -56, -52, -44, 0, 0, -28, -22, -20, -12, 0, 0, -2, 2, 2, 4, 36, 44, 46, 50, 50, 54, 66, 92], 18",
"468"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0], 34",
"1"
],
[
"[1, 2, 8, 12, 0, 0, 14, 17, 18, 27, 28, 31, 34, 37, 38, 42, 43, 45, 49, 52, 53, 0, 0, 58, 62, 66, 71, 74, 87, 93, 96, 99], 25",
"671"
],
[
"[0, -28, -30, 86, 0, -80, 76, -2, 28, 0, 0, 84, 0, 0, -88, 0, 42, 16, 0, 0, 78, -8, -46, -6, 0, 0, 0, -12, -32, -72, 84, -82, 76, -84, 80, -50, 90, -50, -14, -82, 78, 48, -10, 86, 34, -20, -76, 58], 28",
"710"
],
[
"[0, 1], 1",
"0"
],
[
"[83, 86, 57, 18, 98, 52, 1, 37, 11, 49, 10, 67, 2, 60, 30, 42, 8, 97, 25, 55, 5, 75, 9, 67], 16",
"703"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int diameter, int height ) {
return 2 * ( diameter + height );
}
| [] | null | [] | RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_1 | python | [] | def f_gold ( n ) :
dp = [ 0 ] * ( n + 1 )
dp [ 0 ] = 0
dp [ 1 ] = 1
for i in range ( 2 , n + 1 ) :
dp [ i ] = max ( dp [ int ( i / 2 ) ] + dp [ int ( i / 3 ) ] + dp [ int ( i / 4 ) ] , i ) ;
return dp [ n ]
| code_translation | [
[
"50",
"57"
],
[
"83",
"93"
],
[
"18",
"19"
],
[
"24",
"27"
],
[
"31",
"32"
],
[
"38",
"41"
],
[
"94",
"104"
],
[
"24",
"27"
],
[
"13",
"13"
],
[
"53",
"57"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int longest_start = - 1, longest_end = 0;
for ( int start = 0;
start < n;
start ++ ) {
int min = INT_MAX, max = INT_MIN;
for ( int end = start;
end < n;
end ++ ) {
int val = arr [ end ];
if ( val < min ) min = val;
if ( val > max ) max = val;
if ( 2 * min <= max ) break;
if ( end - start > longest_end - longest_start || longest_start == - 1 ) {
longest_start = start;
longest_end = end;
}
}
}
if ( longest_start == - 1 ) return n;
return ( n - ( longest_end - longest_start + 1 ) );
}
| [
"import math"
] | null | [] | MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN | python | [] | import math
def f_gold ( coin , n , k ) :
coin.sort ( )
coins_needed = math.ceil ( 1.0 * n // ( k + 1 ) ) ;
ans = 0
for i in range ( coins_needed - 1 + 1 ) :
ans += coin [ i ]
return ans
| code_translation | [
[
"[2, 4, 5, 9, 10, 10, 11, 14, 15, 19, 21, 22, 29, 36, 36, 38, 39, 39, 39, 41, 41, 42, 45, 45, 48, 55, 56, 57, 64, 66, 66, 66, 66, 69, 74, 76, 80, 81, 82, 82, 85, 87, 95, 95], 33, 27",
"2"
],
[
"[-98, -88, -52, -10, -6, 16, 20, 36, 48, 66, 68, 94], 6, 10",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 16, 16",
"0"
],
[
"[1, 4, 5, 6, 10, 11, 15, 24, 29, 32, 35, 43, 48, 49, 62, 71, 78, 91], 13, 17",
"0"
],
[
"[-98, -92, -88, -84, -82, -78, -74, -74, -68, -62, -62, -56, -56, -50, -46, -44, -26, -18, -14, -8, -8, -6, 8, 16, 20, 20, 22, 26, 36, 42, 44, 44, 52, 60, 66, 68, 68, 70, 76, 84], 25, 34",
"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], 32, 32",
"0"
],
[
"[5, 12, 38, 39, 52, 54, 62, 81, 87, 93], 6, 8",
"0"
],
[
"[-84, -76, -74, -70, -40, -32, -32, -26, -24, -18, -18, -12, -10, -8, 0, 4, 8, 16, 40, 40, 44, 60, 70, 86, 92, 94], 25, 20",
"-84"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 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], 37, 29",
"0"
],
[
"[23, 31, 44, 56, 58, 61, 62, 63, 72, 74, 86, 97, 97, 98], 12, 13",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int DP [ n + 1 ];
DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1;
DP [ 3 ] = 2;
for ( int i = 4;
i <= n;
i ++ ) DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ];
return DP [ n ];
}
| [] | null | [] | PADOVAN_SEQUENCE | python | [] | def f_gold ( n ) :
pPrevPrev , pPrev , pCurr , pNext = 1 , 1 , 1 , 1
for i in range ( 3 , n + 1 ) :
pNext = pPrevPrev + pPrev
pPrevPrev = pPrev
pPrev = pCurr
pCurr = pNext
return pNext ;
| code_translation | [
[
"1",
"1"
],
[
"92",
"124155792775"
],
[
"29",
"2513"
],
[
"52",
"1618192"
],
[
"55",
"3761840"
],
[
"13",
"28"
],
[
"83",
"9882257736"
],
[
"83",
"9882257736"
],
[
"10",
"12"
],
[
"67",
"109870576"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int C [ n + 1 ] [ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) {
for ( int j = 0;
j <= min ( i, n );
j ++ ) {
if ( j == 0 || j == i ) C [ i ] [ j ] = 1;
else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
}
}
int sum = 0;
for ( int i = 0;
i <= n;
i ++ ) sum += C [ n ] [ i ];
return sum;
}
| [] | null | [] | CEILING_IN_A_SORTED_ARRAY | python | [] | def f_gold ( arr , low , high , x ) :
if x <= arr [ low ] :
return low
i = low
for i in range ( high ) :
if arr [ i ] == x :
return i
if arr [ i ] < x and arr [ i + 1 ] >= x :
return i + 1
return - 1
| code_translation | [
[
"[2, 3, 4, 6, 8, 9, 9, 10, 11, 16, 19, 20, 21, 21, 21, 24, 24, 25, 28, 30, 30, 30, 32, 34, 35, 39, 41, 42, 49, 52, 57, 59, 61, 62, 66, 68, 71, 73, 76, 79, 83, 84, 85, 86, 87, 87], 23, 37, 44",
"28"
],
[
"[92, 50, -84, 60, 32, -54, 84, -82, -42, -72, -64, -28, -48, 66, 92, -42, 42, -66, 52, -30, 48, 42, 36, -4, 64, 62, -16, 0, 20, 26, 78, 78, 12, -6, -30, -14, 76, 72, 70, -34, 98, 32], 36, 35, 34",
"36"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 11, 9, 13",
"-1"
],
[
"[26, 68, 73, 76, 14, 19, 56, 80, 17, 7, 15, 64, 99, 98, 21, 21, 72, 12, 14, 10, 44, 82, 25, 42, 46, 86, 79, 43, 91], 23, 27, 26",
"23"
],
[
"[-90, -86, -84, -50, -30, -24, -12, -2, 8, 22, 30, 44, 58, 58, 60, 60, 62, 90], 9, 16, 10",
"9"
],
[
"[0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1], 12, 15, 18",
"-1"
],
[
"[2, 2, 29, 31, 34, 39, 48, 50, 56, 61, 66, 66, 69, 73, 88], 9, 12, 10",
"9"
],
[
"[-98, 48, -58, 8, 70, 62, 92, 84, -58, -46, -26, -92, 18, -88, 40, -12, 60, 14, 54, -64, 88, 52, -44, 88, -46, -8, 36, -22, 28, -20, -50, 58, -82, -44, -44, 54, -86, 40, 10, 0, -24, -84, -10, 62, 58, 0, -88], 40, 29, 24",
"1"
],
[
"[0, 0, 0, 0, 1, 1], 5, 5, 5",
"-1"
],
[
"[56, 30, 33, 5, 67, 35, 22, 54, 36, 55, 94, 89, 40, 65, 29, 76, 17, 14, 14, 49, 40, 44, 35, 69, 63, 2, 81, 78, 19, 67, 12, 14, 68, 30, 82, 85, 12, 2, 94, 33, 85, 75, 97, 31, 69, 31, 85, 26], 46, 47, 47",
"46"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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;
}
| [] | null | [] | MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED_1 | python | [] | def f_gold ( ar , n ) :
if ( n <= 4 ) :
return min ( ar )
sum = [ 0 for i in range ( n ) ]
sum [ 0 ] = ar [ 0 ]
sum [ 1 ] = ar [ 1 ]
sum [ 2 ] = ar [ 2 ]
sum [ 3 ] = ar [ 3 ]
for i in range ( 4 , n ) :
sum [ i ] = ar [ i ] + min ( sum [ i - 4 : i ] )
return min ( sum [ n - 4 : n ] )
| code_translation | [
[
"[4, 4, 9, 26, 31, 31, 33, 35, 40, 45, 48, 52, 57, 60, 69, 75, 82, 89, 90, 92, 95, 97], 19",
"188"
],
[
"[60, -68, 30, -62, -8, 48, -20, 30, 16, -60, -20], 5",
"-76"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 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], 43",
"6"
],
[
"[15, 70, 50, 28, 67, 11, 27, 42, 1, 61, 37, 8, 66, 54, 50, 91, 86, 57, 4], 15",
"48"
],
[
"[-98, -92, -84, -80, -70, -58, -58, -48, -42, -14, -8, 24, 30, 32, 42, 62, 68, 70, 72, 88], 16",
"-366"
],
[
"[1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0], 7",
"1"
],
[
"[4, 5, 5, 10, 12, 13, 16, 19, 19, 21, 22, 25, 26, 29, 30, 33, 34, 44, 46, 52, 55, 55, 56, 78, 86, 88, 88, 90, 92], 16",
"61"
],
[
"[40, -50, -96, 78, 82, -16, 26, 8, 38, 38, 54, -24, 88, 96, -42, -84, -28, -32, -64, 74, 74, -10, -8, 66, 14, -78, 56, -22, -90, 66, -68], 26",
"-474"
],
[
"[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 7",
"0"
],
[
"[29, 38, 20, 25, 16, 97, 16, 90, 30, 99], 9",
"36"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string n ) {
string res = n;
for ( int j = n . length ( ) - 1;
j >= 0;
-- j ) res += n [ j ];
return res;
}
| [] | null | [] | COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X | python | [] | def f_gold ( arr1 , arr2 , m , n , x ) :
count = 0
for i in range ( m ) :
for j in range ( n ) :
if arr1 [ i ] + arr2 [ j ] == x :
count = count + 1
return count
| code_translation | [
[
"[11, 13, 16, 23, 26, 28, 31, 34, 37, 39, 44, 48, 56, 59, 79, 91, 96, 98], [1, 1, 9, 14, 17, 23, 26, 31, 33, 36, 53, 60, 71, 75, 76, 84, 87, 88], 9, 15, 11",
"0"
],
[
"[50, 14, -98, 14, 90, 36, 66, 44, 10, -98, -24, -36, -32, -50], [34, -6, -66, 0, -6, 82, 60, -98, -8, 60, -2, 4, 22, 76], 11, 12, 8",
"5"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 14, 9, 12",
"0"
],
[
"[88, 14, 29, 87, 86, 58], [91, 95, 64, 4, 63, 35], 3, 5, 5",
"0"
],
[
"[-98, -92, -88, -86, -82, -76, -72, -66, -56, -48, -34, -28, -28, -26, -20, -18, -18, -16, -16, -12, -4, 0, 6, 12, 16, 20, 22, 30, 34, 34, 36, 56, 58, 62, 64, 80, 82, 94], [-94, -90, -88, -84, -82, -78, -76, -72, -70, -58, -58, -46, -42, -40, -40, -32, -22, -20, -18, -12, -8, -6, 6, 6, 18, 20, 34, 46, 60, 62, 66, 72, 72, 76, 76, 78, 92, 98], 34, 32, 23",
"0"
],
[
"[1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0], 39, 26, 34",
"0"
],
[
"[70, 70, 74], [15, 55, 84], 1, 1, 1",
"0"
],
[
"[-20, -12, -50, 76, 24, 64, -22, -4, -68], [18, 98, -88, 86, 72, -44, 82, 94, 58], 5, 4, 7",
"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], [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], 27, 26, 37",
"0"
],
[
"[68, 75, 51, 45, 73, 95, 48, 53, 70, 41, 65, 47, 46, 43, 79, 29, 50], [4, 6, 76, 65, 16, 13, 85, 43, 31, 14, 81, 90, 24, 87, 40, 25, 88], 10, 10, 9",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int count = 0;
for ( int i = 5;
n / i >= 1;
i *= 5 ) count += n / i;
return count;
}
| [] | null | [] | CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT | python | [] | def f_gold ( num ) :
if ( num // 10 == 0 ) :
return True
while ( num != 0 ) :
if ( num // 10 == 0 ) :
return True
digit1 = num % 10
digit2 = ( num // 10 ) % 10
if ( abs ( digit2 - digit1 ) > 1 ) :
return False
num = num // 10
return True
| code_translation | [
[
"67",
"True"
],
[
"77",
"True"
],
[
"35",
"False"
],
[
"79",
"False"
],
[
"45",
"True"
],
[
"22",
"True"
],
[
"68",
"False"
],
[
"17",
"False"
],
[
"5",
"True"
],
[
"85",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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;
}
| [] | null | [] | LONGEST_REPEATED_SUBSEQUENCE_1 | python | [] | def f_gold ( str ) :
n = len ( str )
dp = [ [ 0 for i in range ( n + 1 ) ] for j in range ( n + 1 ) ]
for i in range ( 1 , n + 1 ) :
for j in range ( 1 , n + 1 ) :
if ( str [ i - 1 ] == str [ j - 1 ] and i != j ) :
dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]
else :
dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] )
res = ''
i = n
j = n
while ( i > 0 and j > 0 ) :
if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) :
res += str [ i - 1 ]
i -= 1
j -= 1
elif ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) :
i -= 1
else :
j -= 1
res = ''.join ( reversed ( res ) )
return res
| code_translation | [
[
"'qnQxjoRx'",
"'x'"
],
[
"'27473733400077'",
"'7733007'"
],
[
"'000010111111'",
"'0000111111'"
],
[
"'TNVwgrWSLu'",
"''"
],
[
"'9537'",
"''"
],
[
"'1100'",
"'10'"
],
[
"'lYcoiQfzN'",
"''"
],
[
"'52'",
"''"
],
[
"'00100001100'",
"'0000010'"
],
[
"'Rkxe'",
"''"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [
"import math"
] | null | [] | NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES | python | [] | import math
def f_gold ( n ) :
ans = 0
for length in range ( 1 , int ( math.sqrt ( n ) ) + 1 ) :
height = length
while ( height * length <= n ) :
ans += 1
height += 1
return ans
| code_translation | [
[
"34",
"66"
],
[
"49",
"104"
],
[
"41",
"83"
],
[
"17",
"28"
],
[
"67",
"151"
],
[
"38",
"76"
],
[
"59",
"128"
],
[
"64",
"144"
],
[
"61",
"135"
],
[
"58",
"127"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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 );
}
| [] | null | [] | POSITION_ELEMENT_STABLE_SORT | python | [] | def f_gold ( arr , n , idx ) :
result = 0
for i in range ( n ) :
if ( arr [ i ] < arr [ idx ] ) :
result += 1
if ( arr [ i ] == arr [ idx ] and i < idx ) :
result += 1
return result ;
| code_translation | [
[
"[4, 8, 9, 12, 15, 16, 18, 28, 28, 31, 33, 36, 36, 37, 40, 41, 44, 44, 46, 50, 50, 50, 52, 52, 54, 55, 60, 61, 65, 68, 71, 75, 75, 78, 81, 84, 87, 89, 90, 92, 94, 97, 97, 98, 98, 99], 37, 32",
"32"
],
[
"[-16, 86, 94, -86, -38, 64, 96, -64, 94, 10, -10, -62, -50, -46, -62, -32, -4, 72, 14, 36, 74, -66, 46, 82, -44, -22, -26, 16, -8, 0, -90, 94, -50, 22, -82, 8, 92, -84, -34, -36, -66], 31, 27",
"20"
],
[
"[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], 30, 34",
"30"
],
[
"[66, 8, 30, 84, 36, 96, 45, 63, 23, 23, 14, 34, 86, 51, 18, 97, 21, 39, 96, 70, 28, 96, 78, 68, 88, 66, 13, 24, 74, 94], 26, 21",
"24"
],
[
"[-94, -90, -86, -86, -72, -72, -58, -50, -32, -22, -18, -10, -4, -2, -2, 0, 0, 6, 14, 22, 22, 36, 36, 40, 44, 58, 60, 70, 70, 76, 82, 82, 84, 88, 96], 17, 31",
"17"
],
[
"[1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1], 30, 36",
"14"
],
[
"[3, 5, 6, 7, 8, 10, 17, 20, 20, 26, 27, 27, 27, 32, 32, 38, 40, 44, 45, 45, 45, 45, 47, 50, 57, 57, 57, 58, 62, 63, 63, 67, 68, 73, 75, 76, 77, 79, 79, 80, 85, 88, 89, 89, 89, 94, 96, 98], 42, 35",
"35"
],
[
"[98, -92, 18, -18, 44, -88, -90, -66, -38, 78, -22, -46, -20, 64, -10, 54], 14, 12",
"7"
],
[
"[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], 19, 31",
"19"
],
[
"[14, 17], 1, 1",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int x, int y ) {
return ( ( x ^ y ) < 0 );
}
| [] | null | [] | NUMBER_SUBSTRINGS_DIVISIBLE_4_STRING_INTEGERS | python | [] | def f_gold ( s ) :
n = len ( s )
count = 0 ;
for i in range ( 0 , n , 1 ) :
if ( s [ i ] == '4' or s [ i ] == '8' or s [ i ] == '0' ) :
count += 1
for i in range ( 0 , n - 1 , 1 ) :
h = ( ord ( s [ i ] ) - ord ( '0' ) ) * 10 + ( ord ( s [ i + 1 ] ) - ord ( '0' ) )
if ( h % 4 == 0 ) :
count = count + i + 1
return count
| code_translation | [
[
"'Qaq'",
"0"
],
[
"'9400761825850'",
"16"
],
[
"'0011001111'",
"10"
],
[
"'lasWqrLRq'",
"11"
],
[
"'5662'",
"1"
],
[
"'110'",
"1"
],
[
"' tOYKf'",
"6"
],
[
"'6536991235305'",
"11"
],
[
"'11111'",
"0"
],
[
"'uZftT iDHcYiCt'",
"21"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int x = 0, yCount, res = 0;
for ( yCount = 0;
yCount * yCount < n;
yCount ++ );
while ( yCount != 0 ) {
res += yCount;
x ++;
while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount --;
}
return res;
}
| [] | null | [] | SQUARE_ROOT_OF_A_PERFECT_SQUARE | python | [] | def f_gold ( n ) :
x = n
y = 1
e = 0.000001
while ( x - y > e ) :
x = ( x + y ) / 2
y = n / x
return x
| code_translation | [
[
"1763.655093333857",
"41.99589376968351"
],
[
"-3544.737136289062",
"-3544.737136289062"
],
[
"7893.209433000695",
"88.84373605423394"
],
[
"-3008.0331952533734",
"-3008.0331952533734"
],
[
"6155.190186637041",
"78.45502015008492"
],
[
"-5799.751467314729",
"-5799.751467314729"
],
[
"8234.151546380555",
"90.74222584648552"
],
[
"-1829.5367705266551",
"-1829.5367705266551"
],
[
"5778.227173218819",
"76.01465104349802"
],
[
"-7785.473710863676",
"-7785.473710863676"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n ) {
int result = 1;
for ( int i = 1;
i <= n;
++ i ) {
long long y = ( i * ( i + 1 ) ) / 2;
if ( y < n ) result = i;
else break;
}
return result;
}
| [] | null | [] | EFFICIENT_WAY_TO_MULTIPLY_WITH_7 | python | [] | def f_gold ( n ) :
return ( ( n << 3 ) - n )
| code_translation | [
[
"41",
"287"
],
[
"42",
"294"
],
[
"62",
"434"
],
[
"4",
"28"
],
[
"31",
"217"
],
[
"75",
"525"
],
[
"5",
"35"
],
[
"75",
"525"
],
[
"85",
"595"
],
[
"19",
"133"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | MAXIMUM_BINOMIAL_COEFFICIENT_TERM_VALUE | python | [] | def f_gold ( n ) :
C = [ [ 0 for x in range ( n + 1 ) ] for y in range ( n + 1 ) ] ;
for i in range ( n + 1 ) :
for j in range ( min ( i , n ) + 1 ) :
if ( j == 0 or j == i ) :
C [ i ] [ j ] = 1 ;
else :
C [ i ] [ j ] = ( C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ) ;
maxvalue = 0 ;
for i in range ( n + 1 ) :
maxvalue = max ( maxvalue , C [ n ] [ i ] ) ;
return maxvalue ;
| code_translation | [
[
"23",
"1352078"
],
[
"41",
"269128937220"
],
[
"69",
"56093138908331422716"
],
[
"56",
"7648690600760440"
],
[
"71",
"221256270138418389602"
],
[
"38",
"35345263800"
],
[
"26",
"10400600"
],
[
"52",
"495918532948104"
],
[
"93",
"812850570172585125274307760"
],
[
"44",
"2104098963720"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string num ) {
int n = num . size ( );
int rightMin [ n ], right;
rightMin [ n - 1 ] = - 1;
right = n - 1;
for ( int i = n - 2;
i >= 1;
i -- ) {
if ( num [ i ] >= num [ right ] ) rightMin [ i ] = right;
else {
if ( num [ i ] == num [ i + 1 ] ) {
rightMin [ i ] = right;
}
else {
rightMin [ i ] = - 1;
right = i;
}
}
}
int small = - 1;
for ( int i = 1;
i < n;
i ++ ) if ( num [ i ] != '0' ) {
if ( small == - 1 ) {
if ( num [ i ] < num [ 0 ] ) small = i;
}
else if ( num [ i ] <= num [ small ] ) small = i;
}
if ( small != - 1 ) swap ( num [ 0 ], num [ small ] );
else {
for ( int i = 1;
i < n;
i ++ ) {
if ( rightMin [ i ] != - 1 && num [ i ] != num [ rightMin [ i ] ] ) {
swap ( num [ i ], num [ rightMin [ i ] ] );
break;
}
}
}
return num;
}
| [] | null | [] | PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM | python | [] | def f_gold ( l , b , h ) :
return ( ( l * b * h ) / 2 )
| code_translation | [
[
"8448.900678262902, 8135.461799983198, 6577.239053611328",
"226045593884.95786"
],
[
"-1849.728957491451, -4240.89241631363, -9953.518310747193",
"-39040194699.58562"
],
[
"412.667844022232, 9798.083992381831, 1449.9204200270522",
"2931270907.5877957"
],
[
"-5954.835911765373, -661.8872499003203, -8049.6051526695055",
"-15863477478.565292"
],
[
"8437.913444665008, 8182.675681595904, 9863.296545513396",
"340504220608.1437"
],
[
"-7183.181663518317, -6846.746446198541, -971.2199894221352",
"-23882990818.874195"
],
[
"2340.7905920227954, 5479.00956987109, 7073.449591910562",
"45359252560.89365"
],
[
"-7281.157547371143, -615.8705455524116, -3343.0245192607968",
"-7495479637.450533"
],
[
"471.3930826982504, 1357.3753126091392, 1907.815700915636",
"610364933.1115178"
],
[
"-7550.426360065503, -2693.2262997056355, -9110.64755244532",
"-92632540179.42117"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int a [ n ], b [ n ];
a [ 0 ] = b [ 0 ] = 1;
for ( int i = 1;
i < n;
i ++ ) {
a [ i ] = a [ i - 1 ] + b [ i - 1 ];
b [ i ] = a [ i - 1 ];
}
return a [ n - 1 ] + b [ n - 1 ];
}
| [] | null | [] | MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE | python | [] | def f_gold(arr, n):
if (n <= 0):
return 0
incl = arr[0]
excl = 0
for i in range(1, n):
incl_new = arr[i] + min(excl, incl)
excl_new = incl
incl = incl_new
excl = excl_new
return min(incl, excl)
| code_translation | [
[
"[5, 17, 25, 27, 29, 30, 34, 49, 72, 75, 90, 93, 93, 94], 8",
"93"
],
[
"[-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], 36",
"-834"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21",
"5"
],
[
"[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], 29",
"359"
],
[
"[-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], 36",
"-1152"
],
[
"[1, 1, 0, 0, 1, 0, 0, 1, 1, 1], 5",
"1"
],
[
"[9, 15, 19, 29, 30, 39, 40, 61], 4",
"28"
],
[
"[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], 21",
"-314"
],
[
"[0, 0, 0, 1, 1, 1, 1], 5",
"1"
],
[
"[32, 96, 63, 93, 53, 1, 22, 19, 50, 74, 6, 94, 81, 85, 4, 86, 88, 75, 94], 18",
"397"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string num ) {
if ( num . length ( ) >= 3 ) {
int d1 = ( int ) num [ num . length ( ) - 1 ];
if ( d1 % 2 != 0 ) return ( 0 );
int d2 = ( int ) num [ num . length ( ) - 2 ];
int sum = 0;
for ( int i = 0;
i < num . length ( );
i ++ ) sum += num [ i ];
return ( sum % 3 == 0 && ( d2 * 10 + d1 ) % 4 == 0 );
}
else {
int number = stoi ( num );
return ( number % 12 == 0 );
}
}
| [
"import math"
] | null | [] | PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON | python | [] | import math
def f_gold ( side ) :
return ( 2 * ( math.sqrt ( 3 ) ) * ( side * side ) )
| code_translation | [
[
"1449.255716877097",
"7275798.574924052"
],
[
"-8772.104874265995",
"266562009.34357828"
],
[
"2948.419328234334",
"30114046.875937637"
],
[
"-1184.220109553511",
"4857977.358664159"
],
[
"7422.825800698956",
"190866258.51879707"
],
[
"-5808.280006171851",
"116865336.10679008"
],
[
"829.8963781665169",
"2385823.7719733207"
],
[
"-7368.438572511732",
"188079541.63799432"
],
[
"5572.033890611617",
"107551908.5552799"
],
[
"-3998.9441642787706",
"55396369.52612884"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int r, int R, int r1, int x1, int y1 ) {
int dis = sqrt ( x1 * x1 + y1 * y1 );
return ( dis - r1 >= R && dis + r1 <= r );
}
| [] | null | [] | CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER | python | [] | def f_gold ( s , c ) :
oneSeen = False
i = 0
n = len ( s )
while ( i < n ) :
if ( s [ i ] == c ) :
if ( oneSeen == True ) :
return False
while ( i < n and s [ i ] == c ) :
i = i + 1
oneSeen = True
else :
i = i + 1
return True
| code_translation | [
[
"'gILrzLimS', 'm'",
"True"
],
[
"'307471222', '2'",
"True"
],
[
"'110', '0'",
"True"
],
[
"'GcAB', 'v'",
"True"
],
[
"'113', '3'",
"True"
],
[
"'011110010', '0'",
"False"
],
[
"'wcwob', 'w'",
"False"
],
[
"'74571582216153', '1'",
"False"
],
[
"'100000011', '0'",
"True"
],
[
"'ryPErkzY', 'q'",
"True"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string X, string Y ) {
int m = X . length ( );
int n = Y . length ( );
int result = 0;
int len [ 2 ] [ n ];
int currRow = 0;
for ( int i = 0;
i <= m;
i ++ ) {
for ( int j = 0;
j <= n;
j ++ ) {
if ( i == 0 || j == 0 ) {
len [ currRow ] [ j ] = 0;
}
else if ( X [ i - 1 ] == Y [ j - 1 ] ) {
len [ currRow ] [ j ] = len [ 1 - currRow ] [ j - 1 ] + 1;
result = max ( result, len [ currRow ] [ j ] );
}
else {
len [ currRow ] [ j ] = 0;
}
}
currRow = 1 - currRow;
}
return result;
}
| [] | null | [] | MINIMUM_DIFFERENCE_BETWEEN_GROUPS_OF_SIZE_TWO | python | [] | def f_gold ( a , n ) :
a.sort ( ) ;
s = [ ] ;
i = 0 ;
j = n - 1 ;
while ( i < j ) :
s.append ( ( a [ i ] + a [ j ] ) ) ;
i += 1 ;
j -= 1 ;
mini = min ( s ) ;
maxi = max ( s ) ;
return abs ( maxi - mini ) ;
| code_translation | [
[
"[11, 12, 14, 15, 20, 21, 28, 28, 30, 33, 39, 39, 42, 43, 44, 45, 48, 53, 53, 58, 59, 67, 68, 70, 70, 72, 74, 76, 76, 81, 87, 91], 31",
"10"
],
[
"[-94, -84, -70, -62, -60, -56, -44, -42, -30, -14, -14, -12, 0, 14, 18, 28, 42, 52, 58, 58, 88, 92], 11",
"10"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 19",
"1"
],
[
"[2, 4, 4, 6, 8, 9, 10, 21, 24, 28, 28, 31, 31, 31, 32, 34, 36, 37, 38, 44, 46, 46, 48, 49, 49, 61, 61, 64, 66, 67, 70, 70, 76, 76, 78, 78, 85, 90, 97], 37",
"13"
],
[
"[-98, -78, -68, -58, -26, -10, 32, 42, 90, 96], 8",
"38"
],
[
"[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], 35",
"0"
],
[
"[8, 17, 23, 25, 29, 32, 35, 35, 52, 56, 57, 59, 70, 71, 77, 88, 96], 16",
"9"
],
[
"[-10, 18, 46, 62, 82], 3",
"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], 20",
"1"
],
[
"[3, 5, 5, 7, 11, 12, 13, 16, 20, 21, 24, 27, 28, 33, 39, 42, 43, 44, 46, 48, 49, 50, 52, 52, 53, 53, 56, 58, 60, 60, 61, 61, 67, 69, 70, 71, 76, 76, 76, 82, 82, 92, 93, 93, 98], 40",
"16"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b ) {
return ( a / 2 ) + ( b / 2 ) + ( ( a % 2 + b % 2 ) / 2 );
}
| [] | null | [] | PROGRAM_TO_CHECK_IF_A_MATRIX_IS_SYMMETRIC | python | [] | def f_gold ( mat , N ) :
for i in range ( N ) :
for j in range ( N ) :
if ( mat [ i ] [ j ] != mat [ j ] [ i ] ) :
return False
return True
| code_translation | [
[
"[[29]], 0",
"True"
],
[
"[[1, 3, 5], [3, 2, 4], [5, 4, 1]], 3",
"True"
],
[
"[[1, 2, 5], [3, 2, 4], [5, 4, 1]], 3",
"False"
],
[
"[[37, 56, 39, 95, 78, 69, 89, 45, 66, 99, 20, 10, 6, 33, 78, 26, 86, 61, 78, 36, 62, 23, 80, 89, 83], [42, 75, 30, 64, 25, 95, 17, 90, 6, 11, 1, 77, 16, 75, 86, 96, 67, 27, 80, 27, 99, 2, 82, 48, 25], [36, 83, 89, 85, 38, 40, 12, 29, 71, 29, 96, 75, 37, 79, 90, 66, 62, 29, 68, 98, 99, 74, 98, 88, 94], [69, 5, 52, 10, 35, 63, 75, 55, 17, 45, 65, 56, 70, 52, 61, 94, 61, 35, 13, 51, 1, 23, 77, 34, 80], [64, 11, 91, 93, 65, 22, 41, 25, 7, 85, 26, 82, 97, 51, 24, 10, 13, 95, 18, 11, 58, 32, 21, 41, 60], [90, 46, 56, 8, 17, 36, 86, 73, 5, 56, 59, 14, 45, 75, 51, 58, 95, 71, 39, 85, 57, 29, 75, 13, 44], [40, 43, 89, 50, 56, 62, 55, 30, 28, 68, 41, 84, 12, 77, 90, 38, 53, 23, 42, 84, 67, 11, 94, 10, 77], [74, 31, 44, 37, 25, 93, 21, 15, 11, 98, 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, 75, 57, 36, 7, 21, 15, 46, 88, 47, 59, 61, 41, 54, 23, 73, 12], [8, 22, 50, 34, 84, 96, 13, 20, 8, 70, 99, 97, 25, 14, 97, 59, 51, 53, 16, 67, 38, 74, 45, 97, 16], [95, 25, 78, 52, 46, 8, 73, 56, 13, 78, 63, 15, 53, 55, 5, 39, 13, 67, 97, 19, 31, 96, 53, 66, 80], [5, 30, 49, 58, 18, 36, 38, 50, 49, 28, 56, 33, 2, 2, 32, 12, 39, 51, 6, 15, 96, 47, 45, 45, 15], [10, 79, 97, 99, 12, 35, 4, 10, 84, 43, 31, 31, 31, 20, 73, 77, 37, 59, 24, 89, 59, 94, 88, 73, 29], [74, 78, 86, 45, 12, 8, 60, 67, 26, 20, 81, 31, 77, 42, 50, 32, 6, 32, 32, 43, 32, 1, 11, 12, 21], [21, 10, 9, 12, 32, 85, 18, 50, 39, 69, 5, 71, 56, 78, 22, 97, 99, 93, 79, 31, 92, 18, 8, 33, 15], [7, 35, 36, 40, 77, 41, 11, 87, 51, 23, 46, 4, 42, 34, 46, 7, 37, 20, 99, 29, 97, 36, 71, 56, 96], [5, 57, 15, 64, 45, 54, 2, 56, 40, 1, 16, 6, 72, 80, 47, 76, 6, 48, 2, 75, 61, 11, 10, 98, 75], [98, 75, 99, 62, 8, 10, 96, 52, 95, 4, 3, 45, 30, 75, 47, 34, 67, 57, 21, 41, 75, 75, 88, 53, 99], [40, 77, 89, 69, 74, 98, 68, 89, 99, 22, 23, 24, 74, 67, 11, 60, 34, 16, 26, 43, 19, 28, 48, 52, 85], [81, 50, 42, 81, 54, 72, 87, 27, 47, 26, 83, 34, 15, 4, 1, 92, 40, 74, 92, 61, 36, 18, 3, 43, 46], [80, 28, 65, 52, 79, 12, 96, 25, 80, 36, 21, 10, 76, 78, 63, 51, 27, 18, 53, 55, 98, 75, 79, 5, 37], [52, 98, 60, 25, 33, 97, 15, 1, 38, 45, 7, 12, 68, 26, 10, 72, 50, 25, 96, 64, 54, 43, 27, 16, 92], [61, 86, 67, 38, 64, 43, 82, 14, 64, 95, 63, 92, 69, 49, 72, 52, 82, 23, 32, 48, 12, 58, 24, 3, 86], [2, 88, 8, 1, 46, 4, 72, 89, 32, 16, 31, 5, 43, 13, 8, 11, 67, 33, 4, 22, 58, 60, 98, 99, 81]], 21",
"False"
],
[
"[[32, 53, 61, 4, 94, 83, 17, 81, 12, 79, 93, 11, 91, 14, 15], [13, 34, 5, 70, 47, 93, 43, 97, 24, 44, 49, 93, 33, 2, 34], [94, 82, 63, 86, 67, 80, 10, 15, 76, 76, 39, 51, 15, 91, 20], [71, 90, 63, 91, 53, 14, 13, 78, 84, 44, 96, 39, 66, 80, 82], [60, 33, 64, 97, 47, 93, 89, 32, 10, 64, 77, 3, 60, 87, 26], [69, 81, 93, 32, 34, 95, 76, 38, 85, 22, 30, 53, 84, 86, 2], [71, 38, 57, 33, 49, 92, 28, 63, 54, 6, 62, 95, 36, 74, 19], [6, 34, 8, 6, 41, 89, 15, 22, 4, 73, 86, 56, 18, 24, 99], [67, 18, 89, 84, 39, 89, 61, 77, 78, 94, 44, 28, 30, 51, 33], [82, 64, 52, 28, 73, 14, 69, 99, 54, 49, 7, 44, 60, 1, 51], [99, 38, 66, 68, 74, 99, 59, 98, 62, 39, 63, 32, 21, 85, 23], [15, 1, 29, 94, 19, 33, 88, 70, 10, 46, 47, 55, 18, 71, 10], [92, 59, 34, 42, 98, 91, 42, 67, 7, 15, 35, 53, 1, 14, 90], [22, 84, 62, 36, 99, 16, 63, 6, 22, 7, 95, 17, 80, 50, 59], [42, 40, 14, 73, 80, 53, 8, 91, 78, 59, 66, 88, 72, 71, 63]], 13",
"False"
],
[
"[[93, 91, 59, 11, 73, 34, 33, 29, 78, 95, 52, 61, 39, 63, 91, 82, 75, 35, 18, 71, 19, 42, 64], [92, 7, 2, 46, 32, 22, 94, 78, 67, 73, 52, 15, 70, 89, 48, 40, 60, 4, 21, 67, 60, 67, 39], [94, 67, 26, 74, 69, 58, 14, 10, 9, 3, 75, 67, 48, 38, 39, 41, 43, 78, 67, 6, 46, 78, 16], [25, 44, 27, 86, 54, 56, 75, 43, 59, 83, 83, 80, 94, 72, 94, 56, 8, 51, 29, 14, 12, 13, 12], [78, 10, 44, 59, 8, 24, 37, 43, 89, 8, 64, 77, 67, 73, 40, 74, 46, 83, 92, 18, 82, 72, 8], [59, 36, 96, 21, 3, 88, 16, 83, 55, 22, 22, 77, 12, 60, 92, 72, 9, 84, 79, 68, 24, 48, 45], [6, 64, 87, 15, 30, 84, 27, 27, 98, 97, 58, 10, 73, 72, 78, 1, 74, 4, 59, 82, 94, 41, 90], [43, 14, 29, 73, 37, 22, 88, 99, 36, 95, 58, 15, 61, 7, 99, 91, 42, 98, 25, 64, 44, 6, 4], [66, 14, 4, 35, 77, 93, 34, 26, 56, 90, 68, 78, 75, 3, 87, 8, 44, 90, 78, 5, 58, 86, 78], [12, 67, 94, 20, 3, 33, 77, 18, 75, 26, 7, 90, 3, 1, 17, 12, 73, 81, 82, 23, 91, 2, 27], [55, 15, 44, 69, 95, 49, 63, 35, 19, 53, 92, 2, 52, 20, 59, 3, 8, 40, 30, 12, 49, 17, 66], [23, 39, 27, 57, 19, 44, 66, 32, 33, 43, 23, 14, 80, 57, 98, 57, 58, 62, 40, 44, 47, 84, 46], [53, 29, 49, 53, 9, 73, 25, 47, 81, 50, 71, 16, 37, 18, 39, 78, 56, 82, 8, 57, 89, 20, 57], [1, 88, 13, 75, 52, 97, 30, 81, 57, 5, 22, 51, 79, 74, 1, 46, 79, 42, 42, 93, 64, 21, 79], [99, 69, 19, 14, 15, 51, 83, 91, 16, 83, 53, 55, 23, 36, 18, 45, 88, 71, 89, 45, 7, 69, 88], [84, 85, 20, 74, 87, 46, 33, 15, 34, 79, 5, 9, 91, 64, 60, 28, 9, 50, 36, 9, 31, 45, 55], [78, 15, 41, 66, 63, 96, 27, 64, 60, 56, 71, 14, 60, 93, 40, 20, 51, 5, 82, 72, 50, 71, 88], [60, 86, 20, 27, 20, 6, 8, 79, 22, 35, 42, 77, 92, 20, 93, 69, 3, 27, 69, 60, 20, 23, 96], [12, 55, 49, 96, 80, 27, 65, 51, 76, 77, 72, 44, 29, 39, 16, 5, 43, 57, 97, 20, 36, 96, 48], [50, 2, 12, 39, 53, 63, 12, 34, 34, 12, 17, 6, 30, 86, 37, 87, 80, 26, 48, 40, 31, 46, 66], [67, 88, 91, 37, 17, 94, 68, 59, 82, 40, 27, 95, 12, 31, 28, 26, 13, 82, 17, 41, 32, 22, 99], [80, 50, 3, 22, 59, 95, 16, 66, 40, 56, 86, 56, 78, 14, 62, 69, 27, 47, 80, 68, 87, 74, 95], [17, 27, 51, 59, 59, 79, 24, 54, 99, 13, 14, 70, 70, 52, 96, 85, 21, 30, 54, 86, 19, 59, 47]], 12",
"False"
],
[
"[[1, 88, 52, 21, 60, 48, 74, 12, 87, 76, 80, 55, 3, 66, 6, 22, 67, 73, 21, 37, 33, 1, 65, 71, 37, 40, 63, 52, 76, 32, 27, 42, 52], [29, 46, 66, 46, 83, 25, 99, 65, 57, 28, 18, 63, 18, 24, 51, 29, 19, 31, 95, 86, 29, 20, 66, 68, 46, 19, 7, 42, 16, 52, 33, 39, 43], [84, 46, 4, 15, 43, 30, 39, 43, 14, 70, 86, 18, 46, 79, 21, 76, 91, 61, 75, 95, 65, 25, 89, 81, 71, 32, 48, 89, 82, 35, 90, 76, 78], [8, 22, 76, 32, 46, 13, 33, 1, 92, 67, 80, 50, 32, 10, 1, 71, 47, 7, 62, 52, 68, 4, 57, 89, 5, 71, 55, 67, 57, 99, 75, 76, 39], [80, 43, 71, 85, 10, 82, 29, 26, 30, 65, 38, 15, 89, 19, 28, 97, 15, 78, 61, 38, 99, 32, 78, 77, 41, 85, 76, 15, 88, 84, 63, 1, 43], [14, 2, 8, 11, 20, 44, 59, 17, 12, 84, 74, 21, 67, 4, 88, 54, 27, 95, 74, 68, 76, 79, 90, 34, 1, 59, 52, 45, 18, 73, 50, 34, 54], [54, 52, 30, 4, 53, 24, 50, 45, 61, 90, 7, 45, 85, 78, 34, 10, 11, 45, 49, 40, 51, 71, 99, 28, 62, 15, 38, 49, 1, 50, 14, 13, 22], [57, 85, 41, 37, 82, 73, 95, 5, 31, 65, 86, 57, 15, 90, 29, 54, 41, 91, 34, 85, 76, 35, 55, 98, 33, 42, 87, 8, 83, 99, 91, 30, 84], [92, 74, 42, 25, 14, 65, 30, 13, 89, 12, 24, 70, 73, 38, 87, 52, 70, 35, 28, 5, 42, 84, 80, 20, 22, 51, 87, 76, 47, 97, 39, 28, 68], [47, 72, 21, 48, 50, 49, 76, 62, 35, 80, 72, 5, 76, 90, 37, 73, 41, 92, 40, 58, 72, 2, 50, 86, 94, 80, 48, 24, 91, 33, 70, 94, 42], [26, 78, 95, 16, 21, 2, 59, 8, 7, 90, 21, 18, 82, 1, 91, 8, 92, 2, 22, 20, 78, 35, 60, 31, 41, 67, 72, 90, 24, 15, 38, 79, 99], [38, 81, 95, 66, 5, 2, 2, 90, 38, 37, 10, 91, 72, 74, 99, 24, 24, 95, 4, 40, 14, 26, 12, 27, 6, 27, 14, 22, 49, 20, 3, 73, 80], [73, 49, 96, 98, 25, 27, 91, 2, 22, 66, 48, 53, 1, 54, 39, 10, 12, 37, 46, 17, 3, 85, 76, 59, 27, 15, 45, 41, 67, 5, 34, 63, 98], [85, 13, 89, 14, 82, 61, 3, 3, 45, 96, 18, 32, 96, 44, 93, 37, 99, 27, 40, 24, 56, 36, 99, 6, 71, 78, 17, 61, 27, 44, 70, 3, 39], [35, 66, 83, 87, 17, 9, 9, 35, 9, 12, 67, 85, 57, 92, 97, 98, 43, 22, 60, 30, 31, 80, 99, 65, 73, 65, 87, 37, 82, 4, 10, 27, 2], [55, 68, 40, 97, 8, 15, 61, 7, 94, 24, 20, 55, 5, 7, 2, 74, 77, 21, 3, 53, 14, 53, 80, 63, 54, 72, 24, 78, 50, 6, 88, 93, 26], [34, 44, 69, 98, 98, 77, 67, 5, 86, 85, 91, 88, 39, 53, 8, 68, 36, 70, 95, 69, 6, 2, 1, 62, 29, 87, 18, 3, 80, 31, 22, 8, 22], [77, 29, 80, 10, 46, 34, 56, 59, 33, 78, 96, 23, 15, 25, 26, 12, 64, 19, 49, 19, 96, 74, 91, 23, 56, 63, 52, 64, 18, 99, 50, 13, 66], [36, 22, 84, 7, 12, 79, 93, 8, 23, 13, 97, 5, 83, 7, 68, 9, 19, 89, 65, 68, 82, 71, 83, 52, 87, 28, 93, 6, 44, 27, 46, 4, 87], [30, 45, 58, 62, 54, 24, 96, 75, 30, 90, 80, 57, 53, 70, 89, 84, 10, 1, 44, 59, 11, 76, 20, 76, 60, 44, 16, 79, 62, 90, 56, 75, 3], [2, 44, 83, 96, 87, 44, 24, 13, 1, 39, 5, 13, 8, 51, 49, 49, 48, 40, 30, 44, 92, 93, 53, 36, 84, 69, 71, 30, 38, 7, 75, 75, 84], [33, 79, 68, 51, 10, 38, 40, 3, 24, 2, 23, 51, 59, 42, 19, 8, 26, 82, 44, 48, 73, 36, 9, 97, 11, 41, 62, 88, 24, 32, 33, 81, 90], [45, 33, 2, 66, 78, 21, 87, 22, 65, 32, 29, 69, 36, 25, 22, 69, 52, 67, 24, 97, 92, 47, 85, 80, 11, 6, 51, 83, 61, 82, 44, 10, 76], [33, 64, 15, 76, 50, 5, 1, 38, 98, 12, 30, 11, 73, 44, 46, 71, 81, 52, 63, 26, 27, 97, 39, 5, 73, 87, 94, 36, 1, 52, 8, 1, 74], [7, 38, 59, 60, 67, 7, 8, 34, 40, 42, 96, 32, 69, 91, 13, 55, 12, 74, 1, 85, 7, 10, 81, 37, 48, 65, 42, 13, 23, 57, 92, 19, 32], [10, 82, 8, 16, 35, 58, 81, 48, 48, 23, 26, 55, 23, 50, 23, 54, 56, 45, 71, 12, 22, 17, 77, 48, 78, 71, 50, 83, 59, 39, 71, 60, 91], [17, 34, 75, 9, 39, 67, 23, 40, 4, 57, 16, 59, 85, 25, 5, 1, 96, 20, 11, 97, 32, 83, 39, 45, 57, 82, 36, 42, 88, 96, 9, 24, 79], [47, 46, 86, 98, 59, 10, 2, 42, 7, 1, 9, 42, 26, 79, 57, 22, 87, 3, 11, 56, 86, 62, 40, 78, 16, 98, 5, 53, 72, 66, 11, 45, 62], [87, 65, 74, 6, 67, 83, 29, 79, 87, 49, 8, 89, 88, 52, 12, 1, 4, 94, 98, 60, 43, 97, 44, 30, 40, 13, 30, 19, 20, 38, 63, 68, 23], [89, 11, 31, 76, 41, 98, 57, 30, 80, 96, 82, 8, 95, 36, 77, 82, 62, 35, 27, 6, 64, 74, 37, 47, 44, 71, 80, 66, 43, 57, 47, 89, 90], [90, 18, 20, 92, 67, 57, 1, 74, 95, 84, 56, 8, 48, 58, 64, 71, 57, 51, 99, 40, 84, 3, 63, 11, 58, 76, 46, 12, 8, 45, 86, 84, 15], [49, 31, 46, 94, 40, 31, 20, 2, 6, 78, 26, 97, 87, 89, 37, 92, 99, 71, 59, 66, 64, 17, 91, 48, 66, 12, 80, 32, 18, 62, 16, 5, 24], [49, 75, 64, 46, 42, 88, 78, 1, 90, 26, 68, 90, 4, 96, 16, 80, 40, 84, 81, 49, 84, 96, 42, 11, 62, 93, 55, 27, 85, 29, 32, 41, 12]], 22",
"False"
],
[
"[[97, 17, 59, 40, 18, 53, 65, 84, 85, 42, 38, 32, 22, 61, 89, 32, 31, 99, 58, 77, 80, 56, 83, 41, 15, 46, 97, 59, 65, 51, 13, 24, 87, 93, 16, 49, 32, 16, 43, 88, 53, 21, 33, 59, 60], [27, 29, 33, 50, 32, 46, 28, 51, 26, 48, 58, 47, 63, 47, 70, 19, 79, 81, 98, 65, 19, 67, 81, 46, 78, 75, 80, 54, 94, 91, 82, 87, 49, 27, 56, 44, 75, 77, 44, 23, 90, 42, 64, 34, 99], [43, 84, 88, 96, 26, 2, 13, 3, 12, 27, 14, 74, 38, 76, 40, 75, 50, 66, 95, 62, 10, 6, 55, 42, 61, 22, 47, 19, 74, 47, 91, 92, 10, 45, 60, 17, 79, 43, 12, 84, 64, 80, 47, 84, 50], [27, 22, 91, 13, 59, 69, 81, 98, 22, 94, 67, 71, 15, 71, 3, 29, 6, 49, 91, 65, 54, 34, 58, 8, 89, 15, 38, 11, 73, 27, 77, 76, 11, 58, 35, 44, 57, 87, 21, 28, 7, 77, 95, 35, 81], [88, 86, 74, 80, 6, 12, 1, 16, 98, 63, 58, 91, 5, 83, 11, 37, 63, 75, 8, 53, 16, 95, 11, 65, 47, 81, 49, 25, 55, 26, 34, 2, 16, 31, 22, 86, 32, 70, 2, 71, 11, 10, 16, 51, 1], [35, 39, 74, 59, 99, 77, 78, 76, 44, 3, 38, 75, 98, 25, 87, 72, 64, 27, 50, 4, 62, 88, 60, 63, 13, 31, 64, 14, 84, 86, 76, 67, 96, 5, 96, 76, 92, 91, 87, 68, 69, 45, 9, 9, 93], [57, 81, 83, 66, 96, 54, 15, 2, 78, 96, 49, 90, 12, 90, 36, 76, 97, 90, 87, 13, 37, 40, 92, 34, 54, 83, 89, 99, 85, 70, 16, 24, 51, 16, 94, 28, 74, 17, 84, 48, 24, 80, 20, 55, 26], [29, 22, 20, 96, 29, 87, 57, 98, 76, 83, 17, 86, 10, 82, 69, 1, 90, 89, 77, 39, 46, 12, 20, 6, 18, 2, 73, 33, 54, 1, 75, 22, 68, 21, 29, 20, 69, 51, 27, 97, 18, 22, 41, 37, 18], [21, 6, 28, 2, 79, 11, 11, 26, 91, 43, 87, 56, 8, 63, 46, 59, 84, 98, 26, 65, 63, 88, 53, 41, 93, 11, 8, 30, 79, 82, 25, 64, 60, 11, 48, 51, 73, 32, 12, 42, 23, 88, 83, 74, 82], [15, 94, 47, 98, 42, 39, 13, 42, 23, 45, 22, 60, 27, 52, 69, 11, 40, 6, 67, 32, 74, 40, 20, 18, 98, 82, 2, 13, 56, 46, 62, 77, 47, 59, 90, 64, 12, 12, 12, 23, 18, 24, 47, 91, 70], [40, 45, 67, 62, 58, 95, 96, 92, 54, 9, 34, 60, 27, 27, 60, 25, 83, 78, 40, 83, 76, 95, 36, 25, 58, 61, 52, 6, 14, 7, 93, 90, 34, 36, 51, 75, 76, 81, 87, 31, 82, 53, 61, 26, 87], [50, 8, 23, 75, 95, 19, 22, 41, 81, 49, 57, 91, 31, 17, 17, 98, 99, 11, 84, 60, 4, 58, 3, 72, 36, 43, 83, 20, 5, 90, 86, 55, 26, 50, 74, 88, 52, 96, 61, 89, 15, 53, 34, 16, 47], [64, 74, 70, 61, 41, 85, 45, 2, 49, 19, 38, 87, 17, 6, 54, 48, 44, 59, 34, 15, 91, 22, 35, 83, 2, 44, 20, 45, 62, 61, 97, 81, 56, 56, 2, 12, 82, 23, 19, 54, 69, 21, 60, 20, 80], [6, 59, 90, 96, 99, 23, 54, 18, 42, 85, 48, 13, 28, 14, 94, 37, 99, 47, 53, 41, 40, 22, 35, 77, 9, 80, 77, 18, 53, 73, 8, 19, 80, 75, 43, 92, 32, 19, 7, 24, 23, 7, 40, 79, 23], [79, 72, 73, 91, 22, 22, 20, 21, 14, 85, 22, 33, 78, 13, 86, 90, 85, 15, 75, 12, 6, 32, 24, 17, 98, 88, 25, 60, 63, 86, 23, 86, 84, 45, 76, 81, 53, 27, 65, 45, 56, 1, 37, 78, 43], [90, 67, 47, 22, 16, 72, 11, 25, 17, 50, 89, 84, 15, 7, 22, 32, 89, 15, 10, 5, 81, 6, 3, 31, 43, 72, 33, 23, 43, 12, 10, 33, 13, 48, 6, 24, 27, 92, 63, 99, 24, 55, 10, 20, 22], [45, 52, 19, 18, 80, 74, 48, 70, 47, 13, 8, 88, 84, 89, 5, 68, 90, 35, 15, 35, 75, 33, 40, 68, 60, 21, 67, 96, 35, 1, 18, 6, 19, 31, 48, 60, 56, 49, 8, 70, 87, 68, 12, 15, 51], [68, 10, 30, 46, 76, 42, 39, 8, 59, 61, 70, 81, 87, 50, 7, 97, 53, 7, 96, 93, 30, 77, 54, 38, 82, 30, 85, 30, 18, 62, 98, 29, 49, 45, 51, 20, 31, 47, 83, 13, 77, 45, 70, 57, 87], [28, 1, 55, 6, 63, 56, 56, 97, 48, 21, 77, 81, 95, 80, 48, 64, 45, 45, 17, 72, 42, 89, 64, 95, 92, 52, 40, 64, 8, 51, 66, 73, 50, 20, 68, 99, 60, 54, 64, 43, 32, 9, 30, 49, 1], [49, 96, 37, 62, 18, 86, 55, 83, 16, 85, 49, 64, 57, 39, 68, 15, 12, 80, 64, 93, 89, 77, 20, 34, 19, 75, 93, 92, 19, 82, 49, 29, 20, 28, 8, 40, 46, 56, 99, 69, 41, 89, 84, 71, 28], [25, 56, 58, 92, 77, 94, 72, 67, 80, 80, 87, 10, 6, 83, 38, 90, 18, 91, 20, 6, 81, 30, 16, 25, 51, 16, 70, 37, 64, 71, 60, 96, 55, 52, 56, 17, 27, 3, 92, 98, 29, 4, 27, 84, 76], [99, 74, 14, 56, 22, 24, 90, 11, 84, 72, 29, 73, 38, 70, 92, 90, 9, 45, 26, 89, 52, 6, 21, 60, 59, 21, 91, 11, 20, 17, 98, 51, 64, 55, 86, 16, 85, 77, 98, 54, 54, 56, 7, 96, 13], [96, 83, 88, 44, 40, 69, 28, 81, 40, 94, 62, 59, 50, 11, 15, 60, 10, 20, 30, 35, 99, 96, 59, 51, 58, 12, 46, 7, 64, 18, 28, 11, 98, 35, 76, 76, 15, 54, 40, 19, 40, 53, 10, 72, 22], [21, 20, 69, 1, 27, 36, 33, 90, 63, 14, 86, 32, 11, 93, 93, 74, 65, 49, 84, 94, 34, 61, 56, 95, 39, 50, 30, 14, 35, 25, 53, 56, 29, 40, 65, 53, 99, 64, 21, 81, 14, 10, 74, 1, 12], [79, 15, 42, 97, 70, 30, 28, 31, 17, 97, 85, 50, 51, 87, 67, 49, 92, 28, 81, 14, 80, 89, 3, 69, 70, 95, 68, 67, 60, 68, 99, 44, 74, 55, 69, 78, 34, 2, 79, 34, 4, 12, 13, 73, 4], [31, 44, 56, 6, 71, 62, 82, 94, 22, 78, 12, 48, 46, 72, 25, 42, 75, 55, 25, 80, 81, 54, 92, 68, 98, 26, 6, 52, 85, 64, 58, 57, 72, 68, 75, 34, 2, 83, 39, 67, 73, 95, 76, 12, 73], [39, 32, 69, 72, 32, 22, 88, 51, 91, 41, 50, 17, 45, 59, 44, 32, 48, 30, 28, 83, 18, 20, 74, 11, 60, 34, 39, 38, 17, 49, 87, 71, 6, 56, 24, 60, 72, 4, 81, 66, 22, 51, 51, 16, 85], [40, 8, 71, 64, 71, 4, 25, 59, 70, 82, 79, 85, 16, 55, 24, 11, 71, 42, 3, 41, 22, 26, 4, 16, 63, 17, 19, 79, 7, 66, 55, 45, 87, 72, 1, 17, 39, 8, 57, 85, 50, 55, 26, 95, 53], [33, 30, 94, 36, 21, 41, 37, 21, 29, 8, 52, 39, 69, 14, 85, 38, 15, 30, 71, 27, 72, 35, 41, 53, 61, 95, 45, 30, 91, 1, 33, 78, 7, 62, 22, 51, 69, 85, 55, 31, 54, 27, 44, 79, 87], [60, 53, 17, 94, 36, 66, 2, 97, 20, 10, 69, 58, 81, 47, 63, 39, 62, 82, 60, 73, 74, 32, 63, 39, 18, 24, 2, 16, 79, 51, 84, 54, 56, 62, 71, 82, 89, 77, 60, 75, 72, 91, 20, 64, 98], [68, 79, 77, 49, 86, 26, 52, 61, 9, 5, 30, 4, 31, 14, 25, 28, 15, 67, 95, 77, 9, 66, 23, 48, 33, 28, 63, 8, 36, 2, 24, 22, 79, 24, 69, 91, 97, 53, 85, 81, 58, 35, 55, 26, 46], [25, 85, 11, 24, 78, 24, 73, 2, 6, 25, 81, 3, 5, 32, 48, 55, 93, 36, 36, 25, 56, 28, 35, 13, 79, 60, 27, 75, 6, 56, 27, 42, 94, 97, 38, 55, 19, 86, 13, 68, 6, 29, 94, 89, 61], [15, 12, 21, 82, 25, 38, 69, 76, 49, 29, 62, 42, 22, 95, 48, 28, 23, 53, 16, 60, 40, 97, 39, 68, 6, 47, 11, 10, 31, 71, 14, 59, 6, 58, 18, 33, 30, 84, 92, 1, 57, 81, 59, 26, 53], [18, 24, 18, 39, 79, 36, 90, 32, 84, 70, 91, 72, 39, 86, 37, 38, 71, 73, 34, 98, 28, 63, 73, 30, 41, 95, 8, 8, 78, 9, 98, 25, 9, 64, 3, 96, 27, 74, 66, 82, 59, 40, 24, 23, 41], [53, 49, 66, 61, 64, 34, 27, 64, 60, 35, 53, 72, 71, 58, 13, 76, 77, 53, 17, 57, 60, 15, 78, 19, 35, 18, 17, 84, 25, 37, 23, 23, 75, 46, 84, 7, 87, 62, 23, 91, 85, 21, 58, 96, 50], [28, 66, 93, 9, 35, 61, 68, 86, 23, 6, 84, 69, 12, 59, 65, 39, 41, 3, 42, 43, 85, 66, 96, 29, 47, 92, 97, 26, 15, 45, 90, 73, 61, 85, 20, 49, 27, 65, 9, 58, 51, 38, 84, 19, 44], [11, 78, 89, 76, 45, 7, 3, 80, 62, 1, 15, 44, 11, 1, 3, 22, 43, 6, 22, 50, 28, 78, 96, 29, 5, 35, 11, 1, 7, 3, 86, 31, 3, 17, 18, 79, 99, 80, 94, 99, 17, 79, 42, 27, 65], [30, 30, 69, 65, 4, 11, 58, 13, 10, 88, 84, 18, 87, 42, 99, 44, 62, 91, 79, 24, 30, 65, 41, 67, 24, 32, 63, 4, 98, 1, 21, 8, 46, 12, 1, 22, 78, 89, 28, 72, 64, 40, 89, 55, 87], [60, 41, 80, 59, 68, 36, 33, 94, 45, 75, 50, 47, 77, 44, 68, 88, 33, 97, 76, 21, 97, 46, 97, 73, 31, 62, 94, 16, 12, 54, 9, 35, 53, 43, 70, 89, 56, 64, 28, 87, 29, 86, 58, 24, 20], [27, 97, 19, 90, 38, 60, 3, 23, 59, 91, 91, 74, 24, 56, 52, 41, 66, 98, 22, 66, 28, 88, 38, 86, 67, 58, 37, 2, 57, 87, 77, 79, 97, 45, 53, 77, 84, 7, 77, 39, 68, 63, 46, 91, 96], [2, 15, 5, 3, 16, 49, 90, 6, 35, 38, 84, 86, 64, 85, 32, 1, 48, 23, 18, 17, 31, 93, 54, 77, 60, 66, 73, 96, 86, 18, 18, 83, 63, 31, 29, 88, 97, 83, 80, 51, 32, 21, 30, 7, 38], [12, 59, 92, 14, 71, 17, 23, 77, 20, 5, 6, 13, 3, 53, 31, 3, 8, 71, 50, 71, 75, 88, 59, 21, 20, 93, 74, 49, 80, 74, 38, 33, 69, 59, 12, 8, 70, 87, 48, 67, 38, 93, 34, 4, 7], [85, 74, 96, 89, 77, 85, 83, 59, 8, 61, 50, 84, 8, 16, 48, 62, 56, 28, 74, 21, 44, 79, 70, 41, 35, 56, 85, 17, 26, 63, 74, 34, 71, 32, 4, 10, 79, 56, 35, 33, 25, 47, 11, 34, 36], [17, 12, 80, 97, 26, 74, 13, 82, 85, 87, 87, 36, 69, 45, 79, 88, 12, 83, 97, 89, 38, 77, 88, 67, 76, 66, 20, 40, 34, 22, 15, 97, 66, 35, 98, 91, 31, 77, 53, 94, 90, 88, 57, 65, 38], [38, 86, 10, 46, 27, 42, 2, 58, 19, 62, 11, 14, 57, 33, 44, 18, 29, 30, 3, 32, 15, 49, 87, 60, 98, 46, 80, 50, 6, 80, 20, 49, 28, 26, 56, 48, 6, 53, 59, 80, 33, 12, 78, 39, 2]], 34",
"False"
],
[
"[[19, 98, 9, 31, 79, 4, 63, 46, 32, 81, 5, 39, 97, 92, 13, 68, 28, 13, 92, 57, 99, 24, 9, 7, 22, 3, 72, 4, 42, 2, 53, 46, 6, 57, 86, 3, 17, 74, 88, 60, 39, 28, 45, 94], [92, 4, 82, 39, 3, 65, 97, 16, 46, 94, 40, 55, 97, 36, 60, 95, 36, 36, 47, 48, 10, 22, 28, 36, 32, 13, 34, 63, 65, 80, 91, 22, 31, 48, 93, 22, 71, 55, 40, 4, 78, 43, 81, 65], [2, 82, 3, 56, 85, 77, 49, 27, 60, 67, 69, 37, 48, 66, 94, 70, 27, 77, 5, 52, 58, 25, 91, 62, 16, 48, 71, 52, 67, 15, 81, 67, 61, 66, 69, 24, 95, 44, 71, 25, 20, 89, 66, 66], [10, 50, 70, 11, 93, 30, 85, 27, 42, 36, 45, 97, 27, 56, 37, 70, 39, 8, 76, 47, 67, 54, 9, 43, 12, 40, 3, 97, 77, 12, 37, 7, 70, 41, 4, 87, 4, 67, 38, 27, 11, 93, 93, 37], [58, 8, 32, 78, 84, 88, 93, 60, 65, 10, 19, 39, 45, 48, 18, 71, 88, 86, 16, 6, 71, 82, 99, 49, 88, 80, 19, 83, 65, 22, 31, 14, 30, 95, 51, 32, 43, 17, 92, 98, 62, 17, 61, 6], [93, 9, 31, 30, 59, 73, 10, 64, 33, 3, 93, 53, 41, 78, 15, 10, 80, 97, 92, 39, 24, 79, 13, 83, 11, 13, 40, 59, 96, 54, 61, 90, 59, 80, 17, 13, 13, 15, 11, 1, 35, 82, 44, 58], [1, 86, 52, 66, 94, 53, 82, 65, 3, 74, 48, 15, 67, 77, 62, 88, 30, 43, 32, 99, 35, 55, 15, 34, 98, 82, 99, 23, 32, 50, 50, 83, 93, 40, 44, 12, 68, 22, 43, 79, 85, 42, 99, 19], [72, 79, 4, 25, 51, 60, 37, 26, 73, 44, 55, 50, 31, 70, 25, 60, 6, 19, 5, 69, 59, 54, 5, 49, 20, 54, 77, 73, 78, 13, 97, 48, 87, 94, 63, 82, 82, 43, 78, 12, 39, 91, 57, 93], [71, 79, 83, 9, 84, 62, 22, 36, 96, 3, 82, 16, 3, 76, 88, 58, 75, 23, 33, 68, 61, 14, 38, 73, 98, 53, 61, 33, 83, 67, 56, 61, 38, 27, 40, 6, 96, 48, 18, 32, 84, 36, 79, 23], [14, 85, 46, 3, 7, 17, 68, 58, 50, 99, 70, 96, 99, 46, 59, 22, 72, 91, 28, 2, 59, 54, 66, 63, 27, 7, 12, 8, 9, 86, 18, 92, 38, 34, 70, 95, 15, 61, 68, 5, 87, 77, 61, 27], [45, 58, 95, 19, 30, 63, 94, 5, 62, 75, 74, 41, 65, 79, 85, 86, 96, 26, 77, 69, 78, 54, 55, 68, 8, 9, 95, 3, 27, 9, 93, 98, 29, 74, 77, 65, 40, 78, 96, 80, 56, 26, 33, 95], [72, 25, 97, 94, 1, 1, 27, 68, 37, 24, 44, 88, 6, 39, 65, 93, 88, 77, 92, 15, 64, 31, 86, 76, 17, 26, 77, 53, 41, 45, 81, 26, 51, 92, 38, 50, 42, 42, 32, 85, 9, 80, 5, 38], [9, 70, 79, 82, 69, 41, 74, 80, 27, 40, 53, 23, 92, 75, 4, 68, 80, 28, 29, 58, 17, 70, 18, 13, 64, 60, 61, 35, 89, 55, 35, 42, 11, 76, 54, 38, 32, 78, 25, 97, 98, 59, 70, 57], [41, 4, 7, 99, 19, 31, 20, 21, 25, 12, 98, 17, 96, 1, 79, 65, 63, 25, 71, 34, 44, 70, 1, 79, 77, 21, 77, 40, 17, 17, 76, 34, 39, 75, 14, 79, 87, 4, 33, 25, 41, 86, 32, 1], [63, 88, 53, 7, 43, 37, 70, 15, 34, 63, 65, 72, 35, 76, 46, 24, 1, 77, 79, 34, 37, 13, 16, 36, 70, 98, 76, 54, 44, 38, 47, 49, 36, 64, 63, 24, 68, 89, 11, 46, 3, 7, 54, 11], [65, 41, 55, 59, 26, 54, 14, 47, 16, 12, 93, 59, 32, 10, 93, 83, 55, 73, 89, 19, 39, 9, 17, 91, 8, 87, 55, 77, 41, 8, 13, 77, 55, 81, 20, 69, 25, 16, 43, 82, 59, 73, 35, 10], [99, 19, 13, 89, 69, 81, 34, 43, 87, 67, 10, 32, 97, 71, 13, 38, 11, 15, 87, 83, 8, 49, 88, 66, 30, 44, 54, 97, 83, 31, 24, 86, 39, 93, 34, 61, 4, 50, 53, 81, 28, 38, 4, 16], [42, 43, 64, 31, 79, 9, 68, 83, 34, 88, 11, 35, 28, 92, 11, 38, 98, 15, 61, 8, 65, 24, 50, 10, 17, 78, 1, 11, 41, 3, 17, 64, 75, 88, 33, 32, 25, 91, 47, 43, 81, 81, 57, 40], [68, 82, 75, 41, 40, 76, 37, 74, 15, 58, 58, 11, 98, 99, 8, 31, 15, 93, 79, 64, 31, 7, 94, 89, 79, 77, 74, 19, 49, 15, 3, 18, 22, 96, 95, 74, 45, 21, 34, 93, 74, 28, 54, 10], [32, 78, 32, 52, 30, 56, 72, 19, 22, 88, 28, 41, 43, 69, 73, 72, 59, 56, 82, 40, 77, 70, 16, 18, 42, 81, 2, 82, 64, 11, 55, 2, 2, 57, 18, 86, 16, 27, 17, 54, 17, 6, 97, 13], [6, 90, 83, 19, 61, 90, 86, 11, 86, 96, 7, 86, 6, 15, 38, 41, 56, 18, 35, 98, 45, 29, 69, 88, 32, 94, 5, 44, 98, 50, 82, 21, 22, 61, 39, 85, 99, 5, 33, 71, 24, 39, 72, 15], [70, 5, 87, 48, 20, 76, 21, 86, 89, 12, 66, 30, 7, 58, 18, 60, 18, 92, 48, 34, 72, 83, 6, 45, 60, 71, 84, 24, 93, 92, 69, 17, 62, 33, 62, 6, 3, 74, 54, 11, 87, 46, 4, 7], [26, 97, 35, 28, 41, 50, 99, 39, 80, 10, 71, 7, 25, 69, 90, 30, 11, 71, 39, 26, 57, 55, 22, 12, 64, 86, 66, 60, 62, 52, 62, 76, 65, 15, 40, 7, 55, 37, 86, 97, 33, 29, 19, 69], [14, 9, 5, 35, 85, 28, 45, 2, 6, 31, 32, 75, 59, 14, 74, 59, 1, 55, 31, 59, 8, 66, 99, 95, 12, 31, 99, 96, 81, 57, 8, 19, 53, 11, 57, 69, 59, 28, 2, 11, 64, 18, 47, 53], [5, 19, 5, 40, 83, 76, 92, 48, 99, 23, 55, 34, 87, 97, 58, 77, 98, 93, 30, 61, 82, 56, 99, 5, 4, 69, 39, 79, 73, 50, 72, 74, 22, 88, 24, 73, 22, 34, 48, 76, 81, 4, 57, 63], [30, 65, 97, 91, 78, 4, 35, 33, 51, 12, 68, 98, 78, 2, 91, 95, 33, 91, 45, 56, 28, 98, 30, 34, 1, 52, 13, 82, 40, 65, 9, 70, 72, 72, 88, 49, 25, 26, 26, 40, 34, 8, 2, 82], [16, 92, 72, 63, 18, 39, 42, 83, 32, 62, 32, 85, 93, 69, 84, 22, 27, 1, 13, 97, 6, 13, 78, 72, 67, 37, 76, 8, 93, 20, 62, 23, 68, 25, 32, 58, 25, 69, 10, 64, 31, 4, 57, 71], [34, 21, 83, 7, 98, 58, 33, 42, 53, 85, 55, 50, 38, 81, 46, 81, 15, 8, 49, 53, 37, 83, 93, 38, 97, 28, 61, 97, 7, 99, 72, 7, 59, 21, 25, 67, 32, 48, 55, 75, 85, 96, 66, 23], [45, 10, 78, 55, 60, 9, 83, 3, 32, 54, 87, 83, 76, 23, 14, 36, 48, 67, 10, 86, 68, 79, 52, 99, 49, 44, 5, 92, 91, 15, 94, 8, 55, 20, 77, 6, 1, 46, 42, 82, 70, 49, 90, 34], [57, 17, 89, 63, 61, 59, 92, 79, 4, 91, 33, 20, 21, 41, 74, 44, 32, 64, 37, 61, 26, 22, 40, 59, 50, 77, 96, 73, 39, 16, 98, 74, 88, 10, 45, 90, 34, 63, 68, 93, 86, 89, 11, 84], [88, 95, 25, 69, 31, 57, 87, 53, 81, 66, 56, 66, 91, 22, 81, 53, 57, 33, 5, 13, 17, 43, 84, 84, 92, 12, 84, 71, 56, 69, 29, 25, 11, 41, 11, 96, 38, 82, 62, 79, 81, 24, 44, 19], [37, 5, 4, 1, 94, 17, 43, 50, 30, 64, 82, 36, 1, 69, 82, 29, 81, 85, 66, 36, 62, 20, 83, 54, 82, 13, 47, 75, 97, 28, 55, 43, 44, 21, 94, 53, 47, 96, 87, 25, 96, 41, 31, 13], [6, 1, 8, 56, 62, 87, 69, 93, 22, 64, 69, 17, 18, 45, 54, 39, 65, 95, 88, 54, 16, 69, 32, 26, 35, 53, 43, 41, 24, 44, 79, 23, 75, 94, 45, 94, 55, 70, 69, 64, 14, 30, 4, 6], [39, 18, 51, 56, 89, 57, 59, 61, 17, 97, 38, 76, 81, 89, 37, 17, 91, 31, 14, 53, 36, 86, 5, 40, 70, 69, 88, 22, 14, 25, 84, 65, 49, 35, 52, 92, 29, 58, 72, 82, 31, 21, 6, 9], [30, 18, 30, 84, 60, 55, 10, 13, 41, 2, 5, 33, 65, 37, 61, 58, 12, 41, 28, 82, 36, 94, 42, 54, 54, 38, 85, 71, 69, 58, 99, 79, 9, 48, 18, 12, 27, 78, 77, 94, 36, 49, 9, 34], [76, 50, 89, 50, 22, 5, 15, 18, 77, 15, 89, 98, 66, 21, 87, 81, 61, 4, 48, 1, 7, 61, 53, 95, 35, 21, 60, 76, 5, 3, 59, 76, 10, 46, 50, 62, 59, 94, 17, 56, 44, 19, 18, 26], [28, 49, 32, 20, 85, 46, 58, 16, 76, 1, 46, 32, 14, 14, 83, 65, 25, 42, 13, 53, 68, 60, 84, 68, 41, 6, 26, 91, 22, 29, 40, 66, 36, 87, 19, 16, 88, 34, 63, 25, 75, 69, 84, 14], [21, 90, 44, 52, 79, 85, 80, 75, 48, 78, 85, 62, 80, 2, 42, 66, 28, 5, 8, 73, 81, 83, 42, 26, 95, 98, 93, 74, 58, 11, 97, 95, 22, 54, 93, 41, 85, 40, 12, 16, 43, 26, 94, 87], [97, 88, 6, 98, 19, 23, 25, 93, 16, 2, 93, 58, 97, 18, 44, 54, 9, 2, 55, 5, 20, 4, 5, 17, 5, 50, 72, 96, 25, 25, 89, 42, 31, 92, 47, 79, 51, 55, 60, 27, 39, 78, 13, 96], [35, 48, 14, 36, 53, 39, 5, 72, 10, 2, 95, 39, 25, 34, 79, 56, 81, 22, 33, 70, 58, 82, 30, 63, 67, 95, 12, 10, 62, 63, 36, 56, 6, 31, 33, 74, 63, 38, 26, 16, 24, 24, 73, 25], [23, 54, 67, 32, 74, 47, 35, 86, 14, 25, 59, 54, 79, 94, 95, 78, 8, 8, 95, 3, 97, 12, 32, 96, 21, 74, 41, 42, 57, 90, 77, 62, 73, 97, 95, 56, 12, 56, 58, 23, 89, 93, 33, 18], [41, 12, 62, 58, 4, 13, 31, 22, 39, 58, 30, 34, 95, 6, 90, 49, 45, 77, 93, 50, 26, 39, 86, 52, 4, 35, 5, 28, 21, 73, 10, 55, 33, 40, 5, 73, 81, 33, 81, 70, 91, 91, 78, 5], [81, 4, 71, 37, 78, 13, 29, 98, 98, 39, 48, 89, 35, 62, 20, 95, 59, 44, 54, 89, 58, 93, 52, 50, 46, 98, 10, 19, 11, 40, 40, 36, 87, 55, 44, 89, 44, 45, 85, 63, 91, 2, 6, 99], [73, 20, 55, 97, 47, 93, 27, 1, 13, 67, 65, 84, 58, 90, 76, 70, 50, 9, 55, 36, 20, 10, 10, 31, 84, 89, 45, 31, 9, 88, 4, 45, 24, 78, 72, 91, 53, 94, 78, 40, 58, 82, 77, 29]], 37",
"False"
],
[
"[[91, 36, 24, 57], [88, 3, 45, 19], [49, 9, 86, 22], [55, 16, 72, 81]], 3",
"False"
],
[
"[[27, 35, 35, 78, 52, 41, 22, 22, 75, 96, 91, 20, 46, 34, 83, 62, 10, 13, 92, 8, 86, 54, 92, 16, 17, 40, 49, 62, 19, 49, 38, 82, 62, 37, 93, 15, 85], [61, 56, 7, 36, 86, 37, 70, 40, 78, 17, 1, 44, 66, 42, 45, 46, 55, 21, 5, 84, 41, 86, 40, 87, 65, 13, 88, 89, 92, 68, 23, 4, 40, 61, 58, 98, 84], [17, 30, 92, 24, 95, 96, 38, 59, 63, 93, 64, 71, 52, 54, 15, 56, 70, 54, 81, 97, 61, 44, 1, 63, 59, 3, 13, 11, 61, 12, 82, 80, 33, 41, 4, 88, 47], [46, 54, 71, 9, 83, 93, 70, 36, 58, 86, 86, 38, 43, 67, 25, 78, 5, 18, 28, 30, 70, 95, 18, 25, 34, 72, 92, 71, 63, 98, 25, 65, 59, 66, 98, 96, 63], [12, 44, 54, 26, 54, 86, 31, 97, 22, 48, 8, 80, 28, 78, 68, 24, 83, 25, 47, 17, 66, 91, 8, 62, 37, 5, 46, 4, 59, 70, 29, 8, 48, 74, 99, 61, 53], [74, 64, 16, 76, 25, 79, 64, 78, 60, 70, 67, 27, 17, 89, 35, 69, 62, 94, 82, 84, 27, 44, 81, 63, 98, 56, 8, 57, 76, 61, 99, 3, 47, 14, 45, 79, 39], [67, 24, 62, 2, 69, 68, 2, 62, 11, 17, 12, 83, 77, 83, 84, 21, 56, 31, 31, 69, 40, 2, 11, 52, 24, 48, 62, 95, 2, 90, 17, 60, 55, 49, 75, 55, 42], [77, 90, 94, 20, 72, 64, 84, 75, 28, 75, 73, 36, 27, 6, 28, 13, 87, 47, 11, 85, 39, 24, 75, 45, 90, 48, 42, 84, 59, 29, 68, 82, 46, 58, 12, 32, 95], [8, 89, 11, 26, 41, 60, 19, 48, 17, 63, 10, 34, 93, 51, 45, 28, 18, 96, 36, 5, 82, 80, 3, 6, 97, 60, 80, 44, 66, 66, 69, 92, 52, 1, 5, 68, 93], [66, 79, 5, 59, 95, 26, 14, 41, 75, 83, 74, 52, 42, 81, 82, 60, 89, 15, 47, 33, 95, 37, 47, 36, 70, 46, 52, 72, 75, 26, 29, 2, 24, 18, 33, 85, 86], [33, 32, 33, 40, 62, 14, 45, 26, 27, 10, 71, 81, 43, 68, 97, 16, 24, 21, 93, 50, 79, 62, 92, 52, 18, 8, 9, 59, 44, 70, 98, 67, 18, 83, 73, 13, 40], [69, 47, 24, 37, 44, 46, 44, 75, 60, 74, 3, 17, 51, 5, 35, 82, 91, 90, 57, 31, 77, 60, 80, 50, 22, 80, 72, 32, 18, 33, 64, 45, 38, 30, 64, 42, 13], [77, 68, 42, 6, 79, 27, 96, 53, 7, 31, 88, 66, 72, 71, 65, 8, 53, 68, 30, 83, 61, 37, 84, 45, 53, 13, 32, 62, 2, 77, 8, 96, 48, 14, 85, 33, 36], [85, 59, 70, 69, 48, 30, 28, 41, 76, 58, 41, 11, 6, 20, 91, 29, 73, 48, 71, 85, 82, 15, 2, 97, 75, 53, 55, 70, 13, 44, 58, 17, 41, 25, 69, 14, 29], [52, 30, 12, 91, 95, 93, 91, 69, 9, 26, 27, 15, 79, 98, 14, 2, 46, 70, 80, 73, 80, 44, 86, 19, 72, 44, 45, 85, 67, 79, 66, 22, 17, 58, 80, 47, 14], [41, 69, 55, 21, 80, 31, 32, 80, 9, 37, 9, 21, 56, 8, 24, 80, 95, 20, 5, 50, 2, 67, 58, 96, 89, 99, 30, 15, 93, 2, 70, 93, 22, 70, 93, 62, 81], [96, 82, 25, 18, 46, 75, 69, 63, 54, 27, 44, 62, 70, 75, 29, 96, 4, 69, 60, 82, 72, 23, 38, 62, 12, 85, 22, 96, 58, 92, 61, 18, 67, 94, 77, 65, 35], [39, 26, 17, 50, 32, 22, 39, 89, 32, 88, 59, 8, 44, 30, 77, 23, 64, 77, 30, 70, 94, 98, 17, 88, 73, 54, 19, 31, 25, 97, 38, 55, 50, 37, 35, 96, 60], [86, 67, 75, 88, 98, 30, 15, 75, 84, 88, 74, 39, 99, 42, 95, 27, 5, 76, 98, 75, 29, 62, 91, 56, 43, 80, 79, 13, 97, 5, 94, 50, 49, 90, 73, 69, 99], [55, 59, 1, 67, 9, 26, 66, 92, 20, 90, 14, 2, 21, 59, 19, 46, 15, 32, 36, 78, 35, 9, 98, 95, 25, 41, 44, 74, 98, 49, 55, 15, 66, 62, 26, 42, 35], [45, 32, 62, 64, 52, 96, 43, 92, 55, 44, 91, 79, 59, 54, 88, 85, 1, 85, 87, 22, 50, 31, 50, 29, 39, 1, 65, 50, 18, 49, 75, 37, 70, 76, 35, 72, 43], [65, 43, 66, 35, 34, 42, 80, 8, 6, 40, 68, 23, 63, 14, 89, 58, 36, 34, 76, 21, 45, 58, 15, 45, 17, 50, 88, 55, 92, 31, 31, 85, 97, 10, 66, 53, 11], [56, 79, 89, 34, 87, 43, 92, 68, 3, 14, 29, 85, 17, 70, 45, 53, 50, 48, 69, 65, 74, 5, 28, 96, 71, 42, 60, 2, 22, 92, 97, 95, 98, 10, 28, 88, 78], [36, 61, 2, 51, 34, 35, 43, 11, 32, 38, 47, 81, 85, 95, 5, 64, 86, 53, 29, 1, 30, 26, 86, 10, 13, 25, 15, 1, 75, 44, 35, 13, 19, 48, 12, 73, 84], [82, 64, 25, 6, 5, 38, 12, 55, 66, 67, 26, 51, 31, 6, 30, 96, 82, 39, 9, 99, 73, 63, 70, 99, 4, 30, 45, 26, 74, 70, 31, 26, 71, 8, 61, 85, 38], [48, 62, 97, 16, 3, 62, 56, 67, 99, 87, 12, 88, 55, 13, 15, 7, 24, 13, 19, 67, 5, 50, 74, 64, 48, 49, 84, 80, 63, 7, 98, 34, 79, 5, 57, 74, 42], [72, 85, 45, 71, 40, 9, 64, 93, 60, 20, 17, 39, 63, 22, 71, 45, 28, 6, 81, 66, 61, 8, 7, 80, 66, 22, 43, 49, 71, 26, 98, 54, 39, 12, 41, 99, 2], [52, 93, 84, 53, 55, 19, 26, 37, 13, 87, 25, 58, 47, 23, 3, 51, 78, 79, 35, 78, 17, 6, 58, 84, 48, 10, 14, 27, 68, 83, 52, 51, 45, 66, 57, 27, 47], [88, 42, 63, 58, 68, 66, 46, 22, 85, 54, 78, 84, 98, 84, 33, 73, 42, 38, 77, 13, 55, 69, 97, 58, 49, 50, 46, 1, 91, 39, 6, 52, 68, 73, 63, 90, 2], [61, 24, 64, 5, 65, 50, 55, 35, 71, 4, 50, 85, 73, 90, 58, 1, 20, 75, 32, 13, 28, 10, 2, 5, 71, 97, 71, 66, 14, 85, 18, 14, 13, 83, 21, 30, 35], [96, 51, 55, 58, 82, 71, 12, 74, 38, 3, 46, 73, 57, 71, 26, 46, 48, 18, 63, 44, 57, 59, 82, 62, 46, 18, 85, 15, 6, 60, 59, 82, 23, 32, 35, 55, 35], [2, 24, 90, 62, 90, 44, 4, 22, 51, 16, 56, 30, 66, 37, 18, 19, 94, 9, 31, 82, 69, 74, 86, 49, 40, 80, 23, 94, 60, 10, 75, 92, 30, 25, 27, 72, 74], [98, 93, 17, 27, 23, 91, 74, 80, 70, 1, 89, 49, 17, 33, 32, 14, 4, 96, 62, 17, 89, 14, 6, 11, 28, 9, 72, 30, 60, 44, 38, 80, 64, 84, 74, 62, 53], [99, 7, 63, 10, 21, 94, 70, 34, 12, 75, 55, 68, 87, 33, 33, 14, 2, 3, 52, 18, 35, 68, 8, 71, 37, 44, 26, 11, 57, 81, 69, 77, 20, 99, 82, 14, 77], [86, 13, 54, 5, 89, 15, 79, 15, 86, 36, 85, 17, 13, 59, 94, 16, 60, 16, 50, 99, 49, 2, 8, 91, 69, 92, 58, 52, 5, 23, 42, 74, 26, 71, 82, 83, 2], [89, 44, 88, 67, 64, 70, 91, 85, 18, 33, 46, 80, 57, 85, 66, 51, 45, 2, 39, 3, 80, 28, 28, 97, 31, 44, 20, 11, 11, 39, 6, 64, 63, 60, 63, 31, 38], [99, 18, 9, 42, 28, 67, 23, 10, 5, 2, 25, 60, 87, 67, 53, 17, 41, 33, 92, 5, 87, 73, 70, 6, 73, 81, 13, 3, 73, 14, 67, 36, 84, 46, 82, 1, 20]], 36",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int side ) {
int area = side * side;
return area;
}
| [
"import math"
] | null | [] | FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE | python | [] | import math
def f_gold ( n ) :
count = 0
ans = 1
while n % 2 == 0 :
count += 1
n //= 2
if count % 2 is not 0 :
ans *= 2
for i in range ( 3 , ( int ) ( math.sqrt ( n ) ) + 1 , 2 ) :
count = 0
while n % i == 0 :
count += 1
n //= i
if count % 2 is not 0 :
ans *= i
if n > 2 :
ans *= n
return ans
| code_translation | [
[
"95",
"95"
],
[
"48",
"3"
],
[
"3",
"3"
],
[
"10",
"10"
],
[
"82",
"82"
],
[
"1",
"1"
],
[
"77",
"77"
],
[
"99",
"11"
],
[
"23",
"23"
],
[
"61",
"61"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int N, int K ) {
sort ( arr, arr + N );
int dp [ N ];
dp [ 0 ] = 0;
for ( int i = 1;
i < N;
i ++ ) {
dp [ i ] = dp [ i - 1 ];
if ( arr [ i ] - arr [ i - 1 ] < K ) {
if ( i >= 2 ) dp [ i ] = max ( dp [ i ], dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] );
else dp [ i ] = max ( dp [ i ], arr [ i ] + arr [ i - 1 ] );
}
}
return dp [ N - 1 ];
}
| [] | null | [] | FIND_SUM_NON_REPEATING_DISTINCT_ELEMENTS_ARRAY | python | [] | def f_gold ( arr , n ) :
s = set ( )
sum = 0
for i in range ( n ) :
if arr [ i ] not in s :
s.add ( arr [ i ] )
for i in s :
sum = sum + i
return sum
| code_translation | [
[
"[5, 6, 8, 10, 21, 22, 27, 32, 35, 36, 43, 44, 46, 48, 49, 55, 60, 61, 69, 69, 71, 72, 73, 78, 88, 94], 24",
"971"
],
[
"[80, 94, 16, -74, 32, -64, -84, -66, -10], 6",
"84"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 27",
"1"
],
[
"[99, 4, 96, 39, 39, 24, 15, 47, 25, 74, 7, 98, 88, 91, 62, 12, 31, 14, 48, 26, 37, 25, 11, 32, 34, 64, 72, 5, 80, 86, 6], 15",
"769"
],
[
"[-86, -84, -84, -78, -78, -76, -74, -68, -66, -64, -60, -60, -56, -50, -42, -42, -38, -34, -32, -22, -16, -14, -10, -6, -6, 4, 4, 26, 36, 36, 54, 62, 64, 68, 70, 76, 76, 76, 84, 92, 92, 94, 96], 27",
"-972"
],
[
"[1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1], 25",
"1"
],
[
"[3, 3, 5, 8, 32, 33, 35, 35, 42, 48, 67, 71, 71, 74, 77, 80, 94, 96, 96, 97], 19",
"765"
],
[
"[-50, -18, -66, 76, -54, 96, 98, 26, 42, 64, -60], 9",
"150"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 15",
"1"
],
[
"[70, 21, 44, 82, 62, 41, 86], 3",
"135"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
float f_gold ( int a ) {
float area = ( M_PI * a * a ) / 4.0;
return area;
}
| [] | null | [] | C_PROGRAM_FACTORIAL_NUMBER | python | [] | def f_gold ( n ) :
return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ;
| code_translation | [
[
"84",
"3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000"
],
[
"41",
"33452526613163807108170062053440751665152000000000"
],
[
"5",
"120"
],
[
"38",
"523022617466601111760007224100074291200000000"
],
[
"79",
"894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000"
],
[
"80",
"71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000"
],
[
"64",
"126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000"
],
[
"62",
"31469973260387937525653122354950764088012280797258232192163168247821107200000000000000"
],
[
"24",
"620448401733239439360000"
],
[
"12",
"479001600"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int x ) {
return ( x << 1 ) + x + ( x >> 1 );
}
| [] | null | [] | FORM_MINIMUM_NUMBER_FROM_GIVEN_SEQUENCE_1 | python | [] | def f_gold ( seq ) :
n = len ( seq )
if ( n >= 9 ) :
return "-1"
result = [ None ] * ( n + 1 )
count = 1
for i in range ( n + 1 ) :
if ( i == n or seq [ i ] == 'I' ) :
for j in range ( i - 1 , - 2 , - 1 ) :
result [ j + 1 ] = int ( '0' + str ( count ) )
count += 1
if ( j >= 0 and seq [ j ] == 'I' ) :
break
return result
| code_translation | [
[
"'D'",
"[2, 1]"
],
[
"'I'",
"[1, 2]"
],
[
"'DD'",
"[3, 2, 1]"
],
[
"'II'",
"[1, 2, 3]"
],
[
"'DIDI'",
"[2, 1, 4, 3, 5]"
],
[
"'IIDDD'",
"[1, 2, 6, 5, 4, 3]"
],
[
"'DDIDDIID'",
"[3, 2, 1, 6, 5, 4, 7, 9, 8]"
],
[
"'176297'",
"[7, 6, 5, 4, 3, 2, 1]"
],
[
"'1'",
"[2, 1]"
],
[
"'XHkhZq'",
"[7, 6, 5, 4, 3, 2, 1]"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int N, int k ) {
int MS [ N ];
MS [ N - 1 ] = arr [ N - 1 ];
for ( int i = N - 2;
i >= 0;
i -- ) {
if ( i + k + 1 >= N ) MS [ i ] = max ( arr [ i ], MS [ i + 1 ] );
else MS [ i ] = max ( arr [ i ] + MS [ i + k + 1 ], MS [ i + 1 ] );
}
return MS [ 0 ];
}
| [] | null | [] | FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS | python | [] | def f_gold ( stack1 , stack2 , stack3 , n1 , n2 , n3 ) :
sum1 , sum2 , sum3 = 0 , 0 , 0
for i in range ( n1 ) :
sum1 += stack1 [ i ]
for i in range ( n2 ) :
sum2 += stack2 [ i ]
for i in range ( n3 ) :
sum3 += stack3 [ i ]
top1 , top2 , top3 = 0 , 0 , 0
ans = 0
while ( 1 ) :
if ( top1 == n1 or top2 == n2 or top3 == n3 ) :
return 0
if ( sum1 == sum2 and sum2 == sum3 ) :
return sum1
if ( sum1 >= sum2 and sum1 >= sum3 ) :
sum1 -= stack1 [ top1 ]
top1 = top1 + 1
elif ( sum2 >= sum3 and sum2 >= sum3 ) :
sum2 -= stack2 [ top2 ]
top2 = top2 + 1
elif ( sum3 >= sum2 and sum3 >= sum1 ) :
sum3 -= stack3 [ top3 ]
top3 = top3 + 1
| code_translation | [
[
"[4, 10, 11, 24, 27, 33, 34, 36, 36, 40, 42, 43, 52, 58, 67, 69, 77, 86, 86, 88], [4, 13, 34, 40, 41, 47, 47, 52, 55, 62, 66, 66, 69, 70, 73, 74, 75, 76, 85, 98], [6, 8, 10, 12, 14, 29, 41, 52, 53, 54, 55, 66, 69, 73, 77, 77, 78, 80, 90, 99], 10, 12, 18",
"0"
],
[
"[40, 54, 14, 58, -64, -60, -98, -64, -52, 30, 0, -42, 74, 46, -14, 76, 84, 74, -24, 30, 96, 88, -98, 82, 44, -86, -92, -52, 28, 62], [24, 34, -52, 50, -8, -48, -28, 68, -12, -26, 0, 6, -76, -94, -12, 8, 38, -88, 30, 98, -78, -54, -48, 42, 26, -76, 4, 46, 26, 60], [-8, -24, 54, 28, 92, 94, 0, 62, 28, 80, 82, 2, 88, -4, -28, 80, 44, 34, -98, 36, 28, 76, -48, 40, 98, 4, 22, -36, -20, -70], 26, 28, 15",
"0"
],
[
"[0, 0], [1, 1], [0, 0], 1, 1, 1",
"0"
],
[
"[64, 40, 45, 93, 30, 79, 24, 95, 1, 84, 74, 5, 9, 6, 22, 33, 10, 53, 33, 9, 31, 21, 22, 77, 21, 93, 86, 68, 92, 57, 27, 82, 87, 11, 51, 2, 27, 2, 24, 57, 20, 2, 32, 43], [48, 85, 55, 12, 24, 26, 88, 76, 15, 34, 23, 61, 2, 99, 11, 37, 65, 74, 92, 96, 68, 50, 67, 98, 89, 17, 62, 18, 51, 61, 41, 41, 90, 64, 89, 51, 48, 95, 9, 86, 28, 54, 64, 35], [99, 77, 11, 20, 33, 91, 5, 68, 75, 67, 37, 70, 59, 26, 2, 62, 6, 97, 95, 38, 46, 89, 29, 61, 27, 93, 26, 74, 98, 85, 91, 92, 40, 97, 58, 44, 20, 57, 65, 62, 65, 26, 74, 58], 42, 27, 31",
"0"
],
[
"[-94, -50, -24, -12, -6, -6, 8, 26, 28, 44], [-96, -94, -86, -70, -52, -18, -6, 20, 52, 52], [-70, -40, -22, 4, 12, 12, 38, 54, 72, 74], 5, 5, 5",
"0"
],
[
"[1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1], [0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0], 39, 34, 26",
"7"
],
[
"[3, 3, 4, 5, 9, 18, 21, 22, 25, 27, 28, 33, 35, 39, 39, 43, 57, 58, 59, 63, 65, 65, 72, 77, 78, 78, 80, 80, 88, 92, 99], [3, 17, 18, 23, 24, 24, 26, 28, 34, 48, 53, 54, 56, 61, 64, 67, 69, 74, 77, 79, 79, 81, 81, 82, 84, 84, 85, 86, 88, 92, 96], [1, 3, 5, 8, 15, 16, 27, 27, 27, 28, 29, 30, 32, 35, 36, 37, 44, 47, 57, 65, 69, 70, 70, 76, 76, 83, 85, 87, 88, 90, 92], 24, 16, 29",
"0"
],
[
"[40, 28, -84, -38, 82, 2, 38, 10, -10, 20, -54, 48, 56, 38, -98, 68, -8, -30, -96, -16, 28, 94, -52, 28, 34, 68, -46, 44, -28, -52, -48, -14, -30, 24, 56, 8, -30, -46, 18, -68, 86, -12], [26, 24, -50, 18, 78, -90, 62, 88, -36, -96, 78, 6, -94, -2, -28, -38, 66, 72, -36, 14, -48, -64, -24, 82, 92, -16, -26, -12, 6, 34, 30, -46, 48, -22, 34, -64, 4, -32, 84, -20, 32, -22], [66, 26, -90, -40, -52, -98, 84, 88, 40, -92, 30, 28, 32, 92, 18, -34, -42, 64, -34, 70, -72, 28, 44, 34, 76, -78, 46, -48, 20, 54, -2, 66, 6, 56, 52, -98, -48, -70, -60, 94, 90, 10], 32, 37, 41",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 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], [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], [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], 16, 23, 22",
"2"
],
[
"[22, 31, 75, 48, 30, 39, 82, 93, 26, 87, 77, 87, 67, 88, 19, 51, 54, 48, 6, 37, 38, 27], [18, 20, 53, 87, 85, 63, 6, 81, 89, 82, 43, 76, 59, 60, 79, 96, 29, 65, 5, 56, 96, 95], [10, 76, 49, 36, 41, 18, 60, 44, 81, 34, 56, 7, 13, 83, 82, 16, 7, 38, 33, 55, 91, 54], 19, 16, 17",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( char str [ ], int l, int h ) {
if ( l > h ) return INT_MAX;
if ( l == h ) return 0;
if ( l == h - 1 ) return ( str [ l ] == str [ h ] ) ? 0 : 1;
return ( str [ l ] == str [ h ] ) ? f_gold ( str, l + 1, h - 1 ) : ( min ( f_gold ( str, l, h - 1 ), f_gold ( str, l + 1, h ) ) + 1 );
}
| [] | null | [] | FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER | python | [] | def f_gold ( N , K ) :
ans = 0 ;
for i in range ( 1 , N + 1 ) :
ans += ( i % K ) ;
return ans ;
| code_translation | [
[
"11, 5",
"21"
],
[
"36, 69",
"666"
],
[
"71, 28",
"876"
],
[
"74, 1",
"0"
],
[
"66, 84",
"2211"
],
[
"38, 14",
"237"
],
[
"2, 11",
"3"
],
[
"73, 87",
"2701"
],
[
"79, 11",
"388"
],
[
"30, 55",
"465"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int l, int r, int x ) {
if ( r >= l ) {
int mid = l + ( r - l ) / 2;
if ( arr [ mid ] == x ) return mid;
if ( mid > l && arr [ mid - 1 ] == x ) return ( mid - 1 );
if ( mid < r && arr [ mid + 1 ] == x ) return ( mid + 1 );
if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 2, x );
return f_gold ( arr, mid + 2, r, x );
}
return - 1;
}
| [] | null | [] | MAXIMUM_NUMBER_CHARACTERS_TWO_CHARACTER_STRING | python | [] | def f_gold ( str ) :
n = len ( str )
res = - 1
for i in range ( 0 , n - 1 ) :
for j in range ( i + 1 , n ) :
if ( str [ i ] == str [ j ] ) :
res = max ( res , abs ( j - i - 1 ) )
return res
| code_translation | [
[
"'cI'",
"-1"
],
[
"'76478'",
"2"
],
[
"'1'",
"-1"
],
[
"'tr'",
"-1"
],
[
"'10'",
"-1"
],
[
"'01'",
"-1"
],
[
"'Rmhzp'",
"-1"
],
[
"'5784080133917'",
"10"
],
[
"'1100'",
"0"
],
[
"'OK'",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
return 0.6172 * ( pow ( 10, n ) - 1 ) - 0.55 * n;
}
| [
"from math import floor"
] | null | [] | COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW | python | [] | from math import floor
def f_gold ( a , b ) :
return floor ( ( a + b ) / 2 )
| code_translation | [
[
"1, 44",
"22"
],
[
"6, 61",
"33"
],
[
"75, 20",
"47"
],
[
"51, 17",
"34"
],
[
"19, 25",
"22"
],
[
"82, 98",
"90"
],
[
"72, 21",
"46"
],
[
"48, 41",
"44"
],
[
"12, 17",
"14"
],
[
"41, 80",
"60"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
unsigned long long f_gold ( int n ) {
return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) );
}
| [] | null | [] | COST_BALANCE_PARANTHESES | python | [] | def f_gold ( s ) :
if ( len ( s ) == 0 ) :
print ( 0 )
ans = 0
o = 0
c = 0
for i in range ( len ( s ) ) :
if ( s [ i ] == '(' ) :
o += 1
if ( s [ i ] == ')' ) :
c += 1
if ( o != c ) :
return - 1
a = [ 0 for i in range ( len ( s ) ) ]
if ( s [ 0 ] == '(' ) :
a [ 0 ] = 1
else :
a [ 0 ] = - 1
if ( a [ 0 ] < 0 ) :
ans += abs ( a [ 0 ] )
for i in range ( 1 , len ( s ) ) :
if ( s [ i ] == '(' ) :
a [ i ] = a [ i - 1 ] + 1
else :
a [ i ] = a [ i - 1 ] - 1
if ( a [ i ] < 0 ) :
ans += abs ( a [ i ] )
return ans
| code_translation | [
[
"'()'",
"0"
],
[
"'))(('",
"4"
],
[
"'())'",
"-1"
],
[
"'(()'",
"-1"
],
[
"'(()()())'",
"0"
],
[
"'))())(()(())'",
"-1"
],
[
"'))(())(('",
"8"
],
[
"'49'",
"3"
],
[
"'00001111'",
"36"
],
[
"'KDahByG '",
"36"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int num, int divisor ) {
if ( divisor == 0 ) {
cout << "Error: divisor can't be zero \n";
return - 1;
}
if ( divisor < 0 ) divisor = - divisor;
if ( num < 0 ) num = - num;
int i = 1;
int product = 0;
while ( product <= num ) {
product = divisor * i;
i ++;
}
return num - ( product - divisor );
}
| [] | null | [] | PROGRAM_FIND_SMALLEST_DIFFERENCE_ANGLES_TWO_PARTS_GIVEN_CIRCLE | python | [] | def f_gold ( arr , n ) :
l = 0
_sum = 0
ans = 360
for i in range ( n ) :
_sum += arr [ i ]
while _sum >= 180 :
ans = min ( ans , 2 * abs ( 180 - _sum ) )
_sum -= arr [ l ]
l += 1
ans = min ( ans , 2 * abs ( 180 - _sum ) )
return ans
| code_translation | [
[
"[4, 4, 5, 5, 13, 14, 14, 16, 19, 20, 30, 31, 32, 33, 35, 38, 38, 42, 44, 44, 48, 48, 52, 58, 60, 64, 65, 66, 68, 69, 70, 70, 71, 72, 73, 79, 81, 83, 83, 84, 86, 87, 88, 88, 91, 92, 95, 95, 98], 27",
"2"
],
[
"[-56, 88, -50, 70, 20, 58, 42, -56, -52, -78, 98, 20, -26, 4, 20, -66, -46, -58, 74, 74, -72, 2, 16, -78, -4, 10, 58, 60, -46, -2, 32, -96, 24, -6, 90, -64, -24, -38, 26, 66, -42, -86, 48, 92, 28, 6, -54, -6], 29",
"16"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 25",
"340"
],
[
"[52, 67, 62], 1",
"256"
],
[
"[-56, -22, 32, 42, 66], 4",
"360"
],
[
"[1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0], 10",
"354"
],
[
"[38, 46, 58, 72], 2",
"192"
],
[
"[16, 62, 90, 40, 30, -56, -92, -56, 60, 42, -64, 92, -30, -70, 42, -48, -54, 54, 48, 94, -44, -46, 10, 48, 22, -24, -62, 34, 60, 24, -60, 50, 40, 34], 20",
"24"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 37",
"340"
],
[
"[86, 43, 74, 84, 86, 14, 45, 7, 92, 36, 79, 13, 67, 18, 96, 77, 13, 22, 28, 36, 57, 56, 99, 57, 8, 48, 5, 79, 65, 64, 96, 6, 36, 91, 53, 55, 11, 12, 80, 99, 50, 40, 4, 9, 52, 41], 40",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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;
}
| [] | null | [] | WRITE_ONE_LINE_C_FUNCTION_TO_FIND_WHETHER_A_NO_IS_POWER_OF_TWO_1 | python | [] | def f_gold ( x ) :
return ( x and ( not ( x & ( x - 1 ) ) ) )
| code_translation | [
[
"1",
"True"
],
[
"2",
"True"
],
[
"8",
"True"
],
[
"1024",
"True"
],
[
"24",
"False"
],
[
"7",
"False"
],
[
"46",
"False"
],
[
"61",
"False"
],
[
"73",
"False"
],
[
"66",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int pages [ ], int n, int capacity ) {
unordered_set < int > s;
queue < int > indexes;
int page_faults = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( s . size ( ) < capacity ) {
if ( s . find ( pages [ i ] ) == s . end ( ) ) {
s . insert ( pages [ i ] );
page_faults ++;
indexes . push ( pages [ i ] );
}
}
else {
if ( s . find ( pages [ i ] ) == s . end ( ) ) {
int val = indexes . front ( );
indexes . pop ( );
s . erase ( val );
s . insert ( pages [ i ] );
indexes . push ( pages [ i ] );
page_faults ++;
}
}
}
return page_faults;
}
| [
"import math"
] | null | [] | HARDY_RAMANUJAN_THEOREM | python | [] | import math
def f_gold ( n ) :
count = 0
if ( n % 2 == 0 ) :
count = count + 1
while ( n % 2 == 0 ) :
n = int ( n / 2 )
i = 3
while ( i <= int ( math.sqrt ( n ) ) ) :
if ( n % i == 0 ) :
count = count + 1
while ( n % i == 0 ) :
n = int ( n / i )
i = i + 2
if ( n > 2 ) :
count = count + 1
return count
| code_translation | [
[
"99",
"2"
],
[
"33",
"2"
],
[
"50",
"2"
],
[
"17",
"1"
],
[
"18",
"2"
],
[
"69",
"2"
],
[
"23",
"1"
],
[
"18",
"2"
],
[
"94",
"2"
],
[
"16",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int maxA = INT_MIN, maxB = INT_MIN, maxC = INT_MIN;
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] > maxA ) {
maxC = maxB;
maxB = maxA;
maxA = arr [ i ];
}
else if ( arr [ i ] > maxB ) {
maxC = maxB;
maxB = arr [ i ];
}
else if ( arr [ i ] > maxC ) maxC = arr [ i ];
}
return ( maxA + maxB + maxC );
}
| [] | null | [] | GCD_ELEMENTS_GIVEN_RANGE | python | [] | def f_gold ( n , m ) :
return n if ( n == m ) else 1
| code_translation | [
[
"57, 57",
"57"
],
[
"22, 22",
"22"
],
[
"17, 17",
"17"
],
[
"74, 74",
"74"
],
[
"93, 22",
"1"
],
[
"56, 54",
"1"
],
[
"5, 33",
"1"
],
[
"5, 68",
"1"
],
[
"9, 75",
"1"
],
[
"98, 21",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
double f_gold ( double side ) {
return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side );
}
| [] | null | [] | FIND_MINIMUM_SUM_FACTORS_NUMBER | python | [] | def f_gold ( num ) :
sum = 0
i = 2
while ( i * i <= num ) :
while ( num % i == 0 ) :
sum += i
num /= i
i += 1
sum += num
return sum
| code_translation | [
[
"83",
"83"
],
[
"88",
"17.0"
],
[
"60",
"12.0"
],
[
"6",
"5.0"
],
[
"26",
"15.0"
],
[
"98",
"17.0"
],
[
"38",
"21.0"
],
[
"90",
"13.0"
],
[
"76",
"23.0"
],
[
"66",
"16.0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
double f_gold ( double side ) {
return ( ( side * side * side ) * ( sqrt ( 2 ) / 3 ) );
}
| [] | null | [] | PROBABILITY_THREE_RANDOMLY_CHOSEN_NUMBERS_AP | python | [] | def f_gold ( n ) :
return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 )
| code_translation | [
[
"46",
"0.0163062743707905"
],
[
"5",
"0.15151515151515152"
],
[
"44",
"0.017047655947307245"
],
[
"15",
"0.05005561735261402"
],
[
"72",
"0.010417169037858692"
],
[
"2",
"0.4"
],
[
"86",
"0.008721225027887637"
],
[
"17",
"0.04415584415584416"
],
[
"30",
"0.025006946373992776"
],
[
"42",
"0.01785967399007796"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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 );
}
| [] | null | [] | GOLD_MINE_PROBLEM | python | [] | def f_gold ( gold , m , n ) :
goldTable = [ [ 0 for i in range ( n ) ] for j in range ( m ) ]
for col in range ( n - 1 , - 1 , - 1 ) :
for row in range ( m ) :
if ( col == n - 1 ) :
right = 0
else :
right = goldTable [ row ] [ col + 1 ]
if ( row == 0 or col == n - 1 ) :
right_up = 0
else :
right_up = goldTable [ row - 1 ] [ col + 1 ]
if ( row == m - 1 or col == n - 1 ) :
right_down = 0
else :
right_down = goldTable [ row + 1 ] [ col + 1 ]
goldTable [ row ] [ col ] = gold [ row ] [ col ] + max ( right , right_up , right_down )
res = goldTable [ 0 ] [ 0 ]
for i in range ( 1 , m ) :
res = max ( res , goldTable [ i ] [ 0 ] )
return res
| code_translation | [
[
"[[19, 20, 23, 25, 28, 35, 35, 40, 45, 46, 48, 54, 57, 59, 74, 76, 78, 82, 84, 86, 87, 90, 91, 96], [9, 13, 17, 20, 26, 27, 42, 46, 48, 62, 67, 69, 72, 73, 76, 77, 82, 83, 86, 93, 95, 95, 98, 98], [2, 12, 18, 25, 29, 30, 31, 33, 39, 45, 48, 49, 56, 57, 60, 61, 64, 72, 73, 78, 79, 94, 98, 98], [2, 3, 10, 15, 20, 22, 23, 23, 27, 29, 36, 40, 42, 46, 48, 53, 53, 60, 60, 70, 73, 78, 98, 98], [6, 10, 11, 12, 15, 20, 28, 28, 33, 40, 43, 48, 51, 57, 60, 60, 61, 62, 66, 68, 72, 75, 92, 97], [2, 11, 12, 14, 15, 19, 21, 26, 30, 35, 36, 36, 46, 51, 56, 63, 69, 74, 82, 88, 89, 89, 89, 94], [1, 4, 5, 10, 11, 13, 15, 18, 23, 28, 44, 53, 53, 66, 67, 69, 70, 71, 71, 77, 79, 87, 88, 99], [2, 2, 5, 7, 7, 8, 9, 17, 26, 30, 35, 39, 41, 43, 49, 63, 64, 65, 70, 70, 80, 89, 96, 99], [4, 7, 11, 12, 14, 16, 20, 21, 27, 41, 42, 42, 43, 48, 49, 52, 62, 66, 75, 76, 81, 86, 97, 99], [1, 12, 13, 15, 17, 19, 26, 34, 47, 47, 47, 48, 51, 52, 53, 60, 61, 63, 64, 74, 77, 82, 87, 93], [1, 2, 4, 8, 14, 19, 22, 24, 31, 31, 37, 54, 60, 63, 66, 68, 76, 80, 80, 84, 88, 92, 93, 99], [1, 2, 3, 6, 7, 9, 11, 19, 25, 27, 35, 36, 45, 52, 57, 57, 86, 88, 89, 89, 93, 94, 97, 99], [7, 8, 9, 10, 11, 30, 33, 34, 37, 48, 50, 50, 56, 60, 66, 70, 72, 73, 76, 79, 86, 88, 95, 95], [1, 4, 5, 5, 6, 11, 26, 27, 32, 36, 43, 47, 47, 47, 50, 56, 56, 66, 76, 78, 78, 94, 97, 99], [6, 15, 18, 27, 36, 38, 40, 44, 47, 48, 64, 64, 68, 70, 76, 79, 83, 85, 86, 90, 93, 93, 95, 97], [1, 4, 4, 10, 11, 12, 16, 19, 20, 22, 22, 23, 35, 49, 51, 58, 66, 66, 68, 76, 77, 81, 86, 94], [2, 9, 12, 12, 13, 20, 20, 35, 44, 48, 51, 55, 62, 66, 71, 71, 73, 74, 78, 83, 89, 90, 93, 99], [9, 15, 20, 24, 25, 31, 32, 35, 36, 49, 50, 51, 52, 55, 58, 63, 79, 79, 85, 89, 90, 96, 98, 99], [6, 10, 12, 15, 16, 17, 17, 21, 24, 44, 48, 53, 58, 60, 61, 64, 67, 74, 81, 84, 86, 87, 88, 92], [7, 10, 14, 20, 21, 27, 30, 30, 31, 34, 36, 37, 39, 45, 55, 55, 63, 64, 66, 82, 88, 88, 94, 95], [6, 11, 13, 21, 22, 23, 23, 24, 28, 35, 36, 40, 41, 53, 55, 57, 63, 66, 73, 74, 77, 78, 87, 96], [4, 17, 19, 23, 25, 38, 42, 45, 50, 57, 61, 62, 62, 62, 62, 64, 75, 78, 79, 79, 82, 85, 86, 93], [14, 15, 21, 27, 38, 39, 40, 42, 43, 43, 50, 51, 54, 58, 58, 59, 60, 62, 63, 70, 75, 85, 91, 92], [6, 7, 11, 12, 20, 30, 40, 41, 41, 44, 47, 51, 52, 53, 59, 75, 76, 77, 84, 87, 91, 93, 95, 97]], 23, 21",
"1221"
],
[
"[[38, 12, 92, -6, 8], [80, 66, -56, -54, -74], [36, 6, 52, -78, -92], [80, 76, 88, 10, -30], [32, 64, 18, 58, -2]], 2, 3",
"238"
],
[
"[[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], [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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [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], [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], [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], [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], [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], [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], [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], [0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 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], [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], [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], [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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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], [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], [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], [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], [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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 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], [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], [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], [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], [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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 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], [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], [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], [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], [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], [0, 0, 0, 0, 0, 0, 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]], 33, 35",
"21"
],
[
"[[45, 96, 71], [87, 80, 90], [96, 72, 49]], 1, 1",
"45"
],
[
"[[-98, -98, -92, -82, -80, -72, -70, -48, -38, -32, -32, -28, -16, -2, 0, 0, 20, 20, 24, 30, 36, 40, 46, 58, 62, 62, 66, 74, 74, 76, 80, 82], [-96, -94, -94, -88, -80, -64, -54, -48, -46, -44, -38, -36, -34, -32, -30, -30, -24, -16, 2, 8, 26, 36, 36, 40, 48, 52, 78, 80, 80, 80, 88, 94], [-98, -98, -92, -88, -88, -88, -62, -60, -46, -34, -24, -16, -14, 8, 10, 16, 18, 20, 30, 44, 48, 48, 50, 54, 54, 70, 70, 76, 78, 82, 84, 94], [-94, -80, -76, -74, -66, -58, -48, -38, -26, -16, -12, -10, -8, -2, 0, 8, 10, 10, 12, 22, 28, 32, 40, 42, 44, 50, 60, 72, 84, 86, 90, 94], [-88, -72, -62, -46, -44, -44, -34, -30, -28, -28, -18, -18, -10, -6, -4, -2, 2, 8, 8, 22, 32, 34, 38, 46, 54, 54, 54, 76, 76, 80, 84, 86], [-94, -94, -82, -80, -78, -70, -58, -46, -36, -28, -10, -10, 0, 2, 2, 4, 8, 14, 24, 32, 34, 34, 38, 42, 42, 42, 58, 84, 86, 88, 94, 96], [-98, -96, -96, -88, -80, -68, -62, -54, -52, -28, -28, -26, -22, -12, -8, -4, 2, 8, 16, 16, 28, 30, 32, 38, 54, 58, 66, 70, 74, 76, 96, 98], [-86, -84, -80, -62, -62, -58, -52, -50, -42, -38, -36, -36, -28, -18, -4, 10, 14, 38, 40, 46, 46, 48, 54, 72, 72, 74, 84, 86, 86, 88, 90, 96], [-78, -74, -66, -62, -48, -26, -18, -12, 6, 8, 18, 22, 24, 34, 36, 38, 42, 46, 64, 66, 66, 68, 70, 72, 76, 76, 78, 80, 84, 86, 88, 90], [-98, -98, -92, -84, -74, -70, -68, -50, -50, -48, -48, -36, -30, -6, -4, -4, -4, 10, 24, 28, 30, 32, 50, 58, 60, 62, 76, 78, 84, 90, 90, 98], [-98, -96, -82, -78, -74, -62, -62, -60, -58, -56, -50, -42, -36, -32, -20, -4, 0, 2, 6, 14, 16, 26, 26, 42, 46, 70, 70, 72, 78, 82, 86, 90], [-86, -80, -80, -76, -70, -66, -58, -54, -50, -44, -42, -36, -32, -24, -22, -16, -8, -6, 2, 4, 16, 18, 36, 40, 46, 52, 58, 60, 62, 74, 76, 98], [-86, -78, -66, -64, -58, -52, -38, -32, -30, -28, -18, -18, -16, -10, -8, 2, 2, 4, 6, 6, 14, 22, 36, 36, 42, 52, 54, 76, 78, 84, 88, 98], [-98, -94, -94, -74, -72, -52, -50, -38, -30, -26, -16, -14, -4, 2, 2, 4, 4, 16, 22, 24, 28, 32, 34, 34, 36, 50, 56, 66, 68, 80, 82, 94], [-98, -90, -86, -78, -74, -72, -70, -58, -56, -52, -50, -44, -30, -24, -24, -2, 0, 6, 20, 32, 40, 40, 46, 48, 50, 58, 64, 74, 84, 90, 90, 90], [-98, -92, -86, -84, -82, -82, -78, -66, -64, -50, -40, -24, -24, -22, -22, -14, -12, -8, 0, 8, 12, 14, 20, 26, 42, 42, 58, 64, 82, 86, 92, 96], [-98, -90, -86, -76, -68, -64, -64, -64, -54, -54, -52, -44, -34, -34, -12, 6, 10, 12, 26, 38, 40, 40, 60, 68, 68, 68, 74, 78, 80, 88, 98, 98], [-92, -92, -68, -60, -54, -52, -48, -46, -40, -36, -32, -30, -28, -24, -24, -18, -4, -2, 2, 28, 32, 38, 42, 46, 60, 62, 72, 78, 80, 82, 82, 90], [-98, -86, -80, -80, -76, -64, -62, -60, -50, -34, -22, -18, -14, -12, -12, -10, 2, 6, 10, 18, 22, 28, 32, 32, 36, 38, 48, 66, 72, 82, 90, 96], [-92, -90, -86, -84, -82, -78, -72, -72, -68, -68, -60, -46, -38, -30, -28, 2, 8, 10, 18, 22, 24, 28, 40, 40, 52, 54, 64, 74, 80, 82, 86, 96], [-96, -86, -82, -82, -70, -70, -62, -62, -58, -58, -56, -56, -52, -52, -46, -42, -38, -34, -26, -24, -6, -6, -2, 8, 22, 26, 38, 52, 70, 74, 82, 90], [-92, -70, -64, -62, -56, -54, -48, -42, -36, -22, -22, -20, -14, -14, -2, 2, 2, 12, 22, 26, 60, 64, 68, 70, 70, 74, 74, 80, 84, 88, 88, 90], [-98, -98, -84, -84, -84, -80, -64, -60, -54, -54, -44, -34, -30, -18, -16, -14, 2, 8, 10, 28, 30, 32, 50, 58, 62, 62, 64, 72, 78, 78, 82, 88], [-96, -94, -86, -86, -60, -56, -52, -50, -34, -26, -14, -10, -6, -4, 2, 18, 20, 30, 38, 40, 42, 46, 48, 52, 54, 66, 68, 74, 74, 84, 92, 98], [-98, -96, -96, -94, -66, -50, -44, -44, -38, -30, -30, -22, -20, -18, -16, -14, -14, -4, -4, -2, 2, 22, 30, 42, 52, 54, 60, 70, 80, 84, 92, 96], [-96, -84, -80, -78, -76, -74, -68, -64, -60, -58, -54, -46, -26, -14, -14, -10, -2, 4, 10, 10, 12, 26, 28, 28, 38, 40, 42, 42, 50, 82, 88, 88], [-90, -78, -78, -76, -76, -76, -64, -64, -62, -44, -40, -32, -28, -24, -10, 4, 24, 28, 30, 44, 58, 60, 62, 72, 74, 76, 76, 78, 80, 82, 82, 90], [-88, -86, -72, -66, -60, -60, -58, -58, -54, -38, -32, -30, -16, -14, -10, -10, -6, 0, 8, 12, 16, 20, 22, 26, 30, 34, 36, 44, 52, 64, 66, 88], [-98, -94, -92, -92, -88, -68, -64, -64, -62, -44, -44, -36, -32, -32, -24, -18, -16, -6, -6, 6, 8, 14, 20, 26, 28, 36, 38, 40, 56, 56, 66, 84], [-98, -94, -92, -90, -58, -56, -44, -42, -40, -40, -36, -32, -32, -12, -10, -2, -2, -2, 0, 8, 16, 18, 26, 26, 42, 46, 52, 54, 84, 86, 88, 94], [-80, -78, -78, -70, -58, -56, -56, -36, -34, -32, -6, 4, 6, 10, 20, 32, 40, 42, 54, 58, 58, 64, 66, 66, 66, 66, 80, 82, 82, 82, 88, 90], [-92, -90, -78, -74, -70, -50, -48, -46, -46, -40, -40, -36, -24, -22, -20, -10, -10, -8, -8, -4, 6, 14, 20, 32, 38, 46, 46, 48, 60, 68, 68, 74]], 29, 31",
"888"
],
[
"[[1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0], [0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1]], 23, 17",
"17"
],
[
"[[13, 26, 41, 59, 89, 95, 99], [5, 21, 27, 30, 41, 84, 92], [6, 46, 75, 76, 95, 96, 97], [13, 21, 33, 62, 74, 85, 88], [2, 3, 15, 25, 56, 73, 97], [38, 65, 71, 76, 82, 86, 86], [2, 28, 32, 51, 73, 77, 90]], 4, 4",
"210"
],
[
"[[10, -88, 60, -18, -24, -72, -10, 8, -12, 16, -22, -94, 12, -8, 66, 10, 6, 6, 52, -6, -18, 98, 44, 48, -38, -32, -84, -56, -52, -60, -6, -74, -54, 76, -74, -36, -44, 94, -52, 74, 14], [0, -12, -26, -24, -72, 28, -72, -44, 32, -28, -98, -64, -48, 72, -74, -10, 10, -44, 30, -12, -26, -38, -14, 72, -42, 68, 26, 78, -6, -58, -70, 74, 24, -68, -22, 48, 14, 86, -14, 58, -52], [48, -18, 34, -38, 8, 96, -22, 14, -48, 74, 58, -70, -30, -40, -12, -90, 8, -98, -56, 60, 46, 38, -82, 32, -24, -68, -92, 72, 2, -96, -96, 72, 38, 38, 12, -18, -36, -94, -68, -32, 54], [-28, 4, -84, -68, -56, -60, -12, 82, 2, 14, -2, 62, 42, 36, 56, -12, -30, -72, -70, 10, 96, -84, -44, 64, 2, 70, -78, -62, -48, -94, 48, 28, -78, 64, -4, 80, -34, 4, 68, -18, -48], [-38, 0, 34, 28, 80, -36, -4, 52, -86, 84, 44, 16, 34, 8, -38, -80, -62, -78, 62, 50, 98, -88, -40, -66, -16, -20, -34, -84, 48, -28, -4, -10, 34, -10, 52, -58, -92, -46, 14, -86, 66], [-8, -56, -18, 64, -64, -82, 14, -60, -4, -32, -52, -70, 62, 56, -58, -26, -32, 84, 88, 28, -34, -56, 12, 56, 54, 92, -90, 8, 84, 18, 12, 40, -80, -24, 66, -22, -14, 76, -46, -18, 10], [-22, -34, -92, -58, -6, -26, 26, 30, -92, 82, 12, -60, -60, -10, 24, 78, -78, 50, -6, 10, -32, -10, -6, 72, -90, -54, -32, -88, -86, 30, 70, -4, 84, -40, -52, 32, -46, -92, -18, -92, -16], [-78, 0, 56, -10, 14, 64, 84, -6, -32, -54, 42, -22, 26, -94, 32, 54, -32, 20, -76, 6, -68, -72, -54, 32, 14, -36, -2, -74, 44, 76, 28, -34, 20, 84, 56, -60, -6, 30, -4, 36, 54], [90, -48, -22, 20, 26, 48, -64, 88, 20, 46, -86, -92, 2, 24, -4, 4, -36, -12, 28, -38, -84, 48, -46, -30, 68, -8, -30, -10, -2, 64, -4, -30, 48, 2, 96, 26, -76, -26, 14, -94, 86], [-92, -66, -14, 94, -92, -2, 30, -8, 88, 34, -52, 60, 52, -10, -18, 28, 2, 94, -12, 62, -48, 30, 22, -26, 70, -84, -4, 82, -42, 32, 62, 30, -54, 80, -34, 32, -94, -8, -40, -28, 32], [-28, 26, 2, 86, -74, 8, -38, 84, -6, 18, -38, 48, -60, 36, -58, 12, -76, 62, -4, -14, -18, -74, -56, -16, 48, 74, -46, 12, -42, -18, 62, 18, 98, -80, -92, 22, -80, -74, 10, -72, -88], [12, 54, 48, 60, 32, -74, 54, 50, 32, -38, 96, 20, 72, -32, 76, -30, 96, 58, -2, 40, 12, 72, 94, 82, 70, 74, -90, -82, -2, 6, 2, -18, -34, -58, -66, 12, 72, 68, -76, -42, -4], [-60, -30, 70, 42, -52, 4, 32, 20, -40, -34, 26, -74, 36, -10, -16, 0, 16, -66, 4, -46, -54, -50, -76, 52, -4, -96, 60, -62, 82, 8, 56, 70, 32, -44, -68, -8, -10, -42, 44, 84, 28], [-8, 94, 98, 78, 38, 8, 22, -6, 96, -8, 48, 26, -22, 12, -46, 92, 80, 12, 62, 4, 80, -20, 16, -28, 70, -88, 44, 68, 22, 8, 6, 84, 98, 4, -68, -44, -4, 94, 40, 38, 32], [54, 80, -38, 14, -36, -96, 28, -86, -36, -42, 34, 22, 16, 8, 22, 36, -24, -32, 78, 36, 12, -10, -50, 8, 56, -74, -92, -64, -74, 86, 28, 38, 48, 20, 82, 60, -10, 32, -60, 58, -52], [6, 18, -12, -80, -42, -12, -34, -38, 16, 42, 98, 6, 40, -28, 90, 76, 94, -36, 74, 0, -52, -52, 24, 0, 78, 44, 2, -94, 72, 96, 8, 64, -40, -42, -2, -80, 52, -86, 58, -72, -10], [-2, -38, 56, 24, 44, 50, 58, -56, 96, -96, 56, -72, -86, 68, 58, -32, 48, 24, -68, -66, 64, 0, -82, -14, 30, 4, -8, -8, 22, -38, -4, -78, -50, 90, -72, -2, -66, 50, -60, 26, -10], [42, -54, 82, -20, -94, 32, 6, -58, 62, 86, 66, -10, 0, 78, -14, 66, -74, 38, -42, -2, -42, -66, -52, -38, 38, 32, -16, 78, 80, 40, -98, -98, -62, -36, 18, 8, 12, -20, 94, -92, 52], [48, -80, 76, -36, 90, 6, -30, -22, 10, -6, 42, -86, -52, 84, -86, -12, -92, -72, 78, 28, -98, 38, 80, 76, 18, 64, 66, -8, -6, -66, -92, 86, -26, -98, -88, 62, 82, -8, -34, -64, 44], [-26, -28, 92, -82, -36, -24, -58, 32, 44, -70, 2, -72, 54, -64, 58, 92, -36, -14, -22, -70, -30, -10, -84, -22, 82, 88, -18, 24, -18, -22, 4, 72, 28, -46, 48, -14, 92, 24, -82, 92, 40], [-32, -60, -32, 72, 98, -96, 34, -86, -92, -4, -52, -52, 18, -56, -36, -34, -22, -28, 72, 54, -20, -42, 64, 0, 26, 34, -20, -6, -80, -48, 22, 12, -58, 2, 58, -2, -34, 92, -34, 32, 40], [70, 60, -76, -54, -76, 56, -78, 44, 42, -78, -40, 12, 50, 46, 48, -12, 62, -46, -4, -62, 24, -10, 54, 76, 22, 4, 26, 96, -82, -88, -72, 48, -18, 16, -22, 48, 0, -32, 82, 76, 96], [38, -80, -92, 14, 2, -92, 62, 98, -34, -30, -32, -32, 72, -12, -12, 30, -24, -76, -58, -24, -80, 48, -22, 54, -80, 64, -90, -26, 56, -46, 18, -70, 96, 86, 68, -72, 52, 28, -98, -42, 90], [-20, -66, 94, 20, 14, -82, 94, 60, 92, 46, -86, 18, -44, 42, 96, 40, 90, -96, -10, 44, -54, -50, 10, -48, 78, 66, -62, 42, -88, -58, 80, 36, -20, 70, 82, -12, -90, 14, -94, 8, 90], [40, 54, 2, 12, -98, -96, 48, -10, -64, -16, 22, 98, -98, 76, -28, 76, 66, 56, -10, -34, 44, 14, 86, 94, 50, -18, -76, -46, 30, 94, 42, -70, -72, -48, 48, -88, 94, 50, 84, -64, 24], [-14, -96, 94, -42, 94, 52, 58, 62, 46, 14, -28, -68, 42, -80, 70, -44, -94, -66, 54, -60, -58, 30, 40, -30, 78, -76, -40, 24, 98, 6, -42, 72, 20, 64, -84, -30, 84, -34, -16, -86, 70], [-20, -66, 90, 0, 58, -12, -14, -98, -68, -12, 82, 0, 60, 94, -10, 96, 62, -66, -22, 84, -20, -56, -60, 98, -18, 96, 10, 48, 2, 52, -64, -70, 8, -88, -20, -50, 56, -10, 72, -30, -68], [-32, 66, 70, 82, -30, 24, 58, 0, -80, -96, 18, -44, 82, 76, -10, 34, -34, 38, -30, -88, -68, 2, 16, 4, -22, 36, 58, -56, 48, 70, 46, 24, -86, -94, 2, 6, -70, -68, -82, -20, 30], [44, 90, 0, 98, 94, -34, -8, 66, 80, -98, 32, -26, 96, -98, 14, 22, 74, -62, -4, -52, 44, -62, -6, 26, 86, -18, 88, -20, 4, 72, -10, 4, 34, 4, -36, -76, 8, 80, -84, -50, 14], [40, -16, 96, 22, -26, 18, -18, 78, -72, -84, -10, -42, 18, 4, 26, 0, 70, -84, 84, -68, 54, -16, -34, 32, -28, 86, -8, 40, 90, -92, -78, 16, -78, 84, -8, -28, -12, -44, 10, -10, -42], [98, 72, 68, -4, 68, 68, 66, 34, 52, -58, 12, 2, -62, 64, -40, 42, 60, -88, -72, -20, -46, 46, 94, 32, -72, -92, -56, -98, -64, 66, -70, -42, -44, -88, -92, 10, 50, -26, -40, -70, 84], [-58, 84, -40, -16, -72, 10, -26, 76, -72, -14, 50, 16, 6, 6, -8, -82, 96, -80, -70, 46, 66, -46, 96, 68, -50, 54, 4, -32, 32, 62, -80, 36, 88, 88, 74, -22, -80, 8, 98, 62, -42], [50, -68, 82, -28, 72, -78, 82, -84, 80, -2, -94, -46, -16, 16, -64, -12, -38, -84, 98, -68, -74, 14, 88, -66, -50, 58, 98, 70, -34, -4, 86, 28, 60, -34, -52, -22, 12, 40, 98, 42, 66], [90, -58, -18, -70, -12, -86, 2, 26, 70, -76, 80, -38, 68, -30, -62, -2, 0, 88, -62, -44, 84, 32, 98, 28, -42, 80, 28, 80, -70, 2, 80, 74, 92, 72, 56, -14, 28, -52, -28, -50, 0], [-52, -46, 30, 6, -10, 76, 60, -34, -38, -58, 12, 58, -50, 82, -40, -16, 14, 94, 84, -22, -36, 22, 14, 84, -38, 62, 70, -34, -30, -18, 46, -82, -18, 96, -14, -58, 16, 96, -76, -60, 50], [68, 74, 10, -20, 14, -62, -70, -86, -36, 90, 44, -12, 74, -4, -34, -16, 84, -66, -20, 86, 52, 88, 6, 64, 60, 4, -10, -90, -48, 82, -26, 14, 36, -44, 38, 34, -86, -80, 90, 8, -70], [-60, 56, -54, 10, -82, 66, 14, -16, -46, -88, 96, -58, 4, 44, 74, 32, 22, 44, 94, 48, -96, -74, -2, -90, 32, 62, 36, 56, -10, 10, 84, -64, 54, -32, -42, 36, -32, 14, -86, -98, 10], [98, -62, 76, -38, 36, 20, 72, -18, 2, -18, -66, 16, -66, 28, -8, -44, 98, -12, 12, -94, 38, 38, -6, -40, 66, -34, 16, -96, -60, 24, -50, 96, -58, -26, 74, -48, 72, -26, -38, 28, 82], [-60, -62, 24, -74, 72, 22, 56, 78, -56, -10, 86, -60, 54, -92, 18, 36, -26, 66, -18, 54, 50, -70, -10, 20, -4, -6, -34, 80, -76, -10, 76, -72, -6, -44, -64, 88, 78, 78, -8, -26, 2], [-28, -98, -50, 18, 8, -16, 16, 58, 4, 28, 14, 76, 96, 56, 56, -86, 14, -56, 74, -28, -34, 30, 74, 30, 72, 18, 42, -64, -94, 54, -14, -42, 80, 40, -94, -36, -32, -70, 18, -26, 86], [28, 6, -82, 6, -2, -26, 6, -66, -20, -36, 6, 6, 70, 4, -96, 42, -66, -44, -42, 26, 12, -52, 90, 54, -82, -30, 38, -64, -80, -70, 36, -16, -44, -80, -44, -76, 94, -18, 90, -14, 62]], 32, 36",
"2412"
],
[
"[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], 18, 23",
"15"
],
[
"[[44, 4, 10, 70, 98, 8, 30, 72, 6, 11, 85, 86, 72, 96, 67, 39, 45, 63, 4, 28, 55, 81, 74, 7, 4, 44, 53, 90, 89, 35, 89, 32, 96, 28, 44, 61, 74, 13, 9, 83, 96, 41], [37, 10, 41, 26, 61, 21, 58, 58, 72, 3, 73, 43, 21, 47, 6, 30, 57, 35, 16, 37, 18, 23, 23, 32, 15, 19, 29, 67, 65, 16, 65, 93, 8, 44, 46, 21, 24, 30, 62, 52, 66, 88], [48, 53, 60, 92, 35, 91, 92, 46, 56, 39, 30, 31, 66, 24, 96, 54, 1, 90, 31, 47, 52, 45, 70, 82, 83, 27, 22, 99, 67, 23, 53, 82, 34, 52, 88, 7, 36, 7, 20, 55, 92, 44], [15, 75, 94, 97, 21, 37, 45, 50, 71, 64, 60, 49, 51, 86, 79, 90, 53, 93, 93, 13, 95, 51, 28, 66, 16, 10, 7, 2, 85, 27, 80, 37, 76, 33, 86, 30, 6, 62, 5, 45, 42, 47], [75, 93, 35, 92, 77, 7, 89, 76, 43, 9, 90, 10, 6, 80, 34, 24, 18, 30, 58, 84, 68, 71, 93, 58, 41, 52, 28, 75, 86, 86, 80, 84, 82, 64, 50, 89, 99, 59, 44, 83, 94, 89], [95, 1, 40, 3, 34, 69, 24, 99, 58, 29, 36, 11, 78, 80, 91, 71, 68, 69, 35, 93, 34, 61, 45, 33, 48, 30, 41, 95, 56, 99, 5, 27, 95, 14, 99, 69, 48, 94, 11, 27, 92, 54], [70, 19, 36, 19, 31, 78, 14, 51, 61, 28, 8, 10, 31, 2, 25, 61, 46, 55, 77, 21, 41, 5, 21, 32, 23, 99, 71, 46, 76, 66, 37, 2, 21, 65, 36, 48, 71, 52, 90, 89, 68, 24], [43, 40, 64, 15, 67, 6, 20, 61, 69, 51, 86, 95, 92, 70, 1, 32, 21, 80, 63, 30, 86, 4, 47, 21, 33, 66, 2, 75, 8, 78, 19, 51, 44, 66, 12, 58, 14, 20, 39, 66, 94, 78], [8, 25, 73, 3, 51, 70, 51, 36, 34, 46, 16, 28, 20, 75, 18, 35, 35, 71, 31, 80, 24, 1, 96, 30, 17, 64, 69, 55, 24, 48, 82, 85, 67, 70, 15, 94, 13, 33, 12, 25, 49, 65], [33, 90, 55, 35, 6, 30, 47, 12, 2, 60, 80, 80, 6, 68, 39, 35, 98, 13, 44, 94, 20, 13, 15, 50, 7, 52, 12, 8, 24, 18, 83, 69, 30, 76, 32, 89, 55, 20, 58, 85, 80, 50], [49, 80, 37, 60, 53, 38, 14, 60, 2, 17, 88, 15, 25, 87, 3, 2, 88, 8, 64, 5, 44, 47, 13, 79, 2, 2, 74, 77, 58, 40, 1, 80, 74, 2, 83, 42, 26, 89, 62, 66, 20, 77], [37, 13, 42, 49, 21, 7, 26, 39, 14, 58, 12, 97, 52, 45, 77, 25, 66, 58, 30, 48, 59, 46, 90, 37, 94, 3, 78, 66, 70, 46, 95, 26, 49, 88, 8, 90, 13, 87, 47, 89, 65, 82], [81, 55, 21, 50, 64, 12, 37, 28, 27, 83, 52, 29, 83, 43, 56, 14, 60, 25, 61, 48, 56, 6, 16, 47, 56, 71, 70, 40, 17, 85, 65, 8, 24, 31, 6, 4, 87, 31, 24, 78, 85, 37], [51, 46, 97, 80, 73, 46, 45, 93, 4, 43, 96, 96, 48, 1, 62, 85, 3, 70, 61, 81, 37, 45, 72, 35, 78, 12, 98, 56, 84, 77, 99, 96, 87, 42, 98, 97, 27, 30, 66, 45, 84, 41], [42, 41, 8, 68, 6, 28, 57, 24, 59, 93, 39, 20, 19, 59, 78, 8, 92, 61, 11, 3, 27, 94, 77, 66, 48, 31, 18, 70, 60, 36, 27, 39, 72, 87, 56, 48, 8, 6, 35, 38, 37, 40], [50, 45, 75, 68, 22, 7, 84, 74, 30, 34, 15, 44, 30, 44, 49, 65, 79, 93, 63, 54, 72, 89, 58, 29, 47, 50, 77, 44, 52, 57, 45, 34, 31, 26, 29, 54, 44, 93, 38, 37, 53, 82], [11, 86, 90, 17, 22, 44, 73, 54, 25, 58, 21, 27, 22, 91, 26, 66, 74, 66, 3, 27, 51, 19, 90, 60, 7, 51, 93, 54, 29, 19, 23, 2, 35, 29, 48, 87, 76, 66, 14, 99, 98, 51], [34, 39, 88, 97, 99, 84, 14, 8, 36, 56, 69, 57, 94, 68, 91, 62, 40, 96, 10, 73, 65, 35, 94, 91, 80, 67, 37, 95, 6, 5, 23, 69, 22, 81, 22, 58, 83, 13, 25, 6, 38, 28], [60, 88, 74, 42, 42, 39, 2, 10, 57, 59, 94, 79, 92, 39, 59, 31, 63, 44, 17, 99, 3, 55, 2, 87, 95, 90, 47, 60, 72, 17, 17, 35, 39, 63, 70, 74, 76, 25, 55, 72, 13, 30], [26, 27, 43, 37, 21, 26, 8, 65, 66, 33, 15, 82, 43, 40, 15, 68, 74, 1, 98, 49, 51, 9, 47, 21, 79, 67, 21, 11, 28, 73, 7, 96, 33, 44, 61, 30, 75, 95, 90, 43, 64, 89], [91, 13, 86, 21, 29, 24, 34, 68, 24, 3, 60, 92, 92, 80, 82, 52, 95, 13, 12, 59, 36, 78, 6, 9, 1, 3, 61, 93, 86, 80, 31, 16, 59, 11, 6, 23, 77, 7, 10, 1, 32, 30], [6, 21, 11, 79, 3, 77, 25, 52, 32, 39, 92, 63, 3, 32, 18, 15, 66, 53, 96, 93, 74, 79, 31, 36, 80, 27, 12, 46, 72, 27, 98, 83, 44, 21, 36, 15, 47, 41, 18, 96, 91, 60], [59, 98, 10, 37, 12, 91, 48, 77, 14, 59, 12, 22, 91, 25, 36, 83, 31, 4, 31, 5, 38, 25, 44, 67, 49, 27, 7, 28, 19, 82, 35, 13, 55, 70, 49, 48, 73, 78, 36, 98, 97, 82], [10, 87, 31, 78, 38, 14, 99, 81, 87, 49, 60, 53, 57, 82, 90, 77, 82, 35, 60, 82, 85, 13, 67, 21, 70, 45, 88, 13, 25, 9, 85, 60, 63, 50, 50, 39, 44, 32, 51, 73, 74, 87], [40, 34, 76, 93, 84, 22, 2, 73, 95, 42, 26, 92, 88, 20, 50, 14, 74, 41, 34, 75, 10, 47, 89, 41, 15, 32, 74, 48, 82, 8, 22, 70, 25, 34, 19, 63, 79, 76, 82, 15, 98, 53], [27, 19, 98, 30, 57, 58, 79, 13, 31, 61, 75, 33, 54, 9, 25, 2, 24, 64, 66, 67, 73, 59, 30, 44, 89, 35, 71, 55, 90, 66, 44, 10, 92, 36, 8, 23, 83, 75, 17, 39, 96, 75], [52, 31, 79, 97, 85, 46, 67, 50, 41, 3, 57, 48, 53, 58, 55, 42, 24, 33, 86, 27, 84, 28, 1, 46, 40, 73, 78, 41, 33, 99, 73, 57, 18, 69, 32, 47, 91, 3, 82, 80, 9, 43], [17, 60, 74, 21, 61, 90, 72, 18, 45, 86, 72, 78, 14, 98, 43, 65, 4, 22, 34, 18, 45, 38, 83, 38, 50, 40, 30, 60, 64, 25, 69, 6, 57, 10, 52, 59, 69, 17, 80, 65, 94, 97], [47, 37, 33, 49, 55, 83, 4, 9, 79, 24, 17, 48, 58, 49, 44, 19, 16, 44, 99, 6, 45, 78, 61, 85, 88, 12, 20, 30, 12, 37, 2, 84, 47, 97, 42, 74, 34, 1, 34, 28, 19, 18], [26, 28, 6, 93, 27, 1, 49, 32, 83, 36, 36, 16, 34, 96, 27, 50, 7, 43, 86, 42, 20, 37, 70, 87, 33, 8, 93, 55, 80, 4, 66, 73, 13, 11, 79, 99, 4, 42, 17, 74, 12, 34], [64, 93, 72, 63, 99, 8, 97, 99, 29, 45, 61, 42, 95, 14, 47, 56, 86, 2, 81, 92, 36, 13, 20, 7, 96, 62, 79, 84, 33, 36, 91, 35, 42, 2, 83, 4, 37, 98, 92, 39, 89, 14], [86, 77, 25, 50, 14, 29, 32, 86, 57, 7, 72, 95, 48, 51, 61, 20, 77, 2, 9, 11, 21, 64, 52, 41, 64, 6, 45, 64, 55, 2, 90, 45, 30, 23, 47, 53, 9, 71, 83, 36, 62, 67], [47, 65, 75, 96, 24, 18, 98, 80, 13, 63, 88, 51, 47, 72, 12, 54, 88, 77, 13, 77, 19, 56, 81, 25, 77, 62, 44, 43, 61, 5, 35, 21, 35, 38, 21, 52, 41, 86, 90, 16, 26, 87], [20, 80, 16, 44, 45, 38, 52, 99, 63, 14, 90, 84, 89, 82, 50, 4, 72, 94, 28, 26, 3, 54, 58, 83, 31, 34, 20, 16, 96, 33, 34, 9, 55, 89, 42, 16, 18, 87, 13, 85, 69, 64], [44, 71, 35, 81, 66, 4, 4, 29, 53, 73, 52, 99, 69, 54, 69, 38, 48, 8, 94, 31, 13, 3, 16, 8, 3, 54, 31, 58, 96, 17, 36, 15, 27, 16, 22, 56, 54, 27, 11, 40, 34, 5], [58, 93, 26, 73, 54, 22, 32, 35, 83, 44, 18, 78, 17, 58, 28, 47, 51, 75, 40, 69, 50, 13, 84, 18, 59, 50, 42, 74, 56, 82, 77, 43, 12, 99, 82, 77, 10, 2, 25, 59, 50, 36], [83, 23, 64, 92, 61, 47, 43, 4, 67, 92, 18, 18, 54, 58, 50, 2, 86, 69, 47, 99, 7, 50, 48, 45, 35, 20, 39, 63, 29, 9, 84, 21, 69, 28, 91, 13, 68, 91, 51, 90, 22, 46], [45, 28, 67, 44, 26, 98, 95, 8, 43, 23, 52, 77, 46, 34, 72, 56, 74, 59, 77, 94, 7, 50, 30, 18, 73, 97, 42, 34, 46, 52, 5, 96, 40, 10, 63, 51, 93, 16, 14, 65, 63, 65], [77, 24, 8, 94, 47, 10, 20, 15, 39, 49, 71, 92, 76, 2, 71, 85, 45, 87, 41, 32, 38, 70, 79, 12, 30, 44, 22, 95, 89, 21, 51, 88, 35, 33, 66, 9, 65, 64, 26, 72, 19, 35], [44, 43, 19, 41, 45, 85, 10, 54, 79, 21, 81, 17, 16, 29, 60, 68, 85, 90, 89, 68, 92, 61, 98, 92, 21, 49, 10, 19, 7, 29, 51, 31, 57, 60, 7, 86, 21, 88, 7, 54, 15, 1], [98, 10, 52, 61, 26, 89, 45, 10, 22, 36, 45, 71, 26, 57, 41, 10, 98, 19, 58, 24, 12, 50, 76, 67, 3, 94, 43, 71, 42, 14, 80, 24, 74, 33, 68, 51, 47, 55, 99, 65, 39, 22], [43, 92, 79, 13, 74, 41, 76, 42, 6, 47, 97, 39, 98, 48, 54, 81, 97, 90, 74, 95, 60, 47, 98, 50, 25, 33, 97, 27, 70, 51, 32, 41, 54, 18, 87, 1, 91, 81, 59, 64, 30, 88]], 30, 29",
"2346"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n, int a, int b, int c ) {
int dp [ n + 1 ];
memset ( dp, - 1, sizeof ( dp ) );
dp [ 0 ] = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( dp [ i ] != - 1 ) {
if ( i + a <= n ) dp [ i + a ] = max ( dp [ i ] + 1, dp [ i + a ] );
if ( i + b <= n ) dp [ i + b ] = max ( dp [ i ] + 1, dp [ i + b ] );
if ( i + c <= n ) dp [ i + c ] = max ( dp [ i ] + 1, dp [ i + c ] );
}
}
return dp [ n ];
}
| [
"import math"
] | null | [] | SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER | python | [] | import math
def f_gold ( num ) :
result = 0
i = 2
while i <= ( math.sqrt ( num ) ) :
if ( num % i == 0 ) :
if ( i == ( num / i ) ) :
result = result + i ;
else :
result = result + ( i + num / i ) ;
i = i + 1
return ( result + 1 ) ;
| code_translation | [
[
"2",
"1"
],
[
"57",
"23.0"
],
[
"28",
"28.0"
],
[
"43",
"1"
],
[
"38",
"22.0"
],
[
"29",
"1"
],
[
"45",
"33.0"
],
[
"47",
"1"
],
[
"44",
"40.0"
],
[
"3",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int dist ) {
int count [ dist + 1 ];
count [ 0 ] = 1, count [ 1 ] = 1, count [ 2 ] = 2;
for ( int i = 3;
i <= dist;
i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ];
return count [ dist ];
}
| [] | null | [] | COUNT_WAYS_DIVIDE_CIRCLE_USING_N_NON_INTERSECTING_CHORDS | python | [] | def f_gold ( A ) :
n = 2 * A
dpArray = [ 0 ] * ( n + 1 )
dpArray [ 0 ] = 1
dpArray [ 2 ] = 1
for i in range ( 4 , n + 1 , 2 ) :
for j in range ( 0 , i - 1 , 2 ) :
dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] )
return int ( dpArray [ n ] )
| code_translation | [
[
"32",
"55534064877048198"
],
[
"52",
"29869166945772625950142417512"
],
[
"52",
"29869166945772625950142417512"
],
[
"32",
"55534064877048198"
],
[
"73",
"79463489365077377841208237632349268884500"
],
[
"31",
"14544636039226909"
],
[
"29",
"1002242216651368"
],
[
"75",
"1221395654430378811828760722007962130791020"
],
[
"39",
"680425371729975800390"
],
[
"49",
"509552245179617138054608572"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b, int c ) {
if ( a > b ) {
if ( b > c ) return b;
else if ( a > c ) return c;
else return a;
}
else {
if ( a > c ) return a;
else if ( b > c ) return c;
else return b;
}
}
| [] | null | [] | FIND_SUM_UNIQUE_SUB_ARRAY_SUM_GIVEN_ARRAY | python | [] | def f_gold ( arr , n ) :
res = 0
m = dict ( )
for i in range ( n ) :
Sum = 0
for j in range ( i , n ) :
Sum += arr [ j ]
m [ Sum ] = m.get ( Sum , 0 ) + 1
for x in m :
if m [ x ] == 1 :
res += x
return res
| code_translation | [
[
"[7, 24, 34, 35, 36, 40, 49, 51, 53, 74, 78], 9",
"5631"
],
[
"[-34, 60, 32], 2",
"52"
],
[
"[0], 0",
"0"
],
[
"[80, 64, 10, 82, 14, 75, 51, 91, 1, 25, 98, 22, 36, 27, 21, 31, 93, 6, 52, 91, 80, 8, 62, 95, 10, 71, 40, 80, 35, 86, 85, 26, 74, 72, 64, 88, 4, 71, 4, 16], 31",
"207596"
],
[
"[-94, -46, -36, -24, -22, 0, 10, 14, 34, 34, 90, 92, 98], 9",
"-1638"
],
[
"[1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1], 21",
"0"
],
[
"[19, 20, 20, 24, 25, 33, 43, 47, 57, 61, 61, 64, 65, 71, 72, 73, 75, 82, 90, 93, 95], 15",
"27034"
],
[
"[-6, 56, 58, -36, 70, -92, 30, 58, -40, 98, 80, -96, -4, -88, 34, 76, 40, -32, -94, -26, 8, 72, -56, -96, -88, -24, 36, 14, -88, -32, 90, 4, -88, 28, 18], 24",
"1698"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11",
"0"
],
[
"[91, 51, 15, 78, 55, 3, 10, 24, 42, 84, 66, 78, 10, 41, 21, 53, 69, 57, 20, 22, 50, 72, 8, 80, 12, 91, 29, 95, 38, 74, 95, 26, 10, 57, 51, 25, 49, 74, 15, 42, 99, 21, 27], 36",
"267019"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string str ) {
int N = str . length ( );
int dp [ N + 1 ] [ N + 1 ];
for ( int i = 0;
i <= N;
i ++ ) for ( int j = 0;
j <= N;
j ++ ) dp [ i ] [ j ] = 0;
for ( int len = 1;
len <= N;
len ++ ) {
for ( int i = 0, j = len - 1;
j < N;
i ++, j ++ ) {
if ( len == 1 ) dp [ i ] [ j ] = 1;
else {
dp [ i ] [ j ] = 1 + dp [ i + 1 ] [ j ];
if ( str [ i ] == str [ i + 1 ] ) dp [ i ] [ j ] = min ( 1 + dp [ i + 2 ] [ j ], dp [ i ] [ j ] );
for ( int K = i + 2;
K <= j;
K ++ ) if ( str [ i ] == str [ K ] ) dp [ i ] [ j ] = min ( dp [ i + 1 ] [ K - 1 ] + dp [ K + 1 ] [ j ], dp [ i ] [ j ] );
}
}
}
return dp [ 0 ] [ N - 1 ];
}
| [] | null | [] | FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES | python | [] | def f_gold ( n ) :
DP = [ 0 ] * ( n + 1 )
DP [ 0 ] = 0
DP [ 1 ] = 1
for i in range ( 2 , n + 1 ) :
if ( int ( i % 2 ) == 0 ) :
DP [ i ] = DP [ int ( i / 2 ) ]
else :
DP [ i ] = ( DP [ int ( ( i - 1 ) / 2 ) ] + DP [ int ( ( i + 1 ) / 2 ) ] )
return DP [ n ]
| code_translation | [
[
"37",
"11"
],
[
"24",
"2"
],
[
"13",
"5"
],
[
"56",
"3"
],
[
"26",
"5"
],
[
"67",
"11"
],
[
"82",
"11"
],
[
"60",
"4"
],
[
"64",
"1"
],
[
"65",
"7"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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 ) ) );
}
| [] | null | [] | MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING | python | [] | def f_gold ( n ) :
res = list ( )
res.append ( 0 )
res.append ( 1 )
i = 2
while i < n + 1 :
res.append ( max ( i , ( res [ int ( i / 2 ) ] + res [ int ( i / 3 ) ] + res [ int ( i / 4 ) ] + res [ int ( i / 5 ) ] ) ) )
i = i + 1
return res [ n ]
| code_translation | [
[
"3",
"3"
],
[
"19",
"24"
],
[
"39",
"57"
],
[
"89",
"152"
],
[
"96",
"192"
],
[
"68",
"114"
],
[
"48",
"83"
],
[
"5",
"5"
],
[
"3",
"3"
],
[
"4",
"4"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int N, int K ) {
int ans = 0;
int y = N / K;
int x = N % K;
ans = ( K * ( K - 1 ) / 2 ) * y + ( x * ( x + 1 ) ) / 2;
return ans;
}
| [] | null | [] | NEXT_POWER_OF_2_1 | python | [] | def f_gold ( n ) :
p = 1
if ( n and not ( n & ( n - 1 ) ) ) :
return n
while ( p < n ) :
p <<= 1
return p ;
| code_translation | [
[
"8",
"8"
],
[
"79",
"128"
],
[
"31",
"32"
],
[
"63",
"64"
],
[
"18",
"32"
],
[
"2",
"2"
],
[
"6",
"8"
],
[
"85",
"128"
],
[
"29",
"32"
],
[
"8",
"8"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int l = sqrt ( n );
int sq = l * l;
if ( sq == n ) return l * 4;
else {
long long int row = n / l;
long long int perimeter = 2 * ( l + row );
if ( n % l != 0 ) perimeter += 2;
return perimeter;
}
}
| [] | null | [] | COUNT_PAIRS_DIFFERENCE_EQUAL_K | python | [] | def f_gold ( arr , n , k ) :
count = 0
for i in range ( 0 , n ) :
for j in range ( i + 1 , n ) :
if arr [ i ] - arr [ j ] == k or arr [ j ] - arr [ i ] == k :
count += 1
return count
| code_translation | [
[
"[9, 14, 17, 19, 22, 23, 23, 27, 30, 31, 34, 37, 37, 39, 39, 42, 57, 61, 68, 73, 77, 79, 91, 96, 97], 19, 19",
"3"
],
[
"[-78, -42, 28, -88, 18, -52], 3, 4",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 16, 14",
"0"
],
[
"[8, 46, 57, 28, 80, 2, 75, 57, 83, 45, 32, 49, 77, 30, 94, 33, 23, 29, 35, 81, 85], 15, 11",
"3"
],
[
"[-90, -72, -72, -62, -62, -54, -54, -52, -48, -38, -22, -22, -22, -12, -12, -8, -8, -8, -6, -6, -2, 6, 12, 26, 26, 28, 28, 38, 40, 48, 52, 52, 58, 60, 68, 70, 72, 76, 76, 76, 92], 22, 25",
"0"
],
[
"[0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1], 45, 39",
"0"
],
[
"[3, 13, 19, 23, 27, 32, 49, 52, 54, 57, 58, 58, 63, 67, 68, 68, 69, 70, 75, 80, 86, 90, 91, 95], 19, 21",
"2"
],
[
"[-56, 40, -66, 42, 8, -40, -8, -42], 7, 6",
"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], 16, 28",
"0"
],
[
"[99, 12, 90, 10, 86, 86, 81, 19, 1, 1, 98, 82, 34, 39, 34, 1, 54, 47, 39, 82, 21, 50, 82, 41, 98, 47, 88, 46, 72, 28, 28, 29, 60, 87, 92, 53, 93, 29, 74, 75, 11, 32, 48, 47, 85, 16, 20], 24, 45",
"3"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( unsigned int n ) {
return n & ( n - 1 );
}
| [] | null | [] | MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION | python | [] | def f_gold ( n ) :
table = [ 0 ] * ( n + 1 )
for i in range ( n + 1 ) :
table [ i ] = n - i
for i in range ( n , 0 , - 1 ) :
if ( not ( i % 2 ) ) :
table [ i // 2 ] = min ( table [ i ] + 1 , table [ i // 2 ] )
if ( not ( i % 3 ) ) :
table [ i // 3 ] = min ( table [ i ] + 1 , table [ i // 3 ] )
return table [ 1 ]
| code_translation | [
[
"59",
"9"
],
[
"7",
"3"
],
[
"90",
"13"
],
[
"78",
"11"
],
[
"49",
"6"
],
[
"15",
"6"
],
[
"45",
"13"
],
[
"56",
"6"
],
[
"7",
"3"
],
[
"70",
"12"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_1 | python | [] | def f_gold ( n ) :
return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ;
| code_translation | [
[
"57",
"40526919504877216755680601905432322134980384796226602145184481280000000000000"
],
[
"28",
"304888344611713860501504000000"
],
[
"23",
"25852016738884976640000"
],
[
"79",
"894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000"
],
[
"52",
"80658175170943878571660636856403766975289505440883277824000000000000"
],
[
"42",
"1405006117752879898543142606244511569936384000000000"
],
[
"79",
"894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000"
],
[
"77",
"145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000"
],
[
"99",
"933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000"
],
[
"70",
"11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_set < int > s;
for ( int i = 0;
i < n;
i ++ ) {
if ( s . find ( arr [ i ] ) != s . end ( ) ) return arr [ i ];
s . insert ( arr [ i ] );
}
return - 1;
}
| [] | null | [] | PYTHAGOREAN_QUADRUPLE | python | [] | def f_gold ( a , b , c , d ) :
sum = a * a + b * b + c * c ;
if ( d * d == sum ) :
return True
else :
return False
| code_translation | [
[
"1, 1, 1, 3",
"False"
],
[
"3, 2, 5, 38",
"False"
],
[
"0, 0, 0, 0",
"True"
],
[
"-1, -1, -1, 1",
"False"
],
[
"82, 79, 6, 59",
"False"
],
[
"14, 57, 35, 29",
"False"
],
[
"6, 96, 45, 75",
"False"
],
[
"13, 7, 3, 63",
"False"
],
[
"96, 65, 72, 93",
"False"
],
[
"70, 33, 6, 2",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int ans = INT_MIN;
for ( int i = 0;
i < n;
i ++ ) {
int curr_xor = 0;
for ( int j = i;
j < n;
j ++ ) {
curr_xor = curr_xor ^ arr [ j ];
ans = max ( ans, curr_xor );
}
}
return ans;
}
| [
"import math"
] | null | [] | PROGRAM_CHECK_PLUS_PERFECT_NUMBER | python | [] | import math
def f_gold ( x ) :
temp = x
n = 0
while ( x != 0 ) :
x = x // 10
n = n + 1
x = temp
sm = 0
while ( x != 0 ) :
sm = sm + ( int ) ( math.pow ( x % 10 , n ) )
x = x // 10
return ( sm == temp )
| code_translation | [
[
"371",
"True"
],
[
"9474",
"True"
],
[
"85",
"False"
],
[
"35",
"False"
],
[
"54",
"False"
],
[
"17",
"False"
],
[
"97",
"False"
],
[
"63",
"False"
],
[
"12",
"False"
],
[
"43",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string str ) {
string result = "";
bool v = true;
for ( int i = 0;
i < str . length ( );
i ++ ) {
if ( str [ i ] == ' ' ) v = true;
else if ( str [ i ] != ' ' && v == true ) {
result . push_back ( str [ i ] );
v = false;
}
}
return result;
}
| [] | null | [] | MAXIMUM_SUBARRAY_SUM_ARRAY_CREATED_REPEATED_CONCATENATION | python | [] | def f_gold ( a , n , k ) :
max_so_far = - 2147483648
max_ending_here = 0
for i in range ( n * k ) :
max_ending_here = max_ending_here + a [ i % n ]
if ( max_so_far < max_ending_here ) :
max_so_far = max_ending_here
if ( max_ending_here < 0 ) :
max_ending_here = 0
return max_so_far
| code_translation | [
[
"[5, 6, 12, 20, 23, 28, 33, 37, 47, 51, 53, 56, 63, 65, 65, 68, 69, 76, 76, 78, 83], 18, 20",
"15540"
],
[
"[68, 10, 52, -44, 34, -4, -34, 2, 50, -60, 50, 94, -98, -98, -44, -36, -4, -62, -2, -92, -70, -48, -78, -10, 94], 22, 22",
"218"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 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], 34, 29",
"522"
],
[
"[71, 59, 21, 82, 73, 29, 30, 25, 21, 10, 85, 22, 60, 43, 49, 20, 34, 39, 69, 6, 44, 27, 50, 33, 57, 29, 65, 18, 68, 56, 50, 28], 23, 30",
"29070"
],
[
"[-84, -74, -74, -56, -54, -48, -48, -46, -42, -34, -32, -30, -18, -16, -16, 6, 12, 20, 24, 26, 30, 32, 34, 42, 42, 42, 44, 46, 46, 50, 50, 62, 72, 78, 90], 17, 23",
"18"
],
[
"[0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0], 16, 25",
"300"
],
[
"[3, 7, 11, 11, 26, 60, 68, 71, 77, 91, 95], 8, 10",
"2570"
],
[
"[28, 48, -86, -52, 6, 4, 30, 18, -32, 60, -2, 16, -88, -36], 8, 11",
"134"
],
[
"[1], 0, 0",
"-2147483648"
],
[
"[76], 0, 0",
"-2147483648"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
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 );
}
| [] | null | [] | FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1 | python | [] | def f_gold ( arr1 , arr2 , m , n ) :
i = 0
j = 0
for i in range ( n ) :
for j in range ( m ) :
if ( arr2 [ i ] == arr1 [ j ] ) :
break
if ( j == m ) :
return 0
return 1
| code_translation | [
[
"[7, 10, 10, 10, 13, 17, 23, 24, 25, 28, 30, 33, 37, 49, 49, 50, 57, 60, 60, 63, 63, 64, 65, 65, 72, 81, 84, 85, 85, 94, 96], [10, 13, 17, 63], 29, 4",
"1"
],
[
"[12, 30, -94, -92, -62, -18, -56, 44, -50, -92, 6, 2, 56, -90, 0, 0, 18, 86, -58, 58, -54, 62, -94, 94, 0, 8, 82, -68, -88, -18, 8, -80, -42, 18, 62, -8, 56, -76, -42, 56, 44, -2, -20, 62, -14, 74, -86, -76], [12, -18, 44], 46, 3",
"1"
],
[
"[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], [0, 0, 0], 34, 3",
"1"
],
[
"[94, 26, 32, 20, 46, 55, 9, 51, 57, 80, 45, 38, 68, 12, 90, 10, 80, 65, 12, 52, 51, 86, 64, 57, 93, 19, 30, 92, 85, 82, 24, 26, 36, 56], [80, 58, 32, 2], 17, 4",
"1"
],
[
"[-98, -90, -86, -86, -84, -84, -82, -80, -78, -72, -70, -68, -66, -64, -52, -52, -50, -38, -28, -26, -24, -14, -8, 16, 26, 26, 28, 34, 36, 40, 42, 44, 44, 46, 50, 60, 68, 78, 80, 86, 90, 92, 98], [-99, -90, -90, -86], 23, 4",
"1"
],
[
"[1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1], [0, 0, 1, 1], 10, 4",
"1"
],
[
"[6, 8, 11, 13, 14, 26, 26, 41, 48, 70, 82, 83, 84, 88, 96], [1, 9, 12, 16], 10, 4",
"1"
],
[
"[-88, 80, 62, 76, 48, 92, 18, -94, -62, 98, -46, -50, 70, 32, 68, -54, 26, 16, 94, 0, -84, 2, -16, 88, 26, -38, 18, 64, 90, 80, 76, 2, 14, -90, 50, 4, 76, 30], [-76, -54, 4, 78], 27, 4",
"1"
],
[
"[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1], 10, 4",
"1"
],
[
"[54, 44, 97, 92, 13, 54, 27, 8, 43, 70, 77, 84, 55, 64, 5, 59, 27, 19, 65, 68, 66, 26, 33, 38, 7], [93, 5, 9, 13], 19, 4",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int dp [ n + 1 ];
dp [ 0 ] = 0, dp [ 1 ] = 1;
for ( int i = 2;
i <= n;
i ++ ) dp [ i ] = max ( dp [ i / 2 ] + dp [ i / 3 ] + dp [ i / 4 ], i );
return dp [ n ];
}
| [] | null | [] | MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY | python | [] | def f_gold ( arr , n ) :
arr.sort ( reverse = True )
dimension = [ 0 , 0 ]
i = 0
j = 0
while ( i < n - 1 and j < 2 ) :
if ( arr [ i ] == arr [ i + 1 ] ) :
dimension [ j ] = arr [ i ]
j += 1
i += 1
i += 1
return ( dimension [ 0 ] * dimension [ 1 ] )
| code_translation | [
[
"[99, 96, 95, 95, 92, 84, 83, 82, 81, 74, 72, 68, 67, 52, 51, 51, 49, 47, 44, 40, 36, 25, 24, 17, 16, 14, 12, 11, 9, 8, 6, 5, 1], 27",
"4845"
],
[
"[-32, -54, -82, -92], 2",
"0"
],
[
"[1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 15",
"1"
],
[
"[99, 96, 96, 94, 68, 65, 62, 60, 45, 44, 30, 26, 17, 17, 16, 15, 2], 8",
"0"
],
[
"[98, 94, 82, 82, 74, 66, 66, 56, 54, 46, 16, -28, -34, -42, -50, -52, -78, -82, -88], 15",
"5412"
],
[
"[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 18",
"1"
],
[
"[97, 96, 93, 87, 85, 85, 75, 68, 65, 65, 64, 63, 62, 58, 56, 52, 49, 44, 43, 38, 33, 30, 29, 28, 27, 25, 24, 23, 14, 14, 13, 10, 8, 8, 8, 6, 1], 20",
"5525"
],
[
"[78, 78, 76, 70, 60, 54, 50, 32, 16, 16, 6, -6, -20, -56, -64, -68, -70, -90, -90, -92], 19",
"1248"
],
[
"[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 30",
"1"
],
[
"[94, 94, 94, 90, 84, 82, 75, 71, 57, 55, 53, 51, 51, 43, 35, 31, 30, 29, 22, 18, 14, 10, 7, 5, 4], 22",
"4794"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int coin [ ], int n, int k ) {
sort ( coin, coin + n );
int coins_needed = ceil ( 1.0 * n / ( k + 1 ) );
int ans = 0;
for ( int i = 0;
i <= coins_needed - 1;
i ++ ) ans += coin [ i ];
return ans;
}
| [] | null | [] | INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1 | python | [] | def f_gold ( arr , n ) :
neg = 0
pos = 0
sum = 0
for i in range ( 0 , n ) :
sum += arr [ i ]
if ( arr [ i ] < 0 ) :
neg += 1
else :
pos += 1
return ( sum / abs ( neg - pos ) )
| code_translation | [
[
"[49, 98], 1",
"49.0"
],
[
"[82, 66, -68, 24, -10], 2",
"74.0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 8",
"0.125"
],
[
"[56, 3, 18, 5, 20, 56, 47, 29, 60, 98, 60, 40, 42, 2, 54, 56, 91, 8, 93, 14, 31, 27, 61, 49, 23, 12, 71], 25",
"41.72"
],
[
"[-94, -94, -92, -86, -50, -48, -6, 8, 28, 40, 44, 58, 62, 72, 94], 12",
"-146.0"
],
[
"[0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1], 36",
"0.5833333333333334"
],
[
"[16, 56, 56], 1",
"16.0"
],
[
"[74, -90, -92, 30, -18, 66, -66, 22], 5",
"-96.0"
],
[
"[0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 7",
"0.5714285714285714"
],
[
"[21, 64, 82, 78, 30, 34, 35], 5",
"55.0"
]
] |
Subsets and Splits