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 1 + n * ( n + 1 ) / 2;
}
| [
"import math"
] | null | [] | PROGRAM_TO_CHECK_IF_A_GIVEN_NUMBER_IS_LUCKY_ALL_DIGITS_ARE_DIFFERENT | python | [] | import math
def f_gold ( n ) :
ar = [ 0 ] * 10
while ( n > 0 ) :
digit = math.floor ( n % 10 )
if ( ar [ digit ] ) :
return 0
ar [ digit ] = 1
n = n / 10
return 1
| code_translation | [
[
"474",
"0"
],
[
"9445",
"0"
],
[
"90",
"0"
],
[
"30",
"0"
],
[
"37453",
"0"
],
[
"27",
"0"
],
[
"2400",
"0"
],
[
"98",
"0"
],
[
"46",
"0"
],
[
"722",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int sum = INT_MIN;
for ( int i = 0;
i < n;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) for ( int k = j + 1;
k < n;
k ++ ) if ( sum < arr [ i ] + arr [ j ] + arr [ k ] ) sum = arr [ i ] + arr [ j ] + arr [ k ];
return sum;
}
| [
"import math"
] | null | [] | AREA_OF_A_HEXAGON | python | [] | import math
def f_gold ( s ) :
return ( ( 3 * math.sqrt ( 3 ) * ( s * s ) ) / 2 ) ;
| code_translation | [
[
"1772.6589509256596",
"8163986.207300422"
],
[
"-599.737107809315",
"934487.9989101035"
],
[
"1074.1765931782",
"2997804.1448343466"
],
[
"-1182.4087746714795",
"3632345.696441302"
],
[
"8083.035797247716",
"169746524.38794258"
],
[
"-6126.414356565494",
"97513471.98905805"
],
[
"5370.057504189614",
"74922068.46663411"
],
[
"-6947.020794285176",
"125386010.4299519"
],
[
"2110.5107873533325",
"11572495.990484647"
],
[
"-6458.751326919488",
"108379966.88267714"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n );
int a = 0, b = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( i & 1 ) a = a * 10 + arr [ i ];
else b = b * 10 + arr [ i ];
}
return a + b;
}
| [] | null | [] | REMOVE_ARRAY_END_ELEMENT_MAXIMIZE_SUM_PRODUCT | python | [] | def f_gold ( dp , a , low , high , turn ) :
if ( low == high ) :
return a [ low ] * turn
if ( dp [ low ] [ high ] != 0 ) :
return dp [ low ] [ high ]
dp [ low ] [ high ] = max ( a [ low ] * turn + f_gold ( dp , a , low + 1 , high , turn + 1 ) , a [ high ] * turn + f_gold ( dp , a , low , high - 1 , turn + 1 ) ) ;
return dp [ low ] [ high ]
| code_translation | [
[
"[[23, 37, 54, 57, 59, 75, 97], [9, 15, 34, 39, 80, 96, 99], [15, 25, 26, 31, 43, 47, 93], [22, 31, 37, 44, 54, 62, 91], [7, 19, 32, 56, 57, 70, 81], [16, 37, 49, 77, 81, 82, 85], [44, 48, 64, 74, 79, 89, 99]], [31, 50, 50, 68, 69, 80, 87], 6, 5, 4",
"89"
],
[
"[[-24, -34, -86, -16, -34, 14, 76, 4, 18, 60, -4, -24, 46, -26, -74, 6, 50, -34, 8, -30, -62, 56, -78, -50, 76, -98, -64, -72, -76, 46, -70, 4, -92, -18, 10, -76, 78, -26], [-34, -30, -96, -4, 76, 48, -10, 96, -88, 96, 90, 40, -24, 68, -42, -48, -30, -32, -44, -50, -98, 34, -78, -52, -88, -38, 54, -64, -94, -48, -80, -2, -90, -14, -8, 90, -78, -36], [30, -80, -58, 48, -80, -78, 40, -48, -40, -84, 2, 44, 72, 6, 78, -84, -30, -70, 32, 86, 16, 68, 40, -36, 80, -46, 66, -92, 8, 72, -56, 58, -72, 44, 40, 6, 66, -66], [16, -72, -66, -30, 66, -94, 36, -34, -78, 14, -74, -54, 48, 6, -40, -40, -24, -6, 18, -20, -88, -8, 82, -56, -96, -32, 30, -22, 70, -4, 98, -40, -72, 66, -54, -60, 52, 66], [-28, -52, 90, -52, 12, 98, 42, -52, 38, -60, -28, 94, 86, -22, -62, 68, 12, 92, -82, 18, -2, 82, -28, 72, -78, -70, 40, -54, -24, -68, -74, -40, -32, 14, 88, 94, -46, -14], [-38, -30, 62, -52, 54, 56, 12, 32, -78, 24, 38, -82, 6, -64, -96, -56, -30, 62, -94, -26, -64, -38, 96, 72, 54, -56, 56, 82, 6, -30, 94, 80, -68, 18, 84, 58, -48, -34], [82, -44, 14, -26, -14, -92, 62, -48, -52, 26, -30, -76, -26, 28, 54, -16, -60, 16, -76, -90, 20, -8, 56, -86, 66, -84, 92, -52, 90, 30, 38, -2, 90, -50, 88, 44, -66, -80], [-22, 68, 62, -84, -76, -12, 82, 70, -58, 86, 20, -66, 96, -28, 6, 60, -90, 52, -28, 8, 34, 90, 38, 24, 76, -22, 6, 16, -46, -4, 84, -6, 6, 30, 50, 26, 8, -8], [34, -62, -26, 18, -14, 42, -50, 72, 16, -62, -76, 32, -20, 82, 8, 74, 60, -60, -16, -50, -38, -88, 68, -26, 66, -14, 64, 42, 98, 40, -56, 28, -96, 36, -82, -74, 38, -26], [-66, -58, -84, 16, -42, 4, -38, -6, -32, -98, 20, -96, 60, -38, 24, -8, -74, 52, 98, 52, -10, -24, -22, 78, -20, 58, -24, -98, -76, 0, -94, 6, 28, 42, 20, -36, 68, -68], [-20, 70, -80, 68, -26, -26, -22, 88, 86, 12, -98, -80, 2, -22, -2, 2, -52, -50, 30, 12, 74, 34, -14, -54, 70, 16, -76, -56, 16, -50, -14, -4, 30, 48, -14, 84, -34, 30], [68, 68, -86, 66, -64, 60, -28, 52, 14, -40, -98, 22, -30, 28, -48, -76, 66, 94, -28, 32, 88, 86, -76, -4, 68, -56, 76, -4, 36, 16, -4, 8, -44, -84, 74, 74, 96, -22], [-14, -88, -52, -72, -60, -50, 32, 86, 14, -26, 36, -84, 38, 80, -86, -64, 14, -96, 86, -52, -48, -16, -78, -66, -10, -24, 70, 22, 90, 46, -74, 36, -74, 2, 96, 6, 4, 34], [-34, 72, -40, 34, -30, 18, 54, -50, 0, 94, -62, 80, 4, 84, 10, 98, 56, -36, -94, 88, 10, -30, 90, -52, 14, -46, 30, 82, -66, 8, -98, 86, -90, 46, -44, -92, 22, 58], [70, -44, -28, -78, -62, -78, -96, -6, -92, -86, -82, 72, -50, 26, -4, 82, -42, 58, 28, -88, 98, -98, -14, 72, -24, 58, 72, -72, 6, -78, 34, -34, 58, -62, 78, -98, 0, 50], [84, 48, -82, -32, -22, 16, -34, -28, -76, 40, 26, 30, 70, 28, -64, -90, 70, -90, 82, 60, 10, -52, 0, 50, -38, -32, -18, 2, 48, 20, -96, 4, 62, -28, 28, -12, 50, -90], [64, 58, -34, 10, -44, -72, 62, 70, 60, 84, -12, -46, -82, -12, 80, 46, 44, -58, -18, 10, 44, 50, -60, -20, 82, -10, 18, -4, 48, 22, -14, 12, -76, -32, 8, -60, -54, -6], [22, -58, 58, -24, -58, -64, 62, -38, -36, 44, -82, 46, -78, 54, 96, 24, 84, 90, -2, -98, -74, 8, 44, -94, 84, 48, -2, 66, -44, 52, -42, -36, 34, -98, -6, 54, 26, 18], [-28, 30, -66, -14, -20, -44, -62, -20, 90, -92, -38, 64, 44, -60, 90, -60, -82, 36, -46, 52, -60, 26, 12, 80, -64, 92, -22, -68, -10, 54, -96, 44, 70, 10, 4, -4, -94, 66], [-70, 54, -32, 92, -26, -66, 28, -98, -14, -20, 40, -36, -6, -60, -36, -32, 26, 90, 34, -34, 82, 48, -82, -8, -86, -74, -58, -68, -68, -16, -26, -88, -6, -76, -12, -68, -98, -94], [14, -84, 90, 88, 80, -28, -46, 4, -4, 36, -56, -44, 68, 24, 24, 70, 36, -4, 58, -78, 14, -48, -46, 58, -44, -66, 72, -36, 84, 70, -26, 72, 76, 30, -30, 92, 4, -40], [-24, -28, 0, -44, -48, 74, 76, 50, -88, 36, -24, 62, -34, 82, -20, 38, -76, 16, -70, 92, -82, 56, 72, 78, 40, 52, -52, -38, 36, -44, 92, 46, -60, -54, 58, 96, 74, -18], [70, -30, -62, -74, -88, -92, 72, -42, 34, 76, -4, -94, 22, -82, 56, 2, 44, -64, -88, -20, 96, 0, -12, -20, -40, -56, -8, 18, -8, 18, 98, 28, 50, -14, 72, 50, 4, 38], [72, -66, 16, -44, 94, 10, 60, 96, 24, 12, 92, 30, 2, 64, 4, 58, 74, -24, -96, -52, 72, 10, -2, -18, -74, -2, 70, -6, -60, 72, -32, 34, -78, -10, -2, -30, 54, 42], [80, 92, 18, 54, -42, 50, -62, 76, 94, 38, 84, 78, 44, 98, 78, -54, -36, -80, 62, 14, 24, 86, 52, 4, 78, 96, 20, 58, -64, -42, 20, -98, -90, 6, 30, 56, -66, -34], [-86, 60, -62, -32, -12, 92, -54, -2, 8, 58, 68, 42, -46, -8, 82, -28, -96, 62, 46, -12, 2256, 88, 82, -26, -42, 36, 46, -46, 54, -58, -58, -62, 32, -48, -60, 86, 4, 56], [88, -36, 4, 60, 24, 6, 72, 58, 44, 14, -40, -64, 36, -92, 36, -56, -78, 86, 80, 80, -94, 64, -4, -2, 86, 26, -98, -56, 62, -56, -18, 40, 12, 26, 50, 72, -16, -58], [-88, 4, -66, 64, 42, 94, 54, -38, 8, -18, -8, 88, 46, 42, 64, -88, 94, 58, -50, 26, 38, 92, -66, 82, 8, 38, -92, -32, 50, -44, -88, -6, 34, 12, 66, 54, -52, -86], [20, -90, 2, -94, -76, -28, -76, 44, -12, -56, 50, 4, 34, -88, 46, 2, 60, 52, 22, 98, -84, 6, -26, -90, -4, 48, -66, -42, 58, -22, 30, -22, -82, -50, 42, 84, 94, 4], [-56, 4, -4, 54, 64, 82, 88, 8, 50, 66, -2, 80, -4, 12, 24, -56, -52, 80, 66, 82, -66, -92, -42, -56, 66, -92, -60, -92, -52, -54, 32, 22, -42, -46, -66, 60, 10, -62], [-44, 0, 6, -54, -98, 72, -98, -28, -4, -86, -10, -76, -64, -66, 58, 60, 24, 90, -6, -54, -22, 84, -34, 64, 36, 18, 14, -32, -88, -32, 84, -8, 60, 98, 28, -6, 14, -88], [-94, -92, 74, 96, 28, 34, 56, 74, -62, -46, -8, 10, -96, -72, 50, -98, -28, 72, 2, 46, 68, 14, -72, -78, -76, 68, 52, -30, -32, 90, 40, 50, 50, 20, 98, 2, 72, 44], [-6, 94, 16, -70, -74, -46, 22, 24, 44, -40, 52, -50, 94, -66, 84, -66, 14, -12, 48, -6, 64, -12, -44, -14, 2, -48, -22, 52, -28, -18, 8, 72, -28, 68, 44, -28, -20, 62], [12, -94, -86, -52, -92, -76, -78, 10, -8, 30, 34, 26, -80, -8, 68, 92, 66, 16, -48, 70, 30, -56, -80, -78, 58, 94, -56, -12, 56, -94, -60, -70, 0, -94, 6, 36, 48, -98], [74, 72, 20, -84, 96, -84, 40, -36, -88, -14, 60, -70, 36, -28, -18, -82, -36, 92, -86, 44, -16, -66, 28, -88, -18, -52, 66, -26, -90, -12, -16, 80, -28, 82, -92, 82, -76, -80], [40, -38, -48, 72, -30, 70, -14, 14, 90, 42, -6, 52, -94, 44, -32, -8, -74, 80, -18, -10, 74, -80, 86, -82, -2, 10, -12, 58, -70, -18, 86, 40, 62, 76, 88, 68, 68, 4], [86, 4, 16, 86, -66, 72, -38, -40, -52, 14, -60, -88, -44, -60, -64, 84, -50, -78, -44, -18, 78, 74, -66, -64, 18, 26, 74, 98, -18, -96, -82, 4, -74, -40, -50, -46, -4, 94], [-70, -64, -10, -22, -88, -48, 84, 78, 16, 64, 78, -48, 66, -88, 44, 60, -10, -48, 60, -40, 86, -40, 32, 16, 28, -30, 32, -74, 10, -34, 38, -36, -30, 2, 14, -92, -48, 88]], [-74, -50, -90, -52, 96, 78, -16, 14, -14, 66, -50, 74, -34, -88, 84, 80, 34, 18, -38, 62, 56, -48, -22, 94, 94, 94, 92, -46, -32, 10, -48, 46, 20, 80, 32, 30, 88, 60], 25, 20, 25",
"2256"
],
[
"[[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], [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], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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, 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], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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, 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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 28, 28, 32",
"32"
],
[
"[[84, 65, 61, 9, 50, 58, 19, 98, 63, 92, 42, 82, 5, 55, 81, 77, 1, 92, 74, 40, 13, 59, 48, 51, 18, 42, 34, 78, 41, 82, 13, 6, 92], [31, 76, 5, 83, 74, 92, 29, 9, 40, 28, 36, 36, 4, 73, 32, 6, 79, 8, 45, 89, 60, 34, 82, 27, 68, 24, 68, 47, 27, 42, 3, 61, 19], [56, 19, 38, 73, 69, 25, 38, 90, 20, 50, 27, 8, 1, 84, 9, 44, 54, 64, 8, 74, 19, 52, 40, 9, 75, 66, 58, 8, 40, 46, 55, 54, 75], [12, 13, 58, 11, 23, 52, 60, 91, 95, 86, 63, 25, 62, 93, 35, 36, 60, 87, 94, 46, 3, 85, 35, 77, 28, 22, 33, 7, 92, 76, 33, 53, 30], [2, 4, 55, 27, 47, 76, 45, 70, 34, 36, 5, 2, 50, 24, 32, 85, 81, 34, 5, 35, 56, 72, 21, 39, 58, 90, 49, 75, 74, 49, 76, 22, 30], [35, 66, 31, 4, 44, 70, 53, 57, 36, 36, 54, 26, 96, 4, 22, 34, 1, 87, 57, 51, 16, 36, 47, 91, 39, 5, 25, 45, 61, 5, 37, 51, 88], [45, 98, 42, 35, 56, 86, 16, 75, 9, 32, 14, 92, 40, 25, 24, 29, 5, 1, 75, 13, 3, 8, 71, 79, 96, 33, 22, 13, 30, 20, 41, 84, 59], [74, 33, 15, 13, 27, 6, 87, 95, 74, 82, 7, 52, 29, 66, 44, 89, 74, 21, 57, 22, 32, 13, 14, 42, 12, 99, 55, 9, 16, 94, 37, 72, 29], [64, 47, 16, 76, 77, 39, 94, 53, 65, 65, 80, 12, 25, 14, 6, 77, 66, 12, 37, 63, 78, 17, 32, 16, 22, 7, 40, 25, 8, 27, 32, 55, 39], [27, 52, 60, 70, 10, 52, 14, 60, 35, 31, 27, 50, 74, 87, 32, 28, 55, 98, 68, 9, 72, 48, 53, 39, 29, 64, 84, 64, 47, 7, 69, 22, 72], [89, 58, 93, 44, 1, 12, 98, 64, 65, 97, 36, 4, 84, 47, 49, 77, 81, 11, 30, 3, 69, 73, 30, 68, 73, 10, 96, 40, 71, 57, 3, 81, 46], [39, 71, 95, 88, 22, 67, 25, 57, 53, 22, 98, 68, 19, 28, 10, 26, 79, 13, 50, 2, 10, 54, 44, 88, 69, 97, 75, 31, 18, 77, 17, 22, 53], [85, 17, 87, 79, 24, 25, 49, 13, 15, 16, 36, 98, 41, 78, 77, 89, 31, 91, 20, 85, 51, 29, 55, 94, 69, 16, 85, 91, 83, 9, 66, 96, 16], [67, 72, 45, 87, 18, 95, 50, 29, 69, 80, 43, 78, 53, 37, 71, 67, 41, 16, 66, 77, 69, 74, 50, 11, 37, 80, 5, 60, 5, 56, 85, 9, 92], [92, 36, 57, 21, 48, 29, 77, 51, 52, 74, 68, 1, 18, 60, 70, 47, 98, 75, 81, 17, 12, 74, 1, 52, 50, 21, 30, 24, 17, 56, 29, 65, 18], [63, 47, 21, 28, 54, 39, 53, 42, 30, 59, 74, 9, 14, 66, 94, 45, 27, 44, 43, 98, 60, 57, 1, 65, 35, 19, 35, 58, 27, 38, 82, 96, 96], [29, 64, 7, 9, 34, 80, 65, 45, 40, 56, 95, 7, 32, 36, 9, 70, 83, 73, 92, 73, 20, 19, 65, 27, 87, 2, 88, 64, 48, 71, 20, 57, 11], [85, 39, 35, 38, 44, 69, 64, 28, 47, 77, 38, 4, 84, 50, 54, 72, 62, 33, 31, 60, 68, 37, 80, 62, 74, 96, 81, 17, 64, 11, 91, 85, 64], [45, 96, 40, 46, 4, 53, 91, 75, 80, 53, 8, 29, 93, 10, 11, 48, 15, 96, 80, 13, 47, 23, 81, 23, 41, 59, 28, 37, 6, 16, 46, 49, 89], [1, 59, 53, 1, 36, 70, 18, 90, 6, 18, 15, 1, 74, 7, 57, 87, 54, 92, 8, 41, 47, 60, 60, 18, 77, 5, 79, 47, 83, 23, 9, 42, 55], [45, 22, 54, 33, 86, 86, 2, 52, 34, 74, 17, 40, 78, 5, 77, 8, 52, 13, 8, 24, 27, 97, 9, 8, 28, 91, 74, 98, 99, 8, 18, 12, 85], [43, 68, 81, 7, 74, 86, 13, 75, 46, 95, 62, 39, 98, 22, 51, 53, 46, 62, 25, 90, 54, 5, 26, 45, 31, 84, 95, 63, 11, 27, 2, 43, 7], [20, 68, 7, 65, 20, 49, 16, 59, 39, 68, 20, 43, 2, 37, 39, 14, 90, 45, 94, 31, 68, 94, 88, 72, 80, 95, 1, 88, 19, 93, 21, 71, 27], [41, 67, 5, 99, 99, 88, 90, 4, 31, 54, 22, 28, 1, 27, 2, 46, 94, 37, 21, 43, 21, 4, 44, 74, 72, 49, 39, 58, 91, 76, 39, 70, 43], [23, 23, 33, 86, 60, 69, 14, 39, 49, 89, 1, 32, 65, 67, 62, 63, 16, 70, 59, 20, 53, 50, 8, 93, 52, 75, 77, 20, 16, 13, 92, 16, 18], [97, 3, 56, 96, 41, 64, 6, 95, 92, 95, 30, 15, 1, 13, 55, 68, 88, 8, 99, 55, 81, 9, 87, 46, 93, 83, 54, 51, 32, 52, 62, 54, 41], [81, 13, 63, 13, 67, 97, 51, 72, 40, 49, 87, 12, 24, 92, 46, 46, 45, 38, 95, 67, 51, 51, 88, 62, 71, 66, 32, 57, 23, 27, 21, 13, 52], [6, 91, 35, 9, 74, 55, 71, 71, 28, 63, 89, 65, 95, 45, 26, 47, 64, 27, 88, 10, 42, 45, 14, 27, 32, 93, 95, 64, 14, 88, 53, 30, 41], [55, 51, 89, 7, 37, 36, 89, 43, 26, 78, 33, 2, 21, 94, 58, 40, 95, 46, 68, 89, 38, 75, 97, 58, 78, 12, 6, 57, 18, 3, 96, 61, 17], [56, 24, 53, 35, 66, 26, 30, 60, 27, 57, 82, 78, 84, 84, 94, 31, 48, 59, 33, 27, 54, 33, 20, 67, 46, 19, 71, 91, 70, 29, 26, 17, 66], [85, 48, 88, 33, 78, 98, 69, 3, 81, 70, 80, 66, 84, 61, 48, 17, 8, 25, 8, 29, 82, 59, 62, 1, 58, 71, 74, 86, 8, 94, 15, 22, 79], [43, 32, 57, 81, 97, 19, 68, 26, 21, 12, 12, 44, 10, 81, 42, 92, 44, 58, 10, 11, 2, 5, 33, 1, 86, 46, 85, 40, 13, 16, 44, 70, 42], [31, 28, 33, 90, 54, 30, 46, 18, 1, 95, 73, 79, 87, 16, 87, 39, 92, 26, 85, 75, 42, 56, 11, 78, 50, 6, 63, 77, 46, 77, 45, 35, 83]], [23, 36, 42, 49, 50, 88, 97, 51, 1, 27, 4, 72, 11, 61, 24, 49, 75, 29, 96, 16, 11, 65, 13, 22, 13, 23, 84, 23, 20, 63, 35, 76, 22], 25, 30, 19",
"62"
],
[
"[[-82, -82, -76, -74, -72, -70, -70, -68, -66, -56, -56, -50, -48, -44, -42, -38, -36, -32, -26, -20, -20, -18, -8, 6, 8, 12, 12, 14, 18, 20, 24, 24, 30, 32, 36, 38, 40, 44, 50, 56, 60, 62, 66, 70, 76, 78, 90, 98, 98], [-92, -80, -76, -70, -58, -58, -50, -48, -38, -36, -34, -32, -30, -30, -24, -20, -20, -18, -10, -10, -8, -6, -6, -6, -4, 2, 10, 14, 24, 26, 30, 34, 36, 44, 52, 54, 64, 76, 78, 82, 86, 86, 86, 86, 86, 88, 88, 92, 94], [-98, -94, -86, -82, -80, -76, -74, -74, -72, -70, -70, -68, -66, -62, -50, -50, -48, -42, -34, -24, -22, -22, 2, 8, 8, 10, 12, 22, 22, 26, 26, 26, 30, 38, 44, 54, 56, 58, 68, 68, 72, 78, 80, 80, 84, 88, 92, 94, 98], [-92, -88, -84, -84, -82, -78, -78, -66, -60, -48, -48, -46, -42, -40, -40, -38, -36, -34, -30, -30, -26, -26, -22, -22, -20, -14, -12, 6, 28, 36, 38, 44, 46, 46, 48, 50, 52, 52, 56, 58, 60, 70, 80, 80, 80, 86, 92, 96, 98], [-98, -94, -80, -76, -72, -70, -70, -70, -68, -64, -64, -62, -60, -56, -54, -52, -50, -48, -46, -42, -40, -30, -28, -28, -24, -22, -6, -4, 0, 2, 10, 12, 18, 18, 32, 36, 58, 60, 68, 70, 72, 74, 80, 84, 86, 88, 88, 94, 98], [-96, -96, -86, -84, -84, -72, -72, -70, -70, -66, -64, -60, -58, -58, -46, -38, -38, -28, -22, -18, -14, 16, 18, 20, 20, 24, 24, 26, 32, 32, 34, 40, 42, 42, 44, 44, 46, 56, 58, 60, 62, 64, 66, 68, 68, 68, 74, 78, 86], [-98, -92, -70, -58, -54, -50, -50, -50, -46, -40, -40, -36, -34, -24, -22, -22, -18, -8, -6, -6, -2, 2, 2, 10, 16, 16, 20, 22, 24, 26, 28, 28, 30, 32, 38, 40, 42, 48, 56, 56, 58, 60, 66, 66, 72, 84, 90, 94, 96], [-98, -90, -82, -80, -78, -78, -70, -66, -60, -54, -48, -48, -38, -28, -18, -16, -14, -12, -12, -10, -8, -4, -4, -4, -2, 0, 2, 6, 6, 12, 16, 18, 20, 24, 36, 46, 52, 54, 60, 62, 66, 66, 70, 70, 82, 82, 86, 86, 88], [-98, -90, -88, -86, -78, -76, -76, -70, -66, -60, -56, -56, -56, -54, -52, -46, -40, -28, -26, -22, -20, -20, -18, -14, -12, -8, 0, 18, 18, 28, 34, 36, 36, 36, 38, 46, 50, 54, 56, 56, 60, 66, 70, 72, 74, 74, 80, 80, 82], [-98, -92, -90, -86, -84, -82, -78, -70, -66, -60, -58, -44, -42, -34, -32, -30, -24, -20, -16, -8, -4, 8, 8, 14, 14, 14, 14, 20, 20, 32, 38, 42, 52, 62, 62, 66, 68, 70, 72, 72, 78, 78, 78, 78, 84, 96, 98, 98, 98], [-90, -88, -82, -82, -82, -80, -74, -68, -68, -64, -58, -56, -54, -50, -42, -36, -32, -28, -20, -20, -20, -18, -16, -14, -6, -6, -2, 6, 8, 10, 20, 24, 26, 32, 38, 44, 46, 48, 56, 56, 58, 60, 64, 68, 74, 80, 88, 92, 96], [-96, -94, -88, -72, -72, -72, -70, -70, -64, -52, -46, -46, -44, -38, -34, -34, -28, -26, -20, -16, -14, -10, -8, -2, -2, 2, 6, 8, 10, 30, 34, 34, 36, 44, 52, 58, 60, 70, 72, 72, 74, 76, 76, 80, 90, 92, 92, 94, 98], [-98, -98, -96, -96, -84, -82, -80, -76, -62, -52, -46, -44, -44, -40, -38, -38, -36, -30, -22, -8, -4, -2, 0, 2, 4, 8, 12, 20, 22, 26, 26, 30, 34, 46, 46, 52, 54, 56, 58, 60, 62, 66, 72, 74, 78, 80, 90, 92, 96], [-94, -94, -92, -92, -80, -80, -74, -64, -56, -54, -52, -50, -50, -42, -42, -42, -40, -36, -36, -32, -24, -16, -14, -4, 0, 2, 4, 10, 12, 16, 22, 24, 26, 28, 28, 30, 40, 46, 48, 56, 58, 62, 62, 62, 80, 88, 88, 96, 98], [-96, -94, -94, -92, -84, -82, -80, -74, -70, -58, -54, -52, -52, -48, -44, -34, -34, -30, -28, -24, -14, -12, -4, -2, 2, 2, 4, 10, 12, 14, 24, 28, 38, 40, 46, 58, 62, 68, 72, 72, 74, 76, 82, 84, 84, 84, 84, 90, 98], [-98, -90, -84, -82, -76, -70, -66, -62, -60, -60, -58, -56, -54, -54, -50, -50, -46, -40, -40, -38, -32, -24, -22, -22, -20, -12, -12, -8, 6, 6, 8, 8, 8, 22, 26, 40, 42, 50, 50, 50, 50, 56, 64, 86, 92, 92, 94, 94, 96], [-92, -78, -74, -68, -66, -62, -62, -62, -60, -60, -54, -40, -36, -34, -34, -32, -22, -22, -18, -14, -12, -10, -6, -4, -2, 0, 12, 14, 18, 28, 32, 32, 38, 44, 48, 50, 52, 52, 60, 64, 66, 66, 82, 86, 90, 90, 94, 94, 96], [-96, -94, -92, -90, -88, -86, -84, -76, -74, -72, -72, -68, -66, -66, -58, -52, -50, -46, -42, -34, -32, -32, -30, -14, -10, -6, -6, -2, -2, 10, 14, 20, 30, 30, 34, 36, 36, 38, 38, 42, 44, 50, 52, 64, 68, 82, 90, 90, 98], [-98, -88, -82, -80, -80, -78, -76, -72, -70, -66, -66, -58, -56, -52, -52, -50, -50, -44, -42, -42, -32, -32, -30, -26, -22, -20, -20, -2, 0, 10, 12, 18, 20, 24, 24, 26, 36, 38, 42, 56, 66, 74, 76, 78, 78, 84, 86, 96, 98], [-94, -94, -94, -80, -76, -74, -68, -56, -52, -50, -44, -42, -38, -36, -34, -28, -26, -24, -16, -2, 0, 4, 8, 14, 16, 20, 22, 32, 34, 38, 46, 46, 48, 50, 52, 54, 62, 64, 66, 66, 72, 76, 78, 78, 80, 82, 82, 84, 94], [-98, -98, -90, -86, -80, -78, -76, -74, -74, -72, -72, -60, -58, -54, -50, -46, -32, -24, -22, -18, -18, -14, -12, -12, -10, -8, 8, 14, 24, 30, 36, 46, 48, 50, 58, 58, 62, 66, 66, 74, 74, 74, 78, 78, 80, 84, 86, 90, 92], [-98, -94, -82, -80, -72, -64, -60, -58, -48, -46, -46, -40, -32, -26, -24, -16, -14, -12, -10, -8, -6, -4, -4, 2, 4, 4, 12, 12, 14, 26, 34, 36, 40, 46, 48, 54, 66, 66, 66, 66, 66, 72, 78, 80, 80, 80, 94, 96, 98], [-96, -92, -86, -72, -70, -70, -68, -68, -66, -64, -62, -56, -50, -44, -32, -30, -28, -24, -12, -4, -4, -4, 2, 10, 16, 18, 18, 22, 32, 32, 36, 36, 40, 42, 46, 46, 50, 50, 50, 50, 52, 54, 64, 68, 70, 72, 74, 90, 96], [-98, -98, -98, -90, -86, -82, -64, -60, -58, -54, -48, -36, -36, -32, -30, -28, -18, -16, -14, -6, -2, 4, 6, 6, 10, 12, 14, 18, 24, 32, 34, 46, 48, 50, 52, 58, 66, 68, 70, 80, 80, 82, 84, 84, 86, 92, 94, 96, 98], [-98, -96, -88, -86, -86, -86, -86, -86, -84, -78, -78, -74, -72, -72, -70, -70, -70, -66, -64, -56, -42, -40, -38, -36, -34, -32, -30, -28, -26, -20, -8, -6, 0, 2, 2, 14, 24, 30, 34, 36, 44, 50, 52, 60, 66, 68, 74, 78, 86], [-96, -86, -72, -72, -70, -70, -68, -68, -64, -58, -58, -58, -54, -54, -52, -48, -46, -40, -38, -28, -14, -10, -6, -4, 0, 10, 10, 12, 16, 18, 18, 20, 20, 22, 34, 34, 40, 40, 46, 46, 58, 58, 62, 66, 68, 68, 72, 84, 92], [-96, -90, -88, -88, -82, -82, -76, -74, -70, -68, -62, -56, -52, -48, -46, -38, -22, -22, -16, -12, -8, 0, 4, 8, 14, 20, 22, 24, 28, 34, 36, 38, 44, 46, 48, 58, 66, 68, 68, 76, 84, 84, 86, 86, 88, 88, 90, 92, 94], [-96, -96, -96, -94, -90, -88, -88, -84, -76, -72, -72, -58, -54, -52, -52, -50, -40, -38, -32, -12, -12, -6, -4, -2, 0, 2, 2, 10, 12, 22, 28, 28, 30, 34, 42, 42, 54, 56, 58, 64, 70, 70, 74, 74, 84, 86, 88, 88, 90], [-94, -92, -84, -82, -82, -70, -66, -64, -60, -60, -58, -58, -54, -52, -52, -42, -36, -32, -30, -28, -26, -24, -22, -20, -16, -12, 0, 4, 6, 8, 14, 20, 30, 32, 46, 54, 60, 62, 62, 64, 66, 68, 68, 70, 70, 72, 72, 76, 88], [-90, -90, -90, -88, -88, -86, -78, -68, -62, -62, -60, -54, -54, -48, -48, -36, -36, -32, -28, -28, -22, -20, -6, -2, 4, 6, 8, 10, 14, 24, 28, 28, 28, 34, 34, 36, 44, 52, 54, 54, 66, 70, 70, 72, 78, 80, 84, 88, 88], [-98, -94, -94, -90, -84, -76, -72, -70, -68, -68, -60, -54, -54, -48, -46, -46, -44, -34, -28, -28, -26, -12, -8, -4, 2, 6, 6, 8, 14, 32, 32, 38, 38, 40, 44, 46, 46, 50, 50, 52, 54, 58, 60, 62, 70, 78, 86, 92, 92], [-98, -94, -94, -92, -90, -86, -82, -76, -74, -74, -66, -66, -66, -60, -60, -60, -56, -54, -50, -38, -30, -28, -18, -16, -16, -2, 0, 6, 14, 16, 16, 18, 28, 30, 30, 32, 34, 40, 46, 52, 52, 54, 60, 70, 82, 84, 88, 90, 94], [-96, -88, -84, -80, -78, -78, -78, -68, -62, -60, -52, -44, -36, -36, -36, -34, -32, -32, -30, -26, -22, -14, -10, -6, -4, -4, 0, 0, 0, 10, 12, 14, 14, 16, 24, 34, 38, 44, 52, 54, 54, 56, 58, 60, 64, 66, 66, 92, 98], [-98, -88, -80, -80, -74, -72, -70, -68, -64, -62, -62, -62, -58, -56, -52, -50, -50, -46, -34, -30, -30, -26, -18, -12, 4, 10, 14, 22, 24, 30, 32, 38, 42, 42, 46, 56, 56, 58, 68, 72, 80, 82, 86, 90, 90, 92, 96, 98, 98], [-96, -92, -92, -90, -90, -90, -88, -82, -82, -82, -80, -68, -64, -60, -50, -34, -30, -16, -10, -10, -8, -4, -4, -2, 0, 18, 20, 24, 24, 24, 30, 30, 36, 38, 38, 40, 42, 42, 44, 48, 52, 52, 56, 76, 84, 88, 92, 94, 98], [-98, -90, -82, -80, -74, -74, -72, -72, -72, -72, -64, -60, -56, -56, -56, -52, -40, -38, -24, -20, -18, -18, -12, -10, -6, 10, 18, 22, 24, 24, 26, 26, 30, 34, 40, 40, 44, 50, 58, 60, 62, 64, 70, 76, 80, 80, 86, 88, 96], [-96, -94, -86, -82, -72, -68, -68, -64, -62, -56, -54, -50, -50, -48, -44, -26, -20, -16, -10, -8, -6, 6, 8, 10, 10, 10, 16, 20, 28, 28, 32, 40, 42, 44, 44, 46, 46, 48, 58, 62, 72, 76, 80, 84, 86, 88, 92, 96, 98], [-96, -94, -94, -94, -92, -92, -90, -84, -82, -78, -76, -74, -74, -62, -58, -58, -58, -42, -42, -22, -20, -14, -14, -12, -4, -2, 4, 4, 4, 8, 16, 20, 24, 26, 32, 40, 42, 46, 52, 54, 56, 56, 60, 60, 62, 62, 82, 90, 96], [-98, -96, -96, -76, -70, -66, -54, -54, -52, -50, -46, -40, -36, -34, -32, -30, -28, -28, -26, -26, -22, -20, -18, -6, 6, 10, 20, 22, 28, 30, 30, 32, 32, 34, 38, 42, 46, 54, 58, 70, 76, 76, 84, 90, 94, 94, 98, 98, 98], [-90, -86, -82, -72, -70, -70, -66, -62, -60, -58, -54, -54, -40, -36, -32, -30, -28, -26, -26, -24, -16, -14, -10, -8, -8, -8, -8, 4, 6, 8, 14, 16, 18, 18, 22, 26, 30, 58, 66, 82, 84, 92, 92, 94, 96, 96, 96, 96, 98], [-92, -86, -80, -74, -68, -66, -64, -64, -52, -44, -36, -34, -32, -30, -26, -22, -20, -18, -14, -12, -8, 2, 10, 10, 12, 16, 24, 32, 32, 44, 46, 48, 52, 52, 54, 66, 68, 70, 72, 74, 82, 84, 88, 90, 94, 94, 96, 96, 96], [-92, -90, -80, -78, -78, -78, -74, -66, -50, -50, -46, -46, -44, -44, -40, -38, -34, -32, -32, -30, -18, -18, -16, -14, -12, 4, 10, 10, 10, 18, 20, 20, 22, 24, 24, 26, 26, 46, 46, 48, 48, 52, 58, 62, 64, 72, 80, 96, 96], [-98, -96, -94, -92, -88, -86, -84, -82, -76, -76, -60, -58, -58, -58, -56, -50, -48, -38, -34, -30, -20, -16, -16, -10, -4, -2, 10, 12, 18, 26, 32, 34, 48, 48, 52, 64, 64, 68, 70, 74, 76, 78, 80, 90, 92, 92, 92, 94, 96], [-96, -88, -88, -82, -76, -70, -62, -58, -56, -48, -48, -38, -36, -30, -18, -18, -16, -16, -14, -12, -6, 4, 8, 10, 10, 12, 14, 24, 28, 28, 34, 38, 44, 50, 58, 60, 62, 66, 66, 72, 74, 76, 76, 78, 78, 84, 86, 88, 96], [-98, -94, -94, -94, -90, -86, -78, -74, -68, -66, -62, -58, -56, -54, -52, -52, -48, -44, -44, -44, -30, -26, -26, -12, -4, 2, 4, 4, 6, 6, 12, 12, 14, 16, 16, 22, 22, 30, 30, 34, 36, 42, 50, 50, 64, 70, 80, 88, 98], [-98, -96, -96, -94, -88, -84, -58, -56, -52, -48, -44, -30, -26, -26, -20, -18, -16, -8, -8, -8, -6, -6, -4, -4, -2, 0, 6, 12, 12, 14, 24, 34, 42, 46, 48, 56, 60, 62, 62, 72, 72, 80, 84, 88, 88, 90, 90, 94, 96], [-98, -90, -82, -78, -70, -68, -64, -62, -56, -52, -50, -44, -44, -42, -36, -26, -24, -22, -12, -10, -6, -4, 0, 2, 6, 10, 18, 32, 32, 36, 38, 42, 48, 52, 54, 56, 62, 64, 66, 66, 66, 66, 70, 72, 74, 74, 78, 86, 92], [-96, -90, -88, -78, -74, -72, -70, -68, -66, -60, -58, -56, -56, -50, -50, -44, -36, -26, -24, -18, -16, -16, -12, -6, 2, 6, 8, 10, 10, 18, 18, 22, 24, 26, 42, 46, 64, 64, 66, 72, 74, 74, 76, 88, 94, 94, 96, 98, 98], [-94, -82, -78, -78, -76, -64, -64, -58, -58, -56, -56, -52, -44, -42, -38, -36, -22, -16, -14, -6, -2, 4, 4, 8, 8, 12, 14, 14, 14, 16, 16, 22, 30, 34, 38, 42, 44, 58, 62, 66, 66, 68, 76, 78, 80, 80, 84, 90, 98]], [-96, -90, -90, -86, -86, -86, -84, -76, -76, -74, -72, -70, -52, -50, -34, -32, -26, -20, -16, -14, -10, -8, -8, -6, 4, 12, 14, 16, 18, 24, 26, 32, 34, 38, 42, 42, 48, 48, 48, 48, 64, 66, 70, 76, 76, 82, 86, 86, 96], 37, 38, 26",
"52"
],
[
"[[0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1], [1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1], [0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1], [0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1]], [0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0], 43, 32, 35",
"1"
],
[
"[[13, 16, 26, 38, 44, 71, 73], [16, 28, 39, 47, 48, 59, 61], [15, 30, 50, 59, 60, 89, 90], [24, 61, 63, 71, 72, 76, 83], [14, 36, 39, 42, 64, 76, 77], [4, 6, 11, 24, 34, 36, 58], [22, 35, 63, 70, 81, 91, 98]], [3, 9, 32, 55, 78, 85, 90], 5, 3, 3",
"24"
],
[
"[[-48, -22, -52, -86, -22], [-54, -6, -16, -84, -34], [-46, -16, -80, -82, -38], [-44, 98, -54, -32, -88], [42, 52, 38, -20, -36]], [48, -68, 0, -54, -80], 4, 4, 3",
"-240"
],
[
"[[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], 7, 10, 9",
"1"
],
[
"[[62, 15, 2, 68, 63, 42, 57, 46, 37, 30, 1, 51, 47, 75, 50, 24, 48, 56, 93, 9, 50, 79, 58, 74, 81, 64, 63, 60, 49, 24, 46, 55, 89, 10, 49, 46, 17, 86, 24, 51, 69, 21, 16, 97, 66, 14], [95, 91, 93, 6, 64, 52, 1, 29, 77, 42, 16, 76, 40, 30, 32, 7, 36, 72, 1, 94, 12, 25, 11, 75, 52, 95, 64, 4, 54, 78, 40, 67, 81, 92, 5, 42, 65, 94, 59, 12, 35, 75, 82, 83, 72, 47], [69, 96, 79, 34, 12, 8, 27, 58, 49, 56, 43, 17, 26, 87, 1, 19, 99, 48, 80, 25, 56, 40, 42, 63, 92, 27, 76, 55, 15, 2, 30, 81, 79, 4, 15, 52, 21, 94, 80, 27, 93, 33, 44, 20, 45, 34], [18, 47, 49, 73, 19, 87, 86, 72, 52, 21, 36, 27, 96, 2, 87, 35, 22, 20, 97, 92, 69, 13, 15, 95, 80, 58, 84, 66, 56, 12, 57, 36, 90, 25, 14, 43, 43, 80, 2, 53, 42, 65, 52, 42, 5, 48], [85, 40, 51, 5, 9, 71, 80, 70, 2, 18, 87, 36, 78, 90, 57, 60, 27, 92, 15, 64, 47, 22, 99, 53, 87, 28, 97, 94, 28, 83, 64, 10, 10, 34, 30, 90, 17, 87, 31, 7, 29, 68, 29, 69, 47, 35], [15, 32, 84, 9, 45, 6, 37, 97, 12, 69, 91, 45, 39, 58, 49, 85, 76, 2, 48, 71, 81, 88, 16, 71, 49, 32, 68, 5, 23, 65, 93, 47, 88, 59, 43, 43, 36, 59, 52, 77, 1, 25, 36, 86, 26, 42], [39, 15, 66, 15, 13, 29, 80, 10, 75, 3, 21, 65, 41, 19, 76, 82, 64, 55, 63, 46, 24, 94, 40, 75, 24, 20, 2, 86, 90, 24, 53, 70, 65, 90, 45, 70, 96, 98, 68, 60, 12, 31, 27, 57, 63, 17], [79, 58, 4, 37, 50, 72, 71, 69, 45, 86, 47, 25, 98, 59, 63, 16, 13, 97, 66, 2, 8, 13, 4, 54, 96, 1, 80, 3, 35, 15, 62, 20, 74, 58, 80, 65, 85, 37, 74, 6, 93, 29, 10, 19, 80, 61], [53, 59, 23, 20, 92, 20, 65, 17, 71, 81, 41, 50, 37, 86, 75, 62, 21, 49, 59, 34, 56, 94, 41, 71, 70, 94, 44, 6, 25, 19, 37, 3, 13, 39, 86, 98, 19, 30, 52, 26, 35, 25, 65, 74, 9, 69], [15, 92, 20, 89, 35, 8, 50, 32, 17, 2, 21, 64, 76, 26, 9, 49, 25, 63, 17, 51, 58, 1, 97, 3, 28, 80, 11, 89, 23, 86, 9, 27, 5, 52, 31, 62, 77, 63, 86, 41, 59, 19, 28, 78, 6, 63], [76, 97, 67, 74, 17, 13, 95, 60, 16, 63, 87, 95, 84, 66, 82, 69, 80, 44, 54, 32, 29, 37, 47, 62, 78, 79, 45, 10, 63, 11, 20, 53, 95, 72, 40, 75, 89, 81, 1, 37, 56, 15, 85, 93, 84, 9], [72, 60, 72, 79, 28, 8, 48, 76, 89, 84, 89, 46, 42, 83, 65, 90, 71, 93, 64, 50, 55, 88, 66, 29, 6, 6, 47, 99, 61, 98, 24, 57, 4, 83, 56, 56, 46, 21, 46, 33, 78, 85, 15, 28, 80, 33], [49, 8, 68, 50, 35, 16, 35, 44, 22, 80, 94, 48, 98, 13, 43, 79, 28, 68, 15, 99, 5, 27, 62, 63, 85, 66, 55, 31, 44, 48, 73, 58, 71, 50, 94, 22, 19, 79, 76, 13, 97, 27, 91, 19, 47, 12], [52, 75, 69, 55, 13, 16, 39, 7, 82, 28, 77, 88, 84, 98, 47, 21, 21, 43, 40, 92, 82, 92, 33, 94, 3, 21, 42, 47, 89, 40, 59, 78, 13, 97, 62, 96, 74, 69, 95, 73, 90, 11, 67, 10, 48, 47], [37, 21, 84, 6, 27, 11, 42, 18, 62, 58, 81, 7, 9, 71, 77, 38, 69, 12, 16, 61, 2, 44, 81, 71, 2, 99, 22, 38, 30, 51, 39, 11, 62, 73, 95, 74, 13, 87, 33, 17, 23, 8, 90, 45, 36, 73], [80, 14, 37, 80, 75, 12, 38, 69, 25, 91, 72, 14, 3, 36, 97, 93, 61, 20, 22, 9, 56, 89, 37, 99, 9, 50, 59, 95, 67, 25, 48, 36, 91, 66, 48, 61, 71, 13, 50, 54, 51, 29, 58, 48, 14, 19], [64, 64, 97, 27, 3, 7, 54, 36, 57, 24, 82, 5, 83, 49, 78, 87, 87, 93, 70, 62, 68, 26, 40, 84, 82, 76, 98, 27, 41, 71, 23, 56, 3, 46, 85, 39, 62, 92, 73, 74, 16, 79, 40, 24, 91, 63], [88, 29, 39, 88, 15, 76, 44, 40, 66, 67, 26, 9, 61, 5, 24, 71, 8, 56, 35, 89, 71, 12, 72, 54, 26, 84, 57, 58, 46, 73, 92, 24, 20, 59, 70, 86, 84, 15, 98, 51, 29, 15, 74, 7, 19, 64], [14, 46, 80, 84, 53, 57, 50, 32, 23, 48, 35, 83, 89, 10, 67, 51, 96, 63, 84, 18, 6, 41, 48, 79, 66, 17, 17, 45, 51, 7, 65, 79, 29, 34, 92, 17, 45, 36, 2, 36, 66, 30, 65, 4, 55, 61], [23, 37, 69, 52, 89, 17, 78, 39, 81, 83, 94, 61, 33, 11, 46, 34, 27, 35, 55, 1, 22, 99, 91, 24, 56, 28, 70, 88, 23, 48, 77, 57, 57, 72, 69, 79, 95, 58, 37, 68, 17, 66, 11, 82, 97, 20], [24, 46, 12, 76, 76, 15, 6, 97, 22, 95, 83, 52, 69, 59, 17, 24, 54, 85, 60, 41, 2, 84, 71, 76, 71, 27, 36, 54, 79, 32, 66, 65, 27, 15, 39, 30, 38, 58, 6, 66, 73, 31, 73, 74, 64, 51], [71, 37, 75, 62, 93, 88, 55, 77, 22, 54, 67, 34, 50, 89, 66, 77, 17, 54, 1, 53, 83, 3, 74, 37, 41, 38, 48, 39, 25, 46, 72, 61, 70, 77, 7, 58, 5, 77, 60, 64, 95, 22, 81, 95, 53, 14], [52, 25, 79, 20, 16, 26, 40, 49, 23, 82, 56, 61, 40, 89, 99, 58, 90, 17, 22, 20, 1, 14, 5, 99, 34, 63, 71, 7, 51, 56, 8, 3, 8, 39, 45, 90, 97, 24, 45, 77, 51, 57, 41, 59, 47, 15], [98, 5, 15, 87, 54, 20, 2, 88, 73, 98, 90, 4, 79, 94, 74, 26, 3, 91, 65, 28, 25, 93, 61, 63, 3, 97, 15, 40, 1, 79, 88, 71, 15, 55, 94, 93, 38, 56, 10, 41, 68, 28, 85, 74, 71, 19], [10, 27, 56, 25, 36, 22, 54, 74, 28, 72, 53, 19, 66, 49, 49, 56, 94, 55, 24, 82, 54, 66, 1, 7, 37, 45, 49, 85, 34, 51, 91, 74, 64, 28, 87, 81, 39, 42, 93, 60, 43, 10, 85, 12, 7, 62], [73, 51, 16, 10, 70, 67, 50, 75, 37, 60, 45, 31, 57, 94, 44, 51, 23, 74, 16, 79, 78, 57, 63, 90, 28, 24, 63, 5, 61, 2, 20, 86, 57, 46, 42, 5, 34, 72, 35, 68, 37, 6, 19, 15, 48, 93], [70, 43, 61, 32, 77, 46, 11, 98, 66, 70, 44, 73, 51, 53, 55, 69, 54, 3, 65, 25, 75, 37, 47, 44, 78, 78, 3, 98, 73, 71, 34, 54, 80, 69, 20, 35, 1, 27, 42, 18, 93, 96, 60, 9, 80, 57], [2, 31, 55, 74, 66, 86, 59, 31, 40, 18, 55, 86, 79, 74, 45, 19, 83, 26, 24, 28, 15, 34, 34, 28, 66, 68, 94, 87, 19, 66, 67, 48, 38, 39, 67, 75, 23, 28, 23, 10, 65, 75, 50, 23, 85, 55], [91, 22, 56, 89, 33, 23, 8, 81, 56, 97, 2, 88, 94, 38, 61, 8, 56, 85, 68, 31, 99, 30, 75, 61, 23, 68, 10, 95, 53, 57, 55, 42, 48, 97, 23, 40, 61, 99, 30, 54, 18, 66, 83, 58, 6, 35], [46, 84, 95, 99, 63, 16, 14, 13, 55, 83, 6, 77, 77, 40, 1, 85, 53, 14, 66, 46, 99, 67, 42, 55, 11, 27, 40, 38, 81, 54, 80, 3, 52, 77, 5, 22, 75, 50, 95, 54, 88, 27, 1, 85, 6, 60], [38, 32, 53, 70, 13, 71, 48, 20, 37, 38, 25, 23, 58, 93, 34, 66, 47, 71, 50, 64, 11, 60, 45, 49, 57, 25, 42, 75, 78, 97, 58, 31, 83, 60, 53, 72, 45, 71, 22, 43, 79, 1, 81, 8, 62, 39], [53, 8, 61, 2, 80, 52, 70, 9, 47, 23, 87, 99, 41, 89, 23, 54, 5, 50, 50, 96, 51, 30, 41, 93, 90, 77, 30, 4, 63, 52, 89, 30, 72, 96, 75, 55, 74, 12, 67, 62, 3, 38, 53, 62, 80, 80], [88, 65, 51, 42, 27, 28, 91, 20, 8, 18, 46, 12, 36, 12, 41, 29, 31, 18, 27, 84, 84, 83, 96, 70, 2, 3, 40, 53, 1, 39, 16, 29, 8, 23, 38, 71, 89, 87, 92, 83, 83, 57, 3, 64, 62, 51], [76, 38, 28, 18, 53, 19, 90, 48, 7, 74, 89, 6, 10, 5, 29, 51, 59, 32, 33, 66, 4, 90, 39, 9, 90, 77, 35, 48, 29, 58, 35, 14, 72, 89, 17, 75, 45, 8, 54, 58, 40, 65, 6, 90, 26, 47], [93, 31, 76, 38, 69, 20, 19, 44, 28, 53, 95, 64, 50, 11, 27, 64, 77, 18, 24, 1, 46, 8, 77, 72, 48, 14, 87, 28, 54, 9, 63, 68, 67, 59, 37, 20, 17, 74, 6, 30, 49, 65, 50, 80, 75, 77], [76, 40, 73, 71, 21, 7, 8, 38, 60, 4, 40, 32, 18, 36, 82, 31, 29, 74, 73, 19, 51, 98, 46, 74, 98, 53, 24, 66, 7, 14, 71, 95, 4, 86, 60, 14, 80, 28, 34, 18, 49, 68, 76, 55, 72, 35], [66, 6, 48, 50, 62, 34, 10, 41, 14, 93, 60, 58, 8, 51, 31, 89, 42, 67, 29, 75, 90, 98, 58, 4, 87, 82, 29, 27, 38, 13, 70, 4, 40, 30, 81, 29, 57, 61, 90, 10, 82, 36, 9, 32, 45, 87], [76, 45, 58, 23, 90, 81, 1, 48, 12, 36, 90, 35, 36, 83, 19, 6, 17, 6, 90, 88, 26, 12, 53, 49, 23, 13, 52, 17, 30, 92, 22, 83, 64, 1, 82, 71, 67, 30, 54, 67, 64, 93, 93, 8, 45, 71], [65, 37, 45, 41, 91, 59, 22, 56, 29, 22, 12, 44, 56, 7, 73, 87, 77, 98, 9, 38, 37, 62, 86, 66, 53, 64, 73, 86, 8, 20, 8, 3, 46, 51, 11, 53, 50, 57, 26, 93, 80, 41, 34, 70, 82, 82], [77, 1, 52, 73, 66, 59, 96, 50, 60, 63, 38, 44, 26, 95, 62, 99, 37, 34, 8, 44, 31, 10, 82, 75, 82, 92, 54, 61, 3, 52, 55, 7, 48, 22, 43, 71, 50, 96, 27, 56, 44, 66, 48, 25, 27, 22], [5, 86, 67, 70, 46, 7, 43, 52, 7, 19, 85, 27, 99, 55, 1, 48, 16, 41, 2, 47, 59, 51, 21, 19, 80, 80, 8, 41, 51, 75, 74, 49, 54, 48, 73, 15, 69, 24, 96, 19, 97, 23, 28, 90, 60, 50], [76, 65, 97, 12, 56, 95, 81, 27, 85, 46, 42, 56, 77, 90, 55, 6, 91, 41, 81, 93, 62, 83, 56, 21, 31, 28, 10, 28, 47, 92, 29, 85, 9, 30, 94, 62, 88, 86, 52, 16, 30, 50, 47, 1, 51, 11], [83, 14, 96, 9, 59, 84, 27, 94, 5, 20, 93, 58, 99, 71, 9, 5, 78, 38, 97, 97, 42, 88, 50, 51, 28, 64, 62, 32, 22, 50, 18, 57, 12, 61, 86, 72, 35, 53, 64, 42, 90, 32, 46, 84, 82, 65], [28, 99, 16, 15, 46, 15, 57, 32, 82, 90, 2, 29, 28, 8, 41, 33, 74, 61, 87, 64, 7, 51, 79, 30, 70, 33, 88, 9, 24, 7, 61, 22, 5, 12, 37, 19, 91, 38, 55, 23, 54, 62, 82, 8, 44, 73], [30, 77, 76, 3, 41, 88, 95, 36, 78, 76, 33, 86, 54, 38, 92, 36, 65, 99, 67, 8, 72, 33, 71, 88, 8, 63, 43, 89, 57, 6, 20, 74, 52, 50, 61, 66, 52, 3, 3, 60, 28, 6, 90, 51, 60, 15], [32, 86, 94, 46, 87, 40, 20, 75, 67, 86, 63, 63, 48, 42, 81, 69, 30, 11, 45, 18, 58, 68, 58, 79, 95, 51, 81, 1, 88, 58, 49, 75, 89, 60, 52, 24, 80, 70, 47, 17, 45, 94, 69, 17, 11, 97]], [19, 39, 31, 50, 61, 70, 43, 64, 45, 82, 49, 80, 21, 37, 96, 30, 42, 82, 96, 30, 22, 26, 42, 88, 57, 12, 59, 58, 83, 64, 66, 2, 37, 60, 5, 76, 20, 81, 10, 57, 70, 74, 65, 72, 15, 84], 34, 25, 32",
"14"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string s ) {
int n = s . length ( );
int lps [ n ];
lps [ 0 ] = 0;
int len = 0;
int i = 1;
while ( i < n ) {
if ( s [ i ] == s [ len ] ) {
len ++;
lps [ i ] = len;
i ++;
}
else {
if ( len != 0 ) {
len = lps [ len - 1 ];
}
else {
lps [ i ] = 0;
i ++;
}
}
}
int res = lps [ n - 1 ];
return ( res > n / 2 ) ? n / 2 : res;
}
| [] | null | [] | STEINS_ALGORITHM_FOR_FINDING_GCD | python | [] | def f_gold ( a , b ) :
if ( a == 0 ) :
return b
if ( b == 0 ) :
return a
k = 0
while ( ( ( a | b ) & 1 ) == 0 ) :
a = a >> 1
b = b >> 1
k = k + 1
while ( ( a & 1 ) == 0 ) :
a = a >> 1
while ( b != 0 ) :
while ( ( b & 1 ) == 0 ) :
b = b >> 1
if ( a > b ) :
temp = a
a = b
b = temp
b = ( b - a )
return ( a << k )
| code_translation | [
[
"37, 93",
"1"
],
[
"58, 13",
"1"
],
[
"89, 27",
"1"
],
[
"75, 14",
"1"
],
[
"59, 47",
"1"
],
[
"84, 39",
"3"
],
[
"47, 76",
"1"
],
[
"37, 75",
"1"
],
[
"83, 62",
"1"
],
[
"28, 58",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int x, int k ) {
int i = 0;
while ( i < n ) {
if ( arr [ i ] == x ) return i;
i = i + max ( 1, abs ( arr [ i ] - x ) / k );
}
cout << "number is not present!";
return - 1;
}
| [] | null | [] | FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT | python | [] | def f_gold ( n ) :
return 1162261467 % n == 0
| code_translation | [
[
"1",
"True"
],
[
"3",
"True"
],
[
"27",
"True"
],
[
"9",
"True"
],
[
"-9",
"True"
],
[
"11",
"False"
],
[
"57",
"False"
],
[
"21",
"False"
],
[
"60",
"False"
],
[
"44",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int m, int n ) {
int count [ m ] [ n ];
for ( int i = 0;
i < m;
i ++ ) count [ i ] [ 0 ] = 1;
for ( int j = 0;
j < n;
j ++ ) count [ 0 ] [ j ] = 1;
for ( int i = 1;
i < m;
i ++ ) {
for ( int j = 1;
j < n;
j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ];
}
return count [ m - 1 ] [ n - 1 ];
}
| [] | null | [] | COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS | python | [] | def f_gold(arr, n):
x = sorted(arr)
count = 1
for i in range(0, n - 1):
if (x[i] + 1 != x[i + 1]):
count = count + 1
return count
| code_translation | [
[
"[3, 7, 7, 11, 14, 14, 14, 16, 17, 17, 21, 22, 24, 27, 27, 27, 31, 33, 35, 36, 36, 37, 38, 43, 45, 49, 52, 54, 57, 59, 59, 60, 67, 73, 74, 74, 74, 75, 75, 79, 83, 87, 90, 93, 97], 42",
"34"
],
[
"[-28, 72, 60, 62, 40, 64, 50, -36, -24, 40, -6, 78, -80, -82, 2, -30, 70, 94, -2, -30, 92, 12, -46, 32, -96, -2, 36, -40, -42, 66, 98], 24",
"24"
],
[
"[1, 1], 1",
"1"
],
[
"[96, 89, 24, 28, 70, 78, 78, 35, 98, 65, 18, 81, 35, 91, 33, 88, 69, 52, 66, 17, 73, 79, 30, 33, 78, 60, 42, 8, 36, 6, 47, 87, 8, 98, 9, 77, 78, 24, 86, 91, 13, 79, 50, 85, 3, 7, 61, 94, 86], 26",
"19"
],
[
"[-92, -92, -90, -84, -78, -66, -60, -60, -46, -42, -38, -32, -24, -20, -18, -16, -14, -10, 0, 4, 6, 12, 24, 32, 34, 44, 48, 50, 50, 64, 66, 68, 80, 84, 86, 86, 88, 90, 90, 90, 92, 94, 96, 98, 98], 42",
"42"
],
[
"[0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0], 27",
"26"
],
[
"[8, 12, 13, 14, 16, 20, 20, 21, 23, 23, 24, 27, 29, 29, 29, 29, 35, 35, 38, 39, 40, 46, 50, 52, 60, 62, 62, 65, 65, 65, 70, 71, 72, 73, 75, 76, 80, 81, 82, 83, 85, 91, 95, 97, 98, 98], 29",
"23"
],
[
"[-84, 92, 70, -46, 26, -94, -82, -26, -90, -62, 52, 62, -58, 44, -14, -6, 58, 2, 10, 76, -34, 42, -26, 80, 26, 32, -82, 38, 2, 72, 68, 44, 24, 84, -32, 54, -96, -8, 36, 80, -82, 32, 98, -68], 25",
"25"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21",
"20"
],
[
"[64, 10, 6, 3, 67, 95, 72, 96, 72, 30, 99, 21, 46, 23, 48, 38, 48, 50, 53, 91, 59, 58, 27, 95, 63, 20, 27, 22, 58, 3, 11, 75, 77, 64, 46, 1, 67, 79, 6, 46, 57, 79, 49, 83, 21, 36, 44], 46",
"36"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | LONGEST_REPEATING_SUBSEQUENCE | python | [] | def f_gold ( str ) :
n = len ( str )
dp = [ [ 0 ] * ( n + 1 ) ] * ( 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 ] )
return dp [ n ] [ n ]
| code_translation | [
[
"'JxZFz'",
"0"
],
[
"'7648992235770'",
"3"
],
[
"'11100000'",
"6"
],
[
"'cRN SgYjPsctJ'",
"1"
],
[
"'434'",
"1"
],
[
"'1'",
"0"
],
[
"'JRfZIAsbrPBZ'",
"1"
],
[
"'03779368305592'",
"3"
],
[
"'1111000'",
"5"
],
[
"'BkULuIi'",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n ) {
sort ( a, a + n );
int count = 1;
int answer = 0;
for ( int i = 1;
i < n;
i ++ ) {
if ( a [ i ] == a [ i - 1 ] ) {
count += 1;
}
else {
answer = answer + ( count * ( count - 1 ) ) / 2;
count = 1;
}
}
answer = answer + ( count * ( count - 1 ) ) / 2;
return answer;
}
| [] | null | [] | FAST_MULTIPLICATION_METHOD_WITHOUT_USING_MULTIPLICATION_OPERATOR_RUSSIAN_PEASANTS_ALGORITHM | python | [] | def f_gold ( a , b ) :
res = 0
while ( b > 0 ) :
if ( b & 1 ) :
res = res + a
a = a << 1
b = b >> 1
return res
| code_translation | [
[
"4, 33",
"132"
],
[
"36, 67",
"2412"
],
[
"65, 52",
"3380"
],
[
"55, 37",
"2035"
],
[
"35, 76",
"2660"
],
[
"69, 98",
"6762"
],
[
"84, 62",
"5208"
],
[
"5, 80",
"400"
],
[
"15, 36",
"540"
],
[
"67, 84",
"5628"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int result = - 1;
for ( int i = 0;
i < n;
i ++ ) for ( int j = 0;
j < n - 1;
j ++ ) for ( int k = j + 1;
k < n;
k ++ ) if ( arr [ j ] * arr [ k ] == arr [ i ] ) result = max ( result, arr [ i ] );
return result;
}
| [] | null | [] | FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_1 | python | [] | def f_gold ( arr , size ) :
Hash = dict ( )
for i in range ( size ) :
Hash [ arr [ i ] ] = Hash.get ( arr [ i ] , 0 ) + 1 ;
for i in Hash :
if ( Hash [ i ] % 2 != 0 ) :
return i
return - 1
| code_translation | [
[
"[49, 90], 1",
"49"
],
[
"[-96, 94, 92, -24, 48, 54, -30, -86, 28, -18, 12, -64, -36, 68, 68, -78, -6, 30, -84, 20, 52, -36, 40, -62, 90, -48, 86, 98, 12, 44, 98, -66, 52, 34, 36, 76, -50, -20, -20, -20], 39",
"-96"
],
[
"[0, 1], 1",
"0"
],
[
"[79, 55, 18, 99, 38, 93, 19, 49, 21, 74, 16, 76, 82, 52, 86, 17, 42, 9, 6, 63, 1, 40, 75, 59, 41, 81], 23",
"79"
],
[
"[-90, -84, -82, -68, -66, -66, -60, -60, -48, -44, -36, -34, -30, -16, -14, -12, -10, -6, 2, 10, 10, 14, 22, 26, 30, 34, 46, 50, 52, 62, 64, 64, 66, 72, 74, 78, 78, 82, 84, 88, 92], 23",
"-90"
],
[
"[1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1], 18",
"1"
],
[
"[2, 4, 5, 7, 7, 18, 18, 23, 23, 25, 25, 31, 41, 43, 45, 46, 52, 52, 55, 64, 69, 69, 80, 81, 84, 90, 91, 93, 94, 94, 94, 94, 96, 98, 99], 20",
"2"
],
[
"[86, 66, -8, 2, -18, -22, 38, 4, -38, -54, 78, 64, 78, 20, -32, 84, -70, 66, -46, 12, -12, 8, 44, 14, 20], 20",
"86"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21",
"0"
],
[
"[11, 4, 98, 38, 20, 41, 1, 8], 7",
"11"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b ) {
if ( a == 0 || b == 0 ) return 1;
return floor ( log10 ( abs ( a ) ) + log10 ( abs ( b ) ) ) + 1;
}
| [] | null | [] | SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2 | python | [] | def f_gold ( n ) :
n -= 1
n |= n >> 1
n |= n >> 2
n |= n >> 4
n |= n >> 8
n |= n >> 16
n += 1
return n
| code_translation | [
[
"60",
"64"
],
[
"20",
"32"
],
[
"33",
"64"
],
[
"34",
"64"
],
[
"68",
"128"
],
[
"79",
"128"
],
[
"20",
"32"
],
[
"41",
"64"
],
[
"36",
"64"
],
[
"17",
"32"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
long f_gold ( int n ) {
long dp [ 2 ] [ n + 1 ];
dp [ 0 ] [ 1 ] = 1;
dp [ 1 ] [ 1 ] = 2;
for ( int i = 2;
i <= n;
i ++ ) {
dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] + dp [ 1 ] [ i - 1 ];
dp [ 1 ] [ i ] = dp [ 0 ] [ i - 1 ] * 2 + dp [ 1 ] [ i - 1 ];
}
return dp [ 0 ] [ n ] + dp [ 1 ] [ n ];
}
| [] | null | [] | FIND_LARGEST_D_IN_ARRAY_SUCH_THAT_A_B_C_D | python | [] | def f_gold ( S , n ) :
found = False
S.sort ( )
for i in range ( n - 1 , - 1 , - 1 ) :
for j in range ( 0 , n ) :
if ( i == j ) :
continue
for k in range ( j + 1 , n ) :
if ( i == k ) :
continue
for l in range ( k + 1 , n ) :
if ( i == l ) :
continue
if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) :
found = True
return S [ i ]
if ( found == False ) :
return - 1
| code_translation | [
[
"[8, 12, 14, 15, 16, 20, 27, 28, 29, 30, 35, 41, 46, 51, 53, 55, 55, 58, 63, 64, 72, 73, 75, 75, 75, 82, 82, 86, 89, 91, 92, 94, 95, 95, 97, 97, 98], 24",
"75"
],
[
"[-96, -82, -62, -58, -56, -50, -44, -44, -40, -28, -22, -20, -12, -2, 10, 26, 34, 42, 48, 74, 86, 92], 19",
"48"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1], 8",
"0"
],
[
"[10, 10, 47, 54, 55, 58, 65, 66, 67, 77, 84], 5",
"-1"
],
[
"[-46, -28, -20, -18, 4, 8, 18, 38, 90, 90], 6",
"-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, 1, 1, 1, 1, 1, 1], 35",
"1"
],
[
"[11, 13, 14, 21, 26, 28, 36, 39, 41, 42, 43, 44, 49, 49, 57, 58, 59, 59, 63, 64, 67, 69, 70, 75, 78, 79, 83, 83, 86, 91, 92, 93, 96, 96, 96, 97], 30",
"91"
],
[
"[-88, -82, -82, -76, -70, -66, -62, -56, -48, -48, -32, -30, -18, -16, 0, 4, 34, 38, 46, 46, 50, 52, 54, 54, 62, 74, 76, 78, 96], 16",
"-30"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 17",
"1"
],
[
"[4, 5, 6, 9, 11, 14, 18, 20, 21, 25, 33, 49, 55, 56, 58, 61, 66, 66, 68, 74, 74, 87, 92, 99], 23",
"92"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | REPLACE_CHARACTER_C1_C2_C2_C1_STRING_S | python | [] | def f_gold ( s , c1 , c2 ) :
l = len ( s )
for i in range ( l ) :
if ( s [ i ] == c1 ) :
s = s [ 0 : i ] + c2 + s [ i + 1 : ]
elif ( s [ i ] == c2 ) :
s = s [ 0 : i ] + c1 + s [ i + 1 : ]
return s
| code_translation | [
[
"'IZTSMw j', 'W', 'k'",
"'IZTSMw j'"
],
[
"'7288334', '6', '9'",
"'7288334'"
],
[
"'010110000', '1', '1'",
"'010110000'"
],
[
"'b gJX', 't', 'P'",
"'b gJX'"
],
[
"'734', '4', '4'",
"'734'"
],
[
"'1', '1', '1'",
"'1'"
],
[
"'xCaUKdhA', 'X', 'S'",
"'xCaUKdhA'"
],
[
"'4370992644981', '5', '6'",
"'4370992544981'"
],
[
"'01010', '0', '1'",
"'10101'"
],
[
"'ZNIFGshaWA', 'Q', 'x'",
"'ZNIFGshaWA'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int prevPrev = 1, prev = 2, curr = 3;
while ( n > 0 ) {
prevPrev = prev;
prev = curr;
curr = prevPrev + prev;
n = n - ( curr - prev - 1 );
}
n = n + ( curr - prev - 1 );
return prev + n;
}
| [] | null | [] | FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY | python | [] | def f_gold ( arr , n ) :
for i in range ( n ) :
if arr [ i ] is i :
return i
return - 1
| code_translation | [
[
"[8, 16, 21, 26, 27, 29, 34, 35, 35, 37, 38, 40, 48, 52, 58, 59, 60, 61, 63, 63, 65, 66, 69, 75, 79, 83, 86, 88, 91, 91, 96], 23",
"-1"
],
[
"[22, -70, 34, -44, 84, 54, 14, -88], 7",
"-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], 31",
"0"
],
[
"[59, 67, 70, 34, 18, 22, 52, 95, 11, 66, 60, 24, 7, 71, 52, 88, 32, 52, 85, 81, 32, 44, 25, 51, 47, 97, 81, 33, 88, 38, 36, 54, 80, 25, 70, 27, 75, 29, 94], 37",
"-1"
],
[
"[-96, -96, -94, -88, -88, -82, -72, -72, -70, -70, -66, -64, -64, -62, -58, -54, -46, -44, -30, -26, -22, -8, -6, -2, 0, 26, 30, 30, 34, 42, 42, 48, 64, 76, 90, 96], 34",
"-1"
],
[
"[0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1], 15",
"0"
],
[
"[2, 2, 4, 7, 10, 15, 16, 16, 23, 24, 27, 39, 42, 58, 60, 64, 72, 74, 78, 78, 78, 80, 80, 84, 85, 86, 88, 88, 90, 92, 93, 94, 95, 96], 22",
"-1"
],
[
"[-68, -48, 36, 22, -80, -48, -74, -14, 44, -46, -76, 18, -16, -36, -68, 0, -30, -56, 42, 92, 82, 64, -18, -6, -78, -86, 26, 86, 36, -66, -50, 18, -26, 48, 8], 20",
"-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, 1, 1, 1, 1, 1], 23",
"0"
],
[
"[3, 76, 99, 1, 1, 29, 9, 12, 57, 12, 74, 22, 83, 77, 39, 84, 50, 60, 36, 90, 88, 62, 79, 58, 58, 40, 44, 99, 84, 63, 23, 21, 16, 98, 68, 8, 46], 35",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int n ) {
bool arr [ 10 ];
for ( int i = 0;
i < 10;
i ++ ) arr [ i ] = false;
while ( n > 0 ) {
int digit = n % 10;
if ( arr [ digit ] ) return false;
arr [ digit ] = true;
n = n / 10;
}
return true;
}
| [] | null | [] | COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1 | python | [] | def f_gold ( n ) :
return ( 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) // 2 ) )
| code_translation | [
[
"55",
"83271"
],
[
"36",
"23383"
],
[
"69",
"164359"
],
[
"92",
"389483"
],
[
"73",
"194619"
],
[
"16",
"2073"
],
[
"88",
"340869"
],
[
"19",
"3459"
],
[
"66",
"143848"
],
[
"68",
"157319"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
double f_gold ( double s ) {
return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 );
}
| [] | null | [] | NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR | python | [] | def f_gold ( n ) :
return ( n * ( n - 1 ) * ( n - 2 ) // 6 )
| code_translation | [
[
"67",
"47905"
],
[
"58",
"30856"
],
[
"67",
"47905"
],
[
"60",
"34220"
],
[
"4",
"4"
],
[
"97",
"147440"
],
[
"9",
"84"
],
[
"16",
"560"
],
[
"83",
"91881"
],
[
"87",
"105995"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS | python | [] | def f_gold ( n ) :
C = [ [ 0 for x in range ( n + 1 ) ] for y in range ( n + 1 ) ]
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 ) :
if n % 2 == 0 :
sum = sum + C [ n ] [ i ]
return sum
| code_translation | [
[
"18",
"131072"
],
[
"54",
"9007199254740992"
],
[
"67",
"0"
],
[
"17",
"0"
],
[
"47",
"0"
],
[
"99",
"0"
],
[
"26",
"33554432"
],
[
"93",
"0"
],
[
"57",
"0"
],
[
"98",
"158456325028528675187087900672"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | DECODE_MEDIAN_STRING_ORIGINAL_STRING | python | [] | def f_gold ( s ) :
l = len ( s )
s1 = ""
if ( l % 2 == 0 ) :
isEven = True
else :
isEven = False
for i in range ( 0 , l , 2 ) :
if ( isEven ) :
s1 = s [ i ] + s1
s1 += s [ i + 1 ]
else :
if ( l - i > 1 ) :
s1 += s [ i ]
s1 = s [ i + 1 ] + s1
else :
s1 += s [ i ]
return s1
| code_translation | [
[
"' EgvQCeqYpZtv'",
"'tpqCvE gQeYZv'"
],
[
"'488540'",
"'484850'"
],
[
"'0000101010111'",
"'1000000011111'"
],
[
"'syw'",
"'ysw'"
],
[
"'402355'",
"'524035'"
],
[
"'0'",
"'0'"
],
[
"'wmHMlAtq'",
"'tlHwmMAq'"
],
[
"'7962'",
"'6792'"
],
[
"'111111'",
"'111111'"
],
[
"'UbgRGDquop'",
"'oqGgUbRDup'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int n ) {
return 1162261467 % n == 0;
}
| [] | null | [] | LEXICOGRAPHICAL_MAXIMUM_SUBSTRING_STRING | python | [] | def f_gold ( str ) :
mx = ""
for i in range ( len ( str ) ) :
mx = max ( mx , str [ i : ] )
return mx
| code_translation | [
[
"'HCoAefoaan'",
"'oaan'"
],
[
"'80336005'",
"'80336005'"
],
[
"'01111111110'",
"'1111111110'"
],
[
"'qIH'",
"'qIH'"
],
[
"'4210598472796'",
"'98472796'"
],
[
"'10101'",
"'10101'"
],
[
"'imqmKdatcgXjs'",
"'tcgXjs'"
],
[
"'950509666021'",
"'9666021'"
],
[
"'10111101101'",
"'111101101'"
],
[
"'wasqgYFvz'",
"'z'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [
"import math"
] | null | [] | FIND_LARGEST_PRIME_FACTOR_NUMBER | python | [] | import math
def f_gold ( n ) :
maxPrime = - 1
while n % 2 == 0 :
maxPrime = 2
n >>= 1
for i in range ( 3 , int ( math.sqrt ( n ) ) + 1 , 2 ) :
while n % i == 0 :
maxPrime = i
n = n / i
if n > 2 :
maxPrime = n
return int ( maxPrime )
| code_translation | [
[
"98",
"7"
],
[
"8",
"2"
],
[
"78",
"13"
],
[
"65",
"13"
],
[
"55",
"11"
],
[
"10",
"5"
],
[
"10",
"5"
],
[
"37",
"37"
],
[
"39",
"13"
],
[
"15",
"5"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n );
int count = 1;
for ( int i = 0;
i < n - 1;
i ++ ) {
if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++;
}
return count;
}
| [] | null | [] | COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1 | python | [] | def f_gold ( n ) :
nCr = 1
res = 1
for r in range ( 1 , n + 1 ) :
nCr = ( nCr * ( n + 1 - r ) ) / r ;
res += nCr * nCr ;
return res ;
| code_translation | [
[
"52",
"1.5830658481259492e+30"
],
[
"75",
"9.282606973670874e+43"
],
[
"25",
"126410606437752.0"
],
[
"80",
"9.204512581373429e+46"
],
[
"18",
"9075135300.0"
],
[
"17",
"2333606220.0"
],
[
"33",
"7.219428434016266e+18"
],
[
"8",
"12870.0"
],
[
"99",
"2.275088307942298e+58"
],
[
"8",
"12870.0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int i, j;
int leftsum, rightsum;
for ( i = 0;
i < n;
++ i ) {
leftsum = 0;
for ( j = 0;
j < i;
j ++ ) leftsum += arr [ j ];
rightsum = 0;
for ( j = i + 1;
j < n;
j ++ ) rightsum += arr [ j ];
if ( leftsum == rightsum ) return i;
}
return - 1;
}
| [] | null | [] | COUNT_OF_PAIRS_SATISFYING_THE_GIVEN_CONDITION | python | [] | def f_gold ( a , b ) :
s = str ( b )
i = 0
while i < ( len ( s ) ) :
if ( s [ i ] != '9' ) :
break
i += 1
result = 0
if ( i == len ( s ) ) :
result = a * len ( s )
else :
result = a * ( len ( s ) - 1 )
return result
| code_translation | [
[
"31, 91",
"31"
],
[
"72, 85",
"72"
],
[
"23, 49",
"23"
],
[
"42, 32",
"42"
],
[
"13, 7",
"0"
],
[
"93, 5",
"0"
],
[
"33, 32",
"33"
],
[
"94, 76",
"94"
],
[
"60, 60",
"60"
],
[
"11, 26",
"11"
]
] |
|
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 i = 1;
i <= n;
i ++ ) {
for ( int j = 1;
j <= n;
j ++ ) {
if ( str [ i - 1 ] == str [ j - 1 ] && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ];
else dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] );
}
}
return dp [ n ] [ n ];
}
| [] | null | [] | WILDCARD_CHARACTER_MATCHING | python | [] | def f_gold ( first , second ) :
if len ( first ) == 0 and len ( second ) == 0 :
return True
if len ( first ) > 1 and first [ 0 ] == '*' and len ( second ) == 0 :
return False
if ( len ( first ) > 1 and first [ 0 ] == '?' ) or ( len ( first ) != 0 and len ( second ) != 0 and first [ 0 ] == second [ 0 ] ) :
return f_gold ( first [ 1 : ] , second [ 1 : ] ) ;
if len ( first ) != 0 and first [ 0 ] == '*' :
return f_gold ( first [ 1 : ] , second ) or f_gold ( first , second [ 1 : ] )
return False
| code_translation | [
[
"'g*ks', 'geeks'",
"True"
],
[
"'ge?ks*', 'geeksforgeeks'",
"True"
],
[
"'g*k', 'gee'",
"False"
],
[
"'*pqrs', 'pqrst'",
"False"
],
[
"'abc*bcd', 'abcdhghgbcd'",
"True"
],
[
"'abc*c?d', 'abcd'",
"False"
],
[
"'*c*d', 'abcd'",
"True"
],
[
"'*?c*d', 'abcd'",
"True"
],
[
"'?*1', '010111111001'",
"True"
],
[
"'a*', 'CBzHMjUGCUJD'",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
unsigned int f_gold ( unsigned int a, unsigned int b ) {
int res = 0;
while ( b > 0 ) {
if ( b & 1 ) res = res + a;
a = a << 1;
b = b >> 1;
}
return res;
}
| [] | null | [] | COUNT_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1 | python | [] | def f_gold ( n ) :
der = [ 0 for i in range ( n + 1 ) ]
der [ 0 ] = 1
der [ 1 ] = 0
der [ 2 ] = 1
for i in range ( 3 , n + 1 ) :
der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] )
return der [ n ]
| code_translation | [
[
"22",
"413496759611120779881"
],
[
"91",
"49737356646526719034213089927154223053699087874086781722304941593871272334365070834417115566952728064714407669076679964208877907815269515530"
],
[
"33",
"3194414033122656019847107490716704992"
],
[
"93",
"425552823467682608056727197416731532447449395850686504416041080277162606092827546059272840790847541321696472016620073773771159379267445974874772"
],
[
"90",
"546564358753040868507836153045650802787902064550404194750603753778805190487528250927660610625854154557301183176666812793504152833134829841"
],
[
"59",
"51018668150501265540235132665923869255996448774374442042212248341013805640069546"
],
[
"88",
"68235250780654290700104388644900225067153815799051709706692104092235354617668945184476980103102890706279798149396605841885662026608593"
],
[
"41",
"12306496796223503426182275975073985352177589230680"
],
[
"70",
"4406670251980594417267750082536198266624210145069636319631367398390065735998555968319248084521910921"
],
[
"63",
"729360839132840072112579847186740997928954991820506048457784613793199724878208627068582"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int size ) {
unordered_map < int, int > hash;
for ( int i = 0;
i < size;
i ++ ) {
hash [ arr [ i ] ] ++;
}
for ( auto i : hash ) {
if ( i . second % 2 != 0 ) {
return i . first;
}
}
return - 1;
}
| [] | null | [] | BREAKING_NUMBER_FIRST_PART_INTEGRAL_DIVISION_SECOND_POWER_10 | python | [] | def f_gold ( N ) :
length = len ( N )
l = int ( ( length ) / 2 )
count = 0
for i in range ( l + 1 ) :
s = N [ 0 : 0 + i ]
l1 = len ( s )
t = N [ i : l1 + i ]
try :
if s [ 0 ] == '0' or t [ 0 ] == '0' :
continue
except :
continue
if s == t :
count += 1
return count
| code_translation | [
[
"'ZCoQhuM'",
"0"
],
[
"'2674377254'",
"0"
],
[
"'11'",
"1"
],
[
"'LbuGlvRyWAPBpo'",
"0"
],
[
"'26382426486138'",
"0"
],
[
"'111010111010'",
"2"
],
[
"'hUInqJXNdbfP'",
"0"
],
[
"'5191'",
"0"
],
[
"'1110101101'",
"1"
],
[
"'2202200'",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
unsigned int f_gold ( unsigned int n ) {
n --;
n |= n >> 1;
n |= n >> 2;
n |= n >> 4;
n |= n >> 8;
n |= n >> 16;
n ++;
return n;
}
| [] | null | [] | DOUBLE_FACTORIAL_1 | python | [] | def f_gold ( n ) :
res = 1 ;
for i in range ( n , - 1 , - 2 ) :
if ( i == 0 or i == 1 ) :
return res ;
else :
res *= i ;
| code_translation | [
[
"88",
"46764808100261091644698061863195655483083859821779272859648000000000"
],
[
"24",
"1961990553600"
],
[
"3",
"3"
],
[
"22",
"81749606400"
],
[
"53",
"157952079428395476360490147277859375"
],
[
"2",
"2"
],
[
"88",
"46764808100261091644698061863195655483083859821779272859648000000000"
],
[
"30",
"42849873690624000"
],
[
"38",
"63777066403145711616000"
],
[
"2",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int S [ ], int n ) {
bool found = false;
sort ( S, S + n );
for ( int i = n - 1;
i >= 0;
i -- ) {
for ( int j = 0;
j < n;
j ++ ) {
if ( i == j ) continue;
for ( int k = j + 1;
k < n;
k ++ ) {
if ( i == k ) continue;
for ( int l = k + 1;
l < n;
l ++ ) {
if ( i == l ) continue;
if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) {
found = true;
return S [ i ];
}
}
}
}
}
if ( found == false ) return INT_MIN;
}
| [] | null | [] | COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME | python | [] | def f_gold ( n ) :
table = [ 0 for i in range ( n + 1 ) ]
table [ 0 ] = 1
for i in range ( 3 , n + 1 ) :
table [ i ] += table [ i - 3 ]
for i in range ( 5 , n + 1 ) :
table [ i ] += table [ i - 5 ]
for i in range ( 10 , n + 1 ) :
table [ i ] += table [ i - 10 ]
return table [ n ]
| code_translation | [
[
"83",
"30"
],
[
"29",
"4"
],
[
"17",
"1"
],
[
"12",
"1"
],
[
"93",
"37"
],
[
"55",
"16"
],
[
"97",
"33"
],
[
"75",
"27"
],
[
"22",
"2"
],
[
"52",
"10"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | COUNT_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ | python | [] | def f_gold(n, k):
if (n + 1 >= k):
return (k - 1)
else:
return (2 * n + 1 - k)
| code_translation | [
[
"90, 74",
"73"
],
[
"86, 36",
"35"
],
[
"92, 38",
"37"
],
[
"72, 71",
"70"
],
[
"25, 57",
"-6"
],
[
"11, 53",
"-30"
],
[
"94, 80",
"79"
],
[
"91, 75",
"74"
],
[
"66, 58",
"57"
],
[
"34, 88",
"-19"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string s, char c1, char c2 ) {
int l = s . length ( );
for ( int i = 0;
i < l;
i ++ ) {
if ( s [ i ] == c1 ) s [ i ] = c2;
else if ( s [ i ] == c2 ) s [ i ] = c1;
}
return s;
}
| [] | null | [] | FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X | python | [] | def f_gold ( y , x ) :
return ( y % pow ( 2 , x ) )
| code_translation | [
[
"57, 76",
"57"
],
[
"80, 46",
"80"
],
[
"84, 96",
"84"
],
[
"35, 16",
"35"
],
[
"3, 84",
"3"
],
[
"42, 79",
"42"
],
[
"7, 2",
"3"
],
[
"99, 83",
"99"
],
[
"13, 61",
"13"
],
[
"44, 8",
"44"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int i;
for ( i = 0;
i < n;
i ++ ) {
if ( arr [ i ] == i ) return i;
}
return - 1;
}
| [] | null | [] | MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME | python | [] | def f_gold ( arr , n ) :
count = 0
cummulative_sum = 0
arr.sort ( )
for i in range ( n ) :
if arr [ i ] >= cummulative_sum :
count += 1
cummulative_sum += arr [ i ]
return count
| code_translation | [
[
"[7, 33, 34, 42, 42, 45, 73], 5",
"3"
],
[
"[-98, -90, -80, -66, -64, -62, -48, -30, -20, -10, 4, 6, 12, 14, 32, 42, 44, 44, 52, 64, 86, 92, 94], 16",
"4"
],
[
"[0, 0, 0, 0, 1], 2",
"2"
],
[
"[11, 44, 71, 82, 85, 89], 3",
"3"
],
[
"[-96, -92, -78, -72, -68, -58, -52, -50, -50, -48, -42, -32, -20, -18, -4, 0, 0, 2, 18, 18, 20, 24, 32, 34, 36, 38, 38, 60, 66, 68, 70, 72, 72, 74, 76, 96, 98], 21",
"5"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 16",
"11"
],
[
"[8, 9, 10, 11, 12, 15, 17, 19, 20, 21, 24, 30, 33, 35, 36, 39, 41, 41, 42, 54, 62, 63, 68, 70, 71, 72, 77, 85, 86, 86, 94, 95, 97, 97], 31",
"5"
],
[
"[-94, -90, -72, -70, -66, -60, -24, -16, 4, 4, 10, 22, 28, 36, 46, 60, 70, 72, 76, 92, 96], 20",
"6"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13",
"13"
],
[
"[7, 10, 12, 16, 20, 28, 31, 40, 42, 47, 53, 57, 59, 63, 63, 67, 69, 84, 90, 97], 10",
"4"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
return 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) / 2 );
}
| [] | null | [] | MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME | python | [] | def f_gold ( s ) :
l = len ( s )
i = 0
j = l - 1
while i <= j :
if ( s [ i ] != s [ j ] ) :
return False
i += 1
j -= 1
return True
| code_translation | [
[
"'aadaa'",
"True"
],
[
"'2674377254'",
"False"
],
[
"'11'",
"True"
],
[
"'0011000 '",
"False"
],
[
"'26382426486138'",
"False"
],
[
"'111010111010'",
"False"
],
[
"'abccba'",
"True"
],
[
"'5191'",
"False"
],
[
"'1110101101'",
"False"
],
[
"'abcdecbe'",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int arr [ ], int n ) {
unordered_set < int > us;
for ( int i = 0;
i < n;
i ++ ) us . insert ( arr [ i ] );
int count = 1;
int curr_ele = arr [ 0 ] - 1;
while ( us . find ( curr_ele ) != us . end ( ) ) {
count ++;
curr_ele --;
}
curr_ele = arr [ 0 ] + 1;
while ( us . find ( curr_ele ) != us . end ( ) ) {
count ++;
curr_ele ++;
}
return ( count == ( int ) ( us . size ( ) ) );
}
| [] | null | [] | CHECK_STRING_CAN_OBTAINED_ROTATING_ANOTHER_STRING_2_PLACES | python | [] | def f_gold ( str1 , str2 ) :
if ( len ( str1 ) != len ( str2 ) ) :
return False
clock_rot = ""
anticlock_rot = ""
l = len ( str2 )
anticlock_rot = ( anticlock_rot + str2 [ l - 2 : ] + str2 [ 0 : l - 2 ] )
clock_rot = clock_rot + str2 [ 2 : ] + str2 [ 0 : 2 ]
return ( str1 == clock_rot or str1 == anticlock_rot )
| code_translation | [
[
"'amazon', 'azonam'",
"True"
],
[
"'onamaz', 'amazon'",
"True"
],
[
"'amazon', 'azoman'",
"False"
],
[
"'ab', 'ab'",
"True"
],
[
"'737009', '239119'",
"False"
],
[
"'000110', '01111'",
"False"
],
[
"'l', 'YVo hqvnGxow'",
"False"
],
[
"'4420318628', '52856'",
"False"
],
[
"'11011111000000', '10'",
"False"
],
[
"' pvFHANc', 'xBIDFbiGb'",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
return n * ( n - 1 ) * ( n - 2 ) / 6;
}
| [] | null | [] | MINIMUM_ROTATIONS_REQUIRED_GET_STRING | python | [] | def f_gold ( str ) :
tmp = str + str
n = len ( str )
for i in range ( 1 , n + 1 ) :
substring = tmp [ i : n ]
if ( str == substring ) :
return i
return n
| code_translation | [
[
"'vdevdNdQSopPtj'",
"14"
],
[
"'5'",
"1"
],
[
"'100010101011'",
"12"
],
[
"'tlDOvJHAyMllu'",
"13"
],
[
"'06'",
"2"
],
[
"'101'",
"3"
],
[
"'DYgtU'",
"5"
],
[
"'4'",
"1"
],
[
"'00'",
"2"
],
[
"'Dt'",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int C [ n + 1 ] [ n + 1 ];
int i, j;
for ( i = 0;
i <= n;
i ++ ) {
for ( j = 0;
j <= min ( i, n );
j ++ ) {
if ( j == 0 || j == i ) C [ i ] [ j ] = 1;
else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
}
}
int sum = 0;
for ( int i = 0;
i <= n;
i += 2 ) sum += C [ n ] [ i ];
return sum;
}
| [] | null | [] | MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1 | python | [] | def f_gold ( arr , n ) :
cum_sum = 0
for i in range ( 0 , n ) :
cum_sum += arr [ i ]
curr_val = 0
for i in range ( 0 , n ) :
curr_val += i * arr [ i ]
res = curr_val
for i in range ( 1 , n ) :
next_val = ( curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ) )
curr_val = next_val
res = max ( res , next_val )
return res
| code_translation | [
[
"[6, 6, 13, 14, 16, 20, 24, 24, 24, 27, 28, 36, 49, 51, 55, 56, 62, 69, 74, 74, 76, 85, 86, 90, 92, 98], 13",
"2249"
],
[
"[-42, 96, 68, 64, 14, -74, 76, 42, 34, -92, -20, 28, -80, -34, -22, 96, -46, 96, 10, -82, 82, 50, -24, 48, 56, 72, -40, -86, 84, 66, -62, 50, -76, 34], 27",
"9152"
],
[
"[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 10",
"35"
],
[
"[37, 88, 70, 86, 24, 62, 34, 44, 37, 42, 46, 34, 23, 32, 55, 2, 5, 70, 30, 46, 40, 65, 91, 4, 7, 74, 46, 12, 30, 22, 1, 91, 89, 88, 97, 6, 6, 11, 33, 14, 68, 24], 39",
"34887"
],
[
"[-92, -90, -70, -70, -10, 2, 10, 12, 14, 40, 44, 46, 64, 68, 68, 96], 11",
"586"
],
[
"[1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1], 15",
"58"
],
[
"[9, 15, 15, 17, 19, 20, 21, 23, 25, 25, 25, 32, 32, 33, 45, 51, 54, 59, 68, 71, 71, 71, 72, 75, 78, 80, 82, 82, 88, 89, 92, 93, 94, 97], 22",
"11145"
],
[
"[52, -78, -80, 32, -56, -98, -36, 86, 34, -36, 42, 46, 50, 0, 34, -46, -2, -18, -96, 12, -42, 62, 32, 78, 66, -8, 50, 60, 10, -18, 66, 80, -24, -98, 8, 48, 34, 44, -80, -34, 72, 0, -60, 52, 40, 20], 45",
"14776"
],
[
"[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], 33",
"297"
],
[
"[45, 35, 25, 7, 24, 73, 25, 86, 48, 70, 47, 91, 96, 15, 39, 9], 8",
"1359"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string s ) {
int l = s . length ( );
string s1 = "";
bool isEven = ( l % 2 == 0 ) ? true : false;
for ( int i = 0;
i < l;
i += 2 ) {
if ( isEven ) {
s1 = s [ i ] + s1;
s1 += s [ i + 1 ];
}
else {
if ( l - i > 1 ) {
s1 += s [ i ];
s1 = s [ i + 1 ] + s1;
}
else {
s1 += s [ i ];
}
}
}
return s1;
}
| [] | null | [] | MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS | python | [] | def f_gold ( arr , N , K ) :
arr.sort ( )
res = 2147483647
for i in range ( ( N - K ) + 1 ) :
curSeqDiff = arr [ i + K - 1 ] - arr [ i ]
res = min ( res , curSeqDiff )
return res
| code_translation | [
[
"[1, 1, 4, 18, 21, 35, 37, 39, 76, 81, 86, 92, 96], 7, 6",
"34"
],
[
"[-94, -86, -48, -48, -38, -8, -6, 0, 2, 24, 34, 52, 62], 9, 12",
"2147483647"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 16, 26",
"2147483647"
],
[
"[3, 10, 13, 23, 30, 30, 34, 36, 37, 39, 43, 50, 57, 66, 71, 74, 81, 83, 89, 94, 94, 99], 17, 20",
"2147483647"
],
[
"[-96, -94, -92, -84, -80, -72, -24, -22, -18, -14, 6, 8, 26, 28, 30, 36, 50, 58, 80, 84, 92, 92], 21, 12",
"82"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21, 22",
"2147483647"
],
[
"[6, 7, 9, 27, 30, 42, 54, 55, 57, 57, 59, 76, 84, 84, 84], 13, 14",
"2147483647"
],
[
"[-96, -86, -80, -72, -70, -68, -64, -64, -56, -54, -38, -30, -24, -16, -16, -12, -12, -10, 0, 0, 4, 4, 24, 28, 38, 40, 44, 48, 50, 54, 54, 62, 62, 68, 80, 84, 88, 88, 92, 94], 31, 26",
"122"
],
[
"[0, 1], 1, 1",
"0"
],
[
"[1, 6, 7, 8, 10, 10, 18, 54, 55, 56, 59, 59, 61, 63, 67, 69, 75, 78, 88, 89, 93, 97, 98], 22, 14",
"39"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string str ) {
string mx = "";
for ( int i = 0;
i < str . length ( );
++ i ) mx = max ( mx, str . substr ( i ) );
return mx;
}
| [
"import sys"
] | null | [] | SORT_ARRAY_APPLYING_GIVEN_EQUATION | python | [] | import sys
def f_gold(arr, n, A, B, C):
for i in range(n):
arr[i] = (A * arr[i] * arr[i] + B * arr[i] + C)
index = - (sys.maxsize - 1)
maximum = - (sys.maxsize - 1)
for i in range(n):
if maximum < arr[i]:
index = i
maximum = arr[i]
i = 0
j = n - 1
new_arr = [0] * n
k = 0
while i < index and j > index:
if arr[i] < arr[j]:
new_arr[k] = arr[i]
k += 1
i += 1
else:
new_arr[k] = arr[j]
k += 1
j -= 1
while i < index:
new_arr[k] = arr[i]
k += 1
i += 1
while j > index:
new_arr[k] = arr[j]
k += 1
j -= 1
new_arr[n - 1] = maximum
for i in range(n):
arr[i] = new_arr[i]
| code_translation | [
[
"[373, 3754, 9853, 0, 78, 85, 85, 92], 4, 4, 5, 4",
"None"
],
[
"[1463, 10143, 45143, 80663, 120143, 63863, 160223, 70823, 88463, 102263, 26663, 45143, 49023, 75663, 34463, 9263, 143, 0, -90, -5, -94, -43, 29, -29, 86, -79, -8, 27, -20, -44, 16], 18, 20, 20, 23",
"None"
],
[
"[18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 59, 59, 59, 59, 59, 59, 1, 1, 1], 25, 26, 15, 18",
"None"
],
[
"[86666, 68641, 55733, 65288, 278438, 214248, 285319, 65288, 202418, 12774, 15868, 163659, 168944, 279, 94464, 31604, 12774, 226414, 17541, 148308, 75599, 75599, 168944, 2344, 292284, 15868, 185303, 278438, 226414, 320984, 251754, 208291, 320984, 4, 25, 69, 30, 76, 68, 88, 29, 73, 68, 51, 24, 14, 69, 18], 33, 42, 35, 41",
"None"
],
[
"[5132, 6728, 54952, 58248, 63372, 70540, 86028, 98652, -12, -1, 9, 29, 48, 52, 56, 63, 88], 8, 12, 8, 8",
"None"
],
[
"[7, 7, 7, 21, 7, 21, 21, 1, 1, 1], 7, 8, 6, 7",
"None"
],
[
"[629, 945, 2869, 6759, 11059, 13605, 16415, 17919, 21125, 26429, 30295, 32327, 38819, 41115, 43477, 48399, 48399, 50959, 64749, 76969, 80189, 0, 54, 55, 59, 64, 66, 71, 72, 72, 73, 76, 78, 82, 82, 84, 92, 93, 95], 22, 33, 19, 25",
"None"
],
[
"[26376, 706, 18067, 1192, 54591, 22398, 12921, 98842, 52738, 118, 9688, 26376, 217, 34746, 143178, 10338, 1192, 8178, 108663, 0, 19, 62, 98, -55, -42, 79, 26, 62, -56, -85, -22], 20, 16, 19, 16",
"None"
],
[
"[23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 63, 63, 63, 63, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1], 23, 21, 19, 23",
"None"
],
[
"[281, 39841, 98691, 34543, 49511, 62501, 26553, 179883, 58003, 93017, 58003, 126303, 153, 139667, 191733, 67167, 168411, 34543, 126303, 98691, 45517, 129581, 3871, 15953, 917, 6483, 28067, 0, 90, 22, 55, 67, 99, 60, 58], 28, 21, 23, 23",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
long long f_gold ( long long n ) {
long long maxPrime = - 1;
while ( n % 2 == 0 ) {
maxPrime = 2;
n >>= 1;
}
for ( int i = 3;
i <= sqrt ( n );
i += 2 ) {
while ( n % i == 0 ) {
maxPrime = i;
n = n / i;
}
}
if ( n > 2 ) maxPrime = n;
return maxPrime;
}
| [] | null | [] | ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS | python | [] | def f_gold ( arr , n , x ) :
i = 0
for i in range ( i , n ) :
if ( arr [ i ] == x ) :
return i
return - 1
| code_translation | [
[
"[4, 5, 5, 11, 13, 14, 15, 19, 22, 22, 23, 26, 29, 29, 36, 44, 48, 49, 65, 65, 67, 68, 70, 76, 79, 79, 81, 85, 88, 91, 91, 92, 92, 97], 17, 5",
"1"
],
[
"[-24, -78, -32, -48, 0, 4, -42], 4, 0",
"-1"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], 6, 0",
"0"
],
[
"[38, 14, 75, 16, 91, 11, 98, 43, 67, 9, 21, 10, 82, 72, 32, 81, 48, 60, 2, 91, 10, 90, 12, 83], 17, 75",
"2"
],
[
"[-92, -92, -82, -80, -76, -66, -64, -64, -56, -48, -38, -38, -34, -32, -32, -10, -8, -6, -2, 0, 8, 10, 18, 20, 22, 22, 30, 34, 38, 38, 38, 44, 50, 52, 56, 64, 64, 66, 70, 76, 88], 25, 25",
"-1"
],
[
"[0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1], 11, -1",
"-1"
],
[
"[1, 4, 4, 4, 4, 8, 12, 13, 14, 14, 22, 25, 25, 27, 29, 33, 36, 38, 40, 40, 40, 41, 47, 47, 47, 48, 48, 50, 51, 52, 52, 52, 55, 56, 59, 59, 62, 64, 66, 77, 82, 84, 90, 91, 91, 93], 38, 4",
"1"
],
[
"[-90, -60, -58, -72, 92, 54, -32, -70, -94, 18, 64, -90, -90, -56, 82, -14, -74, -96, -90, -8, -48, 76, -28, 10, -52, -8, -46, -32, 82, 46, 58, 92, 4, 48, -96, -66, 60, 60, 62, -68], 22, 22",
"-1"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1, 1], 8, 8",
"-1"
],
[
"[42, 17, 77, 96, 72, 36, 74, 97, 7, 94, 80, 7, 27, 58, 49, 81, 51, 9], 16, 11",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int nCr = 1, res = 1;
for ( int r = 1;
r <= n;
r ++ ) {
nCr = ( nCr * ( n + 1 - r ) ) / r;
res += nCr * nCr;
}
return res;
}
| [] | null | [] | ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES | python | [] | def f_gold ( a , n , k ) :
if k >= n - 1 :
return n
best = 0
times = 0
for i in range ( n ) :
if a [ i ] > best :
best = a [ i ]
if i == True :
times = 1
else :
times += 1
if times >= k :
return best
return best
| code_translation | [
[
"[2, 5, 5, 9, 10, 10, 11, 14, 23, 27, 31, 32, 33, 33, 33, 37, 39, 41, 41, 42, 42, 43, 47, 60, 61, 68, 73, 73, 73, 78, 80, 80, 82, 83, 86, 87, 89, 92, 94, 98], 33, 37",
"33"
],
[
"[80, -58, 64, 48, -16, 60, -50, -52, 62, -86, -96, 52, 26, -30, 14], 14, 13",
"14"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], 7, 6",
"7"
],
[
"[90, 23, 43, 42, 7, 71, 79], 4, 4",
"4"
],
[
"[-96, -96, -90, -84, -68, -64, -56, -56, -50, -50, -48, -46, -28, -18, 0, 0, 6, 32, 32, 34, 42, 42, 46, 50, 50, 52, 64, 64, 70, 76, 84, 88], 28, 21",
"64"
],
[
"[1, 1, 1], 1, 2",
"1"
],
[
"[2, 9, 15, 19, 26, 29, 42, 45, 46, 47, 55, 60, 60, 61, 62, 64, 68, 69, 74, 79, 96], 14, 17",
"14"
],
[
"[-32, 12, 80, 42, 80, 8, 58, -76, -42, -98, 22, -90, -16, -4, -62, -32, 28, 12, 78, -52, -84, 78, 88, -76, -52, 68, -34, -16, -4, 2, -78, -94, -22, 34, 6, -62, 72], 26, 31",
"26"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 26, 14",
"1"
],
[
"[52, 19], 1, 1",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b ) {
string s = to_string ( b );
int i;
for ( i = 0;
i < s . length ( );
i ++ ) {
if ( s [ i ] != '9' ) break;
}
int result;
if ( i == s . length ( ) ) result = a * s . length ( );
else result = a * ( s . length ( ) - 1 );
return result;
}
| [] | null | [] | NUMBER_DIGITS_PRODUCT_TWO_NUMBERS | python | [] | def f_gold(a, b):
count = 0
p = abs(a * b)
if (p == 0):
return 1
while (p > 0):
count = count + 1
p = p // 10
return count
| code_translation | [
[
"86, 39",
"4"
],
[
"81, 87",
"4"
],
[
"48, 84",
"4"
],
[
"64, 80",
"4"
],
[
"56, 20",
"4"
],
[
"5, 70",
"3"
],
[
"25, 13",
"3"
],
[
"94, 83",
"4"
],
[
"5, 55",
"3"
],
[
"46, 46",
"4"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | FLOOR_IN_A_SORTED_ARRAY_1 | python | [] | def f_gold ( arr , low , high , x ) :
if ( low > high ) :
return - 1
if ( x >= arr [ high ] ) :
return high
mid = int ( ( low + high ) / 2 )
if ( arr [ mid ] == x ) :
return mid
if ( mid > 0 and arr [ mid - 1 ] <= x and x < arr [ mid ] ) :
return mid - 1
if ( x < arr [ mid ] ) :
return f_gold ( arr , low , mid - 1 , x )
return f_gold ( arr , mid + 1 , high , x )
| code_translation | [
[
"[5, 11, 20, 42, 42, 55, 58, 98, 99], 5, 7, 6",
"-1"
],
[
"[50, -90, -38, -46, -10, -22, -66, 72, -52, 38, 90, 34, -12, -44, -6, 0, -20, -38, 86, 26, 64, -24, 40, 90, -26, -2, -28, 12, 22, -14], 26, 28, 23",
"28"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11, 9, 18",
"-1"
],
[
"[69, 28, 68, 98, 24, 67, 86, 2, 18, 22, 44, 77, 52, 62, 24, 46], 15, 11, 13",
"-1"
],
[
"[-96, -94, -88, -84, -68, -60, -52, -52, -42, -34, -32, -16, -12, -6, -6, -4, -2, 0, 16, 18, 38, 58, 70, 72, 76, 78, 90, 92, 98], 22, 27, 20",
"-1"
],
[
"[0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0], 24, 15, 26",
"-1"
],
[
"[1, 6, 7, 9, 10, 11, 19, 19, 22, 22, 26, 34, 36, 37, 37, 38, 39, 40, 49, 54, 60, 62, 65, 67, 71, 76, 78, 79, 82, 82, 89, 95, 97], 22, 26, 25",
"-1"
],
[
"[76, -32, -98, -18, -80, 74, -22, -82, 40, -64, 58, -18, -64, 34, -44, -82, -46, 62, -80, -76, 32, 44, -32, 98, -26, 62, 16, 86, -52, -72, -90, -30, 6], 28, 31, 24",
"31"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 28, 29, 30",
"29"
],
[
"[81, 69, 15, 52, 49, 54, 18, 92, 33, 21, 91, 21, 5, 25, 77, 92, 26, 58, 72, 55, 76, 18, 13, 59, 9, 12, 31, 24, 36, 33, 71, 87, 55, 19, 42, 25], 35, 19, 33",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_1 | python | [] | def f_gold ( n ) :
sum = 0
while ( n > 0 ) :
sum += int ( n % 10 )
n = int ( n / 10 )
return sum
| code_translation | [
[
"50",
"5"
],
[
"92",
"11"
],
[
"49",
"13"
],
[
"94",
"13"
],
[
"7",
"7"
],
[
"30",
"3"
],
[
"88",
"16"
],
[
"98",
"17"
],
[
"94",
"13"
],
[
"23",
"5"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n, int k ) {
unordered_map < int, int > m;
for ( int i = 0;
i < n;
i ++ ) m [ a [ i ] ] ++;
int res = INT_MAX;
for ( auto it = m . begin ( );
it != m . end ( );
++ it ) if ( it -> second == k ) res = min ( res, it -> first );
return ( res != INT_MAX ) ? res : - 1;
}
| [] | null | [] | BREAK_NUMBER_THREE_PARTS_1 | python | [] | def f_gold ( n ) :
count = 0
count = ( n + 1 ) * ( n + 2 ) // 2
return count
| code_translation | [
[
"71",
"2628"
],
[
"71",
"2628"
],
[
"36",
"703"
],
[
"3",
"10"
],
[
"97",
"4851"
],
[
"69",
"2485"
],
[
"15",
"136"
],
[
"48",
"1225"
],
[
"77",
"3081"
],
[
"6",
"28"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int der [ n + 1 ];
der [ 0 ] = 1;
der [ 1 ] = 0;
der [ 2 ] = 1;
for ( int i = 3;
i <= n;
++ i ) der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] );
return der [ n ];
}
| [] | null | [] | WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3 | python | [] | def f_gold ( n ) :
odd_count = 0
even_count = 0
if ( n < 0 ) :
n = - n
if ( n == 0 ) :
return 1
if ( n == 1 ) :
return 0
while ( n ) :
if ( n & 1 ) :
odd_count += 1
if ( n & 2 ) :
even_count += 1
n = n >> 2
return f_gold ( abs ( odd_count - even_count ) )
| code_translation | [
[
"94",
"0"
],
[
"94",
"0"
],
[
"79",
"0"
],
[
"39",
"1"
],
[
"16",
"0"
],
[
"90",
"1"
],
[
"64",
"0"
],
[
"76",
"0"
],
[
"83",
"0"
],
[
"47",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int invcount = 0;
for ( int i = 0;
i < n - 2;
i ++ ) {
for ( int j = i + 1;
j < n - 1;
j ++ ) {
if ( arr [ i ] > arr [ j ] ) {
for ( int k = j + 1;
k < n;
k ++ ) {
if ( arr [ j ] > arr [ k ] ) invcount ++;
}
}
}
}
return invcount;
}
| [] | null | [] | BINARY_REPRESENTATION_OF_NEXT_NUMBER | python | [] | def f_gold ( num1 ) :
l = len ( num1 ) ;
num = list ( num1 ) ;
i = l - 1 ;
while ( i >= 0 ) :
if ( num [ i ] == '0' ) :
num [ i ] = '1' ;
break ;
else :
num [ i ] = '0' ;
i -= 1 ;
num1 = ''.join ( num ) ;
if ( i < 0 ) :
num1 = '1' + num1 ;
return num1 ;
| code_translation | [
[
"'DXh'",
"'1000'"
],
[
"'48703586411816'",
"'48710000000000'"
],
[
"'0001'",
"'0010'"
],
[
"'yWg WvjNKS'",
"'10000000000'"
],
[
"'8408568459'",
"'8410000000'"
],
[
"'01'",
"'10'"
],
[
"'DFECZ CWtN'",
"'10000000000'"
],
[
"'37742236'",
"'100000000'"
],
[
"'001101'",
"'001110'"
],
[
"'LDxERLmYn'",
"'1000000000'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string N ) {
int len = N . length ( );
int l = ( len ) / 2;
int count = 0;
for ( int i = 1;
i <= l;
i ++ ) {
string s = N . substr ( 0, i );
int l1 = s . length ( );
string t = N . substr ( i, l1 );
if ( s [ 0 ] == '0' || t [ 0 ] == '0' ) continue;
if ( s . compare ( t ) == 0 ) count ++;
}
return count;
}
| [] | null | [] | CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD | python | [] | def f_gold ( n ) :
return ( n % 2 == 0 )
| code_translation | [
[
"67",
"False"
],
[
"90",
"True"
],
[
"55",
"False"
],
[
"90",
"True"
],
[
"83",
"False"
],
[
"32",
"True"
],
[
"58",
"True"
],
[
"38",
"True"
],
[
"87",
"False"
],
[
"87",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
unsigned int f_gold ( unsigned int n ) {
int res = 1;
for ( int i = n;
i >= 0;
i = i - 2 ) {
if ( i == 0 || i == 1 ) return res;
else res *= i;
}
}
| [] | null | [] | ONE_LINE_FUNCTION_FOR_FACTORIAL_OF_A_NUMBER | python | [] | def f_gold ( n ) :
return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ;
| code_translation | [
[
"58",
"2350561331282878571829474910515074683828862318181142924420699914240000000000000"
],
[
"42",
"1405006117752879898543142606244511569936384000000000"
],
[
"76",
"1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000"
],
[
"16",
"20922789888000"
],
[
"49",
"608281864034267560872252163321295376887552831379210240000000000"
],
[
"60",
"8320987112741390144276341183223364380754172606361245952449277696409600000000000000"
],
[
"99",
"933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000"
],
[
"45",
"119622220865480194561963161495657715064383733760000000000"
],
[
"6",
"720"
],
[
"70",
"11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int table [ n + 1 ], i;
for ( int j = 0;
j < n + 1;
j ++ ) table [ j ] = 0;
table [ 0 ] = 1;
for ( i = 3;
i <= n;
i ++ ) table [ i ] += table [ i - 3 ];
for ( i = 5;
i <= n;
i ++ ) table [ i ] += table [ i - 5 ];
for ( i = 10;
i <= n;
i ++ ) table [ i ] += table [ i - 10 ];
return table [ n ];
}
| [] | null | [] | UGLY_NUMBERS | python | [] | def f_gold ( n ) :
ugly = [ 0 ] * n
ugly [ 0 ] = 1
i2 = i3 = i5 = 0
next_multiple_of_2 = 2
next_multiple_of_3 = 3
next_multiple_of_5 = 5
for l in range ( 1 , n ) :
ugly [ l ] = min ( next_multiple_of_2 , next_multiple_of_3 , next_multiple_of_5 )
if ugly [ l ] == next_multiple_of_2 :
i2 += 1
next_multiple_of_2 = ugly [ i2 ] * 2
if ugly [ l ] == next_multiple_of_3 :
i3 += 1
next_multiple_of_3 = ugly [ i3 ] * 3
if ugly [ l ] == next_multiple_of_5 :
i5 += 1
next_multiple_of_5 = ugly [ i5 ] * 5
return ugly [ - 1 ]
| code_translation | [
[
"27",
"64"
],
[
"64",
"450"
],
[
"93",
"1250"
],
[
"90",
"1152"
],
[
"85",
"972"
],
[
"86",
"1000"
],
[
"72",
"625"
],
[
"86",
"1000"
],
[
"32",
"90"
],
[
"1",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n, int k ) {
if ( n + 1 >= k ) return ( k - 1 );
else return ( 2 * n + 1 - k );
}
| [] | null | [] | UNIQUE_CELLS_BINARY_MATRIX | python | [] | def f_gold ( mat , n , m ) :
rowsum = [ 0 ] * n ;
colsum = [ 0 ] * m ;
for i in range ( n ) :
for j in range ( m ) :
if ( mat [ i ] [ j ] != 0 ) :
rowsum [ i ] += 1 ;
colsum [ j ] += 1 ;
uniquecount = 0 ;
for i in range ( n ) :
for j in range ( m ) :
if ( mat [ i ] [ j ] != 0 and rowsum [ i ] == 1 and colsum [ j ] == 1 ) :
uniquecount += 1 ;
return uniquecount ;
| code_translation | [
[
"[[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]], 3, 4",
"2"
],
[
"[[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]], 2, 2",
"1"
],
[
"[[0, 1, 0, 0], [0, 0, 1, 1], [1, 0, 1, 1]], 3, 4",
"1"
],
[
"[[0, 1, 0, 0], [0, 0, 1, 0], [1, 1, 0, 1]], 3, 4",
"1"
],
[
"[[1, 1, 1, 1], [0, 0, 1, 0], [1, 0, 0, 1]], 3, 3",
"0"
],
[
"[[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 33, 13, 43, 21, 83, 34, 30, 20, 82, 85, 36], [7, 69, 9, 45, 18, 47, 1, 78, 72, 53, 37, 20, 95, 71, 58, 41, 38, 44, 15, 35, 81, 27, 21, 40, 44, 90, 44, 5, 97, 49], [69, 92, 21, 8, 66, 37, 14, 34, 60, 61, 46, 21, 91, 18, 61, 69, 34, 82, 54, 99, 90, 29, 41, 92, 70, 90, 58, 82, 30, 33], [63, 96, 90, 86, 34, 49, 12, 22, 85, 24, 56, 25, 66, 1, 74, 34, 5, 17, 1, 78, 21, 6, 75, 39, 59, 20, 84, 85, 64, 24], [41, 90, 67, 38, 38, 28, 10, 24, 62, 52, 71, 87, 87, 24, 95, 50, 86, 91, 38, 69, 18, 72, 99, 49, 17, 76, 86, 53, 6, 94], [66, 5, 2, 62, 99, 5, 31, 81, 63, 91, 95, 74, 76, 18, 77, 57, 72, 99, 62, 4, 62, 46, 71, 21, 60, 45, 79, 98, 22, 65], [6, 65, 83, 27, 10, 55, 78, 34, 41, 32, 67, 51, 80, 39, 97, 5, 58, 99, 17, 23, 90, 46, 7, 62, 7, 15, 30, 20, 67, 86], [54, 50, 71, 95, 49, 50, 3, 64, 46, 81, 22, 52, 37, 60, 67, 48, 30, 88, 97, 43, 10, 71, 80, 96, 2, 72, 79, 67, 84, 98], [46, 41, 4, 87, 8, 10, 5, 74, 90, 80, 59, 58, 23, 61, 17, 28, 18, 52, 58, 41, 75, 98, 79, 1, 97, 73, 17, 79, 4, 46], [70, 6, 83, 23, 94, 1, 73, 61, 22, 65, 57, 36, 25, 16, 26, 92, 5, 22, 14, 73, 78, 80, 94, 96, 70, 17, 1, 18, 75, 11], [92, 12, 34, 80, 74, 8, 90, 42, 14, 51, 9, 83, 98, 38, 29, 29, 28, 88, 92, 76, 83, 6, 2, 53, 31, 37, 56, 93, 40, 12], [55, 97, 57, 45, 25, 42, 18, 30, 18, 7, 79, 30, 5, 69, 33, 6, 48, 4, 13, 26, 49, 20, 32, 96, 65, 89, 89, 53, 65, 3], [21, 43, 25, 85, 67, 93, 35, 86, 23, 13, 98, 23, 63, 99, 83, 15, 79, 26, 67, 81, 94, 61, 28, 34, 16, 43, 11, 24, 87, 25], [77, 19, 34, 66, 72, 5, 75, 66, 54, 96, 24, 76, 80, 51, 24, 50, 54, 17, 96, 84, 35, 30, 47, 42, 22, 31, 51, 37, 88, 88], [13, 89, 31, 14, 84, 39, 92, 89, 38, 75, 18, 39, 83, 67, 41, 46, 49, 27, 23, 35, 13, 26, 78, 35, 41, 6, 72, 52, 53, 79], [8, 47, 80, 93, 64, 34, 29, 35, 48, 74, 65, 69, 67, 14, 46, 27, 46, 29, 1, 82, 3, 26, 21, 24, 45, 84, 29, 18, 3, 51], [97, 18, 37, 63, 85, 19, 23, 84, 55, 24, 83, 26, 97, 96, 54, 99, 89, 33, 88, 57, 9, 64, 75, 85, 59, 81, 16, 5, 44, 46], [10, 77, 58, 70, 64, 80, 70, 93, 60, 25, 87, 11, 93, 85, 63, 26, 41, 53, 75, 24, 81, 73, 72, 94, 7, 87, 73, 83, 64, 72], [46, 78, 51, 92, 99, 71, 6, 30, 16, 57, 65, 61, 17, 63, 7, 35, 69, 91, 30, 44, 99, 80, 6, 80, 56, 8, 84, 95, 20, 73], [30, 62, 77, 26, 66, 61, 61, 45, 46, 24, 77, 16, 82, 16, 66, 1, 74, 25, 14, 81, 82, 7, 21, 93, 91, 49, 4, 12, 22, 34], [26, 28, 19, 31, 14, 87, 81, 23, 81, 8, 38, 10, 30, 7, 2, 22, 5, 67, 73, 69, 56, 20, 93, 70, 68, 57, 21, 17, 79, 27], [39, 83, 67, 92, 86, 70, 95, 69, 13, 98, 50, 10, 56, 44, 28, 85, 37, 36, 56, 92, 77, 57, 36, 1, 43, 9, 84, 81, 67, 32], [99, 70, 58, 52, 70, 89, 28, 65, 40, 80, 20, 88, 79, 10, 76, 62, 37, 99, 60, 91, 77, 94, 67, 52, 35, 62, 12, 29, 30, 22], [81, 53, 91, 22, 60, 49, 49, 7, 46, 11, 16, 54, 57, 36, 51, 22, 37, 3, 35, 38, 55, 41, 38, 88, 34, 99, 11, 79, 14, 81], [21, 28, 86, 60, 34, 65, 87, 96, 4, 56, 70, 80, 10, 35, 88, 10, 76, 63, 97, 91, 25, 74, 89, 32, 56, 26, 68, 73, 27, 73], [90, 11, 53, 32, 59, 30, 9, 11, 87, 17, 96, 11, 57, 86, 50, 96, 73, 81, 53, 89, 80, 97, 66, 43, 39, 42, 76, 34, 25, 78], [9, 94, 12, 10, 88, 34, 76, 26, 96, 35, 77, 83, 56, 77, 56, 86, 48, 23, 65, 8, 98, 13, 49, 10, 3, 28, 27, 85, 11, 88], [12, 7, 42, 96, 10, 61, 64, 28, 26, 93, 91, 52, 74, 4, 22, 10, 4, 7, 63, 87, 67, 88, 30, 76, 21, 48, 17, 67, 79, 96], [9, 40, 86, 96, 59, 69, 41, 68, 48, 61, 5, 7, 75, 6, 29, 51, 81, 28, 57, 63, 38, 83, 49, 12, 45, 83, 97, 45, 5, 65], [35, 35, 31, 36, 40, 99, 40, 61, 12, 82, 92, 13, 30, 40, 17, 73, 22, 56, 62, 57, 15, 93, 54, 16, 84, 89, 24, 80, 80, 25]], 1, 28",
"0"
],
[
"[[0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 45, 59, 40, 83, 46, 59, 89, 37, 82, 68, 65, 97, 28, 41, 83, 97, 15, 87, 93, 39, 78, 94, 66, 77, 28, 31, 12, 13, 3], [63, 29, 64, 94, 76, 85, 66, 50, 80, 96, 92, 73, 17, 56, 83, 7, 36, 40, 1, 42, 36, 39, 1, 88, 63, 74, 75, 86, 56, 31, 1, 41, 11, 6, 51, 64, 81, 78, 96, 20, 4, 39, 47, 22, 93, 42, 77, 79], [35, 25, 3, 51, 12, 14, 40, 32, 50, 68, 29, 31, 96, 24, 11, 30, 19, 36, 6, 2, 19, 46, 40, 18, 36, 46, 56, 52, 54, 56, 20, 1, 23, 38, 20, 4, 69, 6, 63, 90, 1, 63, 79, 80, 87, 86, 54, 69], [43, 5, 70, 66, 10, 36, 35, 45, 23, 62, 47, 16, 37, 42, 35, 40, 16, 69, 11, 51, 93, 75, 80, 89, 50, 67, 67, 65, 12, 7, 43, 46, 96, 22, 76, 6, 38, 39, 60, 85, 62, 92, 96, 27, 49, 15, 33, 96], [46, 98, 71, 13, 53, 39, 50, 70, 60, 9, 4, 94, 92, 21, 12, 77, 50, 13, 52, 91, 92, 82, 80, 21, 55, 10, 78, 92, 29, 11, 30, 40, 91, 49, 3, 1, 32, 39, 85, 2, 74, 31, 18, 7, 5, 29, 68, 46], [56, 3, 13, 67, 72, 50, 4, 42, 99, 76, 24, 19, 99, 82, 40, 34, 89, 7, 75, 38, 19, 99, 45, 20, 91, 95, 89, 2, 93, 37, 31, 42, 6, 85, 97, 9, 74, 86, 95, 53, 11, 83, 76, 16, 13, 38, 13, 15], [18, 16, 41, 50, 69, 91, 66, 41, 27, 59, 65, 14, 35, 23, 22, 27, 50, 25, 98, 54, 49, 91, 99, 85, 3, 25, 68, 57, 15, 67, 11, 92, 3, 18, 53, 9, 79, 72, 40, 56, 14, 61, 13, 47, 74, 94, 5, 86], [99, 5, 12, 35, 85, 26, 1, 10, 38, 24, 95, 47, 87, 85, 2, 95, 2, 30, 25, 83, 62, 1, 92, 63, 84, 59, 54, 69, 55, 94, 87, 42, 91, 53, 65, 9, 71, 51, 90, 16, 53, 70, 62, 37, 61, 57, 45, 76], [88, 17, 2, 95, 37, 54, 42, 29, 65, 78, 40, 11, 58, 96, 20, 66, 31, 5, 96, 50, 9, 41, 10, 53, 49, 26, 67, 36, 23, 94, 39, 59, 23, 23, 43, 25, 84, 60, 33, 33, 65, 47, 33, 38, 24, 73, 95, 49], [92, 87, 30, 82, 58, 90, 97, 59, 16, 93, 16, 33, 39, 46, 38, 23, 26, 49, 81, 24, 83, 42, 27, 2, 8, 79, 41, 13, 91, 22, 47, 47, 65, 69, 29, 79, 30, 46, 6, 6, 87, 52, 5, 86, 41, 20, 20, 39], [30, 48, 81, 60, 23, 60, 50, 13, 74, 38, 39, 68, 19, 52, 41, 92, 27, 23, 19, 80, 35, 5, 88, 5, 93, 6, 41, 41, 54, 44, 48, 37, 93, 56, 33, 91, 35, 6, 46, 74, 36, 44, 7, 7, 29, 80, 65, 60], [35, 57, 29, 38, 77, 12, 87, 80, 58, 78, 80, 6, 36, 52, 88, 27, 25, 40, 36, 60, 29, 95, 3, 13, 68, 11, 48, 79, 60, 2, 79, 70, 13, 35, 51, 56, 40, 77, 59, 12, 16, 53, 41, 20, 40, 61, 77, 34], [19, 45, 91, 29, 19, 56, 27, 2, 40, 65, 78, 8, 27, 97, 95, 30, 25, 49, 56, 65, 31, 99, 60, 85, 34, 17, 73, 29, 72, 83, 6, 88, 6, 3, 95, 31, 76, 52, 8, 90, 26, 15, 77, 56, 86, 62, 13, 46], [54, 9, 88, 3, 23, 12, 41, 44, 58, 11, 19, 59, 73, 37, 10, 73, 33, 77, 20, 44, 75, 93, 13, 63, 14, 73, 54, 42, 38, 83, 72, 82, 98, 36, 9, 80, 5, 15, 24, 64, 48, 43, 39, 25, 80, 86, 80, 97], [5, 60, 7, 18, 6, 12, 33, 98, 21, 58, 82, 78, 42, 94, 46, 3, 57, 53, 62, 13, 51, 19, 59, 62, 37, 77, 15, 90, 70, 91, 12, 89, 50, 47, 16, 16, 67, 34, 88, 46, 87, 64, 94, 49, 21, 53, 62, 81], [54, 82, 3, 53, 12, 80, 38, 78, 91, 18, 84, 35, 81, 84, 70, 90, 71, 76, 17, 21, 70, 47, 37, 89, 54, 15, 11, 9, 68, 3, 13, 96, 6, 1, 5, 66, 86, 96, 41, 50, 7, 21, 81, 53, 20, 65, 32, 96], [84, 74, 6, 41, 33, 74, 25, 24, 95, 93, 12, 37, 50, 9, 93, 67, 4, 54, 85, 6, 66, 37, 84, 45, 97, 14, 84, 43, 66, 7, 55, 37, 76, 16, 17, 95, 71, 90, 1, 2, 95, 84, 33, 13, 65, 51, 33, 3], [60, 83, 44, 96, 5, 47, 43, 47, 6, 60, 36, 37, 77, 76, 6, 30, 92, 10, 28, 6, 73, 24, 52, 82, 68, 45, 87, 27, 68, 13, 75, 75, 19, 33, 78, 13, 7, 33, 32, 45, 56, 72, 46, 98, 19, 34, 63, 70], [54, 55, 50, 65, 45, 30, 79, 73, 61, 93, 59, 2, 30, 46, 68, 19, 84, 5, 73, 84, 57, 63, 52, 59, 60, 80, 84, 20, 90, 33, 12, 21, 56, 23, 20, 87, 49, 47, 70, 45, 76, 35, 72, 27, 80, 47, 32, 29], [71, 80, 53, 93, 56, 89, 43, 4, 64, 91, 87, 23, 60, 30, 43, 88, 48, 80, 7, 87, 31, 19, 52, 68, 6, 83, 60, 91, 93, 12, 38, 13, 28, 5, 46, 46, 81, 27, 26, 62, 68, 72, 90, 97, 12, 77, 85, 52], [37, 25, 39, 67, 19, 71, 81, 77, 24, 51, 45, 8, 72, 45, 2, 30, 67, 45, 26, 17, 38, 67, 57, 33, 94, 79, 72, 94, 64, 23, 12, 8, 73, 72, 38, 33, 48, 97, 45, 75, 23, 43, 25, 15, 10, 20, 16, 99], [98, 85, 57, 46, 1, 25, 56, 46, 59, 62, 78, 61, 83, 8, 41, 15, 44, 82, 1, 97, 65, 34, 4, 81, 2, 39, 54, 10, 42, 45, 26, 27, 39, 25, 29, 82, 22, 90, 60, 90, 52, 85, 21, 8, 66, 98, 76, 18], [81, 15, 3, 85, 83, 59, 55, 32, 11, 82, 53, 29, 67, 4, 92, 9, 57, 38, 7, 65, 35, 47, 34, 63, 9, 90, 72, 19, 26, 46, 56, 10, 43, 30, 40, 55, 58, 31, 72, 47, 77, 37, 94, 57, 79, 57, 99, 3], [29, 88, 45, 87, 73, 2, 15, 96, 18, 29, 40, 3, 97, 58, 71, 94, 91, 38, 29, 31, 65, 43, 27, 27, 93, 69, 3, 29, 13, 97, 60, 84, 67, 70, 81, 47, 68, 97, 33, 6, 64, 78, 71, 70, 51, 67, 22, 72], [24, 77, 77, 65, 53, 41, 32, 69, 71, 45, 32, 28, 97, 14, 13, 93, 50, 40, 1, 47, 91, 30, 34, 46, 1, 34, 59, 7, 65, 42, 82, 99, 19, 13, 23, 66, 3, 86, 36, 49, 72, 87, 72, 57, 89, 99, 64, 11], [41, 6, 45, 81, 57, 82, 33, 61, 18, 7, 29, 69, 16, 95, 69, 74, 29, 29, 16, 4, 65, 72, 92, 1, 92, 3, 64, 66, 89, 57, 75, 18, 39, 84, 81, 7, 55, 17, 68, 36, 94, 1, 35, 76, 17, 80, 28, 32], [55, 35, 19, 93, 93, 80, 4, 21, 44, 62, 1, 83, 51, 90, 76, 17, 37, 92, 36, 29, 69, 3, 15, 67, 77, 69, 21, 23, 47, 86, 34, 41, 90, 47, 31, 35, 7, 45, 57, 96, 22, 70, 21, 49, 47, 27, 10, 86], [44, 51, 18, 68, 99, 38, 36, 60, 68, 74, 96, 74, 45, 74, 75, 9, 13, 57, 82, 57, 37, 47, 11, 28, 6, 33, 14, 47, 29, 15, 56, 69, 86, 31, 19, 18, 58, 70, 73, 30, 95, 35, 17, 16, 97, 68, 95, 33], [36, 11, 60, 4, 63, 5, 64, 85, 77, 4, 35, 26, 26, 19, 37, 11, 66, 31, 18, 75, 44, 16, 58, 2, 59, 96, 48, 86, 36, 8, 36, 25, 40, 95, 4, 43, 74, 27, 38, 81, 38, 64, 89, 17, 13, 85, 79, 24], [7, 64, 63, 22, 53, 74, 97, 12, 72, 22, 39, 47, 64, 44, 16, 59, 34, 46, 80, 78, 70, 55, 74, 24, 27, 73, 16, 2, 31, 63, 47, 19, 56, 11, 86, 93, 95, 8, 74, 6, 31, 99, 50, 29, 21, 41, 69, 69], [88, 79, 56, 28, 34, 56, 77, 55, 44, 32, 86, 29, 3, 69, 11, 48, 53, 56, 53, 26, 9, 75, 65, 56, 28, 23, 31, 66, 61, 82, 16, 59, 81, 48, 17, 35, 95, 99, 59, 88, 41, 37, 30, 82, 91, 16, 84, 47], [28, 21, 41, 45, 97, 73, 64, 88, 13, 94, 43, 97, 58, 88, 20, 63, 1, 23, 33, 57, 81, 54, 66, 95, 31, 54, 16, 37, 7, 1, 94, 18, 42, 39, 26, 75, 65, 57, 69, 86, 77, 17, 7, 71, 12, 38, 87, 48], [55, 54, 72, 15, 30, 55, 73, 21, 60, 78, 8, 47, 36, 73, 26, 84, 70, 34, 60, 23, 97, 85, 41, 90, 69, 55, 73, 45, 61, 33, 89, 52, 81, 19, 75, 8, 70, 6, 72, 57, 88, 60, 19, 52, 41, 91, 84, 88], [38, 69, 16, 39, 97, 74, 51, 5, 83, 62, 41, 85, 67, 59, 92, 19, 80, 62, 53, 66, 8, 46, 12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45], [26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45, 26, 60, 69, 68, 86, 70, 31, 69, 7, 69, 4, 91, 73, 37, 2, 49, 83, 17, 17, 40, 51, 88, 77, 28, 46, 78, 87, 87, 74, 49, 17, 27, 62, 11, 83, 44], [91, 36, 16, 60, 87, 97, 52, 22, 78, 77, 86, 71, 38, 65, 51, 97, 86, 23, 15, 79, 31, 28, 67, 42, 25, 33, 97, 23, 92, 53, 16, 37, 5, 11, 12, 21, 18, 14, 33, 21, 26, 89, 25, 35, 63, 20, 63, 66], [12, 32, 97, 48, 95, 97, 59, 20, 37, 40, 61, 56, 14, 36, 76, 90, 34, 6, 46, 77, 22, 99, 83, 23, 64, 96, 44, 11, 68, 61, 76, 56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44, 67, 2, 58, 6, 42], [17, 37, 44, 23, 40, 85, 44, 31, 76, 93, 13, 90, 97, 98, 20, 47, 10, 65, 52, 63, 29, 54, 86, 50, 65, 44, 8, 9, 23, 84, 34, 16, 86, 62, 87, 65, 78, 52, 23, 38, 40, 8, 32, 40, 66, 48, 13, 27], [46, 71, 3, 85, 61, 72, 65, 17, 26, 29, 72, 38, 51, 43, 72, 8, 25, 55, 45, 91, 86, 67, 57, 49, 54, 47, 64, 24, 62, 33, 99, 40, 29, 8, 75, 16, 33, 64, 11, 29, 49, 88, 66, 5, 88, 53, 44, 7], [95, 94, 70, 69, 79, 27, 99, 54, 73, 23, 58, 17, 87, 46, 47, 93, 59, 45, 62, 54, 75, 13, 12, 2, 42, 54, 11, 78, 22, 85, 49, 37, 36, 89, 49, 58, 3, 66, 91, 33, 18, 48, 75, 71, 37, 50, 36, 27], [22, 31, 40, 54, 64, 70, 53, 54, 54, 97, 71, 6, 64, 54, 65, 46, 42, 93, 75, 92, 56, 40, 15, 30, 23, 12, 92, 95, 30, 16, 30, 68, 33, 57, 97, 28, 85, 79, 26, 14, 57, 15, 66, 16, 37, 11, 11, 33], [2, 33, 63, 3, 84, 33, 26, 34, 78, 52, 93, 66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20, 66, 35, 79, 51, 14, 55, 36, 53], [54, 63, 94, 58, 27, 2, 85, 78, 91, 85, 23, 35, 62, 72, 59, 76, 64, 92, 41, 33, 97, 9, 79, 74, 49, 2, 3, 23, 74, 19, 18, 35, 54, 60, 9, 95, 94, 52, 50, 12, 17, 91, 85, 49, 48, 27, 14, 55], [13, 3, 64, 88, 96, 72, 99, 23, 80, 73, 39, 58, 18, 54, 31, 64, 42, 37, 98, 70, 78, 88, 97, 42, 83, 29, 70, 3, 18, 85, 29, 52, 42, 52, 36, 95, 8, 96, 80, 86, 2, 51, 15, 17, 13, 54, 99, 25], [74, 75, 33, 78, 98, 22, 44, 4, 26, 1, 10, 2, 29, 25, 87, 94, 60, 89, 13, 40, 34, 35, 79, 39, 42, 84, 86, 25, 14, 83, 86, 87, 1, 39, 30, 5, 94, 71, 62, 77, 31, 7, 29, 51, 89, 77, 79, 51], [94, 71, 69, 14, 94, 23, 80, 88, 43, 56, 21, 30, 76, 40, 94, 22, 2, 23, 87, 86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17, 2, 66, 29, 4, 30, 61], [58, 76, 34, 78, 24, 88, 82, 25, 89, 25, 92, 30, 55, 89, 24, 39, 77, 2, 34, 16, 48, 24, 50, 2, 93, 39, 81, 59, 23, 12, 77, 69, 15, 60, 64, 2, 70, 64, 36, 87, 13, 2, 5, 40, 80, 64, 39, 35], [57, 41, 45, 34, 19, 90, 42, 17, 35, 76, 35, 6, 52, 74, 43, 23, 83, 43, 53, 72, 73, 67, 97, 66, 34, 35, 82, 27, 27, 64, 39, 60, 81, 73, 96, 23, 78, 11, 4, 51, 38, 51, 48, 80, 36, 25, 5, 74]], 1, 32",
"0"
],
[
"[[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [69, 62, 79, 46, 48, 38, 61, 81, 17, 48, 33, 18, 36, 54, 3, 89, 99, 20], [31, 21, 34, 57, 37, 1, 57, 55, 31, 23, 75, 48, 20, 7, 99, 2, 97, 40], [24, 74, 9, 43, 97, 51, 85, 78, 50, 87, 76, 22, 92, 91, 10, 82, 88, 67], [4, 30, 85, 22, 92, 73, 41, 16, 56, 69, 14, 52, 14, 47, 16, 43, 68, 37], [14, 41, 87, 73, 24, 75, 92, 19, 83, 12, 47, 98, 12, 3, 30, 58, 46, 51], [99, 15, 43, 22, 9, 92, 93, 39, 81, 68, 57, 68, 7, 2, 54, 37, 74, 82], [28, 59, 46, 63, 35, 99, 94, 85, 58, 89, 13, 71, 6, 84, 45, 5, 38, 44], [25, 82, 88, 15, 72, 77, 39, 48, 52, 60, 89, 23, 69, 52, 86, 22, 25, 55], [64, 65, 4, 52, 32, 53, 26, 79, 35, 91, 14, 34, 60, 25, 54, 27, 21, 48], [35, 52, 70, 99, 26, 15, 5, 90, 33, 25, 81, 52, 44, 20, 56, 66, 8, 83], [64, 29, 48, 19, 9, 72, 15, 98, 68, 63, 91, 38, 47, 13, 96, 99, 46, 36], [10, 55, 23, 23, 68, 44, 5, 4, 30, 52, 97, 13, 18, 32, 33, 58, 62, 71], [14, 14, 10, 59, 39, 46, 18, 19, 37, 3, 55, 7, 71, 52, 54, 38, 63, 64], [6, 74, 52, 44, 36, 37, 64, 48, 27, 65, 1, 48, 85, 37, 92, 49, 55, 39], [36, 66, 66, 68, 2, 65, 18, 41, 98, 91, 39, 26, 75, 3, 49, 28, 16, 99], [22, 80, 97, 77, 49, 28, 16, 64, 60, 66, 26, 42, 92, 3, 21, 32, 70, 69], [24, 65, 23, 80, 8, 45, 89, 11, 57, 12, 72, 10, 63, 35, 38, 21, 51, 18]], 10, 12",
"0"
],
[
"[[0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 93, 66, 82, 36, 56], [21, 97, 63, 2, 74, 15, 62, 12, 3, 4, 9, 46, 42, 74, 31, 37, 11, 61, 27, 46, 70, 94, 43, 99, 45], [18, 50, 6, 13, 12, 7, 14, 73, 99, 47, 7, 39, 56, 85, 19, 27, 61, 66, 52, 56, 14, 33, 12, 85, 94], [86, 66, 93, 24, 96, 45, 76, 55, 71, 53, 66, 19, 51, 82, 98, 66, 45, 40, 83, 6, 51, 41, 47, 17, 23], [40, 73, 37, 85, 58, 21, 27, 11, 39, 94, 63, 28, 84, 47, 47, 4, 61, 18, 50, 93, 36, 91, 1, 35, 5], [6, 60, 5, 32, 39, 95, 40, 42, 74, 95, 8, 91, 29, 60, 78, 23, 4, 34, 38, 61, 27, 83, 31, 3, 93], [77, 27, 43, 60, 96, 46, 37, 67, 6, 59, 3, 77, 11, 27, 2, 64, 44, 76, 55, 40, 76, 23, 64, 95, 57], [10, 35, 6, 89, 95, 54, 94, 79, 67, 82, 56, 81, 60, 14, 46, 16, 27, 37, 97, 61, 20, 25, 50, 58, 78], [37, 5, 54, 37, 74, 10, 9, 78, 33, 93, 24, 70, 57, 26, 39, 44, 64, 48, 67, 48, 40, 46, 96, 90, 3], [76, 14, 83, 4, 12, 99, 23, 3, 3, 42, 80, 77, 19, 28, 38, 9, 56, 17, 7, 72, 76, 54, 28, 66, 28], [25, 91, 99, 79, 49, 48, 99, 47, 62, 33, 42, 87, 27, 8, 62, 38, 4, 54, 48, 69, 16, 61, 18, 45, 18], [8, 29, 21, 54, 91, 47, 66, 68, 48, 76, 80, 89, 23, 17, 61, 52, 42, 51, 1, 21, 57, 36, 2, 23, 60], [59, 66, 43, 59, 74, 73, 93, 90, 36, 60, 93, 4, 21, 97, 95, 92, 97, 4, 4, 33, 14, 9, 88, 64, 62], [89, 7, 92, 5, 13, 2, 84, 12, 91, 7, 34, 21, 60, 82, 10, 38, 58, 56, 44, 85, 80, 64, 20, 50, 54], [46, 40, 24, 85, 58, 31, 50, 10, 84, 14, 19, 30, 57, 16, 22, 54, 84, 70, 43, 97, 19, 5, 71, 98, 20], [15, 38, 1, 5, 98, 54, 85, 61, 78, 17, 76, 27, 70, 25, 91, 45, 2, 22, 96, 54, 17, 61, 66, 26, 56], [33, 1, 40, 43, 44, 62, 36, 56, 39, 89, 13, 39, 12, 21, 87, 18, 13, 19, 35, 46, 57, 34, 62, 56, 1], [57, 86, 28, 4, 71, 75, 76, 40, 53, 39, 35, 98, 82, 10, 51, 64, 79, 59, 26, 3, 77, 98, 17, 65, 78], [1, 88, 57, 11, 67, 77, 55, 86, 41, 59, 30, 25, 71, 64, 89, 25, 66, 34, 55, 58, 86, 54, 1, 18, 16], [56, 74, 31, 48, 77, 34, 34, 60, 76, 37, 40, 17, 41, 56, 54, 79, 13, 46, 72, 17, 11, 40, 46, 65, 32], [52, 10, 59, 15, 3, 9, 8, 74, 8, 16, 11, 23, 56, 56, 22, 18, 39, 3, 8, 5, 91, 5, 19, 81, 61], [46, 18, 61, 60, 2, 50, 63, 71, 49, 80, 71, 18, 90, 93, 16, 46, 94, 25, 8, 64, 14, 22, 78, 91, 35], [51, 76, 43, 85, 75, 3, 73, 55, 19, 42, 61, 23, 80, 4, 96, 65, 4, 59, 90, 91, 80, 30, 33, 80, 33], [20, 95, 48, 27, 32, 86, 27, 25, 66, 87, 12, 46, 48, 85, 75, 85, 37, 4, 90, 84, 61, 71, 47, 91, 47], [17, 32, 10, 50, 75, 59, 18, 66, 35, 6, 3, 71, 35, 77, 66, 66, 51, 72, 73, 34, 39, 95, 93, 49, 47]], 15, 17",
"0"
],
[
"[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 83, 85, 49, 74], [4, 62, 18, 60, 64, 20, 52, 36, 62, 48, 96, 57, 57, 91, 41, 88, 93, 53, 88, 62, 29, 39, 82], [10, 61, 56, 9, 50, 75, 12, 2, 90, 73, 17, 35, 46, 67, 70, 87, 35, 79, 72, 96, 34, 11, 3], [93, 10, 82, 82, 12, 91, 51, 83, 97, 89, 59, 2, 2, 5, 22, 33, 69, 28, 58, 14, 50, 74, 41], [15, 74, 68, 43, 55, 49, 18, 81, 95, 97, 25, 12, 55, 47, 85, 81, 84, 93, 67, 71, 64, 60, 97], [90, 84, 43, 37, 32, 99, 85, 52, 53, 56, 72, 2, 48, 16, 91, 36, 10, 92, 81, 89, 79, 18, 92], [2, 40, 42, 95, 95, 25, 1, 82, 16, 42, 37, 37, 71, 6, 78, 22, 95, 74, 46, 40, 54, 46, 36], [41, 98, 67, 23, 43, 61, 17, 93, 65, 3, 78, 75, 30, 21, 16, 62, 60, 9, 66, 26, 67, 15, 12], [19, 14, 15, 87, 11, 63, 43, 67, 43, 1, 4, 85, 25, 84, 74, 82, 97, 53, 35, 25, 3, 51, 50], [13, 35, 89, 55, 18, 51, 30, 40, 30, 58, 88, 90, 65, 97, 72, 12, 8, 75, 78, 18, 65, 85, 10], [37, 29, 46, 88, 44, 36, 18, 79, 32, 20, 34, 73, 41, 98, 35, 57, 27, 18, 21, 18, 27, 95, 28], [97, 15, 45, 47, 36, 19, 99, 96, 45, 57, 76, 29, 98, 16, 22, 72, 55, 12, 98, 16, 55, 47, 73], [27, 99, 11, 83, 95, 15, 53, 91, 33, 71, 87, 22, 65, 58, 27, 75, 12, 60, 85, 72, 77, 33, 66], [9, 77, 26, 45, 55, 52, 9, 79, 7, 57, 57, 37, 73, 78, 30, 51, 47, 84, 54, 23, 79, 58, 56], [31, 68, 89, 62, 83, 60, 37, 34, 1, 41, 95, 44, 35, 27, 21, 72, 82, 23, 41, 93, 80, 50, 74], [81, 22, 40, 2, 42, 30, 44, 83, 10, 84, 63, 24, 6, 45, 18, 16, 40, 16, 79, 70, 97, 13, 68], [96, 50, 29, 58, 7, 97, 5, 40, 4, 7, 80, 37, 75, 59, 50, 69, 29, 55, 89, 67, 96, 30, 20], [94, 67, 61, 44, 56, 79, 60, 41, 78, 40, 50, 10, 17, 15, 93, 53, 98, 99, 73, 51, 81, 66, 26], [38, 92, 30, 55, 9, 92, 16, 24, 86, 20, 62, 52, 78, 52, 43, 96, 10, 66, 71, 65, 15, 75, 84], [50, 41, 60, 33, 52, 38, 84, 64, 10, 96, 50, 63, 59, 12, 58, 89, 9, 49, 61, 81, 78, 88, 51], [45, 67, 80, 18, 61, 50, 14, 10, 74, 6, 3, 86, 2, 76, 1, 52, 13, 32, 25, 38, 5, 18, 10], [53, 83, 34, 30, 32, 11, 86, 30, 1, 6, 78, 56, 67, 58, 79, 95, 19, 61, 62, 86, 71, 91, 35], [43, 5, 46, 35, 87, 36, 4, 61, 2, 35, 46, 4, 60, 48, 4, 70, 51, 17, 4, 86, 57, 85, 76]], 17, 22",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
long long int f_gold ( long long int y, long long int x ) {
if ( log2 ( y ) < x ) return y;
if ( x > 63 ) return y;
return ( y % ( 1 << x ) );
}
| [] | null | [] | COUNT_POSSIBLE_DECODINGS_GIVEN_DIGIT_SEQUENCE_1 | python | [] | def f_gold ( digits , n ) :
count = [ 0 ] * ( n + 1 ) ;
count [ 0 ] = 1 ;
count [ 1 ] = 1 ;
for i in range ( 2 , n + 1 ) :
count [ i ] = 0 ;
if ( digits [ i - 1 ] > '0' ) :
count [ i ] = count [ i - 1 ] ;
if ( digits [ i - 2 ] == '1' or ( digits [ i - 2 ] == '2' and digits [ i - 1 ] < '7' ) ) :
count [ i ] += count [ i - 2 ] ;
return count [ n ] ;
| code_translation | [
[
"['B', 'C', 'E', 'E', 'F', 'F', 'G', 'J', 'K', 'K', 'L', 'L', 'M', 'O', 'O', 'P', 'Q', 'R', 'V', 'X', 'Z', 'a', 'a', 'a', 'c', 'c', 'c', 'd', 'e', 'g', 'g', 'k', 'k', 'k', 'l', 'm', 'm', 'n', 'p', 't', 'y', 'z'], 31",
"1"
],
[
"['0', '9', '5', '0', '2', '6', '5', '4', '4', '5', '2', '6', '8', '2', '0', '3', '1', '9', '0', '1', '5'], 13",
"0"
],
[
"['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], 19",
"0"
],
[
"['x', 'a', 'R', 'O', 'S', 'r', 'g', 'e', 'Y', 'Z', 't'], 5",
"1"
],
[
"['0', '1', '1', '1', '2', '2', '2', '2', '2', '2', '2', '3', '3', '4', '4', '5', '5', '5', '5', '5', '6', '6', '7', '7', '7', '7', '8', '8'], 21",
"144"
],
[
"['1', '1', '1', '1', '1', '1'], 4",
"5"
],
[
"[' ', ' ', ' ', 'B', 'B', 'C', 'D', 'F', 'H', 'I', 'J', 'K', 'L', 'O', 'P', 'V', 'W', 'W', 'Z', 'Z', 'a', 'c', 'h', 'i', 'q', 's', 'x'], 26",
"0"
],
[
"['0', '9', '1', '5', '2', '4', '9', '3'], 5",
"2"
],
[
"['0', '0', '0', '1', '1', '1'], 4",
"0"
],
[
"['w', 't', 'U', 'R', 'a', 'c', 'G'], 5",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int table [ n + 1 ];
memset ( table, 0, sizeof ( table ) );
table [ 0 ] = 1;
for ( int i = 1;
i < n;
i ++ ) for ( int j = i;
j <= n;
j ++ ) table [ j ] += table [ j - i ];
return table [ n ];
}
| [] | null | [] | PERFECT_REVERSIBLE_STRING | python | [] | def f_gold ( str ) :
i = 0 ; j = len ( str ) - 1 ;
while ( i < j ) :
if ( str [ i ] != str [ j ] ) :
return False ;
i += 1 ;
j -= 1 ;
return True ;
| code_translation | [
[
"'ab'",
"False"
],
[
"'303'",
"True"
],
[
"'11110000'",
"False"
],
[
"'aba'",
"True"
],
[
"'404'",
"True"
],
[
"'10101'",
"True"
],
[
"'abab'",
"False"
],
[
"'6366'",
"False"
],
[
"'001'",
"False"
],
[
"''",
"True"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int count = 0;
int cummulative_sum = 0;
sort ( arr, arr + n );
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] >= cummulative_sum ) {
count ++;
cummulative_sum += arr [ i ];
}
}
return count;
}
| [] | null | [] | FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2 | python | [] | def f_gold ( n ) :
return ( n != 0 and ( ( n & ( n - 1 ) ) == 0 ) and not ( n & 0xAAAAAAAA ) ) ;
| code_translation | [
[
"1",
"True"
],
[
"4",
"True"
],
[
"64",
"True"
],
[
"-64",
"False"
],
[
"128",
"False"
],
[
"1024",
"True"
],
[
"97",
"False"
],
[
"86",
"False"
],
[
"14",
"False"
],
[
"99",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string s ) {
int l = s . length ( );
int j;
for ( int i = 0, j = l - 1;
i <= j;
i ++, j -- ) {
if ( s [ i ] != s [ j ] ) return false;
}
return true;
}
| [] | null | [] | FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE | python | [] | def f_gold ( arr , n ) :
brr = [ 0 ] * ( 2 * n + 1 )
for i in range ( n ) :
brr [ i ] = arr [ i ]
for i in range ( n ) :
brr [ n + i ] = arr [ i ]
maxHam = 0
for i in range ( 1 , n ) :
currHam = 0
k = 0
for j in range ( i , i + n ) :
if brr [ j ] != arr [ k ] :
currHam += 1
k = k + 1
if currHam == n :
return n
maxHam = max ( maxHam , currHam )
return maxHam
| code_translation | [
[
"[1, 4, 18, 22, 28, 34, 35, 39, 44, 45, 67, 73, 75, 79, 81, 83, 89, 93, 96], 12",
"12"
],
[
"[52, -28], 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], 21",
"1"
],
[
"[24], 0",
"0"
],
[
"[-68, 14, 36, 62], 2",
"2"
],
[
"[1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0], 12",
"6"
],
[
"[7, 10, 19, 22, 24, 28, 29, 39, 46, 55, 62, 66, 68, 73, 74, 76, 83, 84, 85, 99], 15",
"15"
],
[
"[-38, 56, 86, 12, 24, -90, -20, -46, 38, 92, -44, -74, 54, 50, 46, 50, -94, 64, 32, -84, 70], 14",
"14"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 8",
"2"
],
[
"[61, 89, 8], 2",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string str1, string str2 ) {
if ( str1 . length ( ) != str2 . length ( ) ) return false;
string clock_rot = "";
string anticlock_rot = "";
int len = str2 . length ( );
anticlock_rot = anticlock_rot + str2 . substr ( len - 2, 2 ) + str2 . substr ( 0, len - 2 );
clock_rot = clock_rot + str2 . substr ( 2 ) + str2 . substr ( 0, 2 );
return ( str1 . compare ( clock_rot ) == 0 || str1 . compare ( anticlock_rot ) == 0 );
}
| [] | null | [] | STOOGE_SORT | python | [] | def f_gold ( arr , l , h ) :
if l >= h :
return
if arr [ l ] > arr [ h ] :
t = arr [ l ]
arr [ l ] = arr [ h ]
arr [ h ] = t
if h - l + 1 > 2 :
t = ( int ) ( ( h - l + 1 ) / 3 )
f_gold ( arr , l , ( h - t ) )
f_gold ( arr , l + t , ( h ) )
f_gold ( arr , l , ( h - t ) )
| code_translation | [
[
"[6, 25, 42, 52, 53, 54, 58, 66, 67, 70], 6, 6",
"None"
],
[
"[-13, -98, 50, -63, 48, 3, -76, 12, -35, 93, 29, 17, 16, 5, -97, -54, -45, -25], 16, 14",
"None"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 28, 24",
"None"
],
[
"[7, 49, 26, 33, 48, 79, 2, 71, 32, 4, 20, 36], 9, 10",
"None"
],
[
"[88], 0, 0",
"None"
],
[
"[1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0], 20, 28",
"None"
],
[
"[2, 2, 4, 5, 7, 12, 12, 14, 14, 16, 17, 29, 29, 31, 32, 39, 41, 47, 48, 49, 51, 54, 58, 58, 59, 60, 73, 78, 80, 81, 82, 83, 84, 85, 90, 95, 97, 99, 99], 28, 29",
"None"
],
[
"[-31, -55, 6, 37, 77, 61, 0, 46, -91, -38, 85, -71, 25, 14, 53, 43, 34], 15, 11",
"None"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 12, 17",
"None"
],
[
"[77, 68, 78, 97, 92, 52, 37, 8, 44, 98, 5, 69, 31, 45, 9, 32, 33, 67, 30, 76, 29, 3, 90, 57, 30, 9, 26, 2, 62, 3, 46, 68, 25, 51, 13, 44, 35, 55], 27, 20",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string s ) {
int n = s . size ( );
int ans = - 1;
string num;
for ( int i = 1;
i < ( 1 << n );
i ++ ) {
string str = "";
for ( int j = 0;
j < n;
j ++ ) {
if ( ( i >> j ) & 1 ) {
str += s [ j ];
}
}
if ( str [ 0 ] != '0' ) {
int temp = 0;
for ( int j = 0;
j < str . size ( );
j ++ ) temp = temp * 10 + ( int ) ( str [ j ] - '0' );
int k = sqrt ( temp );
if ( k * k == temp ) {
if ( ans < ( int ) str . size ( ) ) {
ans = ( int ) str . size ( );
num = str;
}
}
}
}
if ( ans == - 1 ) return ans;
else {
cout << num << " ";
return n - ans;
}
}
| [
"import math"
] | null | [] | COUNT_DIGITS_FACTORIAL_SET_1 | python | [] | import math
def f_gold ( n ) :
if ( n < 0 ) :
return 0 ;
if ( n <= 1 ) :
return 1 ;
digits = 0 ;
for i in range ( 2 , n + 1 ) :
digits += math.log10 ( i ) ;
return math.floor ( digits ) + 1 ;
| code_translation | [
[
"66",
"93"
],
[
"7",
"4"
],
[
"55",
"74"
],
[
"37",
"44"
],
[
"76",
"112"
],
[
"16",
"14"
],
[
"17",
"15"
],
[
"95",
"149"
],
[
"71",
"102"
],
[
"90",
"139"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string str ) {
string tmp = str + str;
int n = str . length ( );
for ( int i = 1;
i <= n;
i ++ ) {
string substring = tmp . substr ( i, str . size ( ) );
if ( str == substring ) return i;
}
return n;
}
| [] | null | [] | PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE | python | [] | def f_gold ( a ) :
return ( 4 * a )
| code_translation | [
[
"98",
"392"
],
[
"9",
"36"
],
[
"18",
"72"
],
[
"38",
"152"
],
[
"84",
"336"
],
[
"8",
"32"
],
[
"39",
"156"
],
[
"6",
"24"
],
[
"60",
"240"
],
[
"47",
"188"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int cum_sum = 0;
for ( int i = 0;
i < n;
i ++ ) cum_sum += arr [ i ];
int curr_val = 0;
for ( int i = 0;
i < n;
i ++ ) curr_val += i * arr [ i ];
int res = curr_val;
for ( int i = 1;
i < n;
i ++ ) {
int next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 );
curr_val = next_val;
res = max ( res, next_val );
}
return res;
}
| [] | null | [] | SPACE_OPTIMIZED_SOLUTION_LCS | python | [] | def f_gold ( X , Y ) :
m = len ( X )
n = len ( Y )
L = [ [ 0 for i in range ( n + 1 ) ] for j in range ( 2 ) ]
bi = bool
for i in range ( m ) :
bi = i & 1
for j in range ( n + 1 ) :
if ( i == 0 or j == 0 ) :
L [ bi ] [ j ] = 0
elif ( X [ i ] == Y [ j - 1 ] ) :
L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1
else :
L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ] , L [ bi ] [ j - 1 ] )
return L [ bi ] [ n ]
| code_translation | [
[
"'YNpjSv', 'qtUkJn'",
"0"
],
[
"'736519', '07592'",
"2"
],
[
"'11010000100010', '0'",
"1"
],
[
"'v ', 'qGBQT'",
"0"
],
[
"'8311172', '157219329531'",
"3"
],
[
"'100011101011', '1000001111'",
"7"
],
[
"'u', 'YzkubTqLhP'",
"0"
],
[
"'3943042', '3859'",
"1"
],
[
"'101', '00010000101010'",
"2"
],
[
"'MpbfF OsizevaM', 'WgsFGaQwtp'",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | SUM_PAIRWISE_PRODUCTS_2 | python | [] | def f_gold ( n ) :
return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24
| code_translation | [
[
"57",
"1397887.0"
],
[
"18",
"15675.0"
],
[
"97",
"11449977.0"
],
[
"9",
"1155.0"
],
[
"42",
"420497.0"
],
[
"67",
"2645897.0"
],
[
"71",
"3327486.0"
],
[
"66",
"2493271.0"
],
[
"69",
"2972060.0"
],
[
"18",
"15675.0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int N, int K ) {
sort ( arr, arr + N );
int res = INT_MAX;
for ( int i = 0;
i <= ( N - K );
i ++ ) {
int curSeqDiff = arr [ i + K - 1 ] - arr [ i ];
res = min ( res, curSeqDiff );
}
return res;
}
| [] | null | [] | N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1 | python | [] | def f_gold ( n ) :
count = 0 ;
curr = 19 ;
while ( True ) :
sum = 0 ;
x = curr ;
while ( x > 0 ) :
sum = sum + x % 10 ;
x = int ( x / 10 ) ;
if ( sum == 10 ) :
count += 1 ;
if ( count == n ) :
return curr ;
curr += 9 ;
return - 1 ;
| code_translation | [
[
"93",
"1324"
],
[
"10",
"109"
],
[
"55",
"703"
],
[
"94",
"1333"
],
[
"2",
"28"
],
[
"5",
"55"
],
[
"37",
"406"
],
[
"4",
"46"
],
[
"11",
"118"
],
[
"46",
"523"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
void f_gold ( int arr [ ], int n, int A, int B, int C ) {
for ( int i = 0;
i < n;
i ++ ) arr [ i ] = A * arr [ i ] * arr [ i ] + B * arr [ i ] + C;
int index, maximum = INT_MIN;
for ( int i = 0;
i < n;
i ++ ) {
if ( maximum < arr [ i ] ) {
index = i;
maximum = arr [ i ];
}
}
int i = 0, j = n - 1;
int new_arr [ n ], k = 0;
while ( i < index && j > index ) {
if ( arr [ i ] < arr [ j ] ) new_arr [ k ++ ] = arr [ i ++ ];
else new_arr [ k ++ ] = arr [ j -- ];
}
while ( i < index ) new_arr [ k ++ ] = arr [ i ++ ];
while ( j > index ) new_arr [ k ++ ] = arr [ j -- ];
new_arr [ n - 1 ] = maximum;
for ( int i = 0;
i < n;
i ++ ) arr [ i ] = new_arr [ i ];
}
| [] | null | [] | SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_N | python | [] | def f_gold(n):
prime = [0] * (n + 1)
sum = 0
max = int(n / 2)
for p in range(2, max + 1):
if prime[p] == 0:
for i in range(p * 2, n + 1, p):
prime[i] = p
for p in range(2, n + 1):
if prime[p]:
sum += prime[p]
else:
sum += p
return sum
| code_translation | [
[
"6",
"15"
],
[
"35",
"291"
],
[
"87",
"1554"
],
[
"91",
"1672"
],
[
"63",
"875"
],
[
"11",
"43"
],
[
"66",
"901"
],
[
"17",
"90"
],
[
"92",
"1695"
],
[
"81",
"1334"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int x ) {
int i;
for ( i = 0;
i < n;
i ++ ) {
if ( arr [ i ] == x ) return i;
}
return - 1;
}
| [] | null | [] | COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_1 | python | [] | def f_gold ( arr1 , arr2 , m , n , x ) :
count = 0
us = set ( )
for i in range ( m ) :
us.add ( arr1 [ i ] )
for j in range ( n ) :
if x - arr2 [ j ] in us :
count += 1
return count
| code_translation | [
[
"[1, 2, 5, 5, 9, 11, 12, 14, 16, 18, 35, 36, 39, 44, 50, 52, 52, 59, 69, 81, 82, 84, 85, 87, 87, 87, 88, 88, 89, 90, 90, 92, 97], [5, 5, 8, 20, 20, 24, 25, 29, 34, 37, 43, 45, 48, 49, 59, 60, 68, 70, 70, 72, 72, 75, 76, 77, 79, 81, 84, 85, 86, 88, 95, 96, 96], 17, 29, 32",
"2"
],
[
"[52, 28, -38, 78, -86, 78, -48, -70, -80, 28, -8, 60, -28, 90, 6, 76, 32, -54, 30, 30, -32, -24, -36, 62, 36, -66, 56, 92, -20, 90, 32], [-88, -32, 30, 32, -46, 62, -92, -90, -18, -18, 10, 16, 60, -40, 32, -88, 60, -82, 76, 50, 86, -82, -48, -68, -42, 34, 4, 0, 98, 92, -78], 30, 27, 17",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 13, 11, 8",
"0"
],
[
"[91, 95, 13, 13, 76, 18, 36, 86, 26, 13, 17, 68, 58, 42, 38, 9, 42, 90, 14, 74, 38, 64, 15], [16, 96, 8, 35, 12, 27, 81, 21, 32, 82, 95, 81, 53, 76, 72, 16, 9, 16, 61, 1, 36, 71, 28], 11, 12, 15",
"0"
],
[
"[-96, -94, -94, -92, -74, -70, -66, -54, -48, -20, -18, -10, -6, -2, 2, 18, 36, 48, 52, 58, 68, 74, 88, 90, 94], [-92, -72, -72, -64, -58, -52, -30, -28, -24, -24, -16, -10, -2, 4, 12, 22, 30, 38, 44, 62, 64, 68, 86, 88, 90], 19, 14, 21",
"0"
],
[
"[1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0], 18, 19, 29",
"0"
],
[
"[7, 18, 19, 20, 24, 25, 25, 27, 30, 35, 39, 42, 58, 59, 63, 64, 64, 66, 66, 68, 69, 77, 86, 93], [2, 2, 18, 20, 22, 22, 31, 35, 36, 40, 41, 41, 41, 42, 42, 43, 45, 61, 79, 83, 87, 91, 95, 96], 22, 18, 18",
"0"
],
[
"[86, 44, 10, 80, 12, 52, -92, 2, 42, -32, -14, 2, -42, 40, 96, 22, 58, -90, -20, 22, 96, 10, -92, -28, -28, 80, 36, 72, -2, 32, -46, 62, -58, 20, 22, 32, -98, -2, -42, -90, 10, 70, 54, -32], [-4, -76, -98, 14, 30, -10, -10, 62, 88, -94, -74, -82, 84, 44, 58, 8, -42, -66, -18, 68, -78, 42, -32, 38, -98, 38, -78, 42, 86, -38, -6, -72, -44, 8, -6, -48, -62, 82, 94, -92, -56, 28, -54, 34], 26, 36, 31",
"0"
],
[
"[0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], 5, 3, 5",
"0"
],
[
"[43, 2, 4, 99, 45, 80, 27, 8, 64, 77, 57, 55, 71, 67, 51, 42, 58, 70, 5, 62, 55, 20, 61, 47, 66, 80, 70, 24, 56, 22, 58, 63, 61, 41, 20, 97, 47], [11, 66, 41, 17, 93, 25, 24, 17, 12, 33, 62, 86, 48, 68, 36, 36, 39, 82, 7, 66, 5, 48, 27, 9, 56, 6, 61, 91, 98, 74, 61, 63, 98, 96, 57, 63, 85], 24, 29, 21",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n, int k ) {
if ( k >= n - 1 ) return n;
int best = 0, times = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( a [ i ] > best ) {
best = a [ i ];
if ( i ) times = 1;
}
else times += 1;
if ( times >= k ) return best;
}
return best;
}
| [] | null | [] | PERMUTE_TWO_ARRAYS_SUM_EVERY_PAIR_GREATER_EQUAL_K | python | [] | def f_gold ( a , b , n , k ) :
a.sort ( reverse = True )
b.sort ( )
for i in range ( n ) :
if ( a [ i ] + b [ i ] < k ) :
return False
return True
| code_translation | [
[
"[99, 97, 90, 88, 87, 70, 52, 52, 43, 40, 27, 25, 16, 12, 9], [4, 7, 11, 20, 34, 35, 36, 44, 46, 71, 72, 78, 85, 85, 91], 10, 7",
"True"
],
[
"[94, 92, 92, 88, 74, 72, 70, 56, 42, 42, 30, 30, 20, 18, 14, 12, 10, 8, 6, -14, -26, -28, -42, -44, -48, -68, -74, -74, -76, -78, -80, -84, -86, -90, -90, -90, -92, -94, -96, -96, -98, -98], [-98, -86, -84, -80, -80, -78, -76, -76, -74, -72, -56, -50, -48, -44, -44, -42, -32, -32, -32, -22, -20, -18, -14, 8, 16, 16, 18, 24, 30, 40, 44, 50, 60, 62, 62, 68, 70, 76, 84, 94, 94, 96], 40, 38",
"False"
],
[
"[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], 11, 15",
"False"
],
[
"[97, 77, 75, 72, 71, 70, 69, 65, 59, 55, 51, 48, 47, 42, 35, 31, 26, 18, 16, 15, 15, 13, 11, 6, 3, 2], [4, 11, 12, 12, 14, 15, 20, 21, 36, 37, 38, 44, 45, 46, 48, 51, 60, 62, 65, 73, 78, 79, 81, 88, 89, 98], 25, 16",
"True"
],
[
"[94, 92, 90, 90, 84, 84, 74, 72, 68, 58, 56, 56, 54, 52, 36, 32, 18, 18, 16, 16, 4, 2, -2, -4, -4, -20, -34, -40, -42, -46, -48, -52, -52, -52, -64, -66, -70, -72], [-94, -76, -74, -56, -54, -50, -46, -38, -26, -24, -24, -22, -16, -10, -6, -4, -4, 0, 0, 6, 12, 12, 18, 20, 38, 50, 52, 52, 54, 64, 64, 72, 72, 72, 76, 90, 96, 96], 26, 30",
"False"
],
[
"[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], 13, 13",
"False"
],
[
"[98, 96, 96, 94, 93, 92, 87, 82, 80, 80, 80, 79, 72, 72, 66, 66, 64, 58, 53, 48, 44, 37, 34, 32, 23, 21, 18, 17, 8], [11, 15, 17, 19, 23, 23, 26, 27, 36, 43, 46, 47, 55, 59, 63, 66, 77, 79, 79, 82, 85, 86, 86, 91, 91, 94, 94, 97, 99], 20, 14",
"True"
],
[
"[94, 80, 78, 62, 52, 50, 32, 28, 24, 24, 22, 18, 18, 14, 14, 10, 10, -8, -14, -14, -16, -20, -22, -28, -38, -48, -50, -66, -78, -78, -80, -82, -88, -88, -98], [-96, -82, -80, -80, -66, -54, -46, -44, -40, -30, -16, -14, 2, 6, 12, 20, 24, 32, 36, 38, 42, 46, 52, 56, 62, 66, 70, 88, 88, 90, 90, 96, 96, 98, 98], 31, 24",
"False"
],
[
"[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, 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], 31, 30",
"False"
],
[
"[92, 91, 85, 75, 72, 67, 65, 58, 53, 45, 39, 33, 31, 13, 10, 10], [7, 12, 19, 21, 28, 34, 39, 40, 41, 69, 71, 71, 74, 78, 91, 92], 14, 8",
"True"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b ) {
int count = 0;
int p = abs ( a * b );
if ( p == 0 ) return 1;
while ( p > 0 ) {
count ++;
p = p / 10;
}
return count;
}
| [] | null | [] | BREAK_NUMBER_THREE_PARTS | python | [] | def f_gold ( n ) :
count = 0
for i in range ( 0 , n + 1 ) :
for j in range ( 0 , n + 1 ) :
for k in range ( 0 , n + 1 ) :
if ( i + j + k == n ) :
count = count + 1
return count
| code_translation | [
[
"52",
"1431"
],
[
"47",
"1176"
],
[
"75",
"2926"
],
[
"36",
"703"
],
[
"68",
"2415"
],
[
"16",
"153"
],
[
"99",
"5050"
],
[
"38",
"780"
],
[
"84",
"3655"
],
[
"45",
"1081"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int low, int high, int x ) {
if ( low > high ) return - 1;
if ( x >= arr [ high ] ) return high;
int mid = ( low + high ) / 2;
if ( arr [ mid ] == x ) return mid;
if ( mid > 0 && arr [ mid - 1 ] <= x && x < arr [ mid ] ) return mid - 1;
if ( x < arr [ mid ] ) return f_gold ( arr, low, mid - 1, x );
return f_gold ( arr, mid + 1, high, x );
}
| [] | null | [] | BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET | python | [] | def f_gold ( n ) :
bell = [ [ 0 for i in range ( n + 1 ) ] for j in range ( n + 1 ) ]
bell [ 0 ] [ 0 ] = 1
for i in range ( 1 , n + 1 ) :
bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ]
for j in range ( 1 , i + 1 ) :
bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ]
return bell [ n ] [ 0 ]
| code_translation | [
[
"84",
"408248141291805738980141314733701533991578374164094348787738475995651988600158415299211778933"
],
[
"78",
"1635000770532737216633829256032779450518375544542935181844299348876855151241590189395"
],
[
"9",
"21147"
],
[
"73",
"214834623568478894452765605511928333367140719361291003997161390043701285425833"
],
[
"4",
"15"
],
[
"53",
"1052928518014714166107781298021583534928402714242132"
],
[
"85",
"10583321873228234424552137744344434100391955309436425797852108559510434249855735357360593574749"
],
[
"38",
"746289892095625330523099540639146"
],
[
"39",
"10738823330774692832768857986425209"
],
[
"6",
"203"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | FIND_ONE_EXTRA_CHARACTER_STRING_1 | python | [] | def f_gold ( strA , strB ) :
res = 0
for i in range ( 0 , len ( strA ) ) :
res = res ^ ( ord ) ( strA [ i ] )
for i in range ( 0 , len ( strB ) ) :
res = res ^ ( ord ) ( strB [ i ] )
return ( ( chr ) ( res ) ) ;
| code_translation | [
[
"'obfLA mmMYvghH', 'obfLA mmMYvghH'",
"' '"
],
[
"'2941', '2941'",
"'\\x00'"
],
[
"'0111111', '0111111'",
"'\\x00'"
],
[
"'oWvbFstI', 'oWvbFstI'",
"'\\x00'"
],
[
"'4937516500', '4937516500'",
"'\\x00'"
],
[
"'101110100', '101110100'",
"'\\x00'"
],
[
"'hYZscJQFBE', 'hYZscJQFBE'",
"'\\x00'"
],
[
"'58443', '58443'",
"'\\x00'"
],
[
"'1100', '1100'",
"'\\x00'"
],
[
"'ZUdYuIBVNaeeb', 'ZUdYuIBVNaeeb'",
"'\\x00'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | MULTIPLY_LARGE_NUMBERS_REPRESENTED_AS_STRINGS | python | [] | def f_gold ( num1 , num2 ) :
len1 = len ( num1 )
len2 = len ( num2 )
if len1 == 0 or len2 == 0 :
return "0"
result = [ 0 ] * ( len1 + len2 )
i_n1 = 0
i_n2 = 0
for i in range ( len1 - 1 , - 1 , - 1 ) :
carry = 0
n1 = ord ( num1 [ i ] ) - 48
i_n2 = 0
for j in range ( len2 - 1 , - 1 , - 1 ) :
n2 = ord ( num2 [ j ] ) - 48
summ = n1 * n2 + result [ i_n1 + i_n2 ] + carry
carry = summ // 10
result [ i_n1 + i_n2 ] = summ % 10
i_n2 += 1
if ( carry > 0 ) :
result [ i_n1 + i_n2 ] += carry
i_n1 += 1
i = len ( result ) - 1
while ( i >= 0 and result [ i ] == 0 ) :
i -= 1
if ( i == - 1 ) :
return "0"
s = ""
while ( i >= 0 ) :
s += chr ( result [ i ] + 48 )
i -= 1
return s
| code_translation | [
[
"'OaITtzE', 'RnYlJUqzk'",
"'Ã210226251418739'"
],
[
"'88111031', '558471'",
"'49207455593601'"
],
[
"'1100111', '11111110111101'",
"'12223454455433432211'"
],
[
"'eiWPbMrFx', 'tBAJaI'",
"'Ǎ89831208627580'"
],
[
"'43701248', '4027'",
"'175984925696'"
],
[
"'100001111110', '11'",
"'1100012222210'"
],
[
"'jVgOapMp', 'Xm'",
"'ŏ602112594'"
],
[
"'68337672', '56939'",
"'3891078706008'"
],
[
"'00110101', '1'",
"'110101'"
],
[
"'JqSh', 'iAfjQRwuVyost'",
"'ó1382344355410428'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int odd_count = 0;
int even_count = 0;
if ( n < 0 ) n = - n;
if ( n == 0 ) return 1;
if ( n == 1 ) return 0;
while ( n ) {
if ( n & 1 ) odd_count ++;
if ( n & 2 ) even_count ++;
n = n >> 2;
}
return f_gold ( abs ( odd_count - even_count ) );
}
| [] | null | [] | MAXIMUM_PRODUCT_SUBSET_ARRAY | python | [] | def f_gold ( a , n ) :
if n == 1 :
return a [ 0 ]
max_neg = - 999999999999
count_neg = 0
count_zero = 0
prod = 1
for i in range ( n ) :
if a [ i ] == 0 :
count_zero += 1
continue
if a [ i ] < 0 :
count_neg += 1
max_neg = max ( max_neg , a [ i ] )
prod = prod * a [ i ]
if count_zero == n :
return 0
if count_neg & 1 :
if ( count_neg == 1 and count_zero > 0 and count_zero + count_neg == n ) :
return 0
prod = int ( prod / max_neg )
return prod
| code_translation | [
[
"[22, 62, 97], 2",
"1364"
],
[
"[-96, 30, 34, 16, 82, 12, 68, 6, -2, -78, -74, -52, 38, 62, 20, 4, -32, 44, -34, 12, -44, -66, -94, 24, -86, 56, -20, -62, 90, -16, -2, 54, 80, -16, -56, -98, 20, 84, 30, -44, -78, 66, -62, 18], 41",
"302250068531776034222739897357475499578036828475291074560000000"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 43",
"1"
],
[
"[9, 1, 90, 53, 67, 14, 42, 52, 55, 52, 86, 99, 43, 74, 48, 71, 55, 85, 87, 73, 41, 55, 52], 20",
"689508348936863540089694008320000"
],
[
"[-92, -78, -74, -72, -70, -66, -46, -44, -42, -34, -32, -30, -10, 18, 30, 34, 56, 64, 66], 10",
"510537135542353920"
],
[
"[0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0], 16",
"1"
],
[
"[1, 2, 3, 18, 20, 33, 38, 53, 55, 56, 67, 80, 83, 87, 90, 97, 98], 9",
"7895685600"
],
[
"[-78, -14, 20, 70, -40, -96, 78, 70, -36, -30, 24, -36, 86, 42, 24, 86, -52, -34, 72, -58, -36, -24, -10, -68, -20, -64, 34, 42, -2, -8], 16",
"15927273509513644992364544"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11",
"1"
],
[
"[1, 6, 32, 4, 63, 85, 48, 64, 11, 29, 77, 59, 1, 99, 17, 17, 38, 49, 78, 82, 50, 87, 75, 18, 75, 73, 98, 17, 27, 51, 4, 98, 96, 6, 74, 5], 32",
"180384264027136163328990905457639350599680000000"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY | python | [] | def f_gold(a, l, h, key):
if l > h:
return - 1
mid = (l + h) // 2
if a[mid] == key:
return mid
if a[l] <= a[mid]:
if key >= a[l] and key <= a[mid]:
return f_gold(a, l, mid - 1, key)
return f_gold(a, mid + 1, h, key)
if key >= a[mid] and key <= a[h]:
return f_gold(a, mid + 1, h, key)
return f_gold(a, l, mid - 1, key)
| code_translation | [
[
"[5, 6, 7, 8, 9, 10, 1, 2, 3], 0, 8, 3",
"8"
],
[
"[30, 40, 50, 10, 20], 0, 4, 40",
"1"
],
[
"[40, 50, 55, 67, 70, 4, 5, 6, 7], 0, 9, 67",
"3"
],
[
"[14, 41, 38, 67, 99, 11, 96, 52, 4, 29, 22, 57, 3, 45, 14, 76, 70, 38, 93, 5, 74, 50, 18, 17, 20, 34, 51, 69, 86, 73], 0, 16, 15",
"-1"
],
[
"[-90, -88, -88, -82, -62, -44, -38, -38, -36, -34, -34, -32, -30, -28, -28, -26, -24, -20, -16, -16, -16, -6, -6, 2, 6, 8, 10, 14, 18, 18, 46, 50, 50, 54, 56, 58, 58, 60, 62, 70, 70, 74, 82, 84, 88, 94, 96], 0, 24, 24",
"-1"
],
[
"[1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0], 0, 10, 10",
"-1"
],
[
"[4, 7, 9, 10, 10, 11, 14, 16, 17, 21, 25, 27, 31, 34, 34, 34, 38, 41, 42, 42, 52, 56, 56, 58, 60, 66, 67, 68, 68, 70, 72, 74, 76, 82, 88, 88, 88, 89, 91, 93, 94, 95, 95], 0, 23, 39",
"-1"
],
[
"[92, 60, -60, 64, 18, 70, 56, 34, 58, 14, 28, -72, -22, -74, -46, -28, 64, 88, 18, -50, -14, -20, 64, 6, -4, -98, 60, 98, 84, -58, -98, 66, 80, 68, -42, -58, 82, 90, -72, 34, 34, 80, 88, -64, 66, -20, -26], 0, 25, 25",
"-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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 0, 40, 29",
"-1"
],
[
"[33, 18, 98, 47, 76, 58, 29, 68, 62, 78, 12, 95, 20, 88, 39, 12, 43, 45, 5, 45, 96, 64, 38, 28, 70, 25, 65, 79, 39], 0, 16, 28",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int n ) {
return ( n % 2 == 0 );
}
| [] | null | [] | DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT | python | [] | def f_gold ( bin ) :
n = len ( bin )
if ( bin [ n - 1 ] == '1' ) :
return False
sum = 0
i = n - 2
while i >= 0 :
if ( bin [ i ] == '1' ) :
posFromRight = n - i - 1
if ( posFromRight % 4 == 1 ) :
sum = sum + 2
elif ( posFromRight % 4 == 2 ) :
sum = sum + 4
elif ( posFromRight % 4 == 3 ) :
sum = sum + 8
elif ( posFromRight % 4 == 0 ) :
sum = sum + 6
i = i - 1
if ( sum % 10 == 0 ) :
return True
return False
| code_translation | [
[
"'101000'",
"True"
],
[
"'39613456759141'",
"False"
],
[
"'11'",
"False"
],
[
"'PoiHjo'",
"True"
],
[
"'2'",
"True"
],
[
"'0000101'",
"False"
],
[
"'T s dZKeDX gK'",
"True"
],
[
"'3944713969'",
"False"
],
[
"'1000'",
"False"
],
[
"'ifYUgdpmt'",
"True"
]
] |
|
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 | [] | FIND_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS | python | [] | def f_gold ( arr , n ) :
d1 = 0
d2 = 0
for i in range ( 0 , n ) :
for j in range ( 0 , n ) :
if ( i == j ) :
d1 += arr [ i ] [ j ]
if ( i == n - j - 1 ) :
d2 += arr [ i ] [ j ]
return abs ( d1 - d2 ) ;
| code_translation | [
[
"[[1, 7, 17, 19, 22, 25, 27, 29, 41, 60, 67, 73, 79, 85, 94], [2, 6, 16, 21, 30, 42, 43, 48, 50, 52, 60, 61, 68, 92, 95], [4, 8, 10, 14, 15, 20, 22, 23, 23, 39, 40, 63, 70, 75, 87], [7, 21, 24, 36, 39, 43, 50, 58, 58, 67, 70, 89, 94, 98, 99], [4, 13, 17, 20, 21, 24, 30, 45, 57, 58, 59, 65, 66, 91, 97], [15, 15, 18, 33, 38, 43, 51, 57, 64, 68, 70, 75, 85, 94, 97], [2, 5, 6, 6, 12, 41, 43, 44, 48, 48, 53, 53, 60, 69, 99], [1, 13, 14, 24, 24, 25, 35, 36, 40, 67, 74, 75, 87, 88, 96], [6, 13, 23, 28, 29, 39, 40, 50, 50, 63, 63, 81, 85, 88, 96], [4, 13, 26, 27, 36, 40, 42, 42, 46, 48, 57, 62, 67, 67, 70], [20, 25, 29, 61, 69, 70, 73, 75, 78, 80, 84, 85, 88, 95, 97], [2, 2, 6, 11, 11, 31, 39, 48, 50, 52, 54, 64, 77, 89, 97], [1, 14, 25, 26, 29, 41, 46, 55, 67, 68, 77, 77, 83, 84, 88], [6, 9, 11, 25, 29, 33, 36, 44, 63, 65, 67, 68, 78, 89, 91], [12, 13, 13, 15, 43, 45, 50, 60, 62, 62, 64, 86, 91, 96, 96]], 10",
"12"
],
[
"[[74, -94, 42, 56, -64, -46, -34, 54, -2, -92, 0, -38, -76, -16, 42, 20, -58, 36, 66, -88, 6, -82, 46, 2, 2, -62, -76, -10, -26, -44, -38, 70, 46, 16, 12, 84, 4, -72, -84, 66, -6, -92, 46, -94, -46, 74, 64], [20, -22, -40, -22, -40, 56, 0, -84, -96, 32, -36, -16, 56, 36, -24, 20, 50, 28, 52, -44, -36, -18, 14, 42, 28, 24, -88, 90, 76, -72, -80, -80, 48, 56, -28, -18, -56, 32, -72, 30, -46, -60, 8, -90, 52, -10, 86], [-82, 60, 60, 72, -68, 2, 40, -56, -38, -80, 10, 54, -22, 34, 62, -78, 10, 28, -8, 28, -22, -34, 12, 14, -18, 38, 88, -10, -70, 44, -70, 10, 70, -58, 36, -70, -32, -60, -98, 32, 32, 6, 58, -78, -58, -66, 74], [58, -16, 66, -26, 18, 46, 92, 14, 62, -8, 62, 12, 72, 8, 36, 22, -24, -2, 80, 88, -16, 46, 16, -70, 22, -58, -46, -66, 4, 86, 54, -86, -6, -36, -54, 14, -38, 16, -12, -68, -18, 96, 54, 70, -22, 78, 40], [-38, -50, -20, -58, 80, -42, -64, -12, 64, -56, 50, 36, 18, 58, 12, 12, 12, -22, -72, -44, 28, 48, -2, 34, -78, -36, -60, -34, 28, 8, 30, -98, 4, 0, 6, 70, -90, -4, 38, -88, -84, 86, 24, -18, 96, -72, 76], [-78, 18, -82, -18, 32, -26, -54, -18, 84, 68, -94, 42, 26, 88, 34, 18, -22, 20, 44, -60, 54, -60, 14, 86, 18, 10, -48, 96, -36, -98, 96, -6, -96, -2, -92, -78, -24, 40, -82, -74, 0, 18, 0, 28, 16, 78, -76], [32, 46, -30, 98, -92, 24, 42, -2, -92, 12, -24, 84, 80, -74, -80, -48, 54, 30, -4, 28, 0, -56, 78, 76, -96, -32, -52, 82, -78, 46, -92, -16, 58, 78, -14, -82, 78, -44, -34, 34, 2, 76, 72, -34, -80, 88, 20], [-66, 6, 70, 82, -86, -16, 38, 22, 42, 76, 58, 2, -12, 0, 14, -8, -8, 62, 46, -38, -90, 8, 36, -68, 56, 26, 40, -36, 76, -54, 44, 88, 46, -62, 34, -26, 90, -94, 52, 40, 24, -86, 36, 28, -12, -48, 6], [-12, 14, -96, -4, -96, -18, -60, -52, 86, 22, -44, -22, -68, 66, -66, 72, -42, -14, -98, 56, 82, -52, -84, 82, 98, -36, -14, 20, -48, 90, -20, 80, -18, 6, -82, -4, 88, 88, 82, 78, 88, -34, 22, 6, -16, 4, 32], [18, 24, 52, -50, -82, -66, 58, 42, -60, 66, 86, 82, -66, -72, -6, 80, 78, 68, -30, -76, -64, 98, -62, 80, -96, 32, 60, -52, -26, -66, 52, -8, 42, 74, -72, 94, -94, -56, -14, 74, 72, -82, -86, -80, -4, -64, -52], [-82, 2, -16, 56, -14, 70, -60, 16, 82, 62, -52, 12, -74, -22, 50, -82, -14, -48, -88, 52, -12, 92, -40, 16, -66, -92, 30, -80, -10, 48, -4, 16, 50, 66, 44, -40, -52, 48, 18, -16, -56, 58, 28, -42, -80, 22, -58], [42, 38, 28, 30, 16, 66, -92, 36, -40, 28, 12, 2, -50, -42, -96, -56, 6, -16, 10, 96, -62, 64, -8, 82, 46, 94, 6, 30, 84, 64, -58, 88, 42, 88, 0, 16, -30, 48, -10, 30, 94, -42, 56, -82, -60, -84, -34], [60, -50, -90, 24, -8, 40, -92, -28, 28, 84, -36, -62, -24, -54, 98, -90, 50, -26, -18, 8, -74, -20, 54, -22, -44, -84, 64, 66, -20, 56, 96, 54, 94, -60, 96, -46, -66, 66, -48, 2, -90, -94, -86, -80, -36, -66, 36], [82, -38, 10, 18, 8, -12, -92, -96, -50, -34, 18, -54, 8, -36, 56, -32, 80, -84, 96, 76, 6, 72, 62, 24, 58, 20, -56, -94, -92, 16, 22, -68, -18, -26, -56, 80, -52, 50, 56, 78, -6, 54, -58, 16, 78, 52, 80], [-34, -56, -86, 42, 26, -78, 8, 92, 2, 10, -56, -14, 84, -20, 14, -76, 2, 82, 90, 28, 18, 16, 94, -96, -40, 22, -52, -90, -28, -64, 38, -68, -62, -94, 76, -78, -48, 70, -60, -98, 84, -38, -12, -20, 8, 84, -52], [-74, -94, 42, 80, 12, 56, -90, 58, 4, -58, 20, 14, 80, -88, 22, 94, -18, -96, 76, 88, 72, -98, -80, 88, -8, 6, -10, 50, -78, 16, -40, 28, 14, -98, -90, -4, 30, 56, 28, 56, 32, 12, 68, 2, 2, 18, 96], [70, 24, -78, -52, -10, -54, -4, 22, -96, -60, -16, 90, 70, 64, 78, 90, -74, 98, 80, 84, -84, -22, 58, -12, -84, -2, -72, 24, -96, 52, -62, 58, 72, -24, -54, -38, -12, 34, 42, -50, -14, -16, 62, -72, 14, -34, 50], [76, 48, -66, 12, -92, 36, 64, -86, -18, 2, 16, 2, 88, 70, -8, 4, -62, -34, -6, 54, 10, -8, -54, 32, 12, 94, -12, -68, 74, 84, -38, -4, -32, 20, 14, -8, 82, -66, 48, -26, -74, 10, -20, -74, -46, 78, -96], [28, 24, 16, 40, 12, -68, -42, 94, 18, 98, 68, -56, 2, -92, -10, -54, -2, -82, 86, -64, -38, -12, 48, -32, 16, 30, -36, -94, 84, -74, -30, -54, 62, -38, -74, -6, 70, -64, -26, -58, 30, 2, 96, 64, -86, -24, -12], [-30, -78, 84, 58, 20, 2, 10, -24, 62, -56, -80, 76, -40, -20, -66, -2, -62, 48, -74, -48, -82, 88, 64, -72, 74, -42, 30, -60, -88, -46, -72, 36, -98, 70, -84, -52, 68, -18, -90, -20, 44, -40, -92, 20, -98, -80, -84], [-90, 44, -30, 84, -10, 36, 28, 46, -96, -42, -60, 2, -14, 78, 80, 44, -54, -10, -12, -30, 80, -80, 94, 72, 50, -98, 74, 14, -28, -84, 60, 62, -72, -90, -46, -90, 56, -36, 98, 64, -26, 64, -68, -58, -10, -12, -18], [84, -86, 90, -90, -42, 38, 6, 8, -90, -6, -52, 18, -62, 96, 42, -26, -86, -24, 54, 10, 94, -66, 58, -82, 84, -42, -6, 48, 72, 54, 94, -36, -56, -66, 0, 28, 80, -22, 92, 44, 64, -86, -96, 6, 56, -62, -88], [32, -90, 68, 72, -74, -70, -4, 58, -78, -18, -50, -10, -84, 26, 38, -84, 72, 44, -52, 44, -26, 42, -84, 2, -42, 76, -16, -46, 0, -46, -26, -28, -10, 56, -84, -92, 84, 32, -80, -46, -10, -30, 52, -78, -50, 56, -22], [-78, 12, -90, -90, -74, 48, -46, 32, 4, 24, -6, 40, 80, -26, -68, -20, 70, 86, 60, -60, 84, 30, 34, -60, -42, 50, 38, 64, 30, -18, -50, -48, 66, -2, -20, 86, 26, -96, 96, -68, 38, 64, -40, -94, -52, 74, 52], [-40, 88, 72, -56, -26, -48, -48, -20, 46, 88, 14, 86, 4, 46, 6, -54, -86, 34, 58, -72, 92, -18, -88, 8, 0, -28, -78, -4, 40, 0, 28, -38, -60, -28, -44, 48, -56, -52, 2, 20, 72, -98, 6, 22, 64, 36, -60], [90, -8, 0, -42, -58, -96, 80, 52, -78, 24, -24, -92, -70, 42, -46, 96, -10, -32, -18, 22, 24, 86, -4, -86, -70, -70, -96, -98, -34, 0, 16, -84, 28, -70, 94, -72, -52, -78, 62, -56, -12, -88, 76, 74, 12, 12, -28], [-42, -94, 96, 74, 70, -40, 50, -40, -26, 2, -76, -88, -54, 80, 66, 38, -8, 42, 94, -12, -88, 38, -44, -26, -98, 80, -56, -40, 48, -48, -8, 50, 6, 74, 94, -50, -70, -30, 70, -2, 60, -92, 38, -28, -64, -62, -54], [-40, 70, -60, -38, -70, 6, 24, -72, 22, -58, -2, 70, 58, 28, 90, -68, -12, 18, -66, -56, 66, 32, 4, 98, 64, -34, 10, -78, -88, -38, 36, -76, -96, 94, -38, -18, -40, 94, -18, -66, -34, 66, 82, -94, 76, -38, 14], [-98, -72, 14, 10, -30, 56, -56, 30, 20, 60, 52, 46, -16, -60, 60, 0, -70, 50, -64, 90, -62, -10, -94, 74, -92, 98, 86, 42, -18, -66, 34, 40, 36, -44, -44, -86, -22, -50, 50, -28, -34, -40, -30, 44, -54, 74, 54], [16, -12, -44, 82, -60, 36, -24, -12, 78, -74, -82, 66, -48, 74, -2, -4, -4, 10, -4, 18, 8, -84, -56, 64, 66, -46, -56, -60, -60, -72, 92, -82, 44, 28, 30, 84, 68, 34, -36, -58, 60, -26, 10, 74, 50, -70, -40], [-94, -12, -34, -82, -22, 22, -14, -66, 76, -42, -94, 24, 40, 10, -24, 60, 80, -52, 62, 76, 96, 92, 46, -44, -20, -92, -36, -6, -90, -64, -64, 44, 54, -60, -30, 80, 32, 32, -76, -10, 48, 88, -84, -32, -94, -50, 80], [86, 56, -50, -48, 74, 36, 2, 6, -64, 24, 86, 58, -92, -66, -32, -4, -74, -94, 16, -18, 10, -66, 82, -96, -96, 56, 18, 78, -12, 32, 48, 70, 42, 20, 0, -80, 78, -28, 80, 0, -94, -56, -28, 48, -30, -50, -20], [46, -94, -6, 60, -94, -18, 80, -58, -62, -70, -20, -8, -60, 92, 32, 78, 4, -26, -32, 98, 40, 98, -92, -96, 2, -96, 42, 30, 2, -4, 20, -84, -8, -40, 42, 8, 92, 32, -12, 44, -60, 32, 14, -56, -68, -72, -18], [2, 50, 48, 44, -24, 68, 16, 88, -66, -48, -82, -50, -24, -50, -56, 40, 30, -58, 38, 24, 44, 42, 52, 18, -86, 26, -4, -64, 70, -12, 6, -90, 78, 12, -82, 52, 70, 32, 74, 66, -98, -62, 76, 20, 74, -48, -46], [90, 66, -62, 86, 76, -54, 78, 98, 66, -16, 16, 32, 48, -42, 50, 16, -86, 66, 12, 88, -92, -78, -84, 74, 10, 0, -86, -34, 14, -74, -88, 86, -48, -34, 44, -58, 26, -48, -70, -96, -26, 84, 82, -90, -14, 30, -20], [-26, 58, -32, 22, -82, 50, -50, 42, 14, 60, -28, -12, 34, 94, -68, -48, -6, -98, 66, 94, -60, 26, 72, 10, -58, -66, -50, -92, -34, 66, 36, 44, 94, -34, -76, 22, -94, 14, 56, -2, 38, 42, 16, 20, -90, -36, -34], [-90, 98, 34, 26, 58, 70, -86, 46, -40, 70, 94, 40, -36, 2, -82, 0, -4, -18, 70, 40, 92, -38, -46, -74, -82, -54, 44, -34, 24, -46, 60, -36, -86, 92, -32, -38, 76, 46, -42, -56, -42, -8, 48, -64, 88, -50, 24], [70, -26, -72, -18, -88, -58, 76, -96, 62, -12, -56, 74, 62, 68, -86, 82, 34, -98, -52, 22, -16, -48, -14, -8, -56, 10, 48, 98, -70, 82, 2, -86, 76, 72, -70, -6, 58, -18, -48, 52, -48, -76, 68, -64, -34, -56, -88], [34, -80, -50, 74, -26, 2, 40, -66, -16, 56, 22, 10, -72, 86, 54, 34, 30, 38, -86, -22, -38, -28, -86, 28, 96, 6, -86, 54, 4, -84, 34, -58, -6, 40, 54, -60, -22, 84, 74, -92, -58, -86, -76, -66, -36, 90, -30], [26, 74, 84, -60, 52, -14, 98, -74, 24, 16, -96, -86, 18, -82, -34, -82, -56, -86, -8, -50, -32, -44, 8, 50, -12, 82, -10, 80, -28, -28, 2, -34, -88, 28, -44, -94, -42, 2, -48, 54, 90, 16, -38, 14, 82, 42, 58], [-22, 14, 26, -60, -18, -38, -60, 54, -48, 60, 50, -70, 24, -50, 18, 48, 98, 42, -52, -68, 24, 94, 60, 74, 76, 6, -76, -70, -86, -22, 76, 16, -4, 48, 20, -60, 82, 38, 32, 36, -56, -58, 40, 12, 46, 18, -96], [-92, 44, 94, -42, -84, -78, -72, -62, -32, 4, -12, -42, 4, 12, 20, -12, 6, 38, -92, -64, 64, 92, -62, 64, 54, -60, -42, -54, -14, -28, 26, -6, -14, 0, 80, 10, -64, -54, 2, 82, -8, 98, -20, 72, -94, -78, -64], [50, 44, -64, -36, 60, -44, 64, -64, 40, -66, 60, -44, 6, -8, -80, 36, 2, 30, -26, 82, -82, 26, -92, -40, -66, -62, 76, -34, -46, -36, 36, -92, 36, -74, -78, 50, -80, 16, -88, 92, -50, -80, 12, -92, 8, -18, -84], [20, -24, 94, -62, 40, -16, -24, -36, 62, -88, 98, -28, -80, 96, -96, 18, 60, -92, 22, 96, 98, -48, -82, 62, -28, -74, -84, -56, 88, -82, 38, 42, -82, -76, -16, -12, 46, -46, 48, 96, 12, 66, 74, -58, -2, -84, 16], [-4, 18, -28, 22, 70, -70, -70, 66, 46, -68, 72, -60, -54, 2, -82, 60, 86, -92, 36, -44, 98, 88, -88, 86, 24, 88, -80, -12, -18, -8, 0, -26, 2, 56, 94, 90, 30, -96, 32, 48, 2, -72, -36, 10, -52, 0, 98], [46, -62, -78, -50, 98, 26, 42, 6, 26, -28, -56, 60, -36, -54, -84, 90, 68, 94, -28, 60, 52, 54, 28, 12, 58, -42, 86, -74, -84, -88, 54, -18, 54, 38, -96, 84, -78, -26, 50, 86, 58, 24, -2, -78, 40, -68, 6], [2, 26, -82, -84, 46, 46, 0, 18, 90, -92, 24, -34, -70, -84, 18, 32, -36, -84, -36, 20, 26, -72, -12, 36, 72, 42, 58, -34, 30, 40, -6, -18, -52, 20, -52, 4, -64, -64, -2, 36, 64, -86, -70, -38, -50, -34, 60]], 44",
"36"
],
[
"[[0, 0, 0, 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, 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, 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], [0, 0, 0, 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, 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], [0, 0, 0, 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, 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], [0, 0, 0, 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, 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], [0, 0, 0, 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, 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], [0, 0, 0, 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, 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, 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], [0, 0, 0, 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, 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], [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], [0, 0, 0, 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, 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, 1]], 16",
"3"
],
[
"[[49, 76, 85, 2, 48, 20], [13, 2, 84, 21, 44, 17], [70, 85, 58, 75, 89, 16], [86, 45, 19, 97, 95, 63], [62, 44, 26, 75, 73, 95], [93, 35, 62, 88, 6, 33]], 4",
"51"
],
[
"[[-80, -72, -68, -62, -56, -40, -28, 4, 22, 24, 34, 58, 60, 60, 78], [-88, -68, -48, -28, -24, -4, 0, 2, 12, 30, 42, 48, 52, 64, 68], [-92, -86, -82, -44, -38, -20, -18, -16, 2, 4, 12, 32, 42, 54, 96], [-82, -74, -64, -48, -30, -10, 16, 20, 28, 46, 46, 54, 60, 74, 96], [-84, -78, -70, -30, -28, -18, -10, -2, 2, 14, 30, 44, 50, 92, 98], [-92, -74, -64, -48, -46, -8, 20, 22, 28, 30, 30, 32, 46, 62, 84], [-92, -82, -82, -66, -64, -60, -40, -2, 2, 40, 44, 46, 66, 68, 74], [-70, -58, -54, -46, -34, -18, 14, 20, 22, 32, 48, 62, 84, 86, 90], [-92, -62, -58, -48, -30, -28, 0, 8, 16, 20, 26, 38, 70, 92, 98], [-90, -80, -46, 0, 14, 36, 42, 48, 48, 50, 50, 50, 52, 76, 98], [-80, -78, -58, -58, -54, -44, -42, 6, 20, 24, 28, 34, 40, 58, 78], [-90, -80, -60, -40, 4, 6, 10, 26, 28, 34, 36, 38, 42, 44, 56], [-96, -96, -72, -58, -54, -40, -34, -34, -28, -26, -22, -18, -2, 18, 54], [-98, -90, -76, -64, -62, -58, -54, -30, -16, 14, 36, 54, 54, 72, 92], [-86, -70, -58, -48, -46, -38, -32, 2, 20, 44, 54, 56, 66, 82, 84]], 9",
"6"
],
[
"[[0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0]], 27",
"2"
],
[
"[[1, 2, 2, 2, 3, 3, 10, 11, 11, 19, 27, 30, 31, 36, 38, 51, 55, 64, 64, 68, 72, 78, 79, 83, 87, 98], [1, 3, 5, 6, 19, 25, 31, 32, 39, 40, 51, 51, 52, 54, 57, 58, 64, 65, 66, 73, 76, 83, 87, 90, 92, 97], [1, 6, 7, 26, 29, 33, 35, 42, 44, 46, 47, 50, 61, 64, 65, 67, 73, 75, 81, 81, 86, 87, 88, 88, 95, 95], [1, 3, 6, 19, 19, 21, 29, 34, 36, 36, 43, 44, 52, 53, 53, 63, 64, 67, 68, 75, 75, 75, 76, 78, 81, 83], [9, 10, 18, 18, 20, 22, 28, 31, 35, 42, 47, 48, 48, 62, 63, 65, 65, 70, 73, 75, 75, 82, 92, 95, 95, 97], [10, 14, 16, 17, 27, 30, 33, 36, 37, 37, 39, 47, 48, 48, 56, 57, 62, 74, 78, 81, 82, 84, 87, 88, 95, 95], [2, 16, 16, 18, 21, 21, 25, 26, 33, 38, 51, 51, 57, 59, 66, 68, 68, 69, 70, 74, 74, 74, 84, 86, 96, 98], [3, 5, 14, 14, 17, 23, 26, 26, 27, 31, 33, 36, 37, 51, 63, 64, 70, 70, 72, 75, 79, 86, 90, 90, 97, 97], [15, 15, 16, 19, 23, 29, 31, 33, 35, 35, 37, 38, 44, 49, 56, 68, 73, 74, 75, 76, 80, 84, 87, 89, 95, 99], [2, 3, 7, 13, 14, 16, 19, 19, 21, 28, 32, 39, 43, 47, 58, 64, 66, 80, 80, 82, 83, 84, 91, 91, 95, 98], [2, 3, 11, 21, 22, 24, 26, 34, 39, 41, 41, 47, 49, 50, 50, 59, 61, 67, 78, 79, 80, 85, 87, 87, 90, 96], [6, 9, 11, 15, 20, 27, 27, 27, 28, 42, 47, 47, 58, 61, 67, 70, 70, 71, 76, 77, 78, 80, 83, 91, 97, 98], [4, 8, 12, 13, 14, 14, 15, 20, 21, 22, 24, 25, 29, 51, 51, 57, 60, 68, 73, 76, 76, 81, 92, 93, 94, 98], [1, 8, 23, 26, 26, 26, 31, 40, 41, 45, 46, 49, 50, 53, 55, 58, 62, 65, 66, 68, 71, 77, 87, 87, 97, 98], [3, 9, 11, 17, 26, 28, 31, 32, 32, 33, 35, 41, 41, 41, 44, 48, 48, 63, 72, 74, 82, 84, 85, 91, 92, 94], [3, 5, 6, 8, 10, 17, 36, 41, 42, 45, 50, 51, 52, 53, 56, 58, 63, 64, 69, 72, 73, 74, 78, 87, 90, 92], [2, 6, 12, 19, 20, 25, 27, 30, 35, 38, 42, 45, 45, 50, 53, 54, 56, 59, 62, 62, 66, 74, 78, 81, 91, 94], [6, 8, 9, 15, 18, 20, 23, 23, 29, 30, 39, 41, 49, 62, 65, 69, 76, 79, 83, 84, 85, 86, 90, 94, 98, 98], [5, 6, 7, 11, 12, 16, 19, 19, 20, 20, 26, 44, 46, 53, 56, 60, 61, 74, 75, 75, 76, 80, 93, 95, 96, 99], [7, 15, 19, 22, 23, 24, 31, 34, 35, 37, 40, 42, 44, 52, 57, 67, 73, 74, 76, 77, 78, 83, 84, 95, 96, 97], [2, 4, 15, 16, 16, 23, 26, 32, 34, 39, 40, 41, 46, 52, 56, 61, 62, 65, 76, 80, 81, 82, 84, 85, 86, 87], [9, 13, 22, 41, 42, 42, 42, 45, 48, 49, 51, 51, 54, 58, 59, 60, 73, 74, 75, 83, 83, 86, 91, 94, 98, 98], [5, 9, 9, 16, 21, 21, 22, 27, 28, 31, 31, 32, 38, 38, 49, 51, 61, 62, 65, 69, 73, 75, 85, 91, 91, 96], [4, 4, 7, 7, 7, 9, 11, 21, 31, 36, 43, 43, 57, 58, 63, 63, 64, 66, 70, 71, 73, 77, 82, 83, 92, 97], [1, 6, 9, 9, 12, 14, 15, 16, 20, 24, 25, 29, 30, 37, 43, 44, 45, 53, 58, 63, 69, 70, 72, 78, 83, 88], [1, 15, 16, 17, 19, 24, 25, 35, 43, 44, 44, 46, 48, 49, 50, 53, 54, 61, 61, 67, 70, 74, 74, 83, 87, 88]], 24",
"59"
],
[
"[[-62, -26, -90, -96, 66, 8, 88, 98, 26, -4, -62, 38, 24, 18, -88, -78, 22, -80, 80, 8, 62, 22, -20, 42, 78, -96, 38, 22, 44, 18, -98, 4, 66, -58, 50, -98, 42, 48, -52, 98, -72, 72, 60, -66, -78, -92], [24, 94, 24, 64, 78, -82, 12, -96, -80, 32, -18, -8, -98, -32, -8, -40, -98, -52, -86, -50, -16, -36, 6, 6, 70, -78, 10, -34, -98, 24, -62, 4, -8, -86, 60, -52, -48, -44, 82, 68, 98, 30, 6, -58, 94, -52], [-20, 84, -82, 42, 42, 86, 38, 64, 84, 88, 46, -48, -8, -60, -94, -74, -72, -74, -52, -96, 46, 68, 84, -64, 22, -44, 78, -62, 64, 14, -80, 90, -26, 84, 92, -82, 36, -56, -46, 28, 86, -58, 50, -78, -36, -50], [-26, -94, -38, -38, -10, 58, -42, 36, 12, 22, 52, 48, 40, 22, 84, -56, -76, 48, -42, -58, 50, 98, -46, -30, 16, 30, 66, -2, 68, 44, -60, -4, 40, 16, 68, -40, 96, -40, -6, 60, 62, 90, 90, -20, 98, 94], [80, 36, 26, 86, 76, 38, 88, 80, -90, -60, -52, 92, 48, -32, -18, 4, -44, 52, 14, 2, 92, 2, -70, -16, 92, 12, -66, 62, 52, -92, -98, -80, -46, -50, 72, 98, 64, -32, 52, -10, 20, -20, -54, -12, 64, -64], [38, 94, 60, 44, -26, -46, 92, 60, -18, -10, -60, -78, -96, 54, -88, -20, 60, 66, -62, 40, 98, -50, 86, -56, -52, -60, 52, 26, 62, 62, -4, 54, -60, 52, -50, -2, 92, -38, -98, -66, 60, 70, 76, 64, -80, -88], [94, 84, 38, -60, -72, 50, -42, -52, -4, 16, -40, 90, -18, -20, 34, -28, -4, -66, -82, -30, -36, 94, -38, -56, -22, 62, -2, 30, -58, 70, -80, 0, -98, 14, 40, -28, 76, 30, 18, 6, -72, -28, 24, 26, 66, -56], [38, 52, 34, -60, 78, 64, 2, 64, -50, 14, -66, -2, -10, 10, 98, 36, 96, 96, -76, -58, -52, 22, 40, -28, 18, -34, -72, -98, -54, 82, 30, 90, 0, -22, 6, -36, -34, 44, -60, -40, 70, -26, 14, 14, -72, 98], [38, -88, 26, 34, 32, -78, 38, 12, -16, -76, 28, -74, 6, -54, 96, 8, -34, 72, 84, -70, -26, 16, -86, -14, 46, -24, -24, -96, -82, -66, 78, 20, -94, -76, -76, 90, -32, -24, -36, -62, -88, -26, -36, 0, -92, 40], [0, 66, 60, 82, -14, 92, 88, 30, 60, 36, 80, -54, 28, -10, -96, -4, -68, 46, 98, 42, 38, 30, -74, -2, 30, 6, -78, 74, -56, -6, -48, 32, 88, -40, 18, 36, -34, -28, 30, -54, -82, 98, 34, -56, 50, 40], [18, -96, 54, -6, 94, -68, -28, -18, -90, -64, -88, 60, 60, -72, 82, 48, 6, -44, -22, -82, 62, 52, -32, 0, 2, -12, -78, 92, 22, 2, 84, -64, 50, -6, -2, 90, 76, -48, -28, 22, -30, 14, 68, 26, 80, 20], [-94, -26, -52, 4, -44, 12, 74, -26, 28, 64, 84, -62, -10, -12, 74, 68, 94, -80, 32, -26, 80, 44, -80, -74, -82, -86, 98, -12, 30, 60, 90, 16, -58, -28, 18, 14, -86, -46, -62, -88, -84, 74, -48, -8, -26, 60], [10, 64, 58, -92, -48, 38, -30, -64, -58, -68, -26, -68, 52, 48, -72, 96, 32, -48, -60, 54, -6, -72, -22, 74, 4, 14, 80, 52, -50, 22, 74, -14, -92, -96, 54, -90, -18, 18, -16, -82, 26, 98, -68, 8, -78, -48], [-78, 12, 70, -42, 34, -52, 86, 64, -32, -96, -22, -8, 84, 36, -38, -80, 84, 72, 58, 34, -86, -84, 30, -40, -90, 10, 0, -74, 14, 76, -22, -2, 86, 86, -60, 32, -62, -34, 4, 14, 68, -38, 86, 94, 18, 30], [66, 16, 82, -70, -24, -90, -70, 82, 32, -42, -82, 74, -24, -16, 68, -92, 32, -58, -58, -14, -34, 68, -24, 20, 68, 54, 78, -72, -14, -46, 74, -90, -98, -64, -2, -58, -6, -20, 54, -70, -46, -56, 50, -62, 0, -14], [4, 50, 66, 84, -44, 50, -22, 36, 20, 94, -2, 66, -16, -82, -90, -74, 88, 42, 16, 42, -76, 0, 28, -42, -44, 48, -12, 78, -40, 54, 34, -86, -26, -46, 78, -68, -80, -94, -2, -48, -42, 62, 48, -24, -20, 60], [-16, 20, 16, -10, -96, -32, 42, -52, -72, 2, -66, -40, 32, 86, 96, -46, 88, 64, 90, 68, -22, 0, -18, 82, 22, 62, -82, -44, 76, -62, -26, 8, 82, 84, 96, 8, 76, 66, -56, 96, 96, -54, -70, 66, 60, 40], [64, -58, -76, 94, -4, -48, -40, 96, 46, -16, 2, -52, 42, -80, -44, 10, -60, 28, -52, -54, -88, 72, -40, -2, 78, 86, -26, -86, -90, -4, -14, 46, -84, -36, -88, 4, -4, -92, -42, 36, -94, -10, -38, -82, -50, 4], [-72, 22, -40, 24, 10, 26, 72, 14, -90, -66, -88, -30, 40, 40, -80, -56, -4, -88, 32, -98, 22, 10, 58, 62, -10, 24, -80, -90, 28, -64, -26, 30, -32, -44, 90, -12, 16, -48, 98, 88, -58, -54, -10, 48, -12, -40], [70, -36, -30, -26, -48, 86, -12, -78, 62, -8, -80, -14, -48, 52, -38, 38, -54, -40, -24, -80, -94, -50, -46, 64, 12, 62, -8, 12, -22, 24, -30, 20, -8, -76, -18, -76, 52, -74, 38, -26, -98, 58, 76, 38, 44, -14], [32, -62, 24, -58, -50, 32, -84, 0, -62, -12, 28, 72, 0, 42, 82, 32, -20, -96, -20, 92, -32, 86, -70, 74, -76, 64, 48, 66, 94, 52, 48, 6, -78, -88, 24, 74, 32, 38, 38, 92, 50, 24, 34, 46, -14, 18], [-42, 86, -48, -96, -72, 52, -28, 8, -92, -28, -56, -16, -48, -88, 90, 42, 30, 62, -50, 78, -20, 26, 10, -14, -40, 22, -34, -98, -48, -56, 54, 0, -54, -68, 52, 70, 78, -20, 60, -88, -26, 40, -80, -6, 66, -86], [18, -68, -46, 24, -62, -8, 14, -46, -60, -48, 0, -46, 50, 98, -86, 2, 92, -94, 66, -90, -74, -34, -80, 14, -42, -72, -54, 36, 70, 38, -92, 64, -86, -64, 6, -22, 92, -60, 38, 94, -74, 46, 96, -32, -10, 22], [2, 44, 44, -16, -96, 26, -32, -66, -22, 30, 68, -12, -94, 32, -48, 16, -80, -94, 2, -4, -56, -22, -22, 36, 16, 50, -2, 46, 56, -68, -72, -34, -54, -76, -84, 74, 22, -38, 26, 36, 30, -56, -82, 54, 92, -50], [-12, 2, -28, 98, -94, -52, 18, -30, -50, 36, 46, -22, -54, -70, 64, -30, 32, -14, 38, -56, -34, 84, 24, 10, 26, 32, 52, -16, -48, 4, -24, -70, -94, -10, -76, -36, 46, 88, 18, 48, -64, -12, -8, -70, -4, -80], [90, -8, 30, -44, -64, 42, 8, -14, -6, -70, -42, -98, -48, 34, -88, -22, 48, -98, 0, -16, 32, -36, 78, 84, 60, 80, 90, 58, -72, 80, -96, -98, -96, 58, -62, 86, -6, -14, -50, -96, 8, 18, -84, -34, -72, -18], [-42, 36, 86, 26, 10, -20, -22, 46, 28, 88, -34, -84, 60, 8, -22, 38, -40, -36, 18, -76, 40, -22, 14, 86, 22, 24, 98, 88, -90, 58, -58, 30, 70, 84, -32, 2, 20, 80, 28, -44, -98, -6, -64, 90, 42, -92], [0, -38, 82, 46, -24, 34, 34, -82, 2, -86, -30, 64, 16, -6, 22, -88, -26, -88, -74, -20, 82, 94, -16, 64, 26, 76, 58, -92, 28, -16, 44, 56, 20, 40, 20, 78, -96, -86, -54, -46, 54, -76, 82, -50, -54, -40], [-66, -18, 2, 98, 6, 70, 32, -6, 66, 4, 88, 64, 20, -24, 68, 2, -86, 66, -46, 18, 70, -90, 6, -44, -28, -86, 16, -38, -34, 2, 96, 80, 80, 34, -34, -66, 68, -20, 32, 36, 8, -40, -34, 8, 80, -94], [54, -28, -22, -26, 96, -34, 96, -92, 20, -24, 26, 24, 18, 96, 14, 96, 48, -96, 38, 86, 88, -66, 26, -22, 54, 72, 42, 0, -10, -42, -54, 78, -42, -2, -30, -60, -20, -84, -14, 98, 24, 96, -62, -28, -52, 34], [-96, 78, -66, -94, 2, 36, -62, -14, 70, -22, -92, -58, -58, -2, 40, 80, 86, -84, -98, -66, -44, -58, 56, -90, 88, 34, 76, 82, -2, 38, -26, 92, -94, 62, -56, -10, 14, -50, -92, 80, 8, -36, -96, -10, 42, -84], [50, -14, 12, 78, 50, -54, -22, -34, -70, -58, -18, 38, 8, -88, -88, -86, 58, -42, -28, -42, -26, 26, 90, 14, -40, 98, 94, 58, 68, 14, 36, 20, 58, 14, -22, -34, -48, -64, 38, -12, -12, 30, 24, 6, 38, 50], [-48, 6, 82, 94, 30, 58, -30, -54, -26, -32, 48, 40, 20, -68, -28, -50, -4, 88, -58, -46, -70, 48, -30, 76, -58, -96, -56, 36, 10, 56, 14, -6, 38, 12, -52, -78, -56, -36, 48, -56, -78, 98, -56, -92, -50, 46], [-30, -64, -90, -38, -28, 74, 70, -44, 56, -38, 64, 98, 62, -50, -68, 82, -6, 36, -16, -60, -44, -34, 92, -56, 12, 12, 88, 30, -72, 98, -86, -64, 82, -56, 58, 28, 24, -72, -98, -68, -54, -52, 50, 8, 44, 18], [-92, -86, -68, -18, 56, 26, 68, -84, 60, -68, 20, -2, -86, -76, -92, -86, -96, 50, 84, -44, 62, 24, -20, 88, -94, -66, 32, 50, -32, -96, 18, 56, 48, 18, -40, 50, -18, -10, 84, -48, 8, -50, 86, 88, 90, -70], [60, 46, 46, 96, 44, -38, -66, -56, 12, -28, -36, -32, -98, 50, 16, -8, 58, -94, 20, -94, 88, 82, 30, -32, -6, -50, 6, 44, -98, -16, -96, -68, 54, 0, 68, 44, 58, -72, -96, -84, -70, -14, -12, -52, -78, -76], [-8, 72, 32, -90, -68, 60, -10, -34, -38, -88, 22, 82, -46, -76, 96, 54, 0, -52, 94, -66, 34, 28, -50, -32, -80, 0, 98, 18, 96, 28, 72, 64, -52, 98, 14, 28, 46, 48, 34, -34, -96, -24, -48, -86, -26, -74], [36, 26, 22, 18, 4, 78, 72, 28, -24, -64, 28, 2, -4, 46, 82, -70, 36, 66, 22, -32, -48, 24, -20, 66, 80, -22, 88, 26, 68, 22, 84, -44, -28, 76, -10, 90, -46, -40, -94, 22, 14, 96, -66, 66, -4, 40], [-44, -22, 52, 30, 70, 22, 22, 74, 56, -14, 66, -34, 34, -2, -96, -90, -38, 32, -4, -74, 16, -34, -6, 14, 38, -66, 68, -2, -28, -66, -8, -22, 80, -70, -62, -66, -18, -84, 82, -8, 34, -42, 16, 10, -64, 34], [-10, 92, -78, -80, 18, 54, 8, 16, -98, 14, 8, 14, -6, -72, -30, 68, -76, 40, 92, -94, 20, 90, 68, 28, 38, -8, -94, 50, 56, -92, -46, -54, -12, -48, 18, 76, 10, 58, 24, -32, 6, 94, 64, 66, 96, 90], [88, 62, -84, 24, 76, -24, -22, 26, 42, -56, -56, -26, -40, 88, 74, 32, 54, -96, -24, -44, 90, 66, 56, -68, 34, 18, 44, -38, 82, -12, -8, 80, 70, 92, 6, -50, 40, -62, 60, -98, 54, 36, -4, 84, 48, 84], [86, -98, -60, 26, -58, -26, 92, -80, -56, -30, 60, -10, 96, 92, -76, -28, 88, 4, -88, -82, -22, 96, -18, -8, -88, 16, 12, -30, -66, -26, 38, -76, 68, -22, -78, 56, -70, -42, 76, 92, 8, -76, 0, 70, -70, 32], [42, -88, -52, -12, -58, 78, 4, 98, -92, 96, 70, 96, 96, 86, -6, -58, -14, -92, -6, 16, -28, 88, 28, 14, -14, 22, -46, -30, -6, -34, -12, -70, 82, 68, 34, 58, 20, 90, -58, -66, -12, -20, -76, -86, 56, 32], [-62, -58, -60, 26, 38, 68, -18, 26, -42, 30, -52, -28, -98, -58, -2, 86, -38, -58, -58, -82, -52, 80, 42, -4, -92, 32, -90, 60, 70, -96, 96, -36, -16, 40, -24, 44, -34, 48, -54, 80, -86, 14, 34, 52, 50, 38], [68, -46, -50, 64, -32, -94, 14, -66, 90, -54, 60, 20, 52, 36, -26, -92, 38, 10, 84, -18, -38, -98, 92, -50, -58, 40, -56, -44, -46, -50, -2, 52, 22, -80, -20, 86, 8, 64, 48, -8, 14, -86, -56, -26, -6, 28], [-58, -40, -82, 8, 26, -46, -14, -62, -28, -28, 90, 76, 62, -18, -34, 18, -78, 14, 24, 2, 62, 62, -88, -84, -54, 66, 96, 44, -46, -18, -44, 32, -12, -94, -54, -18, 62, 12, 4, 8, -66, 72, 12, -32, 48, 68]], 43",
"370"
],
[
"[[0, 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], [0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 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], [0, 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, 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], [0, 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, 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], [0, 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, 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], [0, 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, 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], [0, 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], [0, 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, 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]], 19",
"0"
],
[
"[[94, 55, 14, 44, 30, 47, 19, 87, 68, 17, 34, 15, 93, 98, 10, 27, 43, 51, 83, 24, 19, 45, 91, 59, 84, 82, 80, 51], [4, 37, 73, 13, 56, 1, 10, 52, 62, 6, 71, 18, 21, 24, 48, 82, 41, 86, 45, 79, 74, 42, 49, 92, 73, 40, 57, 28], [63, 27, 3, 18, 66, 35, 77, 76, 77, 17, 69, 56, 34, 48, 83, 96, 57, 6, 7, 20, 41, 11, 14, 78, 10, 10, 24, 76], [75, 75, 93, 9, 27, 21, 26, 88, 55, 93, 73, 46, 37, 14, 94, 15, 87, 91, 66, 76, 90, 95, 6, 14, 33, 22, 69, 34], [32, 11, 56, 49, 83, 82, 15, 80, 85, 68, 22, 87, 8, 33, 50, 87, 59, 82, 73, 34, 31, 39, 77, 30, 51, 44, 57, 92], [66, 57, 78, 33, 72, 1, 88, 46, 15, 89, 96, 67, 28, 91, 99, 7, 69, 13, 18, 26, 36, 48, 20, 39, 66, 57, 25, 66], [40, 41, 73, 88, 44, 60, 53, 70, 38, 51, 3, 35, 25, 34, 30, 56, 58, 66, 67, 63, 7, 64, 48, 46, 43, 21, 33, 67], [41, 71, 98, 92, 82, 99, 88, 68, 7, 52, 92, 75, 25, 95, 54, 39, 46, 30, 71, 69, 53, 51, 73, 65, 2, 63, 60, 95], [19, 56, 87, 21, 61, 51, 78, 34, 40, 23, 65, 80, 94, 90, 70, 98, 32, 89, 65, 82, 35, 91, 83, 18, 46, 89, 47, 10], [69, 26, 55, 42, 59, 37, 59, 88, 16, 97, 11, 51, 67, 3, 84, 50, 39, 44, 92, 36, 36, 88, 44, 29, 73, 92, 93, 48], [86, 59, 11, 78, 91, 40, 93, 61, 6, 20, 70, 18, 98, 14, 25, 89, 49, 26, 32, 79, 1, 76, 30, 47, 22, 81, 28, 9], [96, 52, 64, 21, 57, 31, 23, 75, 71, 69, 40, 67, 54, 18, 64, 52, 99, 77, 20, 52, 59, 16, 47, 26, 49, 83, 53, 86], [27, 61, 59, 50, 90, 15, 24, 36, 40, 96, 35, 46, 52, 45, 97, 77, 15, 67, 59, 18, 86, 6, 21, 40, 29, 89, 94, 21], [97, 78, 48, 95, 78, 24, 11, 45, 29, 18, 41, 68, 88, 66, 20, 13, 75, 14, 90, 17, 40, 76, 91, 40, 62, 21, 19, 55], [92, 89, 85, 12, 93, 53, 47, 60, 39, 14, 63, 87, 82, 98, 49, 59, 34, 64, 57, 85, 49, 27, 87, 67, 94, 62, 89, 68], [98, 25, 36, 88, 5, 79, 87, 67, 70, 88, 2, 33, 46, 81, 38, 43, 11, 10, 38, 32, 40, 94, 63, 52, 77, 32, 52, 39], [25, 2, 1, 7, 56, 64, 59, 37, 56, 32, 37, 58, 28, 67, 45, 61, 95, 69, 96, 96, 16, 86, 18, 8, 8, 89, 8, 46], [41, 21, 95, 76, 6, 55, 40, 59, 96, 50, 38, 15, 82, 58, 76, 3, 80, 21, 63, 97, 17, 20, 8, 50, 22, 75, 46, 30], [72, 75, 28, 67, 4, 83, 57, 98, 8, 24, 9, 39, 3, 97, 49, 32, 91, 36, 68, 1, 76, 98, 67, 68, 34, 38, 43, 96], [84, 29, 46, 41, 1, 42, 79, 84, 49, 95, 25, 18, 22, 61, 39, 90, 51, 11, 57, 28, 35, 68, 51, 77, 46, 72, 19, 54], [72, 65, 70, 48, 89, 7, 92, 78, 95, 27, 41, 85, 20, 54, 54, 33, 19, 28, 84, 35, 29, 35, 97, 63, 57, 2, 29, 28], [26, 65, 73, 34, 38, 95, 83, 73, 23, 67, 42, 19, 79, 13, 13, 63, 1, 53, 52, 71, 40, 40, 45, 42, 13, 50, 30, 39], [9, 56, 62, 34, 18, 82, 94, 2, 12, 45, 40, 38, 35, 20, 95, 13, 21, 90, 68, 20, 59, 1, 6, 89, 24, 96, 40, 68], [27, 44, 44, 50, 10, 72, 77, 69, 49, 66, 94, 32, 3, 48, 67, 77, 49, 71, 46, 76, 91, 5, 69, 46, 61, 90, 14, 74], [88, 44, 35, 20, 13, 82, 8, 38, 67, 85, 88, 93, 16, 96, 4, 43, 67, 24, 44, 66, 57, 26, 26, 32, 85, 1, 91, 88], [74, 52, 93, 80, 26, 34, 69, 46, 61, 3, 45, 82, 17, 45, 90, 67, 36, 39, 9, 56, 76, 79, 34, 94, 53, 87, 80, 71], [81, 47, 80, 21, 34, 27, 67, 38, 92, 35, 37, 74, 17, 91, 36, 91, 49, 18, 92, 1, 55, 46, 55, 48, 19, 36, 25, 26], [30, 49, 79, 30, 21, 84, 33, 48, 65, 43, 62, 63, 52, 43, 5, 88, 75, 27, 54, 95, 83, 42, 41, 18, 62, 99, 77, 68]], 20",
"89"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
unsigned f_gold ( unsigned n ) {
unsigned ugly [ n ];
unsigned i2 = 0, i3 = 0, i5 = 0;
unsigned next_multiple_of_2 = 2;
unsigned next_multiple_of_3 = 3;
unsigned next_multiple_of_5 = 5;
unsigned next_ugly_no = 1;
ugly [ 0 ] = 1;
for ( int i = 1;
i < n;
i ++ ) {
next_ugly_no = min ( next_multiple_of_2, min ( next_multiple_of_3, next_multiple_of_5 ) );
ugly [ i ] = next_ugly_no;
if ( next_ugly_no == next_multiple_of_2 ) {
i2 = i2 + 1;
next_multiple_of_2 = ugly [ i2 ] * 2;
}
if ( next_ugly_no == next_multiple_of_3 ) {
i3 = i3 + 1;
next_multiple_of_3 = ugly [ i3 ] * 3;
}
if ( next_ugly_no == next_multiple_of_5 ) {
i5 = i5 + 1;
next_multiple_of_5 = ugly [ i5 ] * 5;
}
}
return next_ugly_no;
}
| [] | null | [] | NTH_MULTIPLE_NUMBER_FIBONACCI_SERIES | python | [] | def f_gold(k, n):
f1 = 0
f2 = 1
i = 2
while i != 0:
f3 = f1 + f2
f1 = f2
f2 = f3
if f2 % k == 0:
return n * i
i += 1
return
| code_translation | [
[
"50, 60",
"4500"
],
[
"52, 45",
"1890"
],
[
"42, 17",
"408"
],
[
"2, 68",
"204"
],
[
"37, 43",
"817"
],
[
"48, 46",
"552"
],
[
"31, 4",
"120"
],
[
"9, 64",
"768"
],
[
"78, 14",
"1176"
],
[
"64, 80",
"3840"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1 | python | [] | def f_gold ( arr , n ) :
if ( n == 0 or n == 1 ) :
return True
for i in range ( 1 , n ) :
if ( arr [ i - 1 ] > arr [ i ] ) :
return False
return True
| code_translation | [
[
"[6, 8, 8, 16, 19, 19, 21, 23, 26, 33, 34, 36, 38, 39, 41, 41, 45, 47, 52, 52, 55, 57, 60, 60, 60, 61, 69, 69, 70, 70, 72, 73, 73, 75, 78, 81, 84, 84, 85, 88, 88, 89, 90, 91, 97], 22",
"True"
],
[
"[2, -90, 66, 24, -18, 70, 34, 18, 84, -62], 9",
"False"
],
[
"[1, 1], 1",
"True"
],
[
"[12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45, 26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45], 23",
"False"
],
[
"[-38, 38, 40, 72], 2",
"True"
],
[
"[1, 0, 0, 0, 1], 3",
"False"
],
[
"[11, 15, 16, 17, 17, 17, 22, 23, 23, 25, 27, 28, 28, 31, 33, 36, 38, 40, 42, 44, 46, 49, 51, 51, 52, 60, 62, 65, 67, 71, 74, 77, 77, 78, 78, 79, 83, 83, 86, 86, 87, 87, 87, 88, 91, 92, 97, 97, 97], 44",
"True"
],
[
"[-26, -90, -78, -76, -58, -64, -72, -34, -58, -48, 78, -50, -30, 26, -60, 26], 9",
"False"
],
[
"[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], 23",
"True"
],
[
"[56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44], 10",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | MAXIMUM_DISTANCE_TWO_OCCURRENCES_ELEMENT_ARRAY | python | [] | def f_gold ( arr , n ) :
mp = { }
maxDict = 0
for i in range ( n ) :
if arr [ i ] not in mp.keys ( ) :
mp [ arr [ i ] ] = i
else :
maxDict = max ( maxDict , i - mp [ arr [ i ] ] )
return maxDict
| code_translation | [
[
"[1, 20, 25, 28, 29, 31, 34, 35, 38, 39, 41, 43, 46, 55, 56, 60, 65, 66, 74, 77, 79, 80, 81, 83, 84, 88, 88, 88, 90, 91, 99], 27",
"1"
],
[
"[26, 14, 56, 84, -56, -84, -98, 12, -78, 18, -42, 58, 46, -66, -46, 66, 98, 34, -16, 8, -20, 66, 74, 26, 42, -84, 38, 86, 14, 86, 26, -42, -30, 6, -54, -76, -66, 18, 58, 66, 74, -62, 8, -42, 62, -14, -90, 98, -24], 34",
"30"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11",
"10"
],
[
"[69, 87], 1",
"0"
],
[
"[-98, -88, -86, -62, -52, -26, -24, -20, -12, 6, 8, 26, 36, 40, 42, 54, 68, 72, 84, 92, 94, 98, 98], 12",
"0"
],
[
"[1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0], 29",
"28"
],
[
"[11, 16, 17, 19, 20, 21, 21, 22, 27, 37, 45, 49, 64, 77, 81, 85, 96], 9",
"1"
],
[
"[-20, 0, 18, -96], 2",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 22",
"20"
],
[
"[54, 5, 98, 71, 9, 34, 60, 28, 58, 66, 28, 45, 4], 10",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string str ) {
int i = 0, j = str . length ( ) - 1;
while ( i < j ) {
if ( str [ i ] != str [ j ] ) return false;
i ++;
j --;
}
return true;
}
| [] | null | [] | NTH_PENTAGONAL_NUMBER | python | [] | def f_gold ( n ) :
return ( 3 * n * n - n ) / 2
| code_translation | [
[
"96",
"13776.0"
],
[
"93",
"12927.0"
],
[
"15",
"330.0"
],
[
"8",
"92.0"
],
[
"21",
"651.0"
],
[
"14",
"287.0"
],
[
"11",
"176.0"
],
[
"79",
"9322.0"
],
[
"24",
"852.0"
],
[
"94",
"13207.0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( unsigned int n ) {
return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) && ! ( n & 0xAAAAAAAA );
}
| [] | null | [] | SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N | python | [] | def f_gold ( n ) :
count = 0 ;
if ( n and not ( n & ( n - 1 ) ) ) :
return n
while ( n != 0 ) :
n >>= 1
count += 1
return 1 << count ;
| code_translation | [
[
"13",
"16"
],
[
"27",
"32"
],
[
"1",
"1"
],
[
"24",
"32"
],
[
"98",
"128"
],
[
"94",
"128"
],
[
"36",
"64"
],
[
"41",
"64"
],
[
"74",
"128"
],
[
"39",
"64"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int brr [ 2 * n + 1 ];
for ( int i = 0;
i < n;
i ++ ) brr [ i ] = arr [ i ];
for ( int i = 0;
i < n;
i ++ ) brr [ n + i ] = arr [ i ];
int maxHam = 0;
for ( int i = 1;
i < n;
i ++ ) {
int currHam = 0;
for ( int j = i, k = 0;
j < ( i + n );
j ++, k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++;
if ( currHam == n ) return n;
maxHam = max ( maxHam, currHam );
}
return maxHam;
}
| [] | null | [] | K_TH_ELEMENT_TWO_SORTED_ARRAYS | python | [] | def f_gold ( arr1 , arr2 , m , n , k ) :
sorted1 = [ 0 ] * ( m + n )
i = 0
j = 0
d = 0
while ( i < m and j < n ) :
if ( arr1 [ i ] < arr2 [ j ] ) :
sorted1 [ d ] = arr1 [ i ]
i += 1
else :
sorted1 [ d ] = arr2 [ j ]
j += 1
d += 1
while ( i < m ) :
sorted1 [ d ] = arr1 [ i ]
d += 1
i += 1
while ( j < n ) :
sorted1 [ d ] = arr2 [ j ]
d += 1
j += 1
return sorted1 [ k - 1 ]
| code_translation | [
[
"[2, 2, 4, 4, 9, 10, 14, 16, 16, 19, 20, 21, 25, 26, 29, 36, 36, 37, 38, 44, 44, 49, 53, 54, 56, 61, 62, 64, 72, 72, 73, 77, 80, 84, 84, 87, 93, 94], [6, 8, 10, 10, 12, 14, 24, 31, 33, 33, 35, 35, 35, 41, 46, 47, 49, 51, 52, 56, 57, 59, 62, 65, 72, 72, 73, 73, 79, 80, 82, 83, 83, 84, 87, 87, 93, 99], 27, 21, 23",
"31"
],
[
"[2, 4, -90, 62, 22, -94, -74, -22, 44, -94, 20, -40, 20, 0, 32, 24, 78, 8, 4, 98, -74, -60], [58, 74, -46, 38, -58, -78, -32, -84, 84, -54, 84, -34, -26, 88, 74, 48, 26, -92, 68, -86, 74, 88], 18, 11, 12",
"20"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 30, 31, 42",
"0"
],
[
"[85, 44, 62, 2, 71, 88, 60, 78, 32, 46, 17, 47, 65, 78, 65, 94], [18, 3, 15, 9, 61, 73, 3, 62, 87, 1, 54, 97, 61, 37, 23, 65], 11, 11, 13",
"71"
],
[
"[-94, -84, -82, -70, -70, -60, -54, -54, -52, -52, -46, -40, -40, -36, -34, -32, -30, -22, -18, -16, -10, -4, 8, 12, 18, 22, 32, 38, 38, 44, 50, 56, 64, 82, 84, 86, 88], [-92, -68, -64, -62, -54, -52, -52, -34, -24, -22, -20, -12, -12, -10, 6, 10, 14, 22, 22, 24, 24, 30, 30, 36, 36, 48, 50, 56, 58, 64, 68, 80, 84, 88, 88, 92, 94], 19, 26, 28",
"-22"
],
[
"[0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0], 24, 17, 23",
"0"
],
[
"[53, 96, 99], [30, 55, 56], 1, 1, 1",
"30"
],
[
"[98, 86, 36, -68, 86, 22, 52, -20, -2, 74, -72, 86, 80, -78, 14, 62, 10, 94, -66, 78, 28, 92, -8, 46, -24, 66], [72, -72, -90, 24, -22, 60, 78, -68, 98, 26, -30, -20, 44, -96, 8, 90, 0, 98, -24, -68, -32, -62, 0, -60, 26, -98], 22, 19, 24",
"86"
],
[
"[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], [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], 42, 40, 42",
"1"
],
[
"[6, 21, 86, 58, 48, 27, 18, 73, 16, 79, 51, 33, 63, 26, 37, 88, 48, 58, 44, 32, 58, 23, 31], [87, 77, 44, 15, 70, 89, 36, 79, 82, 3, 18, 76, 37, 79, 85, 97, 19, 53, 17, 74, 87, 58, 49], 14, 22, 19",
"70"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
void f_gold ( int arr [ ], int l, int h ) {
if ( l >= h ) return;
if ( arr [ l ] > arr [ h ] ) swap ( arr [ l ], arr [ h ] );
if ( h - l + 1 > 2 ) {
int t = ( h - l + 1 ) / 3;
f_gold ( arr, l, h - t );
f_gold ( arr, l + t, h );
f_gold ( arr, l, h - t );
}
}
| [] | null | [] | FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_7 | python | [] | def f_gold(n):
i = 0
j = len(n)
pos = 0
while (i < j):
if (n[i] == '4'):
pos = pos * 2 + 1
if (n[i] == '7'):
pos = pos * 2 + 2
i = i + 1
return pos
| code_translation | [
[
"'7'",
"2"
],
[
"'305745689'",
"5"
],
[
"'444'",
"7"
],
[
"'4'",
"1"
],
[
"'2074'",
"5"
],
[
"'27'",
"2"
],
[
"'447'",
"8"
],
[
"'255'",
"0"
],
[
"'10000111111011'",
"0"
],
[
"'fAKcSDRTNz'",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
if ( n < 0 ) return 0;
if ( n <= 1 ) return 1;
double digits = 0;
for ( int i = 2;
i <= n;
i ++ ) digits += log10 ( i );
return floor ( digits ) + 1;
}
| [] | null | [] | FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT | python | [] | def f_gold ( n ) :
if ( n == 0 ) :
return False
while ( n != 1 ) :
if ( n % 4 != 0 ) :
return False
n = n // 4
return True
| code_translation | [
[
"45",
"False"
],
[
"16",
"True"
],
[
"15",
"False"
],
[
"91",
"False"
],
[
"82",
"False"
],
[
"18",
"False"
],
[
"31",
"False"
],
[
"6",
"False"
],
[
"93",
"False"
],
[
"35",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a ) {
return 4 * a;
}
| [] | null | [] | QUICK_WAY_CHECK_CHARACTERS_STRING | python | [] | def f_gold ( s ) :
n = len ( s )
for i in range ( 1 , n ) :
if s [ i ] != s [ 0 ] :
return False
return True
| code_translation | [
[
"''",
"True"
],
[
"'ggg'",
"True"
],
[
"'11'",
"True"
],
[
"'KoYIHns'",
"False"
],
[
"'232'",
"False"
],
[
"'10111000011101'",
"False"
],
[
"'DDDD'",
"True"
],
[
"'11'",
"True"
],
[
"'11111'",
"True"
],
[
"'ewJvixQzu'",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string & X, string & Y ) {
int m = X . length ( ), n = Y . length ( );
int L [ 2 ] [ n + 1 ];
bool bi;
for ( int i = 0;
i <= m;
i ++ ) {
bi = i & 1;
for ( int j = 0;
j <= n;
j ++ ) {
if ( i == 0 || j == 0 ) L [ bi ] [ j ] = 0;
else if ( X [ i - 1 ] == Y [ j - 1 ] ) L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1;
else L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ], L [ bi ] [ j - 1 ] );
}
}
return L [ bi ] [ n ];
}
| [] | null | [] | SWAP_ALL_ODD_AND_EVEN_BITS | python | [] | def f_gold ( x ) :
even_bits = x & 0xAAAAAAAA
odd_bits = x & 0x55555555
even_bits >>= 1
odd_bits <<= 1
return ( even_bits | odd_bits )
| code_translation | [
[
"99",
"147"
],
[
"94",
"173"
],
[
"11",
"7"
],
[
"3",
"3"
],
[
"77",
"142"
],
[
"57",
"54"
],
[
"54",
"57"
],
[
"66",
"129"
],
[
"98",
"145"
],
[
"36",
"24"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
long long int f_gold ( int n ) {
return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24;
}
| [] | null | [] | QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE | python | [] | def f_gold ( arr , n , x , y ) :
count = 0 ;
for i in range ( n ) :
if ( arr [ i ] >= x and arr [ i ] <= y ) :
count += 1
return count
| code_translation | [
[
"[9, 16, 19, 24, 36, 38, 42, 49, 51, 53, 53, 57, 57, 58, 71, 78, 78, 92, 92, 93], 13, 12, 13",
"0"
],
[
"[28, -74, -18, 10, 26, 28, -96, -80, 82, 94, 22, 50, 72, -90, 76, 50, 20, -44, -80], 18, 13, 13",
"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], 30, 21, 31",
"0"
],
[
"[25, 8, 66, 90, 50, 65, 76, 90, 27], 4, 8, 5",
"0"
],
[
"[-98, -96, -90, -82, -80, -78, -70, -66, -60, -60, -50, -48, -34, -26, -24, -16, -14, -8, -6, 4, 22, 24, 26, 30, 30, 48, 52, 56, 60, 62, 74, 76, 78, 86], 32, 24, 24",
"1"
],
[
"[1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0], 15, 16, 12",
"0"
],
[
"[4, 6, 17, 19, 24, 29, 30, 31, 32, 37, 37, 40, 43, 44, 44, 45, 57, 64, 69, 70, 73, 78, 86, 89, 91, 92, 94], 17, 21, 15",
"0"
],
[
"[32, -88, 70, -6, 28, -48], 4, 3, 4",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13, 12, 11",
"0"
],
[
"[37, 84, 97, 74, 12, 26, 47, 10, 14, 33], 5, 9, 8",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int count = 0;
for ( int curr = 19;
;
curr += 9 ) {
int sum = 0;
for ( int x = curr;
x > 0;
x = x / 10 ) sum = sum + x % 10;
if ( sum == 10 ) count ++;
if ( count == n ) return curr;
}
return - 1;
}
| [] | null | [] | CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND | python | [] | def f_gold ( h , m ) :
if ( h < 0 or m < 0 or h > 12 or m > 60 ) :
print ( 'Wrong input' )
if ( h == 12 ) :
h = 0
if ( m == 60 ) :
m = 0
hour_angle = 0.5 * ( h * 60 + m )
minute_angle = 6 * m
angle = abs ( hour_angle - minute_angle )
angle = min ( 360 - angle , angle )
return angle
| code_translation | [
[
"7322.337365895532, 6996.326968156217",
"-180830.32265200673"
],
[
"-0.5025472034247969, -2910.070017192333",
"-15630.308678455089"
],
[
"8735.336068205026, 1910.3752934680874",
"-251193.0179320763"
],
[
"-5478.862697905712, -9470.18148108585",
"-111919.88279119915"
],
[
"8264.126919165505, 7058.937313484608",
"-208739.65235079982"
],
[
"-9671.311773842834, -3867.070379361206",
"-268510.4661287983"
],
[
"9995.328351000411, 2145.339179488316",
"-287700.4850428266"
],
[
"-5274.574323066984, -3583.7503371694124",
"-138166.60283757772"
],
[
"1310.8711644223736, 5214.059687285893",
"-10288.806652598792"
],
[
"-2829.678131972794, -9371.556600288217",
"-32986.782657598626"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > hash;
for ( int i = 0;
i < n;
i ++ ) hash [ arr [ i ] ] ++;
int max_count = 0;
for ( auto i : hash ) if ( max_count < i . second ) max_count = i . second;
return ( n - max_count );
}
| [] | null | [] | TRIANGULAR_MATCHSTICK_NUMBER | python | [] | def f_gold ( x ) :
return ( 3 * x * ( x + 1 ) ) / 2
| code_translation | [
[
"6",
"63.0"
],
[
"25",
"975.0"
],
[
"15",
"360.0"
],
[
"30",
"1395.0"
],
[
"17",
"459.0"
],
[
"80",
"9720.0"
],
[
"27",
"1134.0"
],
[
"13",
"273.0"
],
[
"12",
"234.0"
],
[
"67",
"6834.0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int prime [ n + 1 ], sum = 0;
memset ( prime, 0, sizeof ( prime ) );
int max = n / 2;
for ( int p = 2;
p <= max;
p ++ ) {
if ( prime [ p ] == 0 ) {
for ( int i = p * 2;
i <= n;
i += p ) prime [ i ] = p;
}
}
for ( int p = 2;
p <= n;
p ++ ) {
if ( prime [ p ] ) sum += prime [ p ];
else sum += p;
}
return sum;
}
| [] | null | [] | CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1 | python | [] | def f_gold ( arr , n ) :
if ( n == 1 ) :
return True
i = 1
for i in range ( 1 , n ) :
if arr [ i - 1 ] < arr [ i ] :
if ( i == n ) :
return True
j = i
while ( arr [ j ] < arr [ j - 1 ] ) :
if ( i > 1 and arr [ j ] < arr [ i - 2 ] ) :
return False
j += 1
if ( j == n ) :
return True
k = j
if ( arr [ k ] < arr [ i - 1 ] ) :
return False
while ( k > 1 and k < n ) :
if ( arr [ k ] < arr [ k - 1 ] ) :
return False
k += 1
return True
| code_translation | [
[
"[1, 2, 5, 4, 3], 5",
"False"
],
[
"[1, 2, 4, 5, 3], 5",
"False"
],
[
"[1, 1, 0, 0], 4",
"True"
],
[
"[5, 99, 40, 33, 61, 4, 64, 92, 28, 27, 21, 35, 40, 79, 10, 20, 76, 87, 80, 15, 57, 39, 96, 98, 99, 72, 72, 50, 61, 39, 35, 70, 27], 32",
"True"
],
[
"[-98, -92, -86, -58, -22, -12, 0, 26], 6",
"True"
],
[
"[0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0], 24",
"True"
],
[
"[6, 10, 27, 30, 40, 47, 49, 55, 59, 60, 68, 82, 91], 8",
"True"
],
[
"[36, 56, -56, 94, 52, -82, 88, -62, 70, -94, 38, 10, -78, 66, -94, -72, 18, 96, -72, 88, -6, 48, 6, -88, 64, -96, -40, 8, 36, 36, -90, -68, -20, -76, 22, -92], 30",
"True"
],
[
"[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], 31",
"True"
],
[
"[2, 5, 42, 28, 47, 26, 88, 16, 30, 30, 36, 49, 21, 95, 99, 21, 41, 52, 57, 39, 69, 2, 42, 22, 55, 92, 64, 27, 95, 71, 19, 38, 40, 65, 7, 21, 29, 38, 13, 11, 41, 54, 38, 40, 35, 51, 88], 46",
"True"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) {
int count = 0;
unordered_set < int > us;
for ( int i = 0;
i < m;
i ++ ) us . insert ( arr1 [ i ] );
for ( int j = 0;
j < n;
j ++ ) if ( us . find ( x - arr2 [ j ] ) != us . end ( ) ) count ++;
return count;
}
| [] | null | [] | C_PROGRAM_FIND_LARGEST_ELEMENT_ARRAY_1 | python | [] | def f_gold ( arr , n ) :
return max ( arr )
| code_translation | [
[
"[10, 12, 14, 16, 17, 17, 20, 24, 26, 28, 37, 38, 41, 45, 49, 50, 59, 61, 63, 65, 65, 66, 69, 70, 70, 73, 73, 74, 81, 81, 83, 87, 94, 97], 17",
"97"
],
[
"[-56, 38, -22, 84, -60, 2, 68, -78, 62, -98, 24, 26, 48, 62, -80, -14, -84, 12, -54, -12, -20, -82, 10, -34, -50, -72, 78, 16, 30, -76, 72, 34, 6, 52, 44, 18, -38, 48, -14], 25",
"84"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 11",
"1"
],
[
"[92, 5, 40, 65, 86, 51, 14, 29, 66, 6, 62, 92, 29, 13, 88, 54, 15, 60, 45, 2, 51, 9, 33, 51, 31, 11, 62, 61, 77, 38, 11, 4, 27, 54, 72, 64, 85, 46, 24, 44, 39, 73, 82, 85], 40",
"92"
],
[
"[-92, -90, -84, -80, -80, -76, -70, -70, -48, -44, -38, -28, -14, -14, -12, -2, 2, 4, 6, 10, 16, 16, 20, 22, 24, 26, 50, 52, 56, 56, 58, 58, 74, 80, 82, 84, 86], 33",
"86"
],
[
"[0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0], 29",
"1"
],
[
"[5, 19, 20, 26, 31, 32, 34, 37, 39, 40, 46, 46, 50, 53, 58, 58, 59, 65, 72, 72, 75, 76, 77, 78, 81, 83, 83, 95, 98, 99], 28",
"99"
],
[
"[32, -84, -84, 86, -24, 36, -12, 82, 48, -12, 82, -76, 84, -20, -12, -18, 46, -74, -14, -86], 14",
"86"
],
[
"[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], 33",
"1"
],
[
"[95, 73, 74, 14, 73, 74, 19, 93, 34, 53, 85, 75, 80, 15, 36, 57, 15, 98, 51, 37, 8, 9, 62, 71, 28, 24, 37, 53, 84, 76, 22, 48, 15, 19, 43, 88, 58, 38, 63, 68, 27, 22, 37, 76, 59, 66, 22], 34",
"98"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int a [ ], int b [ ], int n, int k ) {
sort ( a, a + n );
sort ( b, b + n, greater < int > ( ) );
for ( int i = 0;
i < n;
i ++ ) if ( a [ i ] + b [ i ] < k ) return false;
return true;
}
| [] | null | [] | PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR | python | [] | def f_gold ( num , divisor ) :
return ( num - divisor * ( num // divisor ) )
| code_translation | [
[
"80, 54",
"26"
],
[
"63, 21",
"0"
],
[
"1, 56",
"1"
],
[
"22, 39",
"22"
],
[
"66, 7",
"3"
],
[
"61, 67",
"61"
],
[
"45, 63",
"45"
],
[
"29, 44",
"29"
],
[
"95, 65",
"30"
],
[
"9, 68",
"9"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string str1, string str2 ) {
if ( str1 . length ( ) > str2 . length ( ) ) swap ( str1, str2 );
string str = "";
int n1 = str1 . length ( ), n2 = str2 . length ( );
int diff = n2 - n1;
int carry = 0;
for ( int i = n1 - 1;
i >= 0;
i -- ) {
int sum = ( ( str1 [ i ] - '0' ) + ( str2 [ i + diff ] - '0' ) + carry );
str . push_back ( sum % 10 + '0' );
carry = sum / 10;
}
for ( int i = n2 - n1 - 1;
i >= 0;
i -- ) {
int sum = ( ( str2 [ i ] - '0' ) + carry );
str . push_back ( sum % 10 + '0' );
carry = sum / 10;
}
if ( carry ) str . push_back ( carry + '0' );
reverse ( str . begin ( ), str . end ( ) );
return str;
}
| [] | null | [] | CONSTRUCT_LEXICOGRAPHICALLY_SMALLEST_PALINDROME | python | [] | def f_gold ( string , l ) :
string = list ( string )
i = - 1
j = l
while i < j :
i += 1
j -= 1
if ( string [ i ] == string [ j ] and string [ i ] != '*' ) :
continue
elif ( string [ i ] == string [ j ] and string [ i ] == '*' ) :
string [ i ] = 'a'
string [ j ] = 'a'
continue
elif string [ i ] == '*' :
string [ i ] = string [ j ]
continue
elif string [ j ] == '*' :
string [ j ] = string [ i ]
continue
print ( "Not Possible" )
return ""
return ''.join ( string )
| code_translation | [
[
"['A', 'B', 'C', 'G', 'I', 'L', 'L', 'O', 'O', 'P', 'Q', 'S', 'W', 'Y', 'c', 'd', 'e', 'f', 'f', 'i', 'm', 'm', 'o', 'q', 'v', 'w', 'x', 'x', 'y', 'z'], 27",
"''"
],
[
"['3', '2', '3', '6', '8', '9', '0', '5', '0', '5', '8', '7', '9', '0', '3', '6', '9', '6', '2', '4', '2', '3', '1', '2', '7', '9', '1', '8', '8', '7', '1', '1', '6', '1'], 30",
"''"
],
[
"['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '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'], 27",
"''"
],
[
"['z', 'v', 'B', 'Y', 'n', 'K', 'h', 'C', 'T', 'L', 'g'], 7",
"''"
],
[
"['1', '2', '5', '6', '7'], 4",
"''"
],
[
"['0', '0', '1', '0'], 3",
"''"
],
[
"['D', 'n', 'r'], 1",
"'Dnr'"
],
[
"['0', '9', '9', '1', '2', '1', '5', '3', '7', '5', '9', '2', '4', '4', '8', '9', '6', '4', '2', '8', '8', '5', '5', '7', '1', '7', '6', '2', '2', '2', '3', '3', '7', '9'], 24",
"''"
],
[
"['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], 21",
"''"
],
[
"['E', 's', 'I', 'S', 'h', 'H', 'i', 'm', 'v', 'B'], 6",
"''"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | REARRANGE_ARRAY_MAXIMUM_MINIMUM_FORM_SET_2_O1_EXTRA_SPACE | python | [] | def f_gold ( arr , n ) :
max_idx = n - 1
min_idx = 0
max_elem = arr [ n - 1 ] + 1
for i in range ( 0 , n ) :
if i % 2 == 0 :
arr [ i ] += ( arr [ max_idx ] % max_elem ) * max_elem
max_idx -= 1
else :
arr [ i ] += ( arr [ min_idx ] % max_elem ) * max_elem
min_idx += 1
for i in range ( 0 , n ) :
arr [ i ] = arr [ i ] / max_elem
| code_translation | [
[
"[53.01851851851852, 1.0185185185185186, 52.03703703703704, 1.0555555555555556, 49.166666666666664, 2.185185185185185, 47.25925925925926, 3.4074074074074074, 45.48148148148148, 9.518518518518519, 43.53703703703704, 10.537037037037036, 42.55555555555556, 14.592592592592593, 42.592592592592595, 22.59259259259259, 42.629629629629626, 26.685185185185187, 40.72222222222222, 28.74074074074074, 39.77777777777778, 29.77777777777778, 37.77777777777778, 29.796296296296298, 34.833333333333336, 30.87037037037037, 32.907407407407405, 32.96296296296296, 32.98148148148148, 54, 56, 58, 59, 68, 71, 73, 76, 81, 81, 83, 84, 91, 94], 29",
"None"
],
[
"[94.52631578947368, 50.48421052631579, 83.06315789473685, 45.4, 46.705263157894734, 6.3578947368421055, 83.45263157894736, 38.27368421052632, 71.02105263157895, 68.02105263157895, 31.11578947368421, 34.305263157894736, 32.1578947368421, 42.33684210526316, 32.68421052631579, 26.263157894736842, 51.8, 2.968421052631579, 6.6, 1.7052631578947368, 77.93684210526315, 11.263157894736842, 88.6421052631579, 28.642105263157895, 14.263157894736842, 14.157894736842104, 25.926315789473684, 31.810526315789474, 61.07368421052632, 65.54736842105264, 61.33684210526316, 24.33684210526316, 25.33684210526316, 75.7578947368421, 88.88421052631578, 92.48421052631579, 66.87368421052632, 57.98947368421052, 76, -67, -42], 38",
"None"
],
[
"[0.0, 0.0, 0.0, 0.0, 0, 0, 1, 1, 1], 4",
"None"
],
[
"[58.25423728813559, 16.677966101694917, 34.96610169491525, 41.16949152542373, 3.3728813559322033, 58.08474576271186, 41.69491525423729, 11.474576271186441, 40.20338983050848, 22.949152542372882, 31.389830508474578, 5.423728813559322, 38.54237288135593, 41.101694915254235, 11.576271186440678, 29.06779661016949, 1.152542372881356, 13.016949152542374, 51.83050847457627, 57.644067796610166, 38.86440677966102, 24.016949152542374, 50.186440677966104, 25.627118644067796, 1.5254237288135593, 33.66101694915254, 9.694915254237289, 7.0508474576271185, 5.576271186440678, 34.983050847457626, 14, 36, 36, 79, 8, 26, 36, 48, 85, 28, 68, 62, 80, 86, 76, 80, 51], 30",
"None"
],
[
"[65.54411764705883, 35.544117647058826, 46.6764705882353, 35.6764705882353, 36.75, 44.75, 31.83823529411765, 44.86764705882353, 30.941176470588236, 49.955882352941174, 26.014705882352942, 50.029411764705884, 23.102941176470587, 56.4264705882353, 9.426470588235293, 58.48529411764706, 5.485294117647059, 63.661764705882355, 4.705882352941177, 64.73529411764706, 0.7647058823529411, 0.8088235294117647, 65.97058823529412, 2.014705882352941, 55.0735294117647, 7.088235294117647, 52.14705882352941, 29.352941176470587, 50.39705882352941, 29.470588235294116, 48.48529411764706, 33.55882352941177, 45.705882352941174, 33.98529411764706, 70, 76, 82, 88], 34",
"None"
],
[
"[0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0], 33",
"None"
],
[
"[66.02985074626865, 2.328358208955224, 43.47761194029851, 22.507462686567163, 34.64179104477612, 32.985074626865675, 70, 74, 94, 94], 6",
"None"
],
[
"[2.96, -22.88, -20.04, -1.0, -4.64, -20.6, -20.12, -2.88, -6.32, -7.96, -54, -31, 14, 47, 66, 23], 10",
"None"
],
[
"[1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.5, 1.5, 0.5, 1.5, 0.5, 1.5, 0.5, 1.5, 0.5, 1.5, 0.5, 1.5, 0.5, 1.5, 0.5, 1.5, 0.5, 1.5, 0.5, 1.5, 0.5, 1], 42",
"None"
],
[
"[85.22093023255815, 19.36046511627907, 31.302325581395348, 31.488372093023255, 77.47674418604652, 26.267441860465116, 41.54651162790697, 42.151162790697676, 36.03488372093023, 41.76744186046512, 77.76744186046511, 23.186046511627907, 28.848837209302324, 47.325581395348834, 73.8953488372093, 13.406976744186046, 16.476744186046513, 3.895348837209302, 66.36046511627907, 66.98837209302326, 32, 54, 98, 72, 59], 20",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int bell [ n + 1 ] [ n + 1 ];
bell [ 0 ] [ 0 ] = 1;
for ( int i = 1;
i <= n;
i ++ ) {
bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ];
for ( int j = 1;
j <= i;
j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ];
}
return bell [ n ] [ 0 ];
}
| [] | null | [] | HORNERS_METHOD_POLYNOMIAL_EVALUATION | python | [] | def f_gold ( poly , n , x ) :
result = poly [ 0 ]
for i in range ( 1 , n ) :
result = result * x + poly [ i ]
return result
| code_translation | [
[
"[3, 18, 22, 27, 31, 33, 36, 36, 37, 37, 40, 48, 49, 49, 50, 58, 66, 71, 75, 85, 89, 91], 16, 16",
"4863064503445832794"
],
[
"[42, -88, 28, 8, 30, -8, -16, 86, 50, 84, 12, -20, -70, -40, -54, -76, 84, 90, -40, -68, -40, 36, -34, 14, 94, -44, 70, 58, -48, -72, 14, -70, 32], 31, 20",
"40449126700122460089497012241585406843374"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], 10, 8",
"73"
],
[
"[66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20], 15, 26",
"4439152634035859071320"
],
[
"[-96, -96, -94, -82, -72, -54, -54, -46, -34, -30, -28, -18, -2, 2, 6, 8, 10, 16, 18, 24, 26, 28, 44, 48, 48, 52, 56, 58, 58, 70, 70, 82, 84, 88, 94], 25, 34",
"-563275647468877027649000626873775860928"
],
[
"[0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1], 20, 25",
"14575198352436218261735001"
],
[
"[2, 3, 8, 13, 15, 17, 18, 18, 25, 29, 29, 31, 36, 37, 42, 42, 42, 51, 52, 52, 54, 54, 58, 64, 70, 70, 74, 75, 78, 80, 83, 85, 86, 88, 95, 96, 97, 98, 99], 19, 32",
"2602117847418815959021235860"
],
[
"[-56, -12, -92, -48, -98, -80, -96, -42, -50, 74, 88, 20, 78, -74, -20, -32, -30, 58, -22, -16, 68, 72, -50, -72, 66, 72, 74, -98, -22, -40, -90, 88, 42, 24], 29, 23",
"-7620126224138078712141271966338903121760"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 20, 23",
"292561"
],
[
"[86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17], 12, 12",
"67907758875578"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
char f_gold ( string strA, string strB ) {
int res = 0, i;
for ( i = 0;
i < strA . length ( );
i ++ ) {
res ^= strA [ i ];
}
for ( i = 0;
i < strB . length ( );
i ++ ) {
res ^= strB [ i ];
}
return ( ( char ) ( res ) );
}
| [] | null | [] | PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS | python | [] | def f_gold ( arr , n , x ) :
for i in arr :
for j in arr :
if i * j == x :
return True
return False
| code_translation | [
[
"[10, 20, 9, 40], 4, 400",
"True"
],
[
"[1, -10, 20, 9, -40], 5, 400",
"True"
],
[
"[0, 0, 0, 0, 0, 1, 1, 1, 1], 7, 8",
"False"
],
[
"[4, 10, 20, 9, -40], 5, -400",
"True"
],
[
"[-90, -86, -76, -72, -70, -62, -56, -50, -18, -12, -10, 4, 16, 26, 42, 48, 52, 54, 54, 70, 84, 86, 88, 98], 23, 23",
"False"
],
[
"[1], 0, 0",
"False"
],
[
"[4, 7, 14, 14, 16, 18, 19, 20, 22, 24, 29, 38, 38, 38, 40, 40, 46, 46, 47, 51, 51, 52, 55, 56, 56, 62, 62, 62, 78, 79, 81, 84, 86, 88, 89, 89, 89], 23, 32",
"False"
],
[
"[72, 80, -82, 24, -98, 90, -32, -56, -22, 8, -12, 8, -78, 60, -62, 50, 12, -60, 10, -54, 74, 98, 26, 56, 24], 21, 19",
"False"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 22, 18",
"False"
],
[
"[93, 40, 48, 99, 95, 59, 43, 58, 79, 70, 28], 9, 5",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
string f_gold ( string num1, string num2 ) {
int len1 = num1 . size ( );
int len2 = num2 . size ( );
if ( len1 == 0 || len2 == 0 ) return "0";
vector < int > result ( len1 + len2, 0 );
int i_n1 = 0;
int i_n2 = 0;
for ( int i = len1 - 1;
i >= 0;
i -- ) {
int carry = 0;
int n1 = num1 [ i ] - '0';
i_n2 = 0;
for ( int j = len2 - 1;
j >= 0;
j -- ) {
int n2 = num2 [ j ] - '0';
int sum = n1 * n2 + result [ i_n1 + i_n2 ] + carry;
carry = sum / 10;
result [ i_n1 + i_n2 ] = sum % 10;
i_n2 ++;
}
if ( carry > 0 ) result [ i_n1 + i_n2 ] += carry;
i_n1 ++;
}
int i = result . size ( ) - 1;
while ( i >= 0 && result [ i ] == 0 ) i --;
if ( i == - 1 ) return "0";
string s = "";
while ( i >= 0 ) s += std :: to_string ( result [ i -- ] );
return s;
}
| [] | null | [] | FIND_LAST_DIGIT_FACTORIAL_DIVIDES_FACTORIAL_B | python | [] | def f_gold ( A , B ) :
variable = 1
if ( A == B ) :
return 1
elif ( ( B - A ) >= 5 ) :
return 0
else :
for i in range ( A + 1 , B + 1 ) :
variable = ( variable * ( i % 10 ) ) % 10
return variable % 10
| code_translation | [
[
"79, 84",
"0"
],
[
"61, 29",
"1"
],
[
"39, 77",
"0"
],
[
"39, 65",
"0"
],
[
"61, 78",
"0"
],
[
"86, 73",
"1"
],
[
"7, 92",
"0"
],
[
"86, 50",
"1"
],
[
"86, 63",
"1"
],
[
"11, 2",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n ) {
if ( n == 1 ) return a [ 0 ];
int max_neg = INT_MIN;
int count_neg = 0, count_zero = 0;
int prod = 1;
for ( int i = 0;
i < n;
i ++ ) {
if ( a [ i ] == 0 ) {
count_zero ++;
continue;
}
if ( a [ i ] < 0 ) {
count_neg ++;
max_neg = max ( max_neg, a [ i ] );
}
prod = prod * a [ i ];
}
if ( count_zero == n ) return 0;
if ( count_neg & 1 ) {
if ( count_neg == 1 && count_zero > 0 && count_zero + count_neg == n ) return 0;
prod = prod / max_neg;
}
return prod;
}
| [] | null | [] | SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES | python | [] | def f_gold ( s ) :
_sum = 0
n = 1
while ( _sum < s ) :
_sum += n * n
n += 1
n -= 1
if _sum == s :
return n
return - 1
| code_translation | [
[
"1",
"1"
],
[
"5",
"2"
],
[
"14",
"3"
],
[
"140",
"7"
],
[
"204",
"8"
],
[
"3",
"-1"
],
[
"506",
"11"
],
[
"42",
"-1"
],
[
"4",
"-1"
],
[
"87",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n, int k, int a [ ] ) {
sort ( a, a + n, greater < int > ( ) );
int f_gold = 0;
for ( int i = 0;
i < n;
i += k ) f_gold += ( 2 * a [ i ] );
return f_gold;
}
| [] | null | [] | FIND_MINIMUM_DIFFERENCE_PAIR | python | [] | def f_gold ( arr , n ) :
diff = 10 ** 20
for i in range ( n - 1 ) :
for j in range ( i + 1 , n ) :
if abs ( arr [ i ] - arr [ j ] ) < diff :
diff = abs ( arr [ i ] - arr [ j ] )
return diff
| code_translation | [
[
"[1, 1, 2, 3, 5, 8, 10, 11, 15, 15, 16, 20, 26, 28, 30, 30, 33, 33, 39, 50, 50, 50, 54, 62, 66, 68, 69, 69, 74, 74, 75, 75, 76, 78, 82, 83, 85, 86, 86, 89, 89, 91, 91, 92, 92, 92, 93, 94, 98], 32",
"0"
],
[
"[6, 6, -20, 88, -78, -18, 74, 72, 80, 76, -62, 38], 11",
"0"
],
[
"[0, 1, 1, 1, 1], 3",
"0"
],
[
"[75, 85, 49, 66, 44, 89, 80, 39, 64, 70, 25, 21, 81, 33, 90, 68, 51], 16",
"1"
],
[
"[-96, -10, 0, 4, 54, 64], 3",
"10"
],
[
"[1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0], 41",
"0"
],
[
"[3, 3, 5, 5, 7, 7, 9, 11, 11, 18, 18, 18, 20, 29, 29, 31, 31, 32, 37, 43, 44, 46, 48, 50, 52, 52, 53, 63, 63, 65, 69, 72, 76, 76, 81, 84, 85, 86, 87, 87, 90, 94, 97, 97], 27",
"0"
],
[
"[40, -46, 72, -28, 8, 90, 86, -90, 8, -66, -98, 6, 42, 86, 88, 42, -50, 74, -34, -16, -94, -56, -18, -18, 84, -44, 34, 80, 96, 42, -50, -92, 70, 80, 62, -38, -4, 68, 54, -14, 30, -18, -58], 33",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 26",
"0"
],
[
"[15, 41, 32, 19, 68, 36, 61, 59, 5, 91, 53, 95, 10, 64, 15, 32, 14, 64, 48, 70, 85, 19, 83, 2, 33, 58, 93, 88, 21, 88, 45, 45, 18, 8], 24",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int l, int h, int key ) {
if ( l > h ) return - 1;
int mid = ( l + h ) / 2;
if ( arr [ mid ] == key ) return mid;
if ( arr [ l ] <= arr [ mid ] ) {
if ( key >= arr [ l ] && key <= arr [ mid ] ) return f_gold ( arr, l, mid - 1, key );
return f_gold ( arr, mid + 1, h, key );
}
if ( key >= arr [ mid ] && key <= arr [ h ] ) return f_gold ( arr, mid + 1, h, key );
return f_gold ( arr, l, mid - 1, key );
}
| [
"import math"
] | null | [] | POSITION_OF_RIGHTMOST_SET_BIT | python | [] | import math
def f_gold ( n ) :
return math.log2 ( n & - n ) + 1
| code_translation | [
[
"45",
"1.0"
],
[
"26",
"2.0"
],
[
"74",
"2.0"
],
[
"80",
"5.0"
],
[
"46",
"2.0"
],
[
"67",
"1.0"
],
[
"16",
"5.0"
],
[
"87",
"1.0"
],
[
"27",
"1.0"
],
[
"17",
"1.0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string bin ) {
int n = bin . size ( );
if ( bin [ n - 1 ] == '1' ) return false;
int sum = 0;
for ( int i = n - 2;
i >= 0;
i -- ) {
if ( bin [ i ] == '1' ) {
int posFromRight = n - i - 1;
if ( posFromRight % 4 == 1 ) sum = sum + 2;
else if ( posFromRight % 4 == 2 ) sum = sum + 4;
else if ( posFromRight % 4 == 3 ) sum = sum + 8;
else if ( posFromRight % 4 == 0 ) sum = sum + 6;
}
}
if ( sum % 10 == 0 ) return true;
return false;
}
| [
"from queue import Queue"
] | null | [] | STACK_PERMUTATIONS_CHECK_IF_AN_ARRAY_IS_STACK_PERMUTATION_OF_OTHER | python | [] | from queue import Queue
def f_gold ( ip , op , n ) :
Input = Queue ( )
for i in range ( n ) :
Input.put ( ip [ i ] )
output = Queue ( )
for i in range ( n ) :
output.put ( op [ i ] )
tempStack = [ ]
while ( not Input.empty ( ) ) :
ele = Input.queue [ 0 ]
Input.get ( )
if ( ele == output.queue [ 0 ] ) :
output.get ( )
while ( len ( tempStack ) != 0 ) :
if ( tempStack [ - 1 ] == output.queue [ 0 ] ) :
tempStack.pop ( )
output.get ( )
else :
break
else :
tempStack.append ( ele )
return ( Input.empty ( ) and len ( tempStack ) == 0 )
| code_translation | [
[
"[2, 3, 3, 3, 4, 5, 6, 9, 18, 20, 35, 39, 39, 45, 50, 55, 57, 61, 63, 65, 72, 73, 77, 77, 78, 87, 88, 91, 93, 95, 98], [2, 5, 7, 13, 16, 23, 24, 25, 27, 31, 31, 33, 34, 35, 38, 46, 49, 49, 51, 52, 58, 61, 62, 66, 68, 71, 73, 78, 91, 94, 98], 23",
"False"
],
[
"[-86, 10, -8, 8, -24, -2, -84, -86, -54, 50, 56, -22, -8, -62, 0, -50, -32], [-8, -46, 22, -66, -94, -96, 70, 58, -4, -70, -96, 34, -80, -26, -52, 52, -76], 16",
"False"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1], 21",
"False"
],
[
"[3, 42, 88, 89, 41, 71, 67, 5, 84, 20, 75, 36, 34, 20, 31, 16, 86, 89, 53, 47, 57, 27, 47, 93, 59, 66, 40, 18, 69, 36, 98, 99, 81], [16, 61, 39, 99, 71, 73, 35, 47, 62, 80, 1, 49, 54, 35, 39, 55, 7, 6, 85, 84, 11, 51, 38, 4, 72, 10, 33, 65, 64, 32, 16, 99, 9], 19",
"False"
],
[
"[-98, -94, -94, -90, -88, -82, -80, -78, -78, -68, -58, -58, -52, -36, -30, -14, -12, -6, -2, -2, 2, 4, 10, 14, 22, 24, 26, 38, 38, 46, 46, 48, 50, 54, 58, 60, 64, 64, 66, 70, 74, 74, 86, 88, 96, 96], [-92, -92, -80, -72, -72, -72, -70, -68, -64, -56, -40, -38, -34, -24, -10, -8, -8, -2, 0, 2, 4, 6, 14, 14, 18, 20, 34, 36, 36, 38, 38, 42, 48, 56, 64, 70, 72, 76, 76, 76, 76, 78, 84, 90, 94, 96], 27",
"False"
],
[
"[1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0], 19",
"False"
],
[
"[19, 37, 44, 65, 72, 87], [17, 31, 39, 46, 56, 88], 4",
"False"
],
[
"[88], [-30], 0",
"True"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], 13",
"False"
],
[
"[5, 8, 53, 60, 85, 94, 77, 53, 81, 54, 67, 48, 56, 49, 16, 1, 85, 6, 55, 98, 62, 36, 4, 7, 64], [69, 37, 32, 5, 84, 14, 25, 9, 86, 85, 30, 82, 99, 92, 32, 43, 79, 58, 75, 90, 49, 54, 95, 76, 80], 12",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [
"import math"
] | null | [] | MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES_1 | python | [] | import math
def f_gold ( a , n ) :
return ( - 1 + int ( math.sqrt ( 1 + ( 8 * n ) ) ) ) // 2
| code_translation | [
[
"[1, 2, 2, 3, 5, 6, 7, 8, 8, 12, 15, 16, 18, 18, 20, 21, 21, 22, 22, 24, 24, 25, 30, 35, 42, 49, 52, 55, 55, 63, 68, 70, 72, 73, 77, 80, 83, 87, 87, 88, 88, 94, 95, 97], 22",
"6"
],
[
"[48, -72, 84, -24, 28, 94, 36, 28, 32, 66, -62, 64, 6, -68, -12, 46, 4, 98, 18, 86, -60, 76, 14, 98], 12",
"4"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 25",
"6"
],
[
"[11, 16, 84, 8, 86, 44, 79, 11, 73, 12, 29, 62, 22, 44, 28, 8, 48, 92, 73, 63, 59, 44, 95, 66], 14",
"4"
],
[
"[-94, -94, -92, -88, -86, -82, -80, -80, -78, -76, -56, -56, -50, -44, -42, -36, -36, -32, -32, -26, -14, -12, -6, 12, 24, 28, 34, 38, 42, 42, 46, 50, 56, 62, 62, 74, 84, 92, 94], 19",
"5"
],
[
"[0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0], 24",
"6"
],
[
"[2, 2, 3, 3, 3, 4, 5, 13, 16, 18, 21, 22, 27, 28, 32, 34, 36, 37, 41, 42, 43, 51, 52, 52, 54, 54, 61, 65, 67, 67, 68, 71, 75, 77, 77, 78, 80, 81, 81, 84, 86, 90, 90, 93, 93, 94, 99, 99], 31",
"7"
],
[
"[54, -86], 1",
"1"
],
[
"[0, 1], 1",
"1"
],
[
"[5, 54, 49, 80, 56, 62, 31, 49, 60, 19, 45, 94, 33, 46, 32], 8",
"3"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS | python | [] | def f_gold ( n , p ) :
n = n % p
for x in range ( 2 , p , 1 ) :
if ( ( x * x ) % p == n ) :
return True
return False
| code_translation | [
[
"71, 78",
"False"
],
[
"85, 75",
"False"
],
[
"4, 35",
"True"
],
[
"20, 99",
"False"
],
[
"71, 29",
"True"
],
[
"72, 88",
"False"
],
[
"36, 54",
"True"
],
[
"95, 52",
"False"
],
[
"83, 33",
"False"
],
[
"72, 13",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int arr [ ], int n ) {
if ( n == 0 || n == 1 ) return true;
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false;
return true;
}
| [] | null | [] | WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO | python | [] | def f_gold ( str ) :
one_count = 0
zero_count = 0
n = len ( str )
for i in range ( 0 , n , 1 ) :
if ( str [ i ] == '1' ) :
one_count += 1
else :
zero_count += 1
if ( one_count % 2 == 0 ) :
return zero_count
return one_count
| code_translation | [
[
"'KfcTJNP'",
"7"
],
[
"'05312505872'",
"1"
],
[
"'100111'",
"2"
],
[
"'tDEEhKxrQ'",
"9"
],
[
"'50824233019'",
"1"
],
[
"'10001110010'",
"5"
],
[
"'T SEZaNm MYQ'",
"12"
],
[
"'838415739'",
"1"
],
[
"'01110100'",
"4"
],
[
"'WYQiAey H'",
"9"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int k ) {
unordered_map < int, int > um;
int mod_arr [ n ], max = 0;
int curr_sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
curr_sum += arr [ i ];
mod_arr [ i ] = ( ( curr_sum % k ) + k ) % k;
}
for ( int i = 0;
i < n;
i ++ ) {
if ( mod_arr [ i ] == 0 ) max = i + 1;
else if ( um . find ( mod_arr [ i ] ) == um . end ( ) ) um [ mod_arr [ i ] ] = i;
else if ( max < ( i - um [ mod_arr [ i ] ] ) ) max = i - um [ mod_arr [ i ] ];
}
return max;
}
| [] | null | [] | LONGEST_SUBSEQUENCE_SUCH_THAT_DIFFERENCE_BETWEEN_ADJACENTS_IS_ONE | python | [] | def f_gold ( arr , n ) :
dp = [ 1 for i in range ( n ) ]
for i in range ( n ) :
for j in range ( i ) :
if ( ( arr [ i ] == arr [ j ] + 1 ) or ( arr [ i ] == arr [ j ] - 1 ) ) :
dp [ i ] = max ( dp [ i ] , dp [ j ] + 1 )
result = 1
for i in range ( n ) :
if ( result < dp [ i ] ) :
result = dp [ i ]
return result
| code_translation | [
[
"[2, 13, 15, 17, 18, 20, 22, 24, 28, 34, 37, 43, 46, 47, 49, 51, 52, 54, 58, 64, 65, 77, 78, 79, 87, 90, 92, 93, 94, 97], 23",
"2"
],
[
"[-86, -56, 76, 86, 42, -40, 8, 34, -48, -54, -80, 6, 42, 48, 76, -26, 6], 15",
"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], 16",
"2"
],
[
"[5, 22, 15, 26, 29, 47, 22], 5",
"1"
],
[
"[-90, -84, -76, -76, -74, -74, -66, -58, -58, -56, -56, -44, -38, -36, -34, -32, -16, -10, 2, 6, 24, 24, 24, 34, 36, 54, 60, 68, 70, 76, 88], 17",
"1"
],
[
"[0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1], 26",
"12"
],
[
"[1, 3, 12, 12, 12, 12, 14, 17, 18, 19, 23, 27, 28, 30, 35, 38, 42, 44, 45, 48, 52, 59, 61, 64, 65, 69, 73, 76, 77, 82, 83, 85, 87, 99], 23",
"3"
],
[
"[-54, -20, 24, -78, -58, 64, 34, 70, -36, -24], 8",
"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], 27",
"2"
],
[
"[5, 35, 75, 21, 82, 32, 28, 53, 20, 27, 42, 92, 32, 70, 81, 75, 72, 66, 97, 60, 11, 83, 14, 30, 5, 68, 17, 27, 62, 86, 26, 20, 97, 91, 44, 69], 20",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n ) {
sort ( a, a + n, greater < int > ( ) );
int sum = 0;
bool flag = false;
int len;
for ( int i = 0;
i < n;
i ++ ) {
if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( ! flag ) ) {
flag = true;
len = a [ i + 1 ];
i ++;
}
else if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) {
sum = sum + a [ i + 1 ] * len;
flag = false;
i ++;
}
}
return sum;
}
| [] | null | [] | FIND_MINIMUM_ELEMENT_IN_A_SORTED_AND_ROTATED_ARRAY | python | [] | def f_gold ( arr , low , high ) :
if high < low :
return arr [ 0 ]
if high == low :
return arr [ low ]
mid = int ( ( low + high ) / 2 )
if mid < high and arr [ mid + 1 ] < arr [ mid ] :
return arr [ mid + 1 ]
if mid > low and arr [ mid ] < arr [ mid - 1 ] :
return arr [ mid ]
if arr [ high ] > arr [ mid ] :
return f_gold ( arr , low , mid - 1 )
return f_gold ( arr , mid + 1 , high )
| code_translation | [
[
"[16, 22, 50, 64, 68, 79, 84, 88, 89], 4, 6",
"68"
],
[
"[88, -38, 46, 24, -52, -12, -90, 28, 18, 14, -72, 58, -98, 28, -84, 44, -42, -32, -22, -22, -82, -30, 90, 18, 62, 62, 92, 6, 60, 28, -90, 92, 82, 62, 98, -68, 48, -74, -8, 50, 62, 24, 30, -86, 98, -96, -98], 42, 31",
"88"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 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, 21",
"0"
],
[
"[26, 66, 94, 28, 38, 31, 92, 66, 81, 8, 36, 64, 80, 32, 48, 71, 72, 54, 61, 60, 89], 19, 17",
"26"
],
[
"[-46, -26, -22, -14, 46, 62], 4, 4",
"46"
],
[
"[0, 1, 1, 1], 2, 2",
"1"
],
[
"[14, 81, 87], 1, 1",
"81"
],
[
"[4], 0, 0",
"4"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 15, 17",
"1"
],
[
"[3, 41, 40, 53, 82, 9, 90, 43, 90, 59, 37, 21, 92, 98, 36, 99, 35, 67, 24, 29, 40, 31, 46, 12, 29, 8, 93, 67, 44, 83, 71, 29, 22, 32, 33, 11, 44, 97, 84, 44, 8, 10, 31, 50, 22, 8], 42, 31",
"3"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > mp;
int max_dist = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( mp . find ( arr [ i ] ) == mp . end ( ) ) mp [ arr [ i ] ] = i;
else max_dist = max ( max_dist, i - mp [ arr [ i ] ] );
}
return max_dist;
}
| [
"import sys"
] | null | [] | MINIMUM_COST_CONNECT_WEIGHTED_NODES_REPRESENTED_ARRAY | python | [] | import sys
def f_gold ( a , n ) :
mn = sys.maxsize
sum = 0
for i in range ( n ) :
mn = min ( a [ i ] , mn )
sum += a [ i ]
return mn * ( sum - mn )
| code_translation | [
[
"[3, 8, 14, 15, 17, 17, 19, 21, 22, 23, 29, 32, 36, 37, 43, 45, 46, 47, 47, 53, 57, 57, 70, 71, 72, 76, 81, 82, 90, 95, 96, 98, 99], 32",
"4548"
],
[
"[94, -18, 50, 94, -74, -50, -44, -92, -58, 14, -66, -78], 10",
"-736"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 24",
"0"
],
[
"[15, 18, 64, 28], 2",
"270"
],
[
"[-96, -88, -88, -84, -82, -78, -78, -60, -58, -56, -54, -52, -48, -44, -28, -26, -14, -12, 6, 10, 10, 14, 14, 50, 52, 54, 60, 62, 62, 64, 66, 70, 72, 72, 78, 80, 84], 31",
"40896"
],
[
"[0, 1, 1, 0, 1, 1, 1, 1], 6",
"0"
],
[
"[3, 10, 14, 14, 15, 16, 18, 20, 21, 30, 31, 33, 35, 39, 46, 48, 59, 59, 61, 77, 78, 79, 81, 83, 85, 92, 97, 97, 99], 23",
"2652"
],
[
"[4, -32, 68, -48, 54, 24, 78, 98, -70, 44, -82, -92, -16, -92, -70, 52, -58, -62, -58, 32, 14, -4, 80, -78, -26, -24, -8], 18",
"9936"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 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], 35",
"0"
],
[
"[82, 74, 53, 91, 81, 88, 42, 62, 38, 43, 29, 60, 43, 44, 19, 28, 20, 1, 5, 94, 18, 77, 52, 38, 55, 1, 10, 29, 34, 91, 64, 80, 81, 39, 4, 47, 30, 62, 58, 66, 73, 52, 62, 9, 36, 49], 38",
"1808"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
return ( 3 * n * n - n ) / 2;
}
| [] | null | [] | FIND_A_TRIPLET_THAT_SUM_TO_A_GIVEN_VALUE_2 | python | [] | def f_gold ( A , arr_size , sum ) :
for i in range ( 0 , arr_size - 1 ) :
s = set ( )
curr_sum = sum - A [ i ]
for j in range ( i + 1 , arr_size ) :
if ( curr_sum - A [ j ] ) in s :
print ( "Triplet is" , A [ i ] , ", " , A [ j ] , ", " , curr_sum - A [ j ] )
return True
s.add ( A [ j ] )
return False
| code_translation | [
[
"[1, 6, 8, 8, 9, 11, 13, 13, 15, 17, 21, 24, 38, 38, 42, 43, 46, 46, 47, 54, 55, 56, 57, 58, 60, 60, 60, 62, 63, 63, 65, 66, 67, 67, 69, 81, 84, 84, 85, 86, 95, 99], 27, 24",
"True"
],
[
"[20, -86, -24, 38, -32, -64, -72, 72, 68, 94, 18, -60, -4, -18, -18, -70, 6, -86, 46, -16, 46, -28], 21, 20",
"True"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 17, 13",
"False"
],
[
"[13, 96, 31, 39, 23, 39, 50, 10, 21, 64, 41, 54, 44, 97, 24, 91, 79, 86, 38, 49, 77, 71, 8, 98, 85, 36, 37, 65, 42, 48], 17, 18",
"False"
],
[
"[-86, -68, -58, -56, -54, -54, -48, -40, -36, -32, -26, -16, -14, -12, -12, -4, -4, -4, 0, 10, 22, 22, 30, 54, 62, 68, 88, 88], 21, 25",
"False"
],
[
"[0, 1, 1, 1, 1, 0, 0], 5, 3",
"True"
],
[
"[8, 8, 9, 13, 20, 24, 29, 52, 53, 96], 9, 8",
"False"
],
[
"[18, -92, -10, 26, 58, -48, 38, 66, -98, -72, 4, 76, -52, 20, 60, -56, 96, 60, -10, -26, -64, -66, -22, -86, 74, 82, 2, -14, 76, 82, 40, 70, -40, -2, -46, -38, 22, 98, 58], 30, 30",
"True"
],
[
"[1, 1, 1, 1], 2, 2",
"False"
],
[
"[72], 0, 0",
"False"
]
] |
Subsets and Splits