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, int k ) {
int p = 1;
if ( k % 2 ) p = - 1;
return ( pow ( n - 1, k ) + p * ( n - 1 ) ) / n;
}
| [] | null | [] | FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH | python | [] | def f_gold ( arr , n , k ) :
if k > n :
return - 1
csum = [ 0 ] * n
csum [ 0 ] = arr [ 0 ]
for i in range ( 1 , n ) :
csum [ i ] = csum [ i - 1 ] + arr [ i ] ;
max_sum = csum [ k - 1 ]
max_end = k - 1
for i in range ( k , n ) :
curr_sum = csum [ i ] - csum [ i - k ]
if curr_sum > max_sum :
max_sum = curr_sum
max_end = i
return max_end - k + 1
| code_translation | [
[
"[2, 4, 6, 19, 21, 23, 32, 34, 47, 51, 56, 57, 57, 65, 68, 68, 69, 70, 71, 73, 74, 74, 77, 77, 79, 82, 82, 86, 87, 87, 88, 89, 90, 91, 92], 29, 20",
"9"
],
[
"[24, 62, -32, -28, 42, -46, -96, -70, -68, 60, 44, 34, -30, 96, -26, 92, 62, 42, -46, -38, 44, 54, -94, 52, 66, 68, -96, -58, 84, -2, 66, 30, 42], 23, 31",
"-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], 32, 31",
"1"
],
[
"[94, 6, 48, 34, 31], 4, 3",
"0"
],
[
"[-98, -88, -82, -80, -76, -70, -70, -60, -60, -52, -50, -46, -44, -44, -44, -20, -18, -12, -12, -12, -10, -8, -6, -4, 4, 4, 18, 28, 32, 34, 42, 42, 44, 46, 48, 54, 60, 70, 70, 72, 78, 78, 78, 78, 84, 86, 90, 96, 98], 45, 30",
"15"
],
[
"[0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0], 15, 8",
"4"
],
[
"[1, 5, 13, 17, 26, 26, 32, 35, 38, 38, 39, 45, 52, 58, 60, 61, 62, 63, 82, 83, 85, 89, 89, 91], 13, 22",
"-1"
],
[
"[-68, -52, 4, -90, 90, 88, 38, -18, 86, 4, 14, -32, -14, -44, -88, -50, -12, -26, -68, -20, -30, 22, 0, 14, -40, 58, -6, 28, -44, 8, 28, 96, -46, -12], 32, 22",
"4"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13, 11",
"2"
],
[
"[17, 33, 36, 34, 32, 10, 37, 48, 47, 32, 21, 18, 75, 8, 18, 52, 21, 73, 25, 25, 80, 32, 10, 24, 1, 89, 7, 42, 86, 85, 73, 12, 20, 20, 1, 74, 77, 4, 24, 74, 8], 20, 28",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int l, int r, int x ) {
if ( r >= l ) {
int mid = l + ( r - l ) / 2;
if ( arr [ mid ] == x ) return mid;
if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 1, x );
return f_gold ( arr, mid + 1, r, x );
}
return - 1;
}
| [] | null | [] | NUMBER_ORDERED_PAIRS_AI_AJ_0 | python | [] | def f_gold ( a , n ) :
count = 0
for i in range ( 0 , n ) :
for j in range ( i + 1 , n ) :
if ( a [ i ] & a [ j ] ) == 0 :
count += 2
return count
| code_translation | [
[
"[17, 20, 32, 35, 35, 36, 43, 47, 59, 59, 68, 69, 70, 70, 75, 82, 88, 94, 96, 99], 17",
"54"
],
[
"[-78, -40, 58, -36, 34, -12, -38, 48, -66, 16, 50, -26, -22, 46, -70, -68, -44, -52, -78, -50], 11",
"6"
],
[
"[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], 23",
"506"
],
[
"[49, 57, 17, 37, 56, 61, 10, 3, 33, 33, 70, 35, 50, 85, 48, 65, 83, 21, 96, 19, 66, 43, 69, 17, 60, 87, 82, 3, 83, 44, 63, 19, 55, 58, 77, 76, 50, 96], 37",
"172"
],
[
"[-94, -88, -86, -80, -80, -72, -64, -60, -58, -58, -58, -50, -44, -32, -8, -8, 0, 6, 8, 10, 14, 14, 18, 28, 34, 34, 46, 54, 56, 56, 56, 64, 66, 66, 70, 82, 84, 88, 96], 33",
"266"
],
[
"[1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0], 13",
"100"
],
[
"[1, 3, 10, 11, 13, 14, 15, 17, 20, 25, 26, 26, 27, 29, 32, 36, 36, 36, 42, 46, 47, 49, 51, 54, 54, 55, 60, 66, 67, 68, 68, 68, 72, 77, 78, 79, 83, 84, 92, 98], 32",
"238"
],
[
"[-76, -72, 16, 38, -60, 44, -2, -76, -76, -56, 40, 36, 50, -50, -32, 48, -96, 80, 84, 60, 84, 38, -54, -42, 48, 30, 66, -62, -52, -94, 64, -16, 54, 98], 28",
"116"
],
[
"[0, 0, 1, 1, 1, 1], 5",
"14"
],
[
"[63, 82, 22, 84, 11, 62, 18, 43, 57, 25, 4, 27, 62, 46, 55, 16, 1, 9, 10, 73, 36, 80, 95, 87, 47, 64, 27, 25, 70], 22",
"108"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int m, int n, int x ) {
int table [ n + 1 ] [ x + 1 ];
memset ( table, 0, sizeof ( table ) );
for ( int j = 1;
j <= m && j <= x;
j ++ ) table [ 1 ] [ j ] = 1;
for ( int i = 2;
i <= n;
i ++ ) for ( int j = 1;
j <= x;
j ++ ) for ( int k = 1;
k <= m && k < j;
k ++ ) table [ i ] [ j ] += table [ i - 1 ] [ j - k ];
return table [ n ] [ x ];
}
| [] | null | [] | NUMBER_SUBSEQUENCES_AB_STRING_REPEATED_K_TIMES | python | [] | def f_gold ( s , K ) :
n = len ( s )
c1 = 0
c2 = 0
C = 0
for i in range ( n ) :
if s [ i ] == 'a' :
c1 += 1
if s [ i ] == 'b' :
c2 += 1
C += c1
return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2
| code_translation | [
[
"'abbc', 96",
"9312.0"
],
[
"'abahk', 7",
"49.0"
],
[
"'hugbabab', 5",
"75.0"
],
[
"'abadbc', 60",
"7260.0"
],
[
"'nkg9', 8",
"0.0"
],
[
"'jh7dab', 41",
"861.0"
],
[
"'abd', 87",
"3828.0"
],
[
"'aabb8yk', 4",
"40.0"
],
[
"'1111', 18",
"0.0"
],
[
"'PFXAhr', 8",
"0.0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int dp [ n + 1 ];
dp [ 0 ] = 0;
for ( int i = 1;
i <= n;
i ++ ) {
if ( i >= 1 && i <= 3 ) dp [ i ] = 1;
else if ( i == 4 ) dp [ i ] = 2;
else dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ];
}
return dp [ n ];
}
| [] | null | [] | MAXIMUM_SUM_BITONIC_SUBARRAY | python | [] | def f_gold ( arr , n ) :
msis = [ None ] * n
msds = [ None ] * n
max_sum = 0
msis [ 0 ] = arr [ 0 ]
for i in range ( 1 , n ) :
if ( arr [ i ] > arr [ i - 1 ] ) :
msis [ i ] = msis [ i - 1 ] + arr [ i ]
else :
msis [ i ] = arr [ i ]
msds [ n - 1 ] = arr [ n - 1 ]
for i in range ( n - 2 , - 1 , - 1 ) :
if ( arr [ i ] > arr [ i + 1 ] ) :
msds [ i ] = msds [ i + 1 ] + arr [ i ]
else :
msds [ i ] = arr [ i ]
for i in range ( n ) :
if ( max_sum < ( msis [ i ] + msds [ i ] - arr [ i ] ) ) :
max_sum = ( msis [ i ] + msds [ i ] - arr [ i ] )
return max_sum
| code_translation | [
[
"[7, 12, 16, 23, 26, 27, 39, 39, 40, 44, 57, 58, 77, 78, 81, 82, 84, 86, 91, 94, 94, 95, 97], 13",
"315"
],
[
"[72, 38, -60, 98, -52, -38, -2, 94, 34, 56, 90, 46, 6, -2, 30, -96, -76, -96, -76, 32, 68, 64, -32, -4, 72, -62, 58, 20, -84, 0, -96, 70, -22, -56, 70, -74, -90, -86, -14, 82, -90, 40, -64, 94], 37",
"230"
],
[
"[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], 33",
"1"
],
[
"[69, 31, 85, 84, 28, 28], 5",
"228"
],
[
"[-80, -74, -24, -22, -22, 4, 20, 28, 30, 32, 36, 58, 58, 68, 92, 94, 98], 16",
"312"
],
[
"[1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1], 10",
"1"
],
[
"[2, 2, 2, 4, 6, 7, 8, 10, 15, 17, 19, 20, 21, 27, 28, 29, 32, 32, 40, 44, 46, 47, 49, 50, 50, 52, 55, 56, 58, 59, 64, 69, 73, 74, 74, 77, 80, 80, 84, 89, 91, 95, 96, 96, 97, 98, 98, 99], 46",
"610"
],
[
"[26, -86, 8, 64, -40, 64, 60, -16, 54, -42, -86, 14, -48, -20, -42, -4, -34, -52, -74, 22, 10], 18",
"68"
],
[
"[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], 27",
"1"
],
[
"[8, 5, 5, 56, 5, 38], 3",
"13"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int k ) {
int dist_count = 0;
for ( int i = 0;
i < n;
i ++ ) {
int j;
for ( j = 0;
j < n;
j ++ ) if ( i != j && arr [ j ] == arr [ i ] ) break;
if ( j == n ) dist_count ++;
if ( dist_count == k ) return arr [ i ];
}
return - 1;
}
| [] | null | [] | MAXIMUM_GAMES_PLAYED_WINNER | python | [] | def f_gold ( N ) :
dp = [ 0 for i in range ( N ) ]
dp [ 0 ] = 1
dp [ 1 ] = 2
i = 1
while dp [ i ] <= N :
i = i + 1
dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ]
return ( i - 1 )
| code_translation | [
[
"73",
"8"
],
[
"28",
"6"
],
[
"33",
"6"
],
[
"23",
"6"
],
[
"84",
"8"
],
[
"31",
"6"
],
[
"48",
"7"
],
[
"46",
"7"
],
[
"45",
"7"
],
[
"90",
"9"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int difference = 0;
int ans = 0;
int hash_positive [ n + 1 ], hash_negative [ n + 1 ];
fill_n ( hash_positive, n + 1, 0 );
fill_n ( hash_negative, n + 1, 0 );
hash_positive [ 0 ] = 1;
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] & 1 == 1 ) difference ++;
else difference --;
if ( difference < 0 ) {
ans += hash_negative [ - difference ];
hash_negative [ - difference ] ++;
}
else {
ans += hash_positive [ difference ];
hash_positive [ difference ] ++;
}
}
return ans;
}
| [] | null | [] | EFFICIENT_SEARCH_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_IS_1 | python | [] | def f_gold(arr, n, x):
i = 0
while (i <= n - 1):
if (arr[i] == x):
return i
i += abs(arr[i] - x)
return - 1
| code_translation | [
[
"[5, 4, 5, 6, 5, 4, 3, 2], 29, 6",
"3"
],
[
"[5, 4, 5, 6, 5, 4, 3, 2], 19, 3",
"6"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 37, 1",
"14"
],
[
"[50, 51, 52, 51, 50, 49, 48], 17, 49",
"5"
],
[
"[-86, -68, -32, -6, 6, 10, 30, 34, 58, 92], 6, 6",
"-1"
],
[
"[1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0], 27, 22",
"-1"
],
[
"[58], 0, 0",
"-1"
],
[
"[-64, 78, 58, 36, 48, 80, -80, 74, -98, 46, -48, 24, 80, 72, 90, -46, 14, 68, 38, 58, -54, 80, 44, -62, 34, -28, 92, 84, 90, 44, -26, 88, 18, 22, -32, 54, 58, 92], 24, 34",
"-1"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 35, 1",
"21"
],
[
"[5], 0, 0",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int x, int y ) {
int i = 0;
int min_dist = INT_MAX;
int prev;
for ( i = 0;
i < n;
i ++ ) {
if ( arr [ i ] == x || arr [ i ] == y ) {
prev = i;
break;
}
}
for (;
i < n;
i ++ ) {
if ( arr [ i ] == x || arr [ i ] == y ) {
if ( arr [ prev ] != arr [ i ] && ( i - prev ) < min_dist ) {
min_dist = i - prev;
prev = i;
}
else prev = i;
}
}
return min_dist;
}
| [] | null | [] | COUNT_SET_BITS_IN_AN_INTEGER_3 | python | [] | def f_gold ( n ) :
if ( n == 0 ) :
return 0
else :
return 1 + f_gold ( n & ( n - 1 ) )
| code_translation | [
[
"6",
"2"
],
[
"58",
"4"
],
[
"90",
"4"
],
[
"69",
"3"
],
[
"15",
"4"
],
[
"54",
"4"
],
[
"60",
"4"
],
[
"51",
"4"
],
[
"46",
"4"
],
[
"91",
"5"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int x, int y, int z ) {
if ( ! ( y / x ) ) return ( ! ( y / z ) ) ? y : z;
return ( ! ( x / z ) ) ? x : z;
}
| [] | null | [] | COMPUTE_N_UNDER_MODULO_P | python | [] | def f_gold ( n , p ) :
if n >= p :
return 0
result = 1
for i in range ( 1 , n + 1 ) :
result = ( result * i ) % p
return result
| code_translation | [
[
"85, 18",
"0"
],
[
"14, 13",
"0"
],
[
"83, 21",
"0"
],
[
"30, 35",
"0"
],
[
"96, 51",
"0"
],
[
"55, 58",
"0"
],
[
"82, 71",
"0"
],
[
"12, 74",
"44"
],
[
"38, 3",
"0"
],
[
"46, 73",
"67"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE | python | [] | def f_gold ( low , high ) :
fact = 1
x = 1
while ( fact < low ) :
fact = fact * x
x += 1
res = 0
while ( fact <= high ) :
res += 1
fact = fact * x
x += 1
return res
| code_translation | [
[
"57, 79",
"0"
],
[
"57, 21",
"0"
],
[
"31, 37",
"0"
],
[
"62, 87",
"0"
],
[
"49, 98",
"0"
],
[
"82, 76",
"0"
],
[
"31, 45",
"0"
],
[
"5, 52",
"2"
],
[
"76, 43",
"0"
],
[
"55, 6",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | FIND_THE_ELEMENT_THAT_APPEARS_ONCE | python | [] | def f_gold ( arr , n ) :
ones = 0
twos = 0
for i in range ( n ) :
twos = twos | ( ones & arr [ i ] )
ones = ones ^ arr [ i ]
common_bit_mask = ~ ( ones & twos )
ones &= common_bit_mask
twos &= common_bit_mask
return ones
| code_translation | [
[
"[7, 26, 26, 48, 59, 62, 66, 70, 72, 75, 76, 81, 97, 98], 7",
"72"
],
[
"[-42, -48, -64, -74, 56, -34, 20, 16, 34, -84, 86, 38, 56, -86, 30, -74, -96, 96, 12, 10, -46, 10, -36, 38, 34, -46, -20, 14, 12, 62, -54, 20, -82, 24, 96], 27",
"-28"
],
[
"[0, 0, 1, 1], 3",
"1"
],
[
"[68, 91, 61, 6, 32, 47, 76, 69, 44, 71, 29, 79, 74, 33, 44, 33, 45, 75, 43, 82, 83, 81, 95, 16, 86, 33, 69, 61, 73, 21, 54, 17, 98, 62, 14, 72, 80, 31, 56, 82, 14, 48, 76], 38",
"25"
],
[
"[-98, -96, -92, -62, -52, -42, -42, -26, 4, 10, 14, 38, 64, 66, 72, 74, 82], 14",
"104"
],
[
"[0, 1, 1, 1, 0, 0, 0, 1, 0, 1], 5",
"0"
],
[
"[53, 63, 63], 2",
"10"
],
[
"[-96, -38, -26, -46, 68, -36, 20, -18, -10, 52, 40, 94, -8, -64, 82, -22], 15",
"34"
],
[
"[0, 0, 0, 0, 0, 1, 1], 3",
"0"
],
[
"[99, 46, 48, 81, 27, 97, 26, 50, 77, 32, 45, 99, 46], 12",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string str ) {
int result = 0;
for ( int i = 0;
i < str . size ( );
i ++ ) if ( i == ( str [ i ] - 'a' ) || i == ( str [ i ] - 'A' ) ) result ++;
return result;
}
| [] | null | [] | PAINTING_FENCE_ALGORITHM | python | [] | def f_gold ( n , k ) :
total = k
mod = 1000000007
same , diff = 0 , k
for i in range ( 2 , n + 1 ) :
same = diff
diff = total * ( k - 1 )
diff = diff % mod
total = ( same + diff ) % mod
return total
| code_translation | [
[
"6, 30",
"725841870"
],
[
"23, 87",
"370622679"
],
[
"89, 31",
"7554776"
],
[
"63, 36",
"76740139"
],
[
"23, 68",
"647498520"
],
[
"44, 66",
"70208793"
],
[
"81, 18",
"227130467"
],
[
"43, 73",
"204618786"
],
[
"9, 42",
"797370673"
],
[
"41, 98",
"903959704"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
return ( n * n ) + ( n * n * n );
}
| [] | null | [] | COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_2 | python | [] | def f_gold ( p , q ) :
dp = [ 1 for i in range ( q ) ]
for i in range ( p - 1 ) :
for j in range ( 1 , q ) :
dp [ j ] += dp [ j - 1 ]
return dp [ q - 1 ]
| code_translation | [
[
"73, 75",
"5800834723650648582408201347161496628568500"
],
[
"70, 5",
"1088430"
],
[
"53, 62",
"544984327577929166763558054404688"
],
[
"80, 70",
"16698257436934424602116017431974081551656800"
],
[
"9, 59",
"5743572120"
],
[
"38, 48",
"931064028937850181759840"
],
[
"41, 49",
"18312575054317505569702710"
],
[
"80, 72",
"75091761310962653894827563300728515629684000"
],
[
"42, 52",
"239712695931351411706673736"
],
[
"54, 1",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
long int dp [ n + 1 ] [ 27 ];
memset ( dp, 0, sizeof ( dp ) );
for ( int i = 0;
i <= 25;
i ++ ) dp [ 1 ] [ i ] = 1;
for ( int i = 2;
i <= n;
i ++ ) {
for ( int j = 0;
j <= 25;
j ++ ) if ( j == 0 ) dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ];
else dp [ i ] [ j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] );
}
long int sum = 0;
for ( int i = 0;
i <= 25;
i ++ ) sum = ( sum + dp [ n ] [ i ] );
return sum;
}
| [] | null | [] | SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN | python | [] | def f_gold ( N ) :
ans = 0
for i in range ( 1 , N + 1 ) :
for j in range ( 1 , N + 1 ) :
ans += i // j
return ans
| code_translation | [
[
"60",
"7021"
],
[
"74",
"11190"
],
[
"8",
"77"
],
[
"74",
"11190"
],
[
"34",
"1974"
],
[
"66",
"8680"
],
[
"96",
"19920"
],
[
"11",
"156"
],
[
"45",
"3697"
],
[
"72",
"10530"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int num ) {
if ( num < 0 ) return f_gold ( - num );
if ( num == 0 || num == 7 ) return 1;
if ( num < 10 ) return 0;
return f_gold ( num / 10 - 2 * ( num - num / 10 * 10 ) );
}
| [] | null | [] | DOUBLE_FACTORIAL | python | [] | def f_gold ( n ) :
if ( n == 0 or n == 1 ) :
return 1 ;
return n * f_gold ( n - 2 ) ;
| code_translation | [
[
"52",
"27064431817106664380040216576000000"
],
[
"93",
"2987435000850314871976096554696085799164511452611632783323554397412109375"
],
[
"15",
"2027025"
],
[
"72",
"25563186766285862273530264901662157745369907200000000"
],
[
"61",
"1782151988659863326386101665566204817109375"
],
[
"21",
"13749310575"
],
[
"83",
"536347102817482913555411512425352545980058003572241486357421875"
],
[
"87",
"3966286825335286145742268134385482077522528936416725791613134765625"
],
[
"75",
"13114900840751548972796135496384318234575359262373046875"
],
[
"75",
"13114900840751548972796135496384318234575359262373046875"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( char str [ ], int n ) {
int ans = ( n * ( n + 1 ) ) / 2;
int a_index = 0;
int b_index = 0;
int c_index = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( str [ i ] == 'a' ) {
a_index = i + 1;
ans -= min ( b_index, c_index );
}
else if ( str [ i ] == 'b' ) {
b_index = i + 1;
ans -= min ( a_index, c_index );
}
else {
c_index = i + 1;
ans -= min ( a_index, b_index );
}
}
return ans;
}
| [] | null | [] | COUNT_NUMBER_WAYS_TILE_FLOOR_SIZE_N_X_M_USING_1_X_M_SIZE_TILES | python | [] | def f_gold ( n , m ) :
count = [ ]
for i in range ( n + 2 ) :
count.append ( 0 )
count [ 0 ] = 0
for i in range ( 1 , n + 1 ) :
if ( i > m ) :
count [ i ] = count [ i - 1 ] + count [ i - m ]
elif ( i < m ) :
count [ i ] = 1
else :
count [ i ] = 2
return count [ n ]
| code_translation | [
[
"93, 54",
"41"
],
[
"17, 4",
"131"
],
[
"38, 39",
"1"
],
[
"33, 64",
"1"
],
[
"78, 35",
"90"
],
[
"40, 61",
"1"
],
[
"95, 6",
"10665883415"
],
[
"12, 8",
"6"
],
[
"69, 60",
"11"
],
[
"78, 21",
"1578"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
double f_gold ( double a, double b ) {
double mod;
if ( a < 0 ) mod = - a;
else mod = a;
if ( b < 0 ) b = - b;
while ( mod >= b ) mod = mod - b;
if ( a < 0 ) return - mod;
return mod;
}
| [] | null | [] | PROGRAM_PRINT_IDENTITY_MATRIX_1 | python | [] | def f_gold ( mat , N ) :
for row in range ( N ) :
for col in range ( N ) :
if ( row == col and mat [ row ] [ col ] != 1 ) :
return False ;
elif ( row != col and mat [ row ] [ col ] != 0 ) :
return False ;
return True ;
| code_translation | [
[
"[[]], 0",
"True"
],
[
"[[1]], 1",
"True"
],
[
"[[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]], 4",
"True"
],
[
"[[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]], 4",
"False"
],
[
"[[7, 28, 37, 88, 70, 41, 11, 67, 9, 9, 35, 80, 99, 45, 41, 88, 51, 25, 54, 40, 28, 72, 91, 71, 72, 14], [4, 90, 11, 18, 54, 57, 43, 53, 69, 55, 74, 57, 27, 84, 14, 77, 16, 56, 93, 60, 87, 35, 29, 17, 19, 98], [37, 91, 56, 85, 69, 17, 68, 81, 85, 58, 43, 96, 26, 16, 91, 46, 85, 4, 33, 25, 80, 80, 43, 53, 80, 3], [53, 92, 40, 1, 6, 75, 90, 33, 3, 87, 22, 46, 87, 44, 99, 26, 49, 45, 57, 1, 58, 8, 10, 50, 77, 6], [94, 17, 54, 45, 67, 91, 14, 7, 87, 87, 60, 99, 46, 32, 45, 59, 92, 98, 82, 13, 44, 72, 89, 76, 75, 54], [96, 46, 82, 21, 97, 70, 95, 9, 20, 52, 46, 80, 21, 25, 7, 57, 90, 20, 50, 68, 86, 84, 20, 49, 72, 11], [75, 19, 51, 52, 16, 72, 68, 30, 18, 96, 88, 21, 17, 42, 68, 7, 9, 13, 28, 20, 72, 14, 67, 89, 74, 44], [86, 59, 47, 73, 13, 32, 31, 77, 31, 55, 28, 10, 7, 11, 5, 69, 63, 43, 54, 97, 38, 33, 88, 44, 81, 92], [46, 87, 97, 25, 96, 30, 79, 8, 38, 54, 1, 79, 12, 23, 92, 25, 22, 34, 27, 38, 71, 29, 40, 12, 34, 85], [3, 82, 23, 40, 75, 92, 60, 24, 51, 81, 73, 56, 28, 96, 42, 31, 65, 61, 80, 54, 33, 71, 31, 63, 15, 98], [37, 79, 60, 59, 45, 43, 91, 9, 45, 31, 6, 50, 92, 95, 37, 85, 5, 78, 98, 76, 38, 38, 39, 97, 32, 88], [47, 54, 98, 76, 58, 19, 62, 32, 37, 63, 42, 71, 20, 17, 32, 30, 25, 62, 18, 52, 20, 70, 19, 34, 22, 50], [17, 44, 72, 87, 85, 39, 69, 87, 97, 69, 47, 32, 47, 37, 55, 40, 52, 93, 11, 5, 37, 59, 22, 28, 86, 74], [60, 87, 13, 48, 18, 7, 38, 65, 28, 30, 55, 33, 26, 80, 93, 8, 97, 92, 60, 35, 79, 46, 23, 34, 69, 25], [69, 89, 92, 94, 96, 26, 6, 76, 82, 12, 60, 16, 57, 33, 73, 21, 99, 71, 52, 79, 73, 3, 41, 43, 98, 43], [83, 94, 99, 92, 7, 12, 22, 48, 17, 28, 70, 46, 86, 60, 52, 43, 32, 41, 26, 35, 82, 68, 83, 41, 31, 20], [92, 61, 66, 51, 74, 84, 27, 34, 31, 6, 98, 85, 29, 45, 40, 36, 30, 95, 65, 44, 48, 53, 62, 55, 48, 39], [33, 17, 57, 20, 94, 60, 19, 81, 14, 43, 63, 49, 39, 92, 60, 11, 29, 38, 94, 84, 41, 85, 27, 88, 47, 60], [65, 63, 62, 96, 87, 87, 53, 39, 45, 32, 71, 77, 8, 33, 18, 17, 75, 57, 55, 21, 21, 49, 44, 84, 98, 49], [50, 42, 41, 95, 20, 33, 18, 69, 18, 90, 28, 97, 27, 47, 26, 87, 23, 24, 8, 51, 90, 40, 60, 18, 6, 41], [76, 98, 96, 10, 27, 98, 3, 66, 54, 51, 69, 76, 14, 36, 29, 30, 53, 8, 6, 45, 72, 50, 3, 71, 49, 46], [31, 34, 36, 75, 23, 27, 53, 32, 3, 42, 87, 28, 77, 21, 13, 89, 8, 18, 48, 43, 61, 33, 15, 26, 83, 95], [55, 79, 11, 90, 76, 74, 19, 88, 53, 43, 22, 28, 39, 84, 3, 63, 21, 98, 51, 91, 94, 37, 2, 92, 59, 84], [81, 36, 20, 40, 11, 85, 51, 43, 23, 59, 22, 90, 52, 49, 81, 96, 25, 70, 80, 99, 19, 83, 6, 88, 54, 24], [97, 97, 33, 56, 42, 86, 62, 50, 51, 1, 91, 60, 21, 58, 68, 85, 63, 62, 13, 68, 43, 12, 7, 40, 97, 54], [46, 13, 97, 14, 53, 75, 56, 17, 81, 91, 24, 52, 26, 97, 26, 27, 79, 43, 44, 87, 10, 94, 97, 56, 80, 25]], 25",
"False"
],
[
"[[80, 68, 67, 24, 55, 89, 15, 35, 7, 28, 36, 65, 76, 4, 97, 99, 82, 21, 14, 55, 66, 43, 28, 81, 94, 23, 43, 97, 74], [94, 39, 98, 29, 57, 15, 49, 96, 28, 97, 8, 4, 39, 58, 71, 76, 88, 85, 9, 89, 93, 64, 44, 64, 41, 47, 26, 70, 75], [47, 8, 15, 88, 50, 27, 9, 88, 95, 51, 96, 43, 14, 14, 38, 63, 40, 60, 41, 80, 13, 74, 29, 26, 52, 95, 86, 39, 66], [40, 65, 70, 92, 28, 99, 1, 80, 18, 13, 45, 88, 67, 16, 75, 91, 37, 2, 80, 33, 64, 4, 59, 6, 11, 11, 25, 39, 7], [43, 70, 31, 99, 4, 1, 98, 30, 76, 89, 2, 14, 6, 28, 56, 19, 30, 87, 98, 75, 37, 39, 1, 84, 29, 92, 71, 67, 54], [18, 97, 8, 12, 59, 68, 25, 40, 24, 82, 22, 43, 73, 59, 17, 92, 67, 90, 14, 95, 8, 41, 3, 7, 69, 59, 15, 63, 88], [32, 57, 74, 7, 87, 61, 83, 38, 83, 68, 1, 89, 92, 76, 94, 21, 25, 27, 62, 29, 21, 88, 14, 59, 20, 77, 7, 35, 5], [22, 72, 82, 3, 58, 73, 55, 65, 23, 83, 65, 96, 63, 16, 92, 63, 60, 76, 91, 58, 7, 65, 3, 61, 13, 12, 6, 88, 83], [15, 52, 62, 34, 57, 88, 56, 16, 25, 23, 50, 90, 57, 94, 56, 62, 33, 20, 71, 66, 7, 10, 88, 35, 47, 42, 61, 9, 1], [85, 33, 29, 35, 54, 26, 37, 63, 35, 16, 22, 97, 68, 22, 14, 70, 84, 89, 93, 85, 54, 15, 15, 77, 15, 80, 81, 60, 64], [4, 62, 17, 84, 89, 79, 9, 58, 43, 16, 10, 32, 36, 93, 76, 7, 44, 93, 12, 19, 25, 34, 80, 53, 65, 69, 9, 71, 56], [65, 37, 85, 44, 43, 68, 55, 69, 55, 52, 47, 38, 41, 37, 32, 24, 35, 59, 46, 41, 48, 51, 87, 64, 75, 71, 94, 17, 60], [50, 6, 95, 63, 14, 78, 8, 83, 46, 7, 32, 90, 3, 25, 88, 78, 11, 34, 57, 10, 18, 33, 75, 14, 68, 6, 98, 12, 36], [11, 73, 12, 20, 89, 5, 78, 56, 3, 36, 98, 63, 11, 88, 4, 9, 87, 20, 62, 87, 23, 3, 54, 51, 99, 10, 30, 34, 33], [79, 23, 94, 80, 42, 32, 29, 28, 18, 35, 74, 94, 89, 52, 11, 74, 5, 15, 78, 99, 38, 94, 95, 89, 92, 79, 74, 13, 24], [74, 87, 21, 34, 25, 60, 49, 92, 29, 88, 22, 65, 27, 24, 89, 32, 90, 42, 67, 24, 71, 47, 79, 12, 73, 42, 2, 80, 13], [79, 84, 54, 87, 94, 43, 62, 11, 48, 36, 26, 22, 27, 31, 14, 87, 30, 23, 6, 43, 64, 76, 68, 2, 33, 14, 13, 63, 4], [77, 96, 66, 22, 59, 32, 40, 81, 24, 58, 39, 63, 53, 3, 68, 37, 29, 11, 50, 38, 74, 64, 70, 5, 75, 46, 47, 15, 75], [5, 87, 49, 47, 42, 18, 34, 58, 72, 65, 68, 73, 17, 74, 93, 85, 97, 97, 93, 36, 97, 70, 49, 84, 24, 73, 21, 36, 92], [97, 58, 52, 86, 90, 71, 1, 92, 71, 85, 32, 71, 27, 68, 71, 96, 57, 62, 81, 98, 25, 89, 13, 84, 59, 91, 83, 92, 43], [74, 54, 73, 63, 20, 19, 13, 22, 96, 46, 80, 60, 68, 40, 12, 34, 43, 41, 57, 49, 24, 69, 54, 29, 20, 65, 13, 50, 54], [93, 26, 9, 10, 61, 46, 49, 40, 3, 93, 22, 24, 99, 19, 77, 92, 10, 27, 28, 5, 8, 4, 56, 9, 52, 76, 89, 28, 82], [73, 33, 56, 17, 7, 59, 85, 95, 64, 16, 40, 86, 27, 59, 65, 49, 55, 27, 35, 93, 97, 27, 73, 14, 78, 33, 27, 84, 5], [37, 93, 55, 95, 95, 70, 37, 78, 49, 62, 65, 26, 85, 16, 70, 36, 39, 59, 33, 24, 62, 53, 80, 30, 91, 28, 44, 92, 12], [45, 91, 17, 24, 74, 67, 90, 86, 68, 26, 55, 20, 65, 9, 51, 69, 74, 76, 3, 90, 3, 64, 81, 81, 89, 73, 60, 76, 21], [4, 53, 19, 1, 88, 95, 30, 83, 85, 76, 74, 29, 59, 52, 92, 46, 74, 93, 67, 96, 46, 88, 45, 87, 56, 28, 49, 57, 96], [10, 41, 45, 41, 2, 48, 49, 20, 48, 21, 60, 57, 10, 69, 47, 91, 34, 23, 5, 89, 61, 36, 51, 19, 59, 23, 96, 90, 94], [16, 12, 62, 79, 4, 78, 25, 56, 40, 44, 66, 42, 75, 95, 91, 17, 78, 79, 41, 79, 17, 7, 99, 81, 47, 36, 67, 74, 68], [78, 88, 92, 77, 75, 10, 5, 97, 22, 77, 70, 97, 86, 14, 3, 6, 39, 95, 21, 38, 33, 68, 52, 24, 22, 38, 37, 98, 46]], 17",
"False"
],
[
"[[54, 16, 12, 57, 31, 31, 71, 17, 46], [74, 81, 65, 60, 4, 64, 19, 31, 18], [42, 3, 51, 46, 58, 13, 72, 29, 69], [6, 81, 28, 72, 32, 8, 11, 14, 16], [9, 2, 29, 22, 52, 42, 78, 46, 15], [70, 89, 42, 58, 72, 9, 21, 23, 34], [37, 33, 35, 32, 96, 38, 69, 53, 18], [35, 19, 88, 73, 2, 67, 92, 61, 29], [49, 40, 86, 14, 67, 89, 37, 66, 29]], 4",
"False"
],
[
"[[6, 45, 61, 50, 95, 16, 88, 4, 77, 57, 23, 14, 58, 9, 94, 61, 56, 58, 52, 22, 3, 88, 34, 16, 75, 37, 40, 45, 19, 5, 38, 43, 25, 90, 33, 54, 45, 58, 91, 26, 72, 59, 90, 58], [57, 23, 46, 56, 38, 75, 35, 81, 92, 15, 69, 75, 73, 74, 2, 25, 82, 15, 3, 66, 55, 50, 78, 42, 27, 20, 59, 82, 84, 99, 77, 60, 29, 87, 2, 93, 4, 73, 58, 75, 24, 91, 34, 60], [48, 16, 15, 20, 93, 77, 91, 76, 26, 29, 82, 81, 6, 17, 65, 78, 72, 13, 17, 21, 70, 68, 27, 5, 86, 42, 29, 93, 22, 85, 83, 47, 34, 71, 20, 66, 38, 51, 11, 98, 69, 33, 11, 61], [52, 98, 3, 21, 45, 88, 95, 71, 96, 74, 5, 34, 29, 25, 22, 4, 45, 34, 27, 34, 25, 6, 20, 64, 95, 6, 38, 70, 47, 12, 16, 31, 36, 69, 52, 3, 42, 99, 39, 51, 4, 83, 43, 89], [82, 5, 49, 81, 7, 20, 64, 69, 5, 76, 7, 66, 34, 32, 73, 21, 39, 84, 11, 79, 12, 75, 41, 22, 9, 55, 83, 58, 20, 91, 23, 55, 14, 41, 90, 34, 28, 82, 71, 31, 75, 97, 13, 70], [14, 38, 99, 57, 37, 89, 94, 35, 32, 3, 8, 80, 7, 36, 13, 14, 62, 18, 9, 65, 10, 62, 18, 23, 79, 18, 19, 27, 85, 5, 24, 89, 4, 18, 79, 55, 50, 53, 93, 98, 47, 79, 11, 44], [36, 45, 81, 66, 95, 20, 70, 67, 48, 14, 53, 71, 38, 92, 33, 65, 19, 93, 70, 82, 49, 39, 20, 99, 49, 26, 62, 14, 51, 43, 50, 67, 79, 71, 1, 79, 44, 88, 77, 29, 16, 17, 79, 37], [47, 63, 92, 95, 43, 92, 58, 38, 70, 7, 33, 6, 22, 24, 57, 14, 16, 99, 86, 58, 7, 60, 18, 86, 66, 12, 99, 35, 62, 84, 16, 64, 7, 64, 37, 26, 89, 95, 46, 22, 82, 41, 63, 81], [44, 45, 67, 38, 12, 94, 31, 12, 24, 7, 81, 14, 25, 88, 7, 44, 78, 20, 67, 49, 64, 52, 5, 3, 79, 95, 29, 50, 30, 76, 57, 35, 11, 10, 73, 35, 62, 92, 19, 47, 61, 2, 21, 18], [26, 32, 78, 90, 56, 43, 74, 23, 88, 4, 86, 76, 75, 51, 45, 76, 49, 47, 27, 34, 53, 44, 52, 31, 79, 34, 51, 75, 38, 20, 58, 29, 11, 42, 82, 67, 83, 48, 32, 6, 89, 88, 36, 2], [75, 60, 53, 13, 83, 51, 2, 9, 67, 24, 12, 85, 4, 11, 94, 3, 51, 30, 7, 13, 47, 80, 21, 11, 52, 13, 31, 99, 10, 60, 53, 8, 4, 86, 74, 41, 98, 64, 11, 4, 48, 55, 58, 8], [2, 30, 97, 44, 20, 75, 85, 39, 34, 37, 66, 61, 85, 96, 26, 13, 78, 59, 37, 25, 20, 50, 21, 90, 39, 22, 51, 9, 49, 2, 83, 89, 98, 11, 32, 91, 57, 83, 80, 23, 48, 62, 14, 20], [43, 87, 42, 65, 98, 57, 25, 16, 20, 23, 86, 8, 47, 82, 85, 56, 95, 80, 72, 83, 35, 17, 35, 51, 7, 64, 49, 87, 99, 37, 25, 55, 86, 58, 82, 59, 73, 4, 97, 76, 70, 36, 39, 51], [38, 79, 75, 87, 98, 4, 60, 71, 43, 12, 30, 59, 89, 91, 67, 85, 59, 74, 94, 10, 36, 88, 59, 15, 90, 20, 62, 67, 7, 65, 48, 85, 72, 42, 24, 33, 85, 37, 70, 8, 91, 33, 60, 36], [65, 64, 13, 60, 62, 41, 27, 90, 90, 72, 40, 55, 83, 31, 54, 47, 1, 86, 27, 93, 91, 95, 44, 56, 6, 72, 93, 67, 17, 24, 19, 52, 46, 25, 58, 37, 42, 71, 62, 96, 38, 4, 80, 44], [25, 70, 58, 20, 57, 12, 57, 29, 95, 36, 54, 63, 48, 92, 43, 87, 72, 58, 39, 85, 42, 53, 1, 7, 1, 56, 52, 4, 47, 50, 12, 4, 57, 9, 54, 72, 6, 50, 67, 1, 20, 88, 70, 59], [9, 39, 54, 75, 64, 97, 52, 37, 52, 22, 14, 87, 16, 69, 20, 85, 45, 43, 96, 14, 14, 12, 35, 79, 23, 85, 23, 27, 82, 1, 63, 1, 69, 26, 82, 14, 95, 30, 13, 87, 95, 73, 52, 18], [6, 50, 3, 2, 89, 32, 77, 57, 75, 12, 49, 25, 53, 14, 23, 77, 32, 40, 48, 25, 66, 28, 42, 86, 68, 80, 88, 40, 85, 24, 41, 64, 77, 8, 8, 72, 51, 86, 72, 58, 36, 95, 74, 34], [70, 93, 46, 18, 15, 36, 4, 3, 8, 86, 82, 87, 44, 93, 54, 95, 26, 25, 59, 81, 58, 14, 15, 60, 98, 87, 24, 59, 43, 3, 91, 91, 42, 37, 4, 88, 2, 96, 49, 93, 60, 87, 58, 23], [60, 63, 45, 25, 49, 83, 69, 50, 69, 72, 72, 60, 68, 66, 46, 20, 32, 31, 47, 72, 54, 64, 18, 96, 24, 99, 73, 31, 97, 28, 81, 36, 35, 87, 64, 97, 56, 11, 15, 58, 5, 99, 20, 91], [48, 71, 80, 56, 84, 33, 73, 39, 19, 51, 80, 90, 54, 22, 50, 30, 41, 22, 74, 29, 74, 16, 26, 75, 89, 31, 32, 73, 64, 89, 37, 87, 51, 20, 59, 41, 18, 23, 54, 53, 79, 87, 69, 72], [37, 2, 19, 48, 66, 62, 73, 81, 90, 78, 3, 66, 10, 49, 32, 44, 67, 24, 28, 63, 79, 25, 89, 59, 63, 55, 22, 92, 22, 9, 37, 36, 48, 88, 47, 92, 83, 44, 38, 60, 87, 67, 85, 10], [67, 95, 54, 94, 33, 72, 62, 96, 67, 16, 87, 35, 54, 38, 79, 59, 53, 57, 96, 51, 52, 78, 72, 22, 80, 86, 53, 38, 47, 72, 95, 22, 72, 10, 53, 95, 49, 22, 13, 12, 29, 50, 36, 60], [91, 79, 47, 95, 10, 98, 88, 93, 69, 89, 80, 90, 55, 17, 76, 40, 46, 42, 41, 56, 62, 40, 19, 87, 95, 46, 37, 61, 33, 96, 85, 83, 60, 37, 73, 55, 70, 56, 27, 42, 50, 32, 86, 97], [65, 30, 27, 47, 8, 3, 73, 16, 19, 68, 38, 37, 90, 62, 83, 12, 15, 34, 29, 26, 48, 90, 64, 28, 61, 17, 86, 10, 81, 92, 23, 75, 16, 97, 76, 89, 61, 4, 54, 92, 70, 91, 67, 92], [68, 8, 75, 73, 41, 37, 79, 63, 2, 96, 29, 18, 80, 66, 63, 88, 95, 13, 31, 83, 51, 56, 39, 69, 79, 9, 1, 84, 86, 66, 74, 27, 10, 35, 40, 96, 41, 42, 18, 95, 54, 74, 11, 71], [64, 45, 42, 50, 83, 34, 54, 55, 99, 11, 74, 78, 20, 29, 47, 41, 68, 12, 8, 14, 42, 63, 98, 55, 36, 20, 79, 75, 30, 57, 17, 75, 33, 39, 39, 4, 15, 39, 48, 32, 61, 13, 4, 5], [34, 40, 40, 57, 3, 45, 81, 4, 34, 43, 63, 51, 55, 65, 91, 29, 59, 9, 23, 90, 79, 80, 82, 24, 91, 31, 45, 76, 32, 91, 81, 59, 69, 92, 98, 54, 48, 48, 9, 54, 51, 52, 46, 72], [14, 30, 64, 76, 37, 19, 73, 70, 80, 21, 32, 65, 6, 82, 82, 63, 9, 84, 83, 18, 18, 72, 18, 34, 3, 69, 3, 40, 27, 4, 20, 6, 59, 41, 64, 5, 49, 1, 4, 48, 51, 3, 73, 98], [78, 67, 32, 90, 78, 32, 16, 15, 20, 39, 75, 80, 20, 67, 4, 6, 6, 45, 48, 97, 13, 39, 50, 4, 62, 92, 78, 12, 88, 89, 27, 69, 17, 59, 27, 79, 36, 66, 14, 81, 32, 68, 46, 77], [25, 26, 66, 77, 45, 94, 29, 69, 7, 55, 43, 41, 14, 68, 98, 98, 75, 81, 91, 93, 58, 36, 75, 16, 52, 95, 41, 76, 6, 2, 12, 50, 66, 7, 63, 24, 96, 36, 12, 47, 58, 86, 20, 8], [43, 30, 21, 45, 62, 76, 21, 12, 5, 98, 24, 39, 66, 8, 10, 47, 52, 62, 69, 33, 43, 63, 94, 47, 89, 35, 2, 97, 68, 27, 91, 67, 79, 76, 63, 44, 62, 26, 71, 41, 65, 11, 63, 68], [83, 26, 88, 87, 27, 89, 90, 44, 25, 11, 24, 51, 63, 87, 21, 47, 30, 87, 41, 10, 51, 68, 19, 99, 3, 60, 9, 1, 88, 96, 50, 51, 4, 7, 21, 19, 81, 12, 3, 68, 86, 76, 94, 27], [70, 20, 21, 16, 66, 54, 91, 72, 58, 19, 87, 21, 83, 86, 36, 55, 90, 93, 21, 99, 40, 83, 70, 10, 74, 29, 47, 2, 90, 40, 54, 7, 42, 58, 81, 86, 96, 50, 78, 91, 13, 8, 19, 75], [48, 77, 22, 83, 16, 42, 23, 23, 66, 28, 93, 6, 55, 33, 71, 80, 69, 45, 17, 65, 61, 36, 96, 88, 34, 91, 96, 16, 38, 82, 14, 46, 93, 30, 80, 71, 78, 32, 88, 10, 49, 64, 80, 71], [43, 22, 43, 14, 39, 21, 40, 9, 28, 58, 67, 37, 48, 21, 15, 23, 65, 37, 95, 9, 78, 72, 24, 15, 61, 34, 60, 71, 89, 67, 54, 12, 65, 93, 7, 33, 32, 66, 15, 77, 35, 49, 7, 37], [11, 94, 76, 42, 84, 60, 54, 9, 48, 62, 66, 29, 46, 66, 39, 5, 50, 42, 11, 70, 68, 44, 97, 32, 66, 78, 94, 30, 74, 62, 30, 9, 72, 93, 86, 56, 39, 33, 3, 69, 90, 82, 84, 52], [58, 42, 85, 13, 96, 49, 7, 2, 15, 63, 99, 30, 99, 61, 4, 70, 61, 2, 41, 89, 65, 73, 26, 81, 80, 99, 19, 60, 97, 47, 82, 52, 99, 46, 20, 64, 72, 76, 77, 87, 83, 71, 61, 27], [52, 73, 93, 29, 14, 16, 36, 20, 50, 20, 82, 46, 13, 97, 48, 91, 3, 64, 95, 94, 57, 80, 35, 72, 96, 88, 2, 90, 46, 85, 12, 85, 6, 72, 26, 43, 6, 23, 98, 98, 57, 5, 88, 33], [16, 41, 49, 59, 67, 92, 11, 44, 53, 79, 8, 47, 38, 89, 16, 59, 8, 57, 45, 87, 27, 63, 52, 23, 70, 22, 27, 95, 39, 42, 53, 70, 77, 14, 37, 66, 40, 42, 83, 19, 15, 51, 42, 31], [11, 64, 69, 92, 73, 96, 98, 93, 44, 68, 87, 34, 37, 60, 65, 74, 41, 20, 72, 60, 58, 91, 84, 58, 54, 16, 68, 88, 17, 9, 20, 10, 2, 24, 80, 41, 15, 99, 74, 19, 83, 88, 77, 97], [1, 23, 97, 64, 27, 1, 39, 25, 98, 41, 57, 7, 11, 26, 60, 53, 1, 88, 78, 45, 83, 1, 7, 43, 35, 34, 68, 40, 20, 64, 82, 66, 61, 46, 54, 50, 30, 55, 51, 83, 9, 47, 89, 94], [58, 17, 59, 16, 88, 29, 50, 63, 79, 86, 5, 74, 37, 36, 17, 23, 2, 55, 85, 19, 88, 94, 98, 10, 80, 3, 18, 2, 90, 24, 45, 95, 42, 7, 59, 46, 44, 93, 35, 30, 4, 89, 62, 45], [30, 12, 55, 36, 47, 2, 26, 57, 75, 42, 38, 56, 75, 95, 26, 95, 37, 73, 28, 31, 29, 46, 25, 96, 15, 77, 85, 19, 76, 71, 83, 23, 1, 93, 59, 94, 64, 45, 37, 9, 92, 92, 66, 5]], 35",
"False"
],
[
"[[65, 34, 26, 9, 37, 67, 53, 2, 72, 64, 94, 58, 2, 94, 35, 57, 91, 79, 54, 72, 39, 11, 27, 46, 26, 53, 1, 43, 93, 8, 32, 94, 4], [70, 74, 34, 17, 26, 35, 12, 1, 81, 4, 69, 57, 12, 53, 47, 75, 31, 54, 38, 4, 75, 27, 12, 68, 75, 76, 32, 30, 97, 65, 71, 82, 58], [55, 76, 56, 98, 18, 2, 69, 56, 84, 19, 8, 83, 11, 32, 19, 33, 18, 70, 85, 12, 21, 53, 84, 42, 79, 57, 48, 74, 4, 32, 56, 93, 25], [81, 46, 85, 84, 85, 1, 12, 93, 15, 95, 36, 6, 66, 53, 15, 15, 22, 13, 52, 78, 51, 78, 13, 12, 16, 6, 33, 46, 74, 60, 42, 23, 86], [24, 32, 97, 90, 96, 79, 70, 38, 1, 40, 31, 81, 50, 18, 5, 83, 71, 28, 59, 22, 85, 88, 9, 42, 42, 80, 1, 53, 69, 19, 28, 6, 7], [94, 36, 5, 98, 38, 21, 4, 80, 67, 31, 67, 25, 86, 20, 25, 51, 91, 81, 49, 36, 34, 90, 15, 17, 73, 93, 29, 64, 65, 69, 15, 99, 85], [51, 3, 38, 69, 97, 30, 29, 16, 18, 38, 53, 56, 27, 45, 82, 52, 93, 83, 38, 48, 58, 63, 75, 35, 57, 3, 64, 35, 91, 2, 3, 11, 17], [42, 87, 47, 48, 84, 66, 97, 47, 22, 24, 25, 13, 60, 82, 36, 33, 6, 21, 37, 70, 99, 46, 59, 7, 48, 43, 85, 61, 88, 23, 28, 62, 67], [39, 1, 60, 53, 83, 73, 88, 11, 94, 21, 35, 42, 70, 76, 11, 21, 37, 94, 77, 44, 16, 18, 11, 48, 23, 31, 88, 99, 47, 51, 5, 84, 39], [76, 36, 4, 40, 26, 32, 68, 98, 87, 61, 86, 9, 7, 19, 87, 82, 25, 89, 88, 17, 71, 90, 93, 96, 93, 38, 79, 40, 37, 39, 50, 78, 27], [93, 50, 25, 86, 64, 79, 31, 5, 2, 79, 17, 28, 43, 55, 75, 86, 80, 44, 40, 79, 22, 86, 76, 39, 29, 94, 55, 21, 58, 16, 11, 25, 3], [65, 46, 21, 53, 94, 31, 36, 95, 56, 15, 61, 79, 47, 91, 6, 3, 77, 58, 19, 1, 14, 3, 88, 14, 25, 26, 87, 31, 32, 92, 34, 1, 10], [32, 23, 80, 11, 71, 66, 61, 14, 5, 4, 20, 46, 14, 22, 46, 33, 79, 10, 23, 40, 27, 14, 53, 96, 36, 18, 88, 72, 21, 89, 54, 41, 15], [58, 51, 83, 78, 50, 9, 74, 89, 78, 45, 35, 48, 16, 22, 87, 98, 55, 14, 45, 66, 39, 69, 15, 63, 90, 99, 58, 71, 72, 58, 66, 60, 59], [75, 60, 51, 45, 94, 80, 68, 18, 55, 52, 91, 83, 75, 66, 82, 59, 25, 32, 60, 99, 55, 18, 44, 8, 47, 70, 23, 50, 47, 70, 7, 82, 75], [99, 87, 34, 94, 16, 25, 38, 55, 34, 47, 95, 19, 23, 33, 65, 4, 12, 69, 58, 37, 49, 64, 31, 15, 8, 81, 49, 21, 43, 17, 36, 69, 66], [36, 37, 27, 32, 39, 87, 14, 14, 20, 91, 54, 77, 73, 98, 84, 49, 31, 88, 35, 60, 64, 92, 11, 25, 83, 61, 81, 9, 17, 75, 41, 26, 9], [56, 72, 59, 52, 16, 37, 54, 75, 37, 61, 38, 68, 69, 30, 45, 88, 94, 90, 63, 37, 68, 93, 36, 66, 81, 75, 22, 26, 70, 1, 91, 57, 48], [12, 1, 43, 29, 13, 3, 73, 28, 90, 13, 17, 93, 52, 42, 98, 43, 50, 25, 73, 54, 77, 70, 68, 53, 34, 14, 36, 19, 74, 2, 3, 62, 91], [53, 16, 54, 88, 98, 49, 27, 72, 31, 44, 42, 79, 26, 27, 2, 29, 98, 49, 13, 86, 43, 39, 15, 35, 93, 47, 36, 30, 55, 50, 14, 6, 62], [78, 34, 23, 81, 13, 49, 39, 23, 3, 56, 41, 98, 47, 22, 13, 60, 99, 73, 1, 12, 63, 72, 96, 76, 28, 40, 41, 59, 78, 36, 67, 94, 80], [49, 16, 72, 51, 7, 35, 73, 49, 91, 86, 45, 12, 4, 60, 56, 32, 55, 92, 19, 93, 55, 11, 79, 31, 58, 36, 61, 16, 68, 36, 80, 2, 61], [5, 36, 19, 30, 33, 96, 99, 83, 98, 89, 30, 33, 31, 36, 31, 65, 94, 40, 31, 13, 42, 60, 66, 2, 74, 95, 41, 77, 59, 60, 23, 29, 50], [44, 80, 2, 23, 40, 79, 46, 11, 47, 85, 79, 1, 36, 61, 2, 56, 79, 51, 31, 3, 44, 76, 47, 12, 37, 43, 13, 43, 47, 2, 98, 56, 7], [16, 78, 74, 73, 14, 67, 14, 10, 48, 6, 18, 81, 76, 3, 95, 20, 59, 93, 2, 69, 49, 45, 12, 25, 31, 17, 37, 17, 9, 21, 88, 21, 10], [76, 93, 65, 22, 27, 8, 28, 66, 46, 92, 12, 73, 84, 28, 43, 95, 15, 83, 77, 90, 32, 85, 52, 89, 21, 82, 11, 21, 11, 98, 70, 31, 43], [44, 70, 41, 47, 92, 72, 99, 44, 62, 51, 70, 76, 10, 37, 50, 27, 39, 42, 81, 59, 82, 41, 33, 57, 57, 4, 14, 34, 95, 59, 33, 16, 2], [22, 63, 34, 90, 6, 55, 79, 36, 55, 52, 96, 12, 19, 95, 26, 58, 31, 41, 77, 55, 25, 22, 13, 64, 39, 2, 53, 77, 70, 60, 40, 99, 14], [81, 48, 68, 96, 21, 87, 19, 85, 97, 55, 12, 43, 26, 17, 74, 82, 37, 66, 79, 27, 39, 8, 33, 69, 69, 51, 64, 64, 65, 55, 69, 40, 64], [87, 40, 17, 98, 18, 93, 65, 49, 93, 30, 55, 5, 70, 42, 31, 1, 23, 72, 23, 4, 25, 27, 77, 39, 19, 20, 89, 83, 70, 31, 97, 14, 67], [13, 48, 77, 97, 13, 89, 48, 57, 27, 18, 84, 78, 58, 84, 73, 45, 97, 6, 12, 27, 63, 83, 59, 51, 75, 15, 28, 89, 14, 24, 34, 91, 77], [92, 66, 37, 4, 47, 78, 71, 32, 83, 73, 64, 91, 27, 29, 83, 9, 39, 58, 80, 63, 43, 59, 14, 22, 75, 40, 39, 66, 91, 12, 83, 94, 59], [76, 33, 76, 72, 72, 20, 38, 51, 14, 15, 85, 73, 91, 6, 11, 38, 69, 33, 33, 80, 82, 48, 38, 10, 66, 80, 57, 74, 23, 85, 93, 17, 63]], 30",
"False"
],
[
"[[20, 59, 92, 38, 68, 74, 80, 12, 75, 17, 90, 28, 32, 68, 51, 92, 9, 87, 92, 42, 1, 58, 4, 54, 95, 81, 87, 47, 29, 71, 32], [91, 56, 90, 35, 34, 99, 8, 1, 13, 48, 11, 13, 98, 49, 66, 59, 93, 31, 94, 67, 76, 95, 12, 9, 3, 97, 74, 32, 52, 88, 51], [78, 15, 37, 60, 60, 51, 19, 57, 62, 95, 22, 82, 60, 17, 70, 11, 38, 99, 11, 81, 53, 98, 69, 80, 85, 22, 66, 18, 6, 85, 35], [61, 35, 21, 18, 30, 38, 26, 82, 1, 31, 86, 8, 68, 82, 95, 73, 51, 5, 27, 97, 67, 64, 52, 15, 59, 45, 36, 76, 75, 94, 96], [84, 55, 25, 87, 88, 21, 76, 60, 54, 69, 74, 12, 36, 77, 84, 1, 34, 16, 19, 69, 34, 75, 97, 87, 13, 52, 38, 9, 75, 94, 14], [47, 82, 61, 86, 67, 43, 66, 51, 25, 35, 15, 48, 16, 93, 50, 91, 44, 57, 52, 56, 3, 11, 97, 92, 25, 37, 99, 14, 68, 34, 64], [31, 12, 98, 9, 45, 80, 4, 61, 55, 46, 38, 31, 40, 42, 27, 53, 49, 59, 20, 19, 62, 16, 9, 52, 95, 75, 87, 70, 96, 90, 74], [88, 20, 61, 40, 55, 58, 43, 50, 34, 77, 73, 86, 17, 24, 98, 56, 14, 47, 41, 90, 41, 32, 63, 66, 88, 57, 6, 66, 20, 9, 26], [16, 54, 1, 53, 79, 34, 12, 30, 7, 23, 9, 46, 40, 45, 3, 44, 83, 99, 63, 56, 38, 76, 82, 11, 18, 59, 88, 74, 42, 21, 44], [38, 50, 80, 48, 98, 72, 60, 51, 67, 96, 55, 70, 71, 70, 87, 87, 12, 42, 87, 65, 19, 14, 20, 19, 84, 32, 21, 48, 30, 23, 58], [7, 23, 15, 17, 86, 87, 76, 92, 19, 13, 15, 21, 65, 52, 12, 37, 74, 19, 13, 33, 73, 60, 39, 50, 37, 32, 62, 58, 10, 20, 31], [69, 27, 28, 76, 93, 14, 24, 96, 83, 94, 77, 47, 14, 11, 39, 86, 40, 24, 69, 30, 45, 24, 9, 24, 93, 32, 3, 86, 87, 61, 87], [47, 83, 78, 32, 86, 32, 92, 82, 10, 76, 45, 83, 6, 77, 91, 63, 78, 24, 86, 61, 90, 51, 44, 88, 11, 81, 90, 33, 17, 23, 97], [84, 97, 32, 2, 6, 19, 17, 53, 25, 60, 15, 42, 17, 76, 86, 35, 29, 28, 69, 95, 60, 92, 6, 31, 80, 21, 2, 52, 14, 46, 32], [1, 71, 62, 39, 44, 88, 75, 39, 9, 53, 48, 76, 63, 27, 69, 71, 22, 89, 15, 25, 1, 75, 39, 75, 31, 86, 52, 29, 38, 64, 76], [48, 70, 75, 49, 76, 5, 82, 72, 83, 58, 66, 43, 25, 87, 73, 6, 9, 87, 42, 47, 82, 43, 71, 19, 7, 17, 61, 78, 44, 3, 31], [78, 89, 29, 56, 19, 7, 68, 28, 81, 68, 91, 88, 41, 98, 8, 3, 12, 11, 85, 78, 1, 21, 19, 69, 32, 72, 62, 9, 26, 20, 14], [94, 60, 73, 46, 60, 12, 21, 21, 47, 91, 56, 74, 88, 76, 60, 84, 10, 38, 4, 23, 20, 46, 59, 8, 19, 51, 14, 6, 15, 25, 69], [4, 48, 57, 98, 25, 86, 76, 78, 66, 21, 16, 71, 18, 65, 95, 33, 10, 7, 50, 21, 81, 52, 30, 92, 15, 40, 7, 20, 90, 1, 9], [92, 58, 71, 51, 54, 56, 57, 21, 32, 7, 54, 97, 57, 32, 71, 81, 51, 25, 82, 81, 35, 25, 45, 69, 82, 20, 31, 77, 20, 70, 17], [55, 96, 60, 73, 88, 63, 2, 90, 14, 37, 9, 94, 55, 44, 55, 96, 84, 54, 20, 90, 6, 54, 34, 7, 16, 58, 58, 88, 72, 44, 68], [98, 72, 10, 44, 74, 20, 96, 24, 85, 9, 23, 58, 7, 32, 30, 65, 75, 28, 57, 25, 37, 61, 94, 38, 5, 45, 86, 77, 55, 50, 23], [9, 43, 13, 86, 41, 42, 4, 64, 59, 31, 90, 68, 99, 93, 10, 88, 89, 83, 84, 95, 52, 25, 99, 95, 75, 1, 27, 99, 92, 61, 95], [23, 9, 95, 28, 79, 76, 53, 1, 13, 47, 30, 14, 81, 43, 84, 84, 99, 77, 44, 52, 47, 35, 90, 64, 77, 47, 66, 32, 77, 96, 40], [53, 27, 68, 47, 54, 21, 53, 24, 38, 1, 85, 65, 33, 50, 32, 60, 37, 6, 54, 15, 78, 35, 98, 88, 73, 32, 84, 10, 31, 79, 55], [45, 44, 77, 84, 86, 83, 10, 64, 60, 57, 20, 71, 9, 92, 78, 61, 29, 62, 63, 39, 49, 58, 88, 5, 25, 61, 59, 55, 39, 12, 9], [12, 35, 58, 74, 10, 97, 46, 66, 22, 77, 6, 87, 64, 20, 55, 65, 68, 10, 15, 51, 24, 96, 93, 36, 5, 20, 59, 3, 22, 76, 18], [29, 27, 6, 76, 52, 73, 81, 12, 7, 55, 18, 30, 81, 15, 86, 93, 48, 40, 63, 78, 8, 5, 79, 83, 93, 78, 91, 7, 94, 7, 83], [10, 29, 80, 26, 28, 72, 4, 94, 69, 37, 89, 26, 40, 78, 22, 1, 99, 4, 73, 79, 51, 89, 83, 79, 30, 41, 17, 71, 10, 32, 99], [39, 61, 3, 58, 92, 51, 77, 76, 79, 30, 44, 5, 30, 3, 95, 15, 50, 89, 39, 73, 53, 82, 1, 18, 76, 99, 29, 65, 75, 32, 32], [38, 40, 23, 94, 62, 91, 94, 42, 32, 52, 10, 23, 51, 7, 77, 52, 86, 13, 65, 12, 25, 26, 84, 32, 19, 36, 94, 91, 48, 50, 11]], 25",
"False"
],
[
"[[93, 83, 42, 36, 3, 96, 99, 4, 83, 84, 92, 19, 69, 39, 25, 37, 46, 22, 48, 91, 51, 83, 1, 5, 31, 15, 80, 59, 40, 93, 95], [54, 11, 90, 56, 27, 57, 45, 62, 95, 13, 85, 33, 86, 20, 39, 58, 72, 86, 29, 60, 14, 95, 58, 85, 72, 58, 90, 6, 73, 96, 83], [33, 22, 85, 19, 97, 11, 52, 56, 85, 45, 6, 97, 69, 99, 37, 43, 16, 45, 91, 6, 44, 85, 1, 20, 38, 8, 8, 43, 76, 88, 25], [69, 43, 13, 63, 41, 26, 51, 26, 83, 20, 65, 38, 60, 76, 13, 80, 51, 90, 70, 63, 88, 47, 82, 52, 15, 55, 98, 12, 36, 21, 81], [2, 91, 37, 21, 77, 38, 47, 83, 46, 50, 21, 80, 13, 54, 53, 31, 44, 94, 85, 47, 20, 54, 23, 60, 86, 86, 56, 35, 86, 88, 18], [46, 75, 65, 1, 94, 23, 37, 13, 73, 70, 90, 44, 12, 54, 50, 69, 28, 80, 64, 10, 44, 71, 6, 68, 63, 79, 22, 10, 96, 19, 95], [13, 71, 30, 9, 50, 85, 17, 41, 16, 58, 27, 14, 25, 59, 51, 15, 48, 61, 50, 15, 39, 7, 79, 49, 43, 21, 28, 32, 60, 5, 8], [40, 81, 37, 19, 62, 87, 90, 26, 23, 70, 64, 89, 35, 10, 1, 50, 94, 20, 75, 48, 62, 41, 59, 43, 38, 78, 4, 44, 37, 73, 16], [97, 37, 78, 7, 32, 92, 29, 80, 85, 68, 52, 98, 15, 27, 54, 46, 37, 33, 40, 20, 72, 68, 50, 49, 50, 22, 52, 96, 94, 54, 29], [35, 66, 92, 81, 84, 52, 72, 10, 3, 52, 10, 22, 25, 14, 22, 43, 78, 75, 95, 55, 11, 95, 93, 14, 16, 81, 14, 82, 61, 82, 7], [92, 56, 47, 97, 57, 39, 82, 67, 14, 63, 49, 24, 27, 33, 12, 98, 16, 70, 55, 13, 12, 29, 59, 8, 15, 78, 60, 94, 36, 50, 79], [79, 56, 75, 54, 90, 10, 59, 53, 87, 86, 48, 65, 9, 10, 5, 55, 35, 37, 75, 75, 72, 63, 41, 43, 96, 33, 51, 49, 55, 97, 89], [51, 24, 59, 88, 43, 51, 67, 10, 84, 22, 15, 62, 77, 24, 75, 34, 97, 71, 3, 46, 38, 59, 82, 53, 52, 69, 2, 57, 21, 89, 88], [33, 49, 78, 9, 9, 85, 92, 47, 9, 36, 67, 24, 14, 66, 72, 45, 11, 49, 2, 44, 87, 98, 3, 28, 15, 22, 42, 30, 28, 26, 45], [30, 97, 41, 94, 2, 35, 30, 83, 75, 35, 77, 12, 40, 15, 9, 39, 64, 47, 63, 92, 54, 33, 23, 4, 3, 42, 32, 55, 16, 46, 20], [11, 80, 79, 61, 36, 97, 56, 15, 15, 5, 55, 11, 96, 66, 51, 51, 99, 45, 55, 77, 33, 49, 91, 96, 58, 10, 53, 69, 12, 6, 6], [23, 73, 85, 83, 94, 51, 28, 20, 39, 36, 50, 60, 74, 68, 38, 30, 65, 71, 78, 69, 78, 87, 26, 49, 20, 44, 10, 72, 97, 1, 17], [12, 50, 96, 79, 8, 43, 71, 63, 13, 88, 21, 13, 62, 80, 42, 85, 19, 53, 97, 62, 21, 75, 86, 78, 91, 35, 88, 9, 3, 73, 28], [28, 62, 83, 54, 34, 11, 79, 29, 20, 74, 75, 68, 46, 22, 4, 59, 89, 29, 24, 56, 8, 49, 12, 87, 89, 95, 90, 21, 48, 39, 29], [98, 88, 4, 74, 67, 38, 35, 65, 58, 36, 35, 24, 59, 12, 49, 92, 84, 27, 56, 81, 48, 43, 73, 65, 51, 84, 39, 93, 56, 24, 94], [94, 92, 81, 45, 74, 80, 98, 72, 40, 20, 41, 34, 23, 59, 59, 28, 83, 13, 23, 74, 12, 89, 90, 82, 2, 12, 49, 50, 51, 2, 52], [29, 74, 58, 85, 1, 37, 5, 66, 26, 58, 7, 84, 70, 73, 16, 6, 98, 87, 51, 49, 87, 89, 24, 30, 80, 16, 76, 50, 6, 74, 9], [14, 96, 38, 81, 29, 8, 19, 75, 17, 83, 63, 5, 57, 46, 3, 52, 46, 47, 94, 96, 18, 22, 77, 14, 9, 60, 94, 50, 7, 37, 30], [85, 76, 84, 18, 58, 48, 45, 54, 93, 16, 10, 22, 30, 5, 62, 51, 18, 44, 27, 23, 55, 56, 28, 58, 13, 14, 6, 85, 32, 25, 30], [70, 19, 93, 74, 98, 7, 55, 67, 38, 49, 77, 85, 37, 65, 80, 83, 67, 15, 99, 71, 51, 81, 25, 77, 65, 37, 62, 80, 8, 78, 48], [1, 76, 42, 12, 54, 26, 18, 30, 9, 61, 74, 7, 58, 5, 48, 43, 41, 18, 70, 24, 8, 15, 41, 47, 46, 44, 9, 95, 82, 24, 3], [17, 28, 29, 45, 1, 80, 41, 27, 18, 50, 1, 43, 84, 92, 19, 18, 23, 2, 68, 7, 18, 27, 32, 9, 65, 85, 21, 33, 89, 74, 72], [98, 66, 13, 88, 97, 14, 26, 83, 71, 6, 59, 65, 34, 10, 39, 78, 45, 95, 70, 22, 89, 93, 98, 58, 63, 80, 93, 98, 31, 73, 85], [56, 76, 20, 78, 84, 26, 43, 32, 39, 14, 64, 37, 99, 54, 44, 6, 98, 26, 9, 29, 78, 19, 41, 51, 33, 37, 33, 93, 55, 93, 42], [56, 29, 87, 54, 47, 91, 90, 47, 11, 43, 63, 8, 53, 88, 76, 63, 87, 41, 64, 81, 39, 85, 74, 56, 4, 3, 58, 86, 20, 85, 53], [64, 65, 80, 69, 83, 7, 3, 64, 27, 52, 18, 45, 3, 51, 86, 16, 59, 73, 4, 48, 47, 20, 20, 34, 74, 40, 16, 37, 30, 86, 93]], 29",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) {
for ( int i = 0;
i < n1;
i ++ ) for ( int j = 0;
j < n2;
j ++ ) for ( int k = 0;
k < n3;
k ++ ) if ( a1 [ i ] + a2 [ j ] + a3 [ k ] == sum ) return true;
return false;
}
| [] | null | [] | DYNAMIC_PROGRAMMING_SET_37_BOOLEAN_PARENTHESIZATION_PROBLEM | python | [] | def f_gold ( symb , oper , n ) :
F = [ [ 0 for i in range ( n + 1 ) ] for i in range ( n + 1 ) ]
T = [ [ 0 for i in range ( n + 1 ) ] for i in range ( n + 1 ) ]
for i in range ( n ) :
if symb [ i ] == 'F' :
F [ i ] [ i ] = 1
else :
F [ i ] [ i ] = 0
if symb [ i ] == 'T' :
T [ i ] [ i ] = 1
else :
T [ i ] [ i ] = 0
for gap in range ( 1 , n ) :
i = 0
for j in range ( gap , n ) :
T [ i ] [ j ] = F [ i ] [ j ] = 0
for g in range ( gap ) :
k = i + g
tik = T [ i ] [ k ] + F [ i ] [ k ] ;
tkj = T [ k + 1 ] [ j ] + F [ k + 1 ] [ j ] ;
if oper [ k ] == '&' :
T [ i ] [ j ] += T [ i ] [ k ] * T [ k + 1 ] [ j ]
F [ i ] [ j ] += ( tik * tkj - T [ i ] [ k ] * T [ k + 1 ] [ j ] )
if oper [ k ] == '|' :
F [ i ] [ j ] += F [ i ] [ k ] * F [ k + 1 ] [ j ]
T [ i ] [ j ] += ( tik * tkj - F [ i ] [ k ] * F [ k + 1 ] [ j ] )
if oper [ k ] == '^' :
T [ i ] [ j ] += ( F [ i ] [ k ] * T [ k + 1 ] [ j ] + T [ i ] [ k ] * F [ k + 1 ] [ j ] )
F [ i ] [ j ] += ( T [ i ] [ k ] * T [ k + 1 ] [ j ] + F [ i ] [ k ] * F [ k + 1 ] [ j ] )
i += 1
return T [ 0 ] [ n - 1 ]
| code_translation | [
[
"'TTFT', '|&^', 4",
"4"
],
[
"'TFT', '^&', 3",
"2"
],
[
"'TFF', '^|', 3",
"2"
],
[
"'TTFT', '|||', 4",
"5"
],
[
"'TTFT', '&&&', 4",
"0"
],
[
"'TTFT', '&&^', 4",
"5"
],
[
"'TTFT', '^&|', 4",
"2"
],
[
"'TTFT', '^^^', 4",
"5"
],
[
"'TTFT', '^||', 4",
"3"
],
[
"'TTFT', '|^|', 4",
"4"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int x, int y ) {
x = x % 10;
if ( y != 0 ) y = y % 4 + 4;
return ( ( ( int ) ( pow ( x, y ) ) ) % 10 );
}
| [
"from math import sqrt"
] | null | [] | PROGRAM_TO_FIND_THE_AREA_OF_PENTAGON | python | [] | from math import sqrt
def f_gold ( a ) :
area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4
return area
| code_translation | [
[
"2009.019461888707",
"6944120.6857642615"
],
[
"-1480.5131394215787",
"3771147.371815937"
],
[
"357.7870347569567",
"220240.9998483103"
],
[
"-8040.293697508038",
"111222537.30911414"
],
[
"3821.882657293133",
"25130647.008061722"
],
[
"-6840.635072240347",
"80508515.3102342"
],
[
"1623.036598830132",
"4532163.809416133"
],
[
"-9714.00706195298",
"162347573.54592204"
],
[
"3916.454769669618",
"26389745.561382204"
],
[
"-669.068424712943",
"770176.1075446572"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int base ) {
base = ( base - 2 );
base = base / 2;
return base * ( base + 1 ) / 2;
}
| [] | null | [] | MAXIMUM_CONSECUTIVE_NUMBERS_PRESENT_ARRAY | python | [] | def f_gold ( arr , n ) :
S = set ( ) ;
for i in range ( n ) :
S.add ( arr [ i ] ) ;
ans = 0 ;
for i in range ( n ) :
if S.__contains__ ( arr [ i ] ) :
j = arr [ i ] ;
while ( S.__contains__ ( j ) ) :
j += 1 ;
ans = max ( ans , j - arr [ i ] ) ;
return ans ;
| code_translation | [
[
"[3, 5, 9, 24, 28, 31, 49, 54, 67, 85, 86, 94, 97, 97], 11",
"2"
],
[
"[-34, 16, -80, -10, 80, 2, 50, -74, -76, 36, -84, -24, 74, -54, -22, 46, 80, 58, -8, 70, 24, -88, 52, 62, 30, 42, 48, 16, 78, -82, 64, -36, 84, -72], 29",
"1"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13",
"2"
],
[
"[49, 61, 68, 4, 90, 89, 71, 74, 45, 61, 35, 41, 59], 11",
"2"
],
[
"[-42, -8, 28, 56, 80, 96], 4",
"1"
],
[
"[1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1], 17",
"2"
],
[
"[3, 4, 6, 6, 13, 27, 27, 29, 32, 36, 46, 50, 52, 65, 69, 70, 71, 83, 87, 91], 10",
"2"
],
[
"[64, -76, 28, 6, 56, 18, 32, -50, -20, 18, -26, -90, 32, 50, -18, 98, 84, 40, 50, 88, -70, -6, -24, -44, -96, -58, 48, -78, -14], 15",
"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], 15",
"1"
],
[
"[50, 48, 61, 87, 7, 78, 93, 44, 16, 88, 98, 15, 73, 93, 43, 46, 42, 34, 1, 35, 79, 35, 84, 60, 18, 79, 17, 4, 78, 1, 20, 64], 25",
"3"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int p ) {
long long checkNumber = pow ( 2, p ) - 1;
long long nextval = 4 % checkNumber;
for ( int i = 1;
i < p - 1;
i ++ ) nextval = ( nextval * nextval - 2 ) % checkNumber;
return ( nextval == 0 );
}
| [] | null | [] | LARGEST_SUM_CONTIGUOUS_SUBARRAY_2 | python | [] | def f_gold ( a , size ) :
max_so_far = a [ 0 ]
curr_max = a [ 0 ]
for i in range ( 1 , size ) :
curr_max = max ( a [ i ] , curr_max + a [ i ] )
max_so_far = max ( max_so_far , curr_max )
return max_so_far
| code_translation | [
[
"[1, 3, 4, 7, 8, 8, 10, 12, 16, 19, 19, 20, 20, 21, 21, 22, 26, 27, 29, 34, 36, 38, 38, 39, 41, 43, 44, 47, 47, 49, 57, 57, 60, 62, 63, 65, 75, 77, 77, 78, 81, 82, 82, 83, 83, 84, 85, 98, 99], 38",
"1265"
],
[
"[-40, 14, 2, -70, 86, -90, -50, -54, -2, 90, 30], 10",
"90"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 18",
"11"
],
[
"[60, 69, 41, 7, 77, 36, 36, 26, 35, 30, 64, 75, 3, 35, 60, 71, 29, 47, 15, 29, 43, 88, 56, 22, 9, 45, 40, 50, 52], 25",
"1063"
],
[
"[-96, -88, -80, -72, -64, -64, -60, -60, -60, -58, -56, -54, -54, -50, -50, -26, -26, -24, -20, -8, -2, 0, 4, 4, 12, 14, 18, 18, 24, 32, 42, 44, 44, 44, 48, 50, 50, 56, 60, 60, 70, 80, 88, 88, 90, 98], 35",
"348"
],
[
"[0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0], 22",
"13"
],
[
"[2, 4, 4, 5, 6, 7, 11, 12, 14, 18, 23, 24, 27, 28, 33, 36, 37, 38, 39, 40, 41, 41, 48, 48, 52, 61, 64, 66, 66, 77, 79, 82, 85, 88, 91, 94, 99], 34",
"1306"
],
[
"[-56, 0, 16, 12, 20, 36, 32, -52, -68, -36, -96, -46, -34, 56, 2, 78, 6, 30, -68, -48, 2, 44, -26, -36, -30, -20, -90, -66, 4, 94, 8, 4, -4, -32, -24], 20",
"172"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 22",
"10"
],
[
"[39, 87, 27, 89, 26, 25, 80, 82, 21, 25, 55, 27, 20, 81, 47, 79, 26, 72, 10, 11, 90, 89], 21",
"1019"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int A [ ], int n ) {
int min_val = * min_element ( A, A + n );
return ( min_val * ( n - 1 ) );
}
| [] | null | [] | MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY_2 | python | [] | def f_gold ( a , n ) :
a = sorted ( a )
num1 , num2 = 0 , 0
for i in range ( n ) :
if i % 2 == 0 :
num1 = num1 * 10 + a [ i ]
else :
num2 = num2 * 10 + a [ i ]
return num2 + num1
| code_translation | [
[
"[4, 16, 29, 30, 38, 83], 5",
"918"
],
[
"[58, 74, -28, -60, -6, 66, -76, 46, 0, -24, 28, -16, -14, 24, -94, -56, -80, 40, -18, -68, -8, -94, -88, -12, -20, -8], 16",
"-2063616120"
],
[
"[0, 1], 1",
"0"
],
[
"[7, 12, 78, 8], 3",
"90"
],
[
"[-78, -48, -48, -26, 8, 34], 4",
"-1334"
],
[
"[1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0], 27",
"2222222"
],
[
"[2, 3, 5, 7, 25, 30, 31, 38, 42, 45, 52, 53, 56, 59, 60, 71, 74, 76, 80, 90, 91, 98], 13",
"3190079"
],
[
"[40, -62, -2, -58, 60, 38, 48, -4, 0, 62, -52, -80, 56, 38, 58, -72, 32, -26, -14, 70, 58, -86, -32, 56, -40, 84, 24, 60, -46, -32, 78, 78, -66, 20, -32, 98, 84, 44, 48, 4, 54, -66, 6, -62, 58], 34",
"-1812105880527545186"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1], 8",
"2"
],
[
"[59, 9, 3, 20, 83, 87, 48, 4, 86, 67, 89, 96, 17, 36, 39, 45, 99, 8, 56, 92, 63, 81, 7, 75, 32, 10, 71, 82, 97, 92, 65, 23, 22, 47, 70, 79, 57, 81, 65, 50], 35",
"430183530665338166"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int m, int n ) {
int T [ m + 1 ] [ n + 1 ];
for ( int i = 0;
i < m + 1;
i ++ ) {
for ( int j = 0;
j < n + 1;
j ++ ) {
if ( i == 0 || j == 0 ) T [ i ] [ j ] = 0;
else if ( i < j ) T [ i ] [ j ] = 0;
else if ( j == 1 ) T [ i ] [ j ] = i;
else T [ i ] [ j ] = T [ i - 1 ] [ j ] + T [ i / 2 ] [ j - 1 ];
}
}
return T [ m ] [ n ];
}
| [] | null | [] | MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC | python | [] | def f_gold ( x , y , p ) :
res = 1
x = x % p
while ( y > 0 ) :
if ( ( y & 1 ) == 1 ) :
res = ( res * x ) % p
y = y >> 1
x = ( x * x ) % p
return res
| code_translation | [
[
"45, 5, 68",
"61"
],
[
"67, 25, 49",
"18"
],
[
"26, 91, 44",
"4"
],
[
"33, 61, 9",
"0"
],
[
"35, 8, 13",
"3"
],
[
"68, 41, 5",
"3"
],
[
"14, 76, 20",
"16"
],
[
"5, 89, 13",
"5"
],
[
"23, 42, 45",
"19"
],
[
"37, 63, 56",
"29"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int ar1 [ ], int ar2 [ ], int n ) {
int i = 0;
int j = 0;
int count;
int m1 = - 1, m2 = - 1;
for ( count = 0;
count <= n;
count ++ ) {
if ( i == n ) {
m1 = m2;
m2 = ar2 [ 0 ];
break;
}
else if ( j == n ) {
m1 = m2;
m2 = ar1 [ 0 ];
break;
}
if ( ar1 [ i ] < ar2 [ j ] ) {
m1 = m2;
m2 = ar1 [ i ];
i ++;
}
else {
m1 = m2;
m2 = ar2 [ j ];
j ++;
}
}
return ( m1 + m2 ) / 2;
}
| [] | null | [] | WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER | python | [] | def f_gold ( n ) :
parity = 0
while n :
parity = ~ parity
n = n & ( n - 1 )
return parity
| code_translation | [
[
"63",
"0"
],
[
"64",
"-1"
],
[
"85",
"0"
],
[
"36",
"0"
],
[
"20",
"0"
],
[
"63",
"0"
],
[
"42",
"-1"
],
[
"19",
"-1"
],
[
"62",
"-1"
],
[
"97",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b ) {
if ( a == b ) return a;
if ( a == 0 ) return b;
if ( b == 0 ) return a;
if ( ~ a & 1 ) {
if ( b & 1 ) return f_gold ( a >> 1, b );
else return f_gold ( a >> 1, b >> 1 ) << 1;
}
if ( ~ b & 1 ) return f_gold ( a, b >> 1 );
if ( a > b ) return f_gold ( ( a - b ) >> 1, b );
return f_gold ( ( b - a ) >> 1, a );
}
| [] | null | [] | SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_1 | python | [] | def f_gold ( n ) :
p = 1
if ( n and not ( n & ( n - 1 ) ) ) :
return n
while ( p < n ) :
p <<= 1
return p ;
| code_translation | [
[
"31",
"32"
],
[
"89",
"128"
],
[
"92",
"128"
],
[
"66",
"128"
],
[
"38",
"64"
],
[
"34",
"64"
],
[
"17",
"32"
],
[
"24",
"32"
],
[
"54",
"64"
],
[
"20",
"32"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int x ) {
int dp [ x + 1 ];
dp [ 0 ] = dp [ 1 ] = 1;
for ( int i = 2;
i <= x;
i ++ ) dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ];
return dp [ x ];
}
| [] | null | [] | K_TH_MISSING_ELEMENT_INCREASING_SEQUENCE_NOT_PRESENT_GIVEN_SEQUENCE | python | [] | def f_gold ( a , b , k , n1 , n2 ) :
s = set ( )
for i in range ( n2 ) :
s.add ( b [ i ] )
missing = 0
for i in range ( n1 ) :
if a [ i ] not in s :
missing += 1
if missing == k :
return a [ i ]
return - 1
| code_translation | [
[
"[2, 9, 9, 13, 38, 41, 50, 59, 64, 64, 72, 78, 79, 80, 84, 92, 94, 98, 99], [5, 9, 11, 21, 24, 27, 30, 35, 38, 39, 40, 45, 48, 48, 51, 58, 61, 91, 92], 11, 9, 18",
"-1"
],
[
"[-54, -80, -62, 98, -68, 42, 98, 80, -8, -6, 26, 0, -60, -24, -74, -48, 4, -54, 20, 32, 42, 68, -50, 58, -50, 96, -34, 22, 56, -60, -10, -18, 80, 20, -50], [90, -86, -82, 92, -42, -34, 10, -28, -78, 8, 66, 96, -16, -22, -68, -36, -72, 84, -54, -44, -80, -30, 64, 10, -60, -90, 22, 54, -88, 74, -56, 22, -24, -52, 82], 24, 24, 21",
"-1"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 15, 15, 11",
"-1"
],
[
"[85, 44, 60, 86, 26, 22, 95, 47, 43, 24, 30, 37, 22, 33, 6, 56], [66, 76, 38, 91, 57, 50, 12, 21, 90, 17, 18, 78, 23, 12, 90, 81], 12, 14, 10",
"37"
],
[
"[-32, -18, 2, 54, 72, 92, 94], [-76, -68, -34, -24, 8, 12, 32], 6, 3, 5",
"-1"
],
[
"[1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0], 29, 29, 37",
"-1"
],
[
"[3, 9, 13, 14, 16, 19, 20, 21, 23, 26, 27, 27, 28, 29, 31, 36, 37, 38, 41, 42, 45, 46, 52, 56, 63, 65, 70, 70, 72, 72, 76, 77, 78, 78, 79, 82, 83, 86, 87, 87, 90, 93, 93, 94, 96, 96, 97, 98], [2, 5, 6, 7, 9, 11, 11, 13, 17, 18, 20, 20, 26, 27, 35, 35, 36, 37, 41, 42, 45, 46, 48, 49, 50, 50, 54, 54, 56, 60, 62, 63, 65, 67, 68, 68, 70, 72, 74, 74, 78, 79, 80, 80, 86, 89, 97, 99], 27, 39, 28",
"87"
],
[
"[-82, -62], [48, 32], 1, 1, 1",
"-82"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 14, 12",
"-1"
],
[
"[26, 5, 60, 53, 35], [41, 80, 35, 14, 47], 3, 2, 3",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int arr [ ], int n, int x ) {
int i;
for ( i = 0;
i < n - 1;
i ++ ) if ( arr [ i ] > arr [ i + 1 ] ) break;
int l = ( i + 1 ) % n;
int r = i;
while ( l != r ) {
if ( arr [ l ] + arr [ r ] == x ) return true;
if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n;
else r = ( n + r - 1 ) % n;
}
return false;
}
| [] | null | [] | SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS | python | [] | def f_gold ( n ) :
arr = [ [ 0 for x in range ( n ) ] for y in range ( n ) ]
for i in range ( n ) :
for j in range ( n ) :
arr [ i ] [ j ] = abs ( i - j )
sum = 0
for i in range ( n ) :
for j in range ( n ) :
sum += arr [ i ] [ j ]
return sum
| code_translation | [
[
"60",
"71980"
],
[
"44",
"28380"
],
[
"72",
"124392"
],
[
"90",
"242970"
],
[
"99",
"323400"
],
[
"45",
"30360"
],
[
"27",
"6552"
],
[
"11",
"440"
],
[
"65",
"91520"
],
[
"52",
"46852"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int p [ ], int n ) {
int m [ n ] [ n ];
int i, j, k, L, q;
for ( i = 1;
i < n;
i ++ ) m [ i ] [ i ] = 0;
for ( L = 2;
L < n;
L ++ ) {
for ( i = 1;
i < n - L + 1;
i ++ ) {
j = i + L - 1;
m [ i ] [ j ] = INT_MAX;
for ( k = i;
k <= j - 1;
k ++ ) {
q = m [ i ] [ k ] + m [ k + 1 ] [ j ] + p [ i - 1 ] * p [ k ] * p [ j ];
if ( q < m [ i ] [ j ] ) m [ i ] [ j ] = q;
}
}
}
return m [ 1 ] [ n - 1 ];
}
| [] | null | [] | WRITE_YOU_OWN_POWER_WITHOUT_USING_MULTIPLICATION_AND_DIVISION | python | [] | def f_gold ( a , b ) :
if ( b == 0 ) :
return 1
answer = a
increment = a
for i in range ( 1 , b ) :
for j in range ( 1 , a ) :
answer += increment
increment = answer
return answer
| code_translation | [
[
"66, 4",
"18974736"
],
[
"82, 66",
"2049813067056723342764042528136639432893302901053747234410457506551439003896274462989048978198596972547480537410778555874279424"
],
[
"12, 38",
"102067469997853225734913580209377959215104"
],
[
"55, 33",
"2703763826271496729576234682033435790799558162689208984375"
],
[
"34, 26",
"6583424253569334549714045134721532297216"
],
[
"22, 23",
"7511413302012830262726227918848"
],
[
"13, 98",
"14670621958378535701248951980679675362359612235946397336166799404770169821526482604486897413846048403503973929"
],
[
"57, 84",
"3115213932270015574240321075487727651114005391975957427662136579551294946632819644909745590885376136652528718398394835039492143654352249398781676001"
],
[
"76, 94",
"625860689720153894675329779023119791218668885268715162182982152269031697289005722783299512029943273307646917630098521886631180215670000397341006070978669962917342878463139250176"
],
[
"76, 95",
"47565412418731695995325063205757104132618835280422352325906643572446408993964434931530762914275688771381165739887487663383969696390920030197916461394378917181718058763198583013376"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string str ) {
int len = str . length ( );
int open [ len + 1 ], close [ len + 1 ];
int index = - 1;
memset ( open, 0, sizeof ( open ) );
memset ( close, 0, sizeof ( close ) );
open [ 0 ] = 0;
close [ len ] = 0;
if ( str [ 0 ] == '(' ) open [ 1 ] = 1;
if ( str [ len - 1 ] == ')' ) close [ len - 1 ] = 1;
for ( int i = 1;
i < len;
i ++ ) {
if ( str [ i ] == '(' ) open [ i + 1 ] = open [ i ] + 1;
else open [ i + 1 ] = open [ i ];
}
for ( int i = len - 2;
i >= 0;
i -- ) {
if ( str [ i ] == ')' ) close [ i ] = close [ i + 1 ] + 1;
else close [ i ] = close [ i + 1 ];
}
if ( open [ len ] == 0 ) return len;
if ( close [ 0 ] == 0 ) return 0;
for ( int i = 0;
i <= len;
i ++ ) if ( open [ i ] == close [ i ] ) index = i;
return index;
}
| [] | null | [] | FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1_1 | python | [] | def f_gold ( arr1 , arr2 , m , n ) :
i = 0
j = 0
if m < n :
return 0
arr1.sort ( )
arr2.sort ( )
while i < n and j < m :
if arr1 [ j ] < arr2 [ i ] :
j += 1
elif arr1 [ j ] == arr2 [ i ] :
j += 1
i += 1
elif arr1 [ j ] > arr2 [ i ] :
return 0
return False if i < n else True
| code_translation | [
[
"[7, 10, 10, 10, 13, 17, 23, 24, 25, 28, 30, 33, 37, 49, 49, 50, 57, 60, 60, 63, 63, 64, 65, 65, 72, 81, 84, 85, 85, 94, 96], [10, 13, 17, 63], 29, 4",
"True"
],
[
"[-94, -94, -92, -92, -90, -88, -86, -80, -76, -76, -68, -62, -58, -56, -54, -50, -42, -42, -20, -18, -18, -14, -8, -2, 0, 0, 0, 2, 6, 8, 8, 12, 18, 18, 30, 44, 44, 56, 56, 56, 58, 62, 62, 62, 74, 82, 86, 94], [-18, 12, 44], 46, 3",
"True"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0], 34, 3",
"True"
],
[
"[9, 10, 12, 12, 19, 20, 24, 26, 26, 30, 32, 36, 38, 45, 46, 51, 51, 52, 55, 56, 57, 57, 64, 65, 68, 80, 80, 82, 85, 86, 90, 92, 93, 94], [2, 32, 58, 80], 17, 4",
"0"
],
[
"[-98, -90, -86, -86, -84, -84, -82, -80, -78, -72, -70, -68, -66, -64, -52, -52, -50, -38, -28, -26, -24, -14, -8, 16, 26, 26, 28, 34, 36, 40, 42, 44, 44, 46, 50, 60, 68, 78, 80, 86, 90, 92, 98], [-99, -90, -90, -86], 23, 4",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1], 10, 4",
"False"
],
[
"[6, 8, 11, 13, 14, 26, 26, 41, 48, 70, 82, 83, 84, 88, 96], [1, 9, 12, 16], 10, 4",
"0"
],
[
"[-94, -90, -88, -84, -62, -54, -50, -46, -38, -16, 0, 2, 2, 4, 14, 16, 18, 18, 26, 26, 30, 32, 48, 50, 62, 64, 68, 70, 76, 76, 76, 80, 80, 88, 90, 92, 94, 98], [-76, -54, 4, 78], 27, 4",
"0"
],
[
"[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1], 10, 4",
"True"
],
[
"[5, 7, 8, 13, 19, 26, 27, 27, 33, 38, 43, 44, 54, 54, 55, 59, 64, 65, 66, 68, 70, 77, 84, 92, 97], [5, 9, 13, 93], 19, 4",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int r ) {
if ( r <= 0 ) return 0;
int result = 4;
for ( int x = 1;
x < r;
x ++ ) {
int ySquare = r * r - x * x;
int y = sqrt ( ySquare );
if ( y * y == ySquare ) result += 4;
}
return result;
}
| [] | null | [] | SORT_EVEN_PLACED_ELEMENTS_INCREASING_ODD_PLACED_DECREASING_ORDER | python | [] | def f_gold ( arr , n ) :
evenArr = [ ]
oddArr = [ ]
for i in range ( n ) :
if ( ( i % 2 ) == 0 ) :
evenArr.append ( arr [ i ] )
else :
oddArr.append ( arr [ i ] )
evenArr = sorted ( evenArr )
oddArr = sorted ( oddArr )
oddArr = oddArr [ : : - 1 ]
i = 0
for j in range ( len ( evenArr ) ) :
arr [ i ] = evenArr [ j ]
i += 1
for j in range ( len ( oddArr ) ) :
arr [ i ] = oddArr [ j ]
i += 1
| code_translation | [
[
"[6, 6, 15, 38, 51, 79, 82, 85, 84, 81, 72, 50, 21, 10, 6, 86, 87], 15",
"None"
],
[
"[-24, 18, 26, 82, 20, -36, -88, -52, 28, 2], 7",
"None"
],
[
"[0, 0, 0, 1, 1, 1], 3",
"None"
],
[
"[35, 38, 81, 94, 70, 47, 43, 30, 57, 55, 78, 97, 72, 1], 8",
"None"
],
[
"[-80, -72, -26, -20, 16, 38, 26, 8, -24, -46, -78, 44, 54, 68, 68, 78, 86, 92], 11",
"None"
],
[
"[0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0], 21",
"None"
],
[
"[3, 9, 20, 33, 37, 50, 52, 51, 38, 34, 30, 12, 4, 54, 60, 69, 73, 74, 92, 93, 94, 97, 98], 13",
"None"
],
[
"[-76, -66, -36, 64, 86, -30, -32, -36, -56, -60, -60, -16, -60, -98, -18, 72, -14], 10",
"None"
],
[
"[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, 1, 1, 1, 1, 1, 1], 29",
"None"
],
[
"[1, 7, 13, 20, 33, 37, 40, 46, 46, 52, 53, 61, 62, 71, 80, 82, 87, 89, 93, 85, 76, 73, 71, 54, 53, 51, 51, 50, 41, 40, 35, 29, 11, 3, 1, 1, 81, 85], 36",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > hM;
int sum = 0;
int max_len = 0;
int ending_index = - 1;
for ( int i = 0;
i < n;
i ++ ) arr [ i ] = ( arr [ i ] == 0 ) ? - 1 : 1;
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ];
if ( sum == 0 ) {
max_len = i + 1;
ending_index = i;
}
if ( hM . find ( sum + n ) != hM . end ( ) ) {
if ( max_len < i - hM [ sum + n ] ) {
max_len = i - hM [ sum + n ];
ending_index = i;
}
}
else hM [ sum + n ] = i;
}
for ( int i = 0;
i < n;
i ++ ) arr [ i ] = ( arr [ i ] == - 1 ) ? 0 : 1;
printf ( "%d to %d\n", ending_index - max_len + 1, ending_index );
return max_len;
}
| [
"import math"
] | null | [] | CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1 | python | [] | import math
def f_gold ( x , y ) :
res1 = math.log ( y ) / math.log ( x ) ;
res2 = math.log ( y ) / math.log ( x ) ;
return 1 if ( res1 == res2 ) else 0 ;
| code_translation | [
[
"57, 1",
"1"
],
[
"3, 9",
"1"
],
[
"10, 101",
"1"
],
[
"10, 10000",
"1"
],
[
"6, 46656",
"1"
],
[
"2, 2048",
"1"
],
[
"2, 40",
"1"
],
[
"20, 79",
"1"
],
[
"96, 98",
"1"
],
[
"25, 5",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
double f_gold ( vector < int > & A, int K ) {
int n = A . size ( );
double pre_sum [ n + 1 ];
pre_sum [ 0 ] = 0;
for ( int i = 0;
i < n;
i ++ ) pre_sum [ i + 1 ] = pre_sum [ i ] + A [ i ];
double dp [ n ] = {
0 };
double sum = 0;
for ( int i = 0;
i < n;
i ++ ) dp [ i ] = ( pre_sum [ n ] - pre_sum [ i ] ) / ( n - i );
for ( int k = 0;
k < K - 1;
k ++ ) for ( int i = 0;
i < n;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) dp [ i ] = max ( dp [ i ], ( pre_sum [ j ] - pre_sum [ i ] ) / ( j - i ) + dp [ j ] );
return dp [ 0 ];
}
| [] | null | [] | POLICEMEN_CATCH_THIEVES | python | [] | def f_gold ( arr , n , k ) :
i = 0
l = 0
r = 0
res = 0
thi = [ ]
pol = [ ]
while i < n :
if arr [ i ] == 'P' :
pol.append ( i )
elif arr [ i ] == 'T' :
thi.append ( i )
i += 1
while l < len ( thi ) and r < len ( pol ) :
if ( abs ( thi [ l ] - pol [ r ] ) <= k ) :
res += 1
l += 1
r += 1
elif thi [ l ] < pol [ r ] :
l += 1
else :
r += 1
return res
| code_translation | [
[
"['A', 'B', 'B', 'D', 'E', 'E', 'F', 'G', 'G', 'G', 'I', 'J', 'O', 'P', 'Q', 'Q', 'Q', 'Q', 'R', 'R', 'S', 'U', 'X', 'Y', 'Y', 'c', 'd', 'h', 'i', 'i', 'i', 'i', 'k', 'k', 'l', 'l', 'l', 'l', 'm', 'p', 'r', 'r', 's', 't', 't', 'u', 'x', 'z'], 33, 45",
"0"
],
[
"['7', '6', '0', '1', '0', '1'], 3, 3",
"0"
],
[
"['0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1'], 9, 10",
"0"
],
[
"['y', 'k', 'S', 'i', 's', 'r', 'i', 'z', 'y', 'f', 'E', 'U', 'y', 'G', 'f', 'f', 's', 'v', 'v', 'D', 'v', 'V', 'S', 'D', 'K', 'S', 'f', 'V', 'g', 'I', 'J', 'p', 'j', 'k', 'R', 'n', 'm', 'O', 'L', 'X', 'y', 'U', 'y', 'k', 'w'], 24, 44",
"0"
],
[
"['1', '1', '5', '8', '8'], 2, 2",
"0"
],
[
"['0', '1', '0', '0', '1', '1', '1', '0', '0', '0', '1', '0', '1', '0', '1', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '1', '1', '1', '0', '0', '0', '0', '0', '0'], 23, 18",
"0"
],
[
"['A', 'I', 'K', 'Q', 'Q', 'X', 'Z', 'f', 'g'], 5, 8",
"0"
],
[
"['7', '0', '6', '9', '7', '5', '1', '3', '9', '8', '0', '0', '1', '3', '9', '2', '5', '5', '2', '7', '9', '3', '3', '9', '3', '8', '5', '5', '0', '4', '6', '2', '7', '4', '0', '4', '6', '4', '2', '3'], 35, 28",
"0"
],
[
"['0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1'], 8, 10",
"0"
],
[
"['D', 'C', 'P', 'H', 'G', 'o', 'u', 'P', 'T', 'G', 'E', 'U', 'n', 'E', 'U'], 11, 12",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int a = 1, b = 2, c = 0;
if ( n <= 2 ) {
return n;
}
for ( int i = 3;
i <= n;
i ++ ) {
c = b + ( i - 1 ) * a;
a = b;
b = c;
}
return c;
}
| [] | null | [] | DYNAMIC_PROGRAMMING_SET_36_CUT_A_ROPE_TO_MAXIMIZE_PRODUCT_1 | python | [] | def f_gold(n):
if (n == 2 or n == 3):
return (n - 1)
res = 1
while (n > 4):
n -= 3
res *= 3
return (n * res)
| code_translation | [
[
"62",
"6973568802"
],
[
"53",
"258280326"
],
[
"8",
"18"
],
[
"6",
"9"
],
[
"35",
"354294"
],
[
"35",
"354294"
],
[
"46",
"19131876"
],
[
"74",
"564859072962"
],
[
"69",
"94143178827"
],
[
"3",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n, int k ) {
int result = 0;
for ( int i = 0;
i < n;
++ i ) {
if ( a [ i ] != 1 && a [ i ] > k ) {
result = result + min ( a [ i ] % k, k - a [ i ] % k );
}
else {
result = result + k - a [ i ];
}
}
return result;
}
| [] | null | [] | MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING | python | [] | def f_gold ( str ) :
l = len ( str )
count = 0
res = str [ 0 ]
for i in range ( l ) :
cur_count = 1
for j in range ( i + 1 , l ) :
if ( str [ i ] != str [ j ] ) :
break
cur_count += 1
if cur_count > count :
count = cur_count
res = str [ i ]
return res
| code_translation | [
[
"'geeekk'",
"'e'"
],
[
"'3786868'",
"'3'"
],
[
"'110'",
"'1'"
],
[
"'aaaabbcbbb'",
"'a'"
],
[
"'11'",
"'1'"
],
[
"'011101'",
"'1'"
],
[
"'WoHNyJYLC'",
"'W'"
],
[
"'3141711779'",
"'1'"
],
[
"'10111101101'",
"'1'"
],
[
"'aabbabababcc'",
"'a'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int k ) {
priority_queue < int, vector < int >, greater < int > > pq;
for ( int i = 0;
i < n;
i ++ ) pq . push ( arr [ i ] );
int count = 0, ans = 1;
while ( pq . empty ( ) == false && count < k ) {
ans = ans * pq . top ( );
pq . pop ( );
count ++;
}
return ans;
}
| [] | null | [] | COUNT_NEGATIVE_NUMBERS_IN_A_COLUMN_WISE_ROW_WISE_SORTED_MATRIX | python | [] | def f_gold ( M , n , m ) :
count = 0
for i in range ( n ) :
for j in range ( m ) :
if M [ i ] [ j ] < 0 :
count += 1
else :
break
return count
| code_translation | [
[
"[[31, 92, 57, 28, 79, 84, 92, 19, 31, 71, 91, 46, 60, 79, 82, 4, 70, 82, 41, 79, 80, 29, 26, 76, 92, 18, 94, 55, 46, 69, 67, 60, 85, 25, 11], [58, 69, 14, 55, 6, 69, 81, 60, 38, 52, 81, 80, 1, 47, 42, 82, 2, 70, 68, 71, 50, 98, 84, 1, 45, 24, 49, 33, 56, 4, 60, 42, 14, 45, 13], [28, 92, 91, 71, 75, 97, 30, 9, 76, 94, 55, 84, 76, 38, 32, 7, 73, 49, 37, 76, 41, 3, 89, 56, 71, 99, 71, 25, 94, 37, 43, 9, 89, 55, 55], [77, 31, 94, 14, 2, 88, 64, 71, 57, 18, 81, 51, 66, 82, 16, 46, 15, 28, 48, 54, 49, 34, 80, 12, 26, 64, 41, 46, 32, 87, 18, 12, 38, 28, 88], [84, 93, 86, 10, 92, 89, 62, 65, 33, 66, 92, 52, 28, 49, 98, 37, 49, 91, 42, 64, 43, 12, 83, 61, 51, 11, 80, 35, 28, 50, 35, 1, 31, 81, 77], [22, 30, 43, 76, 37, 59, 48, 82, 40, 2, 66, 58, 7, 13, 38, 73, 14, 28, 55, 52, 28, 10, 98, 93, 97, 27, 1, 50, 80, 83, 11, 82, 80, 7, 38], [54, 30, 50, 31, 57, 2, 73, 56, 24, 35, 85, 99, 28, 51, 83, 86, 82, 30, 72, 98, 40, 81, 15, 5, 18, 76, 62, 5, 50, 37, 99, 46, 31, 16, 66], [52, 62, 92, 37, 29, 66, 66, 98, 1, 56, 60, 85, 43, 98, 46, 34, 21, 71, 28, 84, 92, 93, 58, 79, 3, 37, 76, 14, 63, 33, 46, 8, 2, 56, 31], [70, 69, 43, 26, 58, 80, 60, 28, 24, 79, 42, 80, 16, 52, 17, 93, 25, 16, 77, 35, 39, 16, 77, 19, 45, 27, 96, 44, 30, 88, 76, 6, 18, 2, 33], [1, 6, 28, 49, 25, 25, 14, 31, 5, 60, 78, 45, 20, 88, 9, 80, 72, 46, 75, 90, 26, 11, 25, 77, 22, 39, 83, 65, 95, 64, 78, 86, 23, 48, 20], [98, 5, 39, 62, 57, 87, 52, 68, 32, 98, 90, 99, 67, 81, 94, 96, 15, 44, 13, 17, 47, 35, 84, 14, 23, 69, 5, 96, 42, 42, 65, 60, 10, 10, 88], [4, 91, 15, 32, 39, 40, 39, 26, 25, 26, 35, 22, 5, 46, 72, 27, 44, 23, 49, 67, 9, 17, 64, 74, 68, 84, 94, 76, 22, 22, 30, 29, 26, 63, 51], [10, 53, 32, 7, 39, 74, 91, 85, 79, 47, 47, 11, 54, 51, 43, 75, 19, 74, 33, 27, 15, 29, 96, 96, 87, 83, 62, 32, 79, 62, 43, 62, 97, 87, 16], [11, 15, 6, 98, 56, 59, 40, 13, 99, 53, 48, 46, 99, 16, 59, 58, 21, 57, 89, 63, 67, 50, 71, 98, 10, 49, 78, 39, 5, 64, 9, 7, 60, 86, 83], [94, 9, 64, 64, 80, 70, 1, 77, 15, 64, 69, 43, 40, 56, 82, 28, 15, 92, 40, 38, 61, 74, 32, 1, 95, 30, 5, 43, 1, 8, 57, 5, 5, 97, 54], [79, 58, 95, 22, 97, 60, 97, 87, 35, 14, 58, 59, 86, 89, 57, 33, 1, 71, 16, 48, 77, 69, 6, 99, 74, 96, 79, 98, 65, 86, 32, 45, 61, 49, 36], [19, 37, 45, 27, 48, 21, 83, 82, 96, 85, 83, 54, 37, 22, 38, 43, 45, 28, 84, 91, 38, 16, 58, 46, 48, 20, 61, 8, 90, 66, 42, 47, 65, 60, 15], [48, 19, 73, 34, 64, 86, 86, 4, 50, 81, 67, 14, 28, 49, 83, 56, 97, 24, 38, 84, 39, 82, 1, 14, 7, 32, 90, 7, 7, 47, 85, 55, 96, 87, 83], [70, 68, 59, 18, 72, 95, 7, 62, 53, 22, 82, 64, 72, 3, 24, 52, 26, 41, 30, 19, 47, 55, 13, 10, 69, 54, 93, 42, 44, 49, 72, 18, 29, 70, 85], [96, 40, 94, 49, 87, 60, 26, 23, 86, 18, 72, 90, 32, 11, 48, 47, 94, 96, 98, 59, 11, 19, 27, 49, 62, 29, 23, 22, 1, 88, 54, 41, 39, 76, 44], [45, 99, 44, 67, 5, 80, 36, 33, 89, 52, 2, 49, 74, 36, 7, 14, 57, 67, 62, 97, 22, 92, 44, 2, 65, 67, 58, 91, 56, 84, 53, 49, 11, 13, 24], [69, 81, 60, 52, 34, 72, 33, 56, 28, 17, 3, 62, 7, 78, 40, 19, 95, 42, 49, 77, 90, 42, 22, 1, 60, 92, 65, 28, 11, 83, 19, 59, 52, 45, 26], [23, 17, 21, 54, 31, 32, 81, 15, 13, 65, 62, 16, 21, 70, 6, 84, 5, 91, 37, 20, 89, 73, 3, 65, 86, 24, 27, 11, 98, 92, 54, 23, 9, 1, 90], [53, 67, 14, 42, 52, 55, 52, 86, 99, 43, 74, 48, 71, 55, 85, 87, 73, 41, 55, 52, 83, 67, 78, 14, 15, 27, 83, 28, 65, 35, 45, 33, 59, 13, 34], [29, 4, 17, 82, 11, 18, 95, 71, 10, 34, 79, 43, 45, 58, 9, 26, 84, 9, 49, 6, 63, 41, 43, 75, 35, 54, 55, 18, 81, 55, 2, 53, 1, 67, 87], [98, 3, 18, 56, 33, 97, 20, 90, 38, 80, 83, 80, 18, 94, 11, 43, 60, 85, 30, 2, 89, 85, 32, 35, 62, 32, 93, 71, 62, 93, 24, 33, 86, 21, 32], [38, 45, 16, 40, 18, 67, 71, 49, 46, 98, 64, 83, 35, 78, 40, 86, 28, 66, 77, 24, 31, 10, 82, 1, 31, 9, 47, 39, 84, 51, 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, 47, 52, 47, 75], [36, 68, 16, 99, 38, 84, 45, 71, 71, 36, 3, 97, 69, 15, 48, 77, 6, 4, 33, 36, 67, 65, 52, 55, 37, 35, 76, 69, 98, 84, 62, 5, 80, 15, 36], [67, 84, 38, 44, 5, 66, 58, 57, 67, 75, 61, 66, 60, 2, 66, 50, 6, 83, 91, 86, 67, 99, 1, 32, 71, 91, 52, 29, 51, 73, 23, 32, 4, 75, 25], [24, 94, 50, 60, 28, 73, 99, 1, 10, 37, 54, 96, 56, 46, 19, 9, 57, 78, 19, 70, 76, 25, 14, 87, 13, 22, 63, 73, 97, 3, 19, 39, 16, 36, 22], [92, 41, 48, 68, 30, 72, 1, 76, 98, 58, 57, 61, 32, 11, 58, 29, 80, 86, 22, 94, 50, 66, 78, 22, 91, 56, 91, 82, 61, 67, 12, 18, 46, 99, 69], [49, 64, 35, 55, 67, 78, 11, 71, 12, 98, 10, 9, 82, 35, 61, 40, 29, 10, 83, 11, 63, 16, 97, 97, 96, 91, 30, 97, 21, 91, 32, 61, 27, 33, 35], [29, 58, 88, 23, 96, 94, 1, 55, 79, 30, 87, 83, 5, 70, 25, 62, 14, 67, 29, 22, 84, 2, 25, 75, 11, 57, 89, 65, 80, 82, 36, 28, 45, 44, 4], [70, 94, 49, 13, 26, 24, 42, 24, 58, 83, 41, 6, 50, 78, 22, 12, 21, 84, 70, 28, 44, 51, 78, 75, 9, 70, 37, 23, 60, 25, 68, 97, 49, 17, 27]], 22, 27",
"0"
],
[
"[[22, 49, 27, 1, 69, 48, 44, 18, 89, 36, 93, 10, 67, 18, 7, 62, 55, 3, 84, 76, 49, 57], [59, 6, 37, 2, 33, 16, 20, 60, 69, 98, 92, 2, 70, 12, 99, 57, 32, 92, 64, 92, 68, 62], [41, 89, 70, 69, 62, 88, 52, 23, 8, 37, 77, 87, 54, 44, 87, 32, 53, 29, 38, 80, 68, 32], [63, 77, 82, 97, 7, 56, 2, 68, 44, 52, 40, 8, 71, 50, 26, 62, 18, 61, 12, 20, 1, 76], [44, 47, 86, 67, 53, 27, 80, 57, 53, 74, 7, 11, 86, 58, 7, 55, 30, 57, 23, 97, 38, 33], [48, 84, 9, 77, 60, 53, 41, 15, 99, 30, 90, 36, 89, 64, 78, 63, 51, 51, 22, 17, 72, 50], [14, 56, 77, 30, 59, 64, 26, 22, 86, 92, 80, 88, 63, 46, 81, 3, 81, 64, 14, 72, 14, 77], [36, 48, 97, 59, 34, 64, 11, 24, 41, 30, 37, 66, 33, 98, 60, 27, 76, 90, 48, 10, 90, 41], [76, 54, 4, 86, 40, 31, 85, 51, 38, 72, 28, 12, 35, 99, 78, 12, 13, 49, 34, 33, 21, 83], [37, 15, 61, 52, 17, 81, 90, 44, 16, 13, 2, 92, 88, 84, 18, 99, 10, 71, 82, 33, 75, 44], [40, 49, 88, 11, 67, 52, 39, 2, 92, 49, 52, 31, 77, 97, 51, 31, 66, 98, 66, 37, 25, 62], [99, 9, 6, 66, 15, 61, 15, 58, 33, 62, 80, 65, 59, 1, 79, 54, 78, 51, 97, 19, 83, 59], [3, 76, 87, 47, 71, 66, 86, 18, 79, 62, 44, 67, 5, 82, 94, 27, 48, 2, 88, 34, 55, 46], [38, 66, 48, 93, 40, 7, 6, 14, 82, 56, 83, 2, 8, 58, 21, 26, 90, 10, 85, 3, 8, 78], [54, 43, 93, 86, 42, 41, 87, 70, 67, 60, 90, 78, 66, 42, 30, 57, 76, 2, 30, 24, 12, 49], [12, 5, 75, 55, 17, 62, 87, 21, 91, 88, 10, 20, 49, 46, 79, 51, 33, 94, 59, 48, 97, 70], [49, 75, 21, 53, 2, 92, 14, 80, 92, 40, 84, 67, 39, 48, 53, 49, 68, 57, 14, 58, 97, 9], [45, 23, 2, 43, 89, 62, 28, 46, 74, 38, 70, 84, 67, 22, 62, 86, 72, 24, 39, 5, 64, 43], [28, 93, 44, 61, 47, 23, 52, 97, 62, 31, 98, 1, 63, 7, 86, 46, 66, 61, 24, 14, 15, 62], [60, 58, 17, 60, 19, 91, 78, 22, 56, 84, 99, 91, 42, 55, 30, 83, 84, 42, 86, 73, 76, 53], [95, 93, 92, 53, 56, 72, 31, 67, 4, 61, 39, 88, 64, 94, 48, 88, 23, 54, 37, 10, 18, 67], [97, 70, 9, 43, 34, 94, 43, 71, 13, 81, 56, 73, 85, 54, 35, 89, 45, 18, 8, 54, 70, 36]], 12, 18",
"0"
],
[
"[[54, 62, 19, 8, 61, 82, 54, 69, 91, 14, 56, 78, 22, 81, 38, 47], [22, 25, 33, 85, 89, 78, 7, 42, 24, 24, 24, 74, 89, 83, 23, 1], [79, 9, 51, 67, 71, 49, 87, 45, 81, 2, 4, 50, 16, 71, 91, 44], [77, 99, 85, 40, 90, 45, 3, 54, 39, 69, 40, 88, 81, 41, 84, 24], [84, 24, 42, 18, 51, 45, 16, 97, 97, 64, 56, 35, 9, 33, 37, 97], [61, 55, 53, 21, 5, 1, 71, 23, 87, 71, 59, 83, 27, 77, 9, 9], [60, 42, 94, 10, 69, 95, 98, 38, 54, 64, 17, 71, 83, 38, 60, 38], [2, 45, 33, 60, 92, 31, 55, 48, 31, 19, 79, 9, 81, 47, 4, 38], [68, 16, 10, 37, 43, 45, 10, 93, 47, 99, 74, 88, 79, 85, 2, 27], [69, 72, 66, 74, 32, 60, 90, 70, 88, 68, 15, 72, 65, 35, 87, 75], [49, 36, 73, 88, 81, 8, 78, 65, 98, 35, 5, 5, 46, 53, 39, 92], [5, 39, 16, 95, 34, 59, 36, 19, 80, 5, 69, 39, 26, 45, 15, 11], [14, 95, 52, 74, 90, 61, 75, 19, 71, 69, 37, 45, 8, 71, 49, 26], [71, 95, 22, 95, 95, 48, 53, 75, 96, 68, 82, 99, 9, 15, 4, 54], [26, 94, 94, 81, 47, 4, 22, 74, 41, 98, 98, 11, 89, 77, 7, 65], [47, 37, 49, 52, 68, 83, 51, 70, 32, 47, 60, 93, 61, 10, 21, 42]], 12, 8",
"0"
],
[
"[[39, 79, 41, 68, 91, 31, 87, 47, 16, 92, 42, 68, 79, 59, 17, 45, 68, 78, 99, 19, 51], [43, 46, 81, 76, 18, 20, 62, 54, 42, 52, 8, 66, 3, 79, 60, 12, 50, 87, 88, 70, 11], [49, 2, 91, 98, 51, 74, 47, 72, 32, 42, 92, 52, 98, 89, 9, 91, 86, 38, 78, 89, 42], [45, 76, 87, 45, 3, 88, 56, 16, 16, 59, 78, 40, 9, 7, 55, 69, 58, 39, 64, 2, 32], [65, 45, 40, 81, 13, 71, 33, 46, 27, 47, 92, 5, 9, 75, 80, 2, 90, 50, 40, 4, 1], [99, 5, 44, 17, 65, 99, 27, 27, 5, 1, 87, 95, 78, 27, 4, 40, 57, 79, 82, 46, 33], [99, 3, 6, 49, 52, 24, 66, 91, 66, 84, 92, 96, 48, 24, 81, 69, 46, 58, 16, 49, 83], [2, 42, 95, 3, 17, 63, 45, 82, 69, 10, 86, 44, 64, 55, 2, 44, 93, 16, 98, 3, 41], [27, 2, 95, 31, 58, 64, 21, 14, 90, 14, 86, 42, 84, 47, 4, 82, 70, 47, 97, 1, 49], [59, 74, 19, 7, 3, 89, 77, 72, 52, 57, 86, 31, 70, 55, 89, 25, 43, 52, 24, 50, 30], [89, 57, 9, 45, 89, 74, 76, 89, 23, 90, 57, 77, 38, 25, 49, 3, 85, 90, 90, 26, 47], [55, 39, 1, 53, 31, 10, 76, 47, 77, 33, 6, 22, 29, 95, 29, 14, 32, 28, 27, 11, 93], [95, 75, 56, 23, 21, 30, 76, 98, 25, 79, 41, 3, 63, 87, 96, 53, 92, 40, 74, 22, 8], [91, 35, 88, 59, 74, 92, 5, 6, 56, 42, 97, 80, 14, 45, 12, 61, 63, 79, 73, 52, 81], [73, 86, 4, 14, 11, 1, 47, 35, 12, 99, 37, 31, 61, 86, 60, 17, 28, 82, 3, 18, 20], [46, 85, 58, 67, 3, 32, 53, 13, 86, 7, 78, 12, 29, 48, 58, 37, 77, 43, 75, 14, 42], [38, 93, 44, 22, 94, 76, 29, 63, 20, 19, 51, 57, 53, 11, 9, 63, 24, 43, 51, 11, 37], [19, 71, 53, 61, 91, 91, 20, 99, 7, 81, 88, 37, 29, 9, 23, 10, 22, 38, 55, 89, 29], [62, 33, 81, 98, 9, 79, 80, 50, 63, 67, 64, 95, 69, 84, 22, 4, 98, 71, 1, 81, 77], [97, 1, 28, 52, 20, 16, 45, 31, 69, 9, 98, 60, 55, 97, 5, 3, 95, 77, 65, 54, 32], [71, 97, 30, 68, 74, 7, 15, 99, 62, 39, 20, 55, 30, 22, 20, 31, 54, 31, 93, 10, 80]], 18, 12",
"0"
],
[
"[[48, 19, 66, 15, 8, 54, 8, 66, 22, 72, 93, 33, 96, 26, 89, 57, 86, 16, 99, 75, 9, 20, 36, 26], [67, 60, 72, 35, 68, 26, 18, 53, 54, 82, 23, 15, 89, 43, 82, 1, 33, 46, 61, 87, 93, 27, 33, 21], [7, 78, 68, 44, 49, 95, 1, 16, 16, 7, 1, 92, 3, 44, 47, 52, 31, 61, 41, 28, 95, 28, 51, 46], [98, 90, 93, 45, 10, 2, 88, 20, 1, 67, 2, 75, 27, 31, 68, 59, 11, 50, 4, 40, 5, 61, 34, 24], [41, 37, 20, 59, 32, 13, 84, 27, 58, 17, 40, 54, 43, 7, 30, 97, 90, 6, 40, 68, 95, 99, 2, 81], [83, 50, 27, 89, 94, 39, 35, 9, 45, 45, 9, 20, 25, 12, 36, 18, 74, 75, 69, 66, 37, 82, 16, 25], [84, 20, 8, 12, 15, 79, 41, 13, 81, 39, 48, 76, 65, 89, 70, 85, 93, 48, 51, 16, 87, 37, 30, 96], [29, 45, 15, 54, 15, 54, 4, 36, 9, 81, 22, 74, 25, 17, 61, 80, 78, 70, 39, 46, 14, 16, 69, 43], [32, 81, 24, 3, 19, 56, 37, 2, 42, 2, 87, 90, 14, 41, 50, 66, 5, 32, 83, 72, 62, 16, 87, 46], [17, 7, 38, 46, 97, 72, 9, 17, 32, 80, 47, 15, 20, 21, 61, 28, 11, 12, 34, 86, 11, 50, 98, 66], [32, 52, 6, 16, 31, 72, 58, 64, 21, 10, 33, 37, 34, 32, 34, 21, 44, 82, 82, 66, 70, 99, 50, 6], [90, 84, 81, 74, 86, 24, 34, 66, 16, 89, 58, 92, 98, 12, 71, 74, 6, 9, 35, 41, 32, 78, 1, 42], [1, 24, 27, 69, 79, 52, 11, 85, 7, 66, 11, 24, 90, 72, 98, 15, 37, 33, 36, 68, 16, 69, 66, 62], [25, 97, 59, 93, 94, 2, 46, 61, 60, 24, 19, 21, 7, 91, 93, 19, 1, 84, 70, 46, 19, 36, 44, 31], [97, 67, 2, 88, 1, 15, 75, 35, 48, 69, 72, 53, 90, 75, 74, 59, 8, 53, 39, 29, 4, 44, 92, 24], [87, 84, 38, 81, 81, 71, 32, 87, 72, 23, 34, 6, 88, 33, 56, 25, 31, 28, 89, 50, 14, 55, 1, 7], [85, 64, 80, 66, 71, 99, 62, 53, 87, 71, 86, 59, 74, 85, 68, 31, 38, 34, 36, 14, 13, 95, 81, 47], [25, 70, 61, 78, 68, 26, 23, 57, 84, 61, 14, 22, 40, 83, 68, 29, 75, 21, 54, 92, 47, 29, 47, 64], [43, 12, 8, 16, 12, 80, 76, 31, 22, 96, 74, 64, 30, 54, 39, 60, 13, 8, 44, 80, 56, 45, 58, 28], [54, 12, 30, 68, 79, 24, 78, 79, 64, 33, 40, 44, 74, 50, 31, 94, 44, 42, 57, 4, 82, 66, 27, 77], [80, 2, 92, 92, 97, 18, 55, 73, 34, 26, 1, 11, 3, 3, 51, 13, 49, 65, 70, 8, 33, 88, 93, 97], [34, 96, 94, 8, 28, 58, 22, 8, 60, 57, 86, 16, 84, 63, 21, 84, 59, 83, 75, 46, 95, 54, 52, 16], [81, 18, 98, 77, 20, 14, 13, 18, 2, 86, 46, 48, 49, 26, 69, 54, 63, 76, 97, 11, 39, 58, 75, 87], [36, 48, 94, 97, 96, 39, 34, 90, 17, 48, 72, 39, 85, 40, 63, 85, 41, 55, 23, 76, 39, 21, 52, 27]], 20, 18",
"0"
],
[
"[[45, 42, 10, 70, 41, 89, 22, 51, 39, 46, 25, 16, 53, 79, 40, 94, 32, 42, 36, 72, 38, 23, 87, 9, 24], [76, 21, 4, 75, 31, 69, 97, 57, 38, 25, 98, 78, 51, 37, 19, 29, 73, 57, 81, 83, 82, 19, 25, 93, 80], [72, 9, 91, 68, 96, 53, 68, 30, 52, 70, 80, 60, 61, 53, 25, 30, 10, 36, 92, 15, 19, 75, 83, 54, 57], [6, 31, 21, 12, 97, 20, 53, 80, 76, 41, 42, 1, 9, 89, 35, 3, 68, 29, 20, 29, 18, 86, 67, 21, 83], [45, 46, 53, 3, 55, 32, 40, 51, 40, 54, 89, 93, 81, 5, 93, 28, 7, 19, 84, 62, 21, 53, 55, 16, 25], [55, 37, 70, 58, 26, 71, 89, 81, 11, 29, 66, 99, 82, 2, 86, 91, 47, 90, 30, 45, 70, 62, 10, 13, 77], [48, 68, 68, 43, 69, 27, 80, 39, 88, 28, 70, 36, 19, 79, 86, 11, 53, 74, 99, 77, 37, 88, 97, 66, 7], [58, 69, 76, 76, 50, 29, 40, 47, 2, 67, 12, 42, 27, 27, 57, 48, 77, 49, 93, 24, 83, 27, 81, 1, 58], [78, 82, 51, 58, 67, 53, 97, 94, 77, 33, 98, 18, 66, 87, 96, 50, 77, 8, 62, 21, 71, 87, 83, 56, 54], [95, 45, 29, 19, 52, 65, 12, 58, 38, 50, 80, 27, 80, 31, 66, 35, 68, 51, 47, 96, 62, 94, 22, 66, 21], [23, 29, 38, 27, 67, 30, 52, 15, 90, 85, 25, 67, 51, 91, 92, 71, 81, 17, 79, 50, 23, 80, 29, 64, 74], [7, 79, 94, 85, 6, 82, 98, 69, 37, 93, 82, 93, 76, 94, 87, 93, 84, 7, 67, 18, 27, 70, 98, 25, 62], [64, 31, 65, 86, 15, 8, 13, 23, 35, 54, 57, 62, 45, 50, 20, 81, 58, 34, 69, 35, 94, 13, 44, 78, 48], [98, 25, 26, 89, 53, 89, 20, 20, 51, 54, 76, 28, 55, 45, 75, 86, 90, 29, 41, 19, 1, 63, 17, 51, 5], [26, 68, 55, 36, 33, 15, 92, 63, 9, 53, 97, 63, 9, 63, 95, 8, 28, 74, 58, 57, 35, 66, 56, 17, 40], [40, 73, 83, 78, 5, 28, 71, 97, 66, 84, 47, 47, 13, 92, 99, 71, 15, 17, 86, 19, 74, 33, 17, 63, 20], [59, 14, 65, 17, 39, 59, 61, 95, 62, 32, 33, 39, 88, 49, 87, 11, 17, 32, 19, 11, 61, 95, 75, 50, 5], [81, 34, 42, 39, 28, 11, 20, 98, 60, 26, 2, 8, 64, 10, 55, 94, 24, 66, 88, 13, 81, 37, 99, 83, 83], [92, 18, 41, 52, 83, 78, 53, 87, 26, 47, 14, 97, 91, 45, 77, 37, 39, 22, 1, 46, 52, 42, 8, 99, 17], [30, 40, 15, 66, 32, 80, 35, 5, 90, 6, 56, 30, 51, 33, 48, 74, 9, 51, 58, 46, 32, 47, 59, 97, 33], [60, 14, 19, 5, 98, 49, 4, 94, 66, 59, 44, 28, 35, 60, 12, 80, 80, 6, 42, 99, 7, 35, 72, 76, 60], [73, 83, 80, 67, 93, 71, 52, 2, 91, 88, 30, 12, 70, 74, 88, 4, 21, 65, 12, 79, 48, 25, 8, 85, 82], [20, 75, 62, 20, 10, 71, 60, 52, 34, 17, 58, 88, 64, 3, 37, 52, 35, 20, 9, 20, 80, 36, 15, 94, 88], [19, 47, 94, 21, 5, 37, 13, 40, 74, 87, 17, 48, 9, 65, 96, 33, 68, 25, 72, 43, 85, 50, 70, 82, 80], [21, 88, 58, 48, 84, 38, 37, 33, 92, 56, 16, 71, 9, 50, 45, 66, 61, 61, 93, 37, 97, 36, 38, 3, 2]], 24, 15",
"0"
],
[
"[[67, 61, 32, 22, 31, 43, 25, 63, 3, 92, 10, 14, 64, 23, 61, 58, 67, 98, 19, 25, 98, 71, 41, 23, 17, 63, 20, 17, 59, 89, 92, 20, 28, 94, 38, 41, 20, 63, 67, 88, 68, 90, 50, 64], [64, 48, 46, 95, 50, 42, 25, 50, 77, 30, 3, 62, 81, 31, 11, 99, 52, 24, 70, 86, 98, 27, 53, 71, 24, 84, 1, 34, 70, 51, 75, 57, 37, 14, 83, 21, 82, 88, 4, 56, 88, 66, 31, 88], [48, 68, 58, 58, 7, 23, 44, 49, 84, 87, 89, 22, 42, 4, 57, 60, 36, 54, 69, 3, 61, 82, 14, 41, 37, 69, 76, 30, 78, 74, 93, 79, 82, 44, 6, 66, 37, 80, 98, 20, 32, 13, 99, 73], [58, 86, 91, 80, 4, 35, 46, 27, 79, 87, 94, 34, 24, 22, 21, 94, 16, 72, 91, 70, 53, 66, 64, 42, 71, 31, 36, 77, 70, 65, 39, 22, 43, 41, 23, 85, 20, 32, 77, 9, 16, 11, 88, 71], [6, 33, 85, 2, 73, 8, 3, 3, 48, 45, 21, 63, 77, 46, 71, 47, 54, 93, 40, 56, 95, 77, 13, 51, 43, 58, 18, 26, 96, 63, 62, 69, 60, 72, 47, 74, 44, 77, 17, 9, 7, 69, 5, 90], [25, 49, 72, 10, 59, 4, 11, 43, 79, 15, 66, 50, 59, 42, 72, 57, 13, 65, 74, 93, 90, 52, 34, 26, 12, 43, 34, 6, 63, 27, 47, 45, 4, 96, 51, 21, 74, 91, 12, 21, 34, 94, 55, 75], [72, 45, 43, 54, 9, 93, 57, 13, 59, 90, 47, 16, 78, 82, 98, 94, 7, 98, 40, 70, 57, 83, 42, 6, 36, 60, 96, 11, 38, 36, 79, 5, 24, 84, 35, 70, 61, 3, 54, 64, 58, 65, 54, 80], [91, 61, 97, 86, 81, 18, 9, 66, 58, 55, 73, 86, 13, 95, 10, 49, 12, 98, 97, 85, 47, 37, 67, 62, 12, 25, 51, 69, 77, 47, 91, 66, 85, 74, 69, 10, 96, 66, 41, 30, 95, 43, 66, 31], [57, 50, 96, 40, 96, 8, 25, 10, 88, 47, 54, 54, 55, 72, 77, 60, 97, 87, 5, 30, 24, 1, 96, 95, 81, 89, 42, 65, 69, 34, 88, 37, 4, 48, 10, 74, 44, 55, 84, 76, 72, 17, 97, 38], [93, 52, 95, 81, 54, 74, 7, 40, 98, 99, 79, 39, 14, 58, 72, 9, 66, 11, 67, 77, 74, 83, 75, 31, 82, 67, 80, 80, 18, 26, 84, 61, 36, 3, 13, 22, 16, 87, 55, 13, 42, 19, 95, 3], [83, 10, 52, 84, 97, 72, 53, 18, 85, 10, 1, 53, 96, 7, 57, 14, 27, 77, 15, 86, 12, 46, 59, 23, 30, 58, 63, 68, 19, 94, 4, 57, 25, 33, 17, 97, 88, 80, 10, 24, 13, 55, 71, 6], [97, 7, 58, 88, 38, 52, 32, 12, 93, 50, 58, 97, 24, 85, 77, 91, 52, 10, 56, 18, 61, 85, 58, 7, 7, 64, 22, 81, 94, 60, 42, 68, 84, 76, 83, 50, 28, 82, 89, 27, 96, 43, 28, 39], [86, 3, 88, 2, 33, 97, 8, 15, 40, 94, 84, 9, 62, 6, 39, 47, 9, 10, 29, 6, 52, 78, 87, 4, 64, 20, 85, 7, 89, 8, 50, 83, 4, 49, 72, 44, 24, 49, 21, 72, 64, 84, 39, 51], [88, 80, 76, 94, 47, 13, 29, 30, 85, 20, 85, 92, 78, 2, 59, 7, 87, 24, 86, 83, 25, 8, 26, 22, 93, 56, 74, 19, 9, 7, 71, 65, 79, 25, 76, 63, 87, 93, 44, 16, 76, 92, 98, 85], [67, 42, 81, 11, 30, 32, 64, 67, 30, 8, 22, 70, 35, 47, 5, 35, 89, 82, 31, 98, 42, 50, 87, 99, 18, 24, 35, 81, 40, 11, 83, 52, 16, 69, 53, 97, 73, 16, 37, 2, 32, 60, 86, 89], [39, 47, 27, 27, 81, 67, 65, 76, 8, 75, 27, 21, 44, 48, 61, 94, 42, 22, 46, 15, 95, 97, 57, 9, 61, 78, 74, 13, 48, 48, 89, 91, 37, 2, 8, 85, 19, 56, 27, 22, 26, 19, 49, 94], [87, 67, 37, 46, 62, 40, 85, 22, 73, 99, 51, 36, 99, 47, 43, 13, 37, 91, 58, 71, 90, 93, 73, 15, 92, 84, 1, 59, 3, 84, 36, 66, 8, 23, 16, 88, 79, 43, 52, 10, 15, 69, 24, 23], [19, 47, 92, 46, 24, 53, 91, 58, 15, 30, 46, 82, 43, 65, 88, 68, 18, 90, 24, 35, 41, 69, 48, 53, 48, 86, 65, 75, 2, 87, 89, 40, 26, 3, 95, 2, 24, 32, 37, 57, 85, 94, 77, 81], [24, 26, 2, 36, 32, 10, 44, 77, 59, 11, 15, 98, 12, 47, 70, 44, 18, 7, 6, 16, 67, 23, 3, 51, 51, 82, 86, 6, 18, 53, 49, 25, 22, 42, 99, 83, 90, 85, 66, 22, 22, 26, 15, 24], [84, 24, 11, 3, 88, 47, 6, 60, 25, 92, 84, 11, 42, 25, 81, 18, 81, 43, 8, 85, 79, 27, 99, 5, 16, 66, 79, 14, 73, 78, 29, 74, 15, 95, 13, 79, 39, 36, 79, 60, 6, 85, 36, 81], [6, 20, 9, 7, 85, 83, 50, 31, 90, 91, 7, 38, 20, 26, 15, 14, 53, 49, 7, 9, 15, 17, 94, 18, 88, 63, 22, 34, 26, 66, 54, 30, 9, 19, 53, 11, 13, 5, 32, 51, 35, 48, 82, 63], [80, 96, 47, 59, 1, 91, 84, 75, 95, 31, 43, 32, 70, 34, 95, 54, 13, 49, 27, 73, 50, 69, 29, 75, 17, 50, 88, 42, 76, 95, 51, 19, 87, 34, 91, 20, 90, 5, 64, 2, 34, 54, 76, 46], [85, 70, 55, 7, 39, 24, 41, 60, 89, 74, 2, 18, 50, 75, 96, 84, 1, 97, 18, 1, 42, 23, 17, 59, 98, 44, 49, 83, 50, 50, 77, 37, 12, 56, 32, 67, 72, 6, 32, 65, 7, 76, 52, 54], [46, 45, 14, 49, 65, 22, 4, 3, 28, 21, 43, 19, 1, 35, 31, 50, 67, 46, 65, 44, 74, 3, 76, 27, 84, 74, 66, 97, 14, 21, 32, 93, 45, 27, 57, 51, 9, 72, 27, 50, 44, 45, 11, 69], [25, 24, 88, 33, 90, 89, 56, 49, 69, 69, 2, 85, 95, 78, 79, 51, 46, 26, 20, 99, 3, 99, 2, 27, 82, 59, 24, 57, 68, 94, 17, 26, 10, 19, 86, 24, 50, 44, 28, 5, 69, 23, 68, 9], [29, 5, 31, 57, 47, 89, 65, 37, 32, 54, 64, 70, 48, 19, 50, 88, 88, 84, 33, 84, 1, 42, 43, 83, 90, 64, 72, 8, 58, 80, 33, 96, 4, 53, 84, 58, 29, 70, 24, 96, 36, 37, 58, 97], [73, 47, 38, 22, 77, 37, 38, 22, 3, 57, 14, 27, 59, 24, 68, 68, 87, 94, 5, 32, 97, 26, 52, 90, 46, 65, 69, 14, 33, 66, 63, 70, 57, 80, 82, 89, 77, 15, 79, 91, 75, 67, 4, 53], [88, 3, 45, 71, 71, 2, 27, 68, 22, 59, 58, 47, 89, 82, 74, 10, 32, 24, 74, 68, 36, 20, 98, 83, 34, 6, 75, 36, 26, 7, 74, 98, 19, 61, 86, 16, 86, 51, 46, 46, 81, 59, 39, 79], [84, 11, 50, 52, 59, 41, 98, 62, 3, 23, 91, 15, 83, 4, 37, 36, 77, 97, 66, 19, 37, 92, 79, 32, 18, 50, 53, 1, 71, 28, 95, 7, 12, 11, 80, 78, 81, 11, 98, 92, 28, 5, 23, 49], [37, 57, 14, 93, 49, 66, 35, 63, 83, 84, 19, 20, 17, 16, 83, 21, 28, 29, 7, 10, 70, 55, 54, 24, 86, 85, 8, 83, 27, 87, 63, 46, 45, 39, 8, 18, 78, 75, 6, 2, 67, 33, 2, 58], [9, 52, 26, 95, 57, 4, 49, 80, 60, 90, 39, 83, 14, 49, 22, 99, 7, 72, 62, 11, 76, 99, 33, 93, 90, 53, 20, 47, 23, 89, 5, 22, 16, 89, 40, 89, 54, 22, 74, 51, 11, 21, 79, 80], [66, 12, 85, 75, 41, 2, 23, 46, 57, 90, 45, 32, 77, 74, 90, 73, 75, 22, 3, 13, 94, 89, 2, 12, 64, 4, 45, 21, 35, 45, 33, 44, 86, 86, 44, 40, 97, 51, 30, 46, 76, 20, 76, 5], [35, 15, 99, 54, 22, 51, 23, 42, 37, 47, 90, 34, 11, 50, 32, 78, 42, 54, 28, 28, 36, 5, 51, 45, 44, 47, 83, 48, 5, 38, 98, 73, 97, 72, 81, 45, 40, 94, 51, 1, 35, 63, 69, 48], [53, 69, 64, 24, 50, 8, 77, 80, 54, 15, 52, 5, 17, 55, 80, 35, 7, 80, 14, 91, 34, 30, 61, 99, 59, 39, 32, 18, 39, 1, 26, 75, 2, 8, 46, 63, 24, 99, 97, 23, 86, 58, 77, 61], [79, 15, 11, 8, 31, 31, 21, 37, 12, 64, 24, 38, 23, 39, 91, 48, 23, 67, 55, 62, 56, 10, 62, 3, 96, 60, 54, 42, 63, 18, 5, 74, 32, 19, 49, 7, 47, 13, 9, 66, 50, 89, 49, 17], [9, 14, 44, 11, 27, 85, 41, 71, 76, 60, 29, 15, 82, 35, 91, 54, 31, 26, 34, 47, 8, 46, 85, 99, 61, 50, 15, 25, 66, 7, 16, 69, 11, 72, 90, 17, 6, 94, 12, 34, 47, 62, 88, 96], [7, 41, 81, 66, 10, 11, 72, 78, 94, 4, 11, 45, 73, 25, 88, 38, 25, 50, 2, 14, 98, 86, 3, 84, 7, 84, 29, 7, 7, 97, 15, 23, 70, 10, 19, 14, 25, 96, 64, 64, 33, 8, 15, 97], [31, 90, 82, 65, 98, 19, 90, 90, 7, 1, 20, 19, 39, 39, 56, 30, 94, 65, 43, 74, 12, 89, 81, 28, 16, 88, 54, 74, 31, 91, 44, 52, 80, 13, 95, 62, 10, 10, 79, 91, 71, 31, 66, 92], [87, 2, 17, 28, 71, 7, 17, 37, 37, 72, 2, 25, 25, 35, 64, 95, 66, 69, 90, 63, 34, 16, 80, 77, 41, 78, 25, 9, 99, 3, 62, 17, 2, 79, 16, 82, 83, 67, 97, 49, 76, 32, 25, 32], [22, 53, 6, 71, 49, 38, 44, 43, 77, 95, 28, 19, 76, 12, 82, 48, 91, 25, 66, 50, 78, 28, 44, 69, 26, 83, 25, 15, 96, 20, 77, 1, 33, 88, 8, 38, 28, 79, 34, 34, 29, 78, 9, 52], [44, 10, 43, 22, 19, 24, 34, 3, 14, 37, 37, 30, 87, 48, 75, 99, 84, 99, 18, 65, 52, 93, 64, 90, 73, 91, 11, 23, 40, 72, 7, 61, 98, 11, 8, 42, 32, 86, 40, 21, 19, 90, 95, 52], [12, 51, 98, 82, 51, 4, 86, 40, 74, 1, 82, 26, 56, 54, 89, 81, 38, 73, 25, 18, 3, 95, 8, 86, 38, 6, 55, 56, 65, 40, 88, 40, 68, 41, 84, 40, 93, 7, 16, 79, 5, 52, 20, 71], [56, 34, 12, 72, 32, 49, 62, 57, 25, 69, 16, 51, 76, 23, 40, 41, 15, 39, 77, 63, 63, 22, 95, 86, 73, 26, 28, 44, 35, 92, 42, 52, 7, 23, 71, 88, 92, 99, 44, 4, 81, 78, 51, 69], [29, 17, 82, 37, 10, 15, 25, 54, 37, 30, 60, 73, 16, 85, 56, 98, 42, 99, 14, 46, 78, 50, 72, 61, 72, 4, 39, 99, 71, 55, 50, 46, 80, 21, 96, 49, 47, 10, 70, 29, 60, 16, 24, 60]], 30, 36",
"0"
],
[
"[[10, 67, 53, 58, 73, 24, 62, 89, 36, 84, 54, 60, 46, 96, 96, 92, 26, 82, 97, 63], [48, 41, 1, 86, 53, 43, 18, 90, 36, 96, 15, 29, 95, 85, 70, 25, 86, 25, 26, 76], [62, 70, 29, 37, 26, 52, 66, 37, 64, 30, 55, 90, 77, 26, 1, 91, 73, 37, 75, 10], [37, 25, 56, 27, 77, 68, 12, 12, 31, 9, 54, 8, 6, 38, 8, 59, 80, 17, 35, 10], [84, 63, 29, 21, 63, 58, 6, 76, 14, 43, 20, 88, 95, 82, 81, 30, 36, 53, 41, 35], [12, 20, 52, 81, 63, 57, 16, 97, 91, 89, 19, 62, 95, 56, 54, 13, 6, 61, 67, 86], [88, 77, 55, 5, 57, 19, 14, 94, 46, 2, 65, 49, 64, 86, 45, 54, 89, 67, 3, 90], [46, 18, 40, 16, 53, 95, 61, 90, 34, 18, 86, 6, 99, 4, 42, 20, 33, 87, 51, 81], [91, 94, 23, 19, 60, 94, 94, 16, 43, 45, 94, 78, 23, 79, 86, 82, 70, 15, 79, 60], [43, 54, 93, 45, 56, 71, 75, 98, 99, 22, 35, 76, 48, 98, 67, 29, 12, 97, 37, 77], [33, 63, 58, 43, 8, 94, 28, 18, 4, 11, 80, 38, 35, 67, 48, 41, 4, 21, 62, 17], [48, 23, 50, 36, 84, 41, 78, 91, 78, 38, 72, 52, 41, 21, 14, 53, 32, 43, 1, 65], [22, 5, 5, 11, 55, 80, 64, 98, 49, 41, 77, 61, 75, 48, 65, 51, 4, 2, 54, 55], [36, 33, 97, 47, 39, 18, 23, 11, 93, 47, 58, 76, 33, 76, 18, 21, 22, 53, 87, 72], [77, 9, 31, 43, 61, 78, 92, 74, 94, 66, 63, 54, 94, 39, 5, 91, 5, 36, 7, 87], [10, 50, 16, 13, 94, 93, 26, 48, 80, 23, 56, 93, 85, 46, 16, 37, 73, 86, 50, 41], [1, 49, 47, 8, 53, 12, 8, 62, 90, 60, 29, 61, 87, 81, 87, 76, 59, 44, 72, 79], [9, 63, 35, 78, 26, 57, 4, 37, 95, 93, 13, 52, 40, 76, 28, 9, 94, 80, 76, 96], [48, 39, 62, 36, 11, 9, 59, 79, 23, 73, 62, 64, 5, 77, 9, 1, 51, 66, 91, 53], [38, 84, 93, 19, 79, 34, 77, 87, 14, 83, 86, 10, 36, 65, 98, 5, 78, 15, 66, 87]], 15, 14",
"0"
],
[
"[[77, 56, 21, 16, 3, 4, 66, 99, 72, 94, 34, 33, 76, 11, 85, 89, 9, 74], [19, 31, 23, 11, 31, 52, 97, 53, 56, 6, 28, 4, 68, 74, 92, 14, 90, 64], [61, 79, 82, 4, 63, 17, 35, 22, 53, 84, 18, 49, 57, 77, 67, 52, 63, 50], [15, 14, 6, 59, 1, 21, 5, 46, 43, 70, 54, 51, 90, 94, 92, 97, 91, 53], [91, 42, 70, 95, 16, 16, 29, 89, 52, 60, 1, 60, 39, 54, 48, 71, 94, 69], [4, 86, 36, 45, 15, 74, 86, 35, 5, 55, 14, 51, 81, 76, 76, 67, 32, 1], [79, 1, 94, 83, 6, 91, 26, 32, 55, 77, 17, 90, 37, 99, 68, 40, 44, 87], [63, 57, 15, 2, 26, 35, 92, 15, 16, 53, 14, 4, 49, 99, 18, 47, 35, 85], [72, 52, 11, 94, 54, 45, 98, 39, 94, 4, 68, 72, 6, 18, 94, 33, 61, 22], [20, 62, 47, 73, 41, 88, 83, 88, 96, 73, 4, 67, 28, 91, 11, 56, 95, 15], [32, 29, 44, 46, 61, 48, 51, 64, 59, 47, 49, 17, 30, 75, 30, 10, 58, 76], [96, 46, 69, 13, 88, 44, 82, 58, 93, 96, 43, 51, 91, 86, 68, 72, 6, 83], [84, 40, 99, 55, 58, 57, 32, 5, 30, 83, 30, 27, 50, 42, 56, 11, 18, 88], [3, 94, 46, 14, 38, 91, 36, 62, 80, 54, 62, 60, 83, 93, 97, 4, 38, 36], [70, 84, 86, 57, 43, 23, 7, 59, 5, 24, 12, 37, 49, 10, 82, 83, 45, 71], [25, 75, 55, 79, 31, 96, 47, 61, 25, 1, 66, 12, 16, 46, 84, 52, 57, 50], [86, 98, 54, 8, 35, 6, 85, 99, 58, 48, 49, 76, 29, 36, 82, 77, 72, 68], [95, 53, 87, 51, 41, 30, 56, 16, 31, 33, 48, 91, 17, 90, 47, 59, 75, 7]], 16, 10",
"0"
],
[
"[[34, 1, 55, 60, 18, 68, 91, 6, 94, 26, 74, 59, 4, 58, 39, 76, 49, 81, 16, 6, 76, 4, 89, 24, 75, 14, 42, 58, 50, 97, 13, 37, 17, 12, 49, 87, 66, 41, 35, 8, 92, 76, 97, 76, 87, 34, 31, 98], [90, 60, 31, 75, 59, 62, 78, 99, 32, 64, 98, 14, 13, 54, 62, 66, 71, 90, 8, 14, 79, 19, 22, 89, 55, 57, 14, 64, 90, 48, 26, 49, 5, 1, 92, 2, 25, 59, 49, 62, 56, 24, 79, 60, 70, 18, 93, 11], [27, 45, 53, 94, 75, 27, 40, 42, 87, 55, 73, 75, 86, 13, 77, 16, 41, 8, 30, 71, 34, 11, 70, 90, 59, 4, 86, 38, 9, 17, 5, 44, 39, 49, 47, 16, 80, 5, 84, 77, 73, 65, 33, 67, 90, 10, 6, 91], [86, 24, 6, 58, 22, 53, 14, 6, 38, 5, 94, 58, 77, 96, 52, 88, 57, 76, 19, 80, 52, 61, 41, 25, 6, 42, 34, 25, 77, 58, 12, 1, 45, 42, 67, 9, 8, 53, 79, 53, 54, 34, 69, 21, 68, 49, 86, 9], [71, 11, 83, 90, 39, 31, 56, 64, 69, 40, 91, 57, 59, 4, 97, 70, 27, 33, 85, 21, 17, 82, 10, 16, 12, 99, 89, 82, 34, 40, 70, 53, 88, 77, 18, 15, 99, 93, 62, 25, 3, 98, 9, 43, 46, 16, 16, 88], [43, 71, 10, 81, 76, 35, 37, 17, 59, 7, 86, 34, 53, 27, 4, 49, 61, 89, 73, 14, 38, 7, 63, 73, 8, 78, 29, 28, 62, 72, 25, 54, 89, 86, 99, 15, 59, 29, 57, 67, 67, 18, 72, 85, 51, 76, 69, 43], [19, 57, 50, 26, 95, 65, 89, 97, 97, 20, 48, 74, 57, 29, 79, 66, 4, 42, 67, 73, 55, 90, 58, 46, 34, 44, 78, 6, 28, 68, 61, 76, 22, 1, 25, 9, 81, 17, 79, 54, 83, 80, 43, 39, 13, 31, 75, 52], [46, 21, 43, 57, 20, 54, 26, 30, 88, 15, 65, 17, 37, 49, 52, 84, 81, 57, 72, 89, 46, 79, 89, 42, 20, 8, 76, 45, 34, 18, 90, 24, 36, 70, 80, 18, 22, 58, 93, 92, 95, 72, 95, 46, 36, 65, 5, 16], [7, 96, 69, 10, 42, 76, 23, 25, 73, 93, 61, 72, 85, 70, 34, 77, 36, 83, 88, 75, 23, 33, 71, 63, 69, 60, 54, 89, 68, 56, 30, 47, 99, 22, 17, 95, 68, 42, 67, 96, 39, 90, 3, 71, 75, 5, 19, 43], [23, 91, 35, 60, 60, 78, 49, 80, 78, 42, 86, 42, 3, 2, 7, 45, 57, 84, 49, 35, 91, 16, 39, 51, 34, 1, 99, 57, 36, 18, 34, 44, 62, 84, 41, 15, 78, 78, 46, 33, 39, 2, 75, 79, 7, 90, 99, 34], [70, 61, 64, 66, 92, 86, 11, 85, 26, 99, 11, 10, 32, 72, 3, 52, 21, 2, 52, 25, 17, 69, 22, 9, 97, 65, 79, 90, 93, 46, 84, 33, 33, 84, 3, 52, 70, 18, 15, 3, 90, 70, 7, 77, 78, 90, 41, 95], [20, 62, 11, 12, 16, 66, 64, 45, 10, 33, 79, 52, 34, 17, 57, 47, 24, 37, 57, 89, 74, 63, 38, 59, 50, 90, 27, 60, 63, 72, 89, 24, 76, 42, 82, 30, 69, 30, 22, 49, 83, 29, 26, 70, 57, 48, 54, 40], [81, 50, 53, 62, 11, 44, 96, 77, 7, 23, 22, 15, 77, 77, 46, 22, 86, 98, 62, 44, 30, 3, 55, 64, 92, 18, 22, 78, 1, 64, 39, 45, 25, 91, 23, 92, 37, 47, 66, 54, 43, 68, 4, 61, 21, 21, 3, 73], [94, 88, 19, 88, 94, 42, 38, 60, 83, 36, 92, 52, 72, 89, 53, 52, 25, 28, 49, 77, 42, 75, 80, 46, 15, 80, 40, 51, 58, 89, 4, 19, 54, 66, 39, 40, 12, 13, 5, 92, 86, 37, 85, 72, 6, 60, 55, 36], [18, 28, 83, 83, 52, 63, 61, 28, 18, 14, 98, 53, 76, 8, 4, 98, 33, 29, 61, 12, 29, 99, 51, 31, 1, 74, 14, 37, 22, 77, 69, 41, 77, 87, 8, 46, 25, 20, 60, 8, 54, 69, 88, 52, 70, 89, 45, 69], [98, 51, 93, 91, 42, 33, 87, 62, 1, 31, 5, 12, 37, 87, 29, 40, 59, 11, 1, 46, 78, 82, 90, 6, 23, 98, 90, 79, 36, 87, 83, 25, 61, 89, 11, 63, 3, 11, 96, 98, 23, 81, 62, 83, 79, 4, 43, 54], [61, 26, 32, 69, 69, 62, 95, 36, 41, 46, 32, 98, 62, 43, 49, 22, 33, 88, 36, 29, 15, 9, 30, 74, 96, 77, 41, 13, 86, 43, 96, 50, 91, 46, 29, 26, 84, 89, 49, 52, 10, 27, 8, 57, 55, 36, 54, 82], [89, 6, 53, 46, 51, 50, 49, 69, 7, 38, 53, 96, 84, 23, 13, 62, 40, 35, 12, 41, 38, 72, 72, 40, 83, 57, 2, 58, 18, 42, 20, 51, 71, 11, 71, 93, 53, 16, 35, 17, 8, 99, 57, 39, 99, 14, 22, 7], [98, 11, 25, 47, 36, 80, 96, 77, 93, 84, 52, 25, 14, 19, 13, 98, 75, 70, 94, 27, 87, 53, 8, 31, 1, 41, 31, 75, 51, 36, 69, 43, 2, 12, 19, 77, 7, 89, 61, 96, 99, 5, 10, 99, 78, 67, 98, 94], [61, 48, 23, 56, 86, 87, 32, 87, 39, 93, 86, 41, 48, 32, 8, 80, 31, 54, 77, 48, 8, 28, 31, 73, 48, 84, 32, 4, 45, 7, 19, 34, 91, 36, 13, 9, 50, 83, 9, 50, 90, 79, 78, 15, 37, 80, 52, 99], [27, 5, 64, 47, 73, 88, 29, 61, 88, 91, 99, 44, 25, 93, 77, 80, 76, 95, 27, 59, 98, 97, 69, 99, 5, 58, 7, 16, 74, 43, 48, 59, 4, 33, 36, 75, 10, 73, 60, 48, 85, 35, 77, 61, 26, 61, 65, 30], [39, 84, 58, 47, 4, 37, 53, 41, 54, 75, 98, 50, 98, 36, 16, 95, 85, 32, 63, 45, 70, 40, 92, 81, 30, 76, 41, 21, 86, 71, 13, 56, 48, 13, 36, 5, 39, 5, 21, 44, 87, 31, 26, 28, 34, 65, 75, 8], [8, 89, 99, 81, 99, 51, 90, 59, 75, 96, 23, 49, 29, 63, 15, 86, 50, 26, 51, 55, 45, 89, 88, 49, 62, 92, 52, 78, 58, 53, 63, 84, 45, 43, 52, 3, 12, 42, 4, 87, 81, 32, 52, 44, 79, 1, 62, 63], [77, 11, 44, 2, 2, 81, 31, 15, 15, 58, 6, 90, 84, 99, 95, 64, 67, 21, 92, 22, 97, 35, 13, 77, 37, 46, 9, 92, 10, 26, 90, 94, 25, 57, 4, 36, 61, 97, 1, 18, 86, 32, 8, 67, 81, 70, 48, 90], [17, 69, 7, 39, 49, 60, 41, 58, 75, 85, 89, 62, 11, 55, 85, 37, 20, 24, 80, 36, 68, 75, 94, 3, 11, 42, 5, 43, 75, 76, 16, 78, 79, 61, 67, 78, 79, 61, 8, 24, 66, 31, 97, 35, 91, 33, 31, 60], [25, 42, 49, 77, 52, 3, 53, 62, 34, 91, 21, 85, 24, 73, 60, 10, 55, 97, 7, 73, 41, 39, 86, 40, 58, 76, 9, 12, 7, 91, 32, 43, 48, 95, 55, 71, 39, 41, 26, 61, 30, 98, 89, 39, 14, 40, 6, 76], [64, 99, 34, 93, 26, 89, 72, 1, 31, 68, 93, 46, 44, 96, 88, 92, 6, 70, 68, 33, 83, 39, 15, 42, 70, 86, 53, 78, 23, 9, 15, 10, 17, 71, 96, 22, 8, 40, 90, 94, 32, 95, 90, 7, 13, 49, 4, 97], [53, 17, 23, 66, 81, 12, 48, 28, 48, 71, 54, 35, 93, 21, 87, 34, 50, 17, 17, 1, 14, 27, 15, 35, 23, 32, 21, 56, 52, 43, 45, 38, 74, 52, 28, 40, 51, 99, 72, 47, 82, 78, 9, 16, 44, 94, 38, 90], [52, 48, 12, 76, 55, 89, 94, 97, 52, 99, 1, 29, 41, 1, 78, 43, 86, 16, 93, 29, 25, 83, 83, 78, 71, 57, 98, 19, 19, 25, 13, 55, 52, 95, 75, 14, 28, 38, 93, 88, 69, 53, 20, 44, 67, 57, 94, 7], [34, 46, 56, 14, 19, 41, 73, 18, 96, 99, 45, 82, 1, 93, 51, 80, 5, 20, 14, 29, 96, 16, 92, 18, 17, 12, 87, 77, 65, 70, 46, 90, 32, 53, 56, 69, 50, 50, 92, 52, 84, 42, 58, 11, 90, 80, 55, 66], [2, 35, 27, 4, 13, 85, 68, 1, 21, 62, 1, 95, 16, 32, 19, 80, 37, 81, 6, 97, 44, 95, 55, 88, 35, 16, 75, 35, 57, 81, 89, 9, 41, 68, 53, 58, 80, 86, 84, 43, 65, 69, 23, 32, 13, 36, 52, 5], [11, 74, 57, 15, 92, 66, 10, 83, 98, 58, 32, 95, 13, 66, 39, 33, 23, 18, 86, 90, 85, 5, 96, 2, 40, 17, 19, 7, 39, 32, 70, 90, 39, 2, 69, 57, 20, 47, 81, 20, 52, 81, 17, 91, 72, 17, 20, 98], [96, 37, 13, 9, 80, 60, 58, 46, 62, 79, 36, 48, 34, 6, 44, 30, 56, 94, 34, 79, 76, 89, 60, 3, 18, 8, 45, 95, 68, 5, 9, 82, 8, 34, 20, 27, 34, 34, 12, 15, 58, 59, 80, 76, 10, 65, 36, 39], [20, 10, 39, 70, 21, 21, 80, 89, 99, 42, 40, 67, 73, 18, 16, 74, 33, 92, 22, 28, 13, 19, 81, 38, 52, 70, 41, 39, 13, 87, 53, 61, 48, 43, 31, 14, 22, 19, 39, 95, 61, 49, 6, 36, 61, 15, 81, 53], [68, 26, 46, 53, 96, 87, 73, 7, 35, 56, 89, 41, 58, 24, 14, 4, 24, 77, 76, 47, 19, 60, 85, 1, 87, 60, 89, 88, 20, 60, 57, 56, 11, 54, 90, 85, 79, 63, 37, 33, 11, 6, 12, 9, 16, 41, 68, 52], [44, 20, 66, 30, 16, 72, 15, 3, 31, 32, 69, 93, 77, 43, 50, 63, 72, 42, 98, 28, 49, 9, 34, 49, 65, 89, 80, 31, 67, 12, 75, 27, 60, 65, 36, 96, 86, 70, 2, 39, 63, 46, 95, 40, 10, 99, 27, 22], [67, 2, 94, 6, 87, 53, 8, 87, 36, 39, 72, 59, 85, 60, 19, 36, 71, 71, 16, 48, 68, 35, 3, 99, 81, 31, 40, 45, 49, 33, 54, 69, 75, 78, 7, 60, 5, 5, 42, 57, 94, 75, 9, 32, 83, 1, 49, 15], [23, 31, 16, 78, 68, 20, 21, 55, 59, 71, 90, 72, 43, 2, 79, 11, 93, 64, 19, 21, 84, 89, 93, 1, 20, 5, 39, 77, 81, 82, 19, 44, 59, 71, 7, 63, 79, 94, 37, 63, 89, 52, 52, 30, 61, 22, 33, 3], [98, 99, 44, 46, 75, 2, 87, 79, 39, 85, 80, 76, 21, 22, 67, 46, 88, 94, 32, 43, 27, 41, 31, 99, 15, 25, 99, 66, 55, 92, 11, 18, 14, 36, 43, 12, 9, 50, 43, 97, 25, 60, 9, 70, 12, 43, 95, 87], [51, 61, 10, 97, 97, 32, 40, 18, 14, 90, 39, 1, 57, 62, 52, 51, 35, 94, 48, 63, 72, 16, 85, 24, 1, 66, 61, 7, 17, 50, 82, 31, 72, 83, 95, 15, 57, 99, 65, 51, 18, 73, 76, 94, 35, 73, 36, 84], [22, 73, 81, 80, 43, 73, 95, 3, 24, 5, 42, 31, 49, 54, 97, 53, 69, 25, 48, 67, 39, 98, 83, 83, 55, 74, 45, 83, 78, 15, 95, 56, 94, 80, 42, 38, 95, 71, 49, 94, 7, 7, 47, 13, 45, 25, 50, 64], [88, 80, 68, 97, 95, 56, 44, 59, 2, 30, 62, 54, 47, 2, 56, 68, 22, 87, 81, 71, 73, 80, 64, 87, 34, 29, 71, 98, 22, 64, 78, 29, 90, 15, 25, 66, 39, 92, 91, 75, 79, 11, 35, 57, 95, 74, 13, 27], [23, 99, 14, 62, 52, 33, 98, 58, 62, 13, 77, 21, 34, 36, 81, 40, 1, 1, 71, 59, 2, 85, 35, 50, 48, 62, 24, 24, 79, 26, 14, 52, 93, 76, 88, 98, 10, 34, 45, 73, 51, 31, 22, 19, 64, 95, 6, 8], [20, 88, 73, 46, 27, 35, 76, 10, 38, 80, 58, 26, 3, 72, 29, 45, 46, 12, 91, 23, 9, 15, 33, 15, 24, 14, 40, 73, 14, 4, 89, 78, 40, 11, 59, 76, 77, 80, 33, 3, 61, 1, 54, 65, 89, 53, 54, 38], [22, 73, 56, 45, 75, 2, 10, 5, 88, 72, 42, 34, 24, 12, 52, 23, 48, 69, 19, 77, 35, 8, 76, 85, 49, 92, 76, 5, 13, 54, 49, 58, 15, 45, 96, 72, 81, 64, 54, 82, 87, 4, 60, 23, 8, 95, 40, 13], [95, 49, 45, 39, 82, 36, 91, 66, 26, 2, 33, 80, 4, 55, 32, 81, 61, 7, 79, 83, 56, 67, 67, 5, 49, 20, 3, 61, 23, 16, 10, 64, 62, 36, 79, 74, 49, 67, 64, 14, 84, 29, 68, 52, 62, 39, 54, 50], [75, 71, 26, 55, 45, 54, 26, 94, 10, 44, 68, 30, 12, 87, 47, 72, 92, 85, 25, 78, 33, 42, 90, 33, 45, 50, 61, 14, 82, 61, 26, 81, 58, 4, 88, 69, 5, 91, 3, 24, 90, 88, 42, 52, 96, 54, 6, 49], [56, 17, 62, 40, 7, 94, 96, 82, 92, 15, 68, 71, 56, 47, 5, 7, 63, 28, 76, 93, 25, 71, 47, 20, 77, 48, 95, 3, 69, 77, 77, 50, 60, 66, 91, 75, 1, 11, 13, 39, 30, 7, 89, 19, 80, 22, 75, 68]], 35, 31",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( char str [ ], int n ) {
int dp [ n ] [ n ];
memset ( dp, 0, sizeof ( dp ) );
bool P [ n ] [ n ];
memset ( P, false, sizeof ( P ) );
for ( int i = 0;
i < n;
i ++ ) P [ i ] [ i ] = true;
for ( int i = 0;
i < n - 1;
i ++ ) {
if ( str [ i ] == str [ i + 1 ] ) {
P [ i ] [ i + 1 ] = true;
dp [ i ] [ i + 1 ] = 1;
}
}
for ( int gap = 2;
gap < n;
gap ++ ) {
for ( int i = 0;
i < n - gap;
i ++ ) {
int j = gap + i;
if ( str [ i ] == str [ j ] && P [ i + 1 ] [ j - 1 ] ) P [ i ] [ j ] = true;
if ( P [ i ] [ j ] == true ) dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] + 1 - dp [ i + 1 ] [ j - 1 ];
else dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] - dp [ i + 1 ] [ j - 1 ];
}
}
return dp [ 0 ] [ n - 1 ];
}
| [] | null | [] | MAXIMIZE_VOLUME_CUBOID_GIVEN_SUM_SIDES_1 | python | [] | def f_gold ( s ) :
length = int ( s / 3 )
s -= length
breadth = s / 2
height = s - breadth
return int ( length * breadth * height )
| code_translation | [
[
"8",
"18"
],
[
"96",
"32768"
],
[
"96",
"32768"
],
[
"96",
"32768"
],
[
"12",
"64"
],
[
"95",
"31744"
],
[
"72",
"13824"
],
[
"81",
"19683"
],
[
"42",
"2744"
],
[
"13",
"81"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b, int c ) {
if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b;
else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a;
else return c;
}
| [] | null | [] | NUMBER_OF_BINARY_TREES_FOR_GIVEN_PREORDER_SEQUENCE_LENGTH | python | [] | def f_gold(n):
BT = [0] * (n + 1)
BT[0] = BT[1] = 1
for i in range(2, n + 1):
for j in range(i):
BT[i] += BT[j] * BT[i - j - 1]
return BT[n]
| code_translation | [
[
"87",
"16435314834665426797069144960762886143367590394940"
],
[
"69",
"337485502510215975556783793455058624700"
],
[
"15",
"9694845"
],
[
"11",
"58786"
],
[
"11",
"58786"
],
[
"15",
"9694845"
],
[
"47",
"33868773757191046886429490"
],
[
"65",
"1440418573150919668872489894243865350"
],
[
"50",
"1978261657756160653623774456"
],
[
"58",
"104088460289122304033498318812080"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int x ) {
return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 );
}
| [] | null | [] | CHECK_WHETHER_ARITHMETIC_PROGRESSION_CAN_FORMED_GIVEN_ARRAY | python | [] | def f_gold ( arr , n ) :
if ( n == 1 ) : return True
arr.sort ( )
d = arr [ 1 ] - arr [ 0 ]
for i in range ( 2 , n ) :
if ( arr [ i ] - arr [ i - 1 ] != d ) :
return False
return True
| code_translation | [
[
"[1, 4, 16, 64], 4",
"False"
],
[
"[0, 4, 8, 12], 4",
"True"
],
[
"[-2, 0, 2, 4, 6], 5",
"True"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 7",
"True"
],
[
"[46, 56, 66, 76, 86], 5",
"True"
],
[
"[46, 56, 56, 66, 76, 86], 6",
"False"
],
[
"[7, 9, 11, 21, 44, 45, 61, 67, 78, 97, 98, 99], 11",
"False"
],
[
"[-96, -84, -74, -70, -68, -62, -50, -50, -38, -36, -36, -36, -34, -34, -28, -28, -26, -18, -12, -4, -4, -2, -2, 6, 6, 14, 24, 34, 36, 44, 50, 54, 54, 62, 64, 66, 70, 74, 74, 78, 84, 86], 33",
"False"
],
[
"[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], 33",
"False"
],
[
"[1, 3, 5, 11, 14, 15, 15, 17, 18, 19, 20, 20, 22, 32, 33, 35, 36, 37, 39, 44, 45, 46, 51, 54, 57, 58, 61, 61, 63, 64, 67, 69, 70, 70, 79, 82, 86, 89, 92, 93, 95, 99], 40",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int ans = 0, temp = 0, num;
for ( int i = 1;
i <= n && temp < n;
i ++ ) {
temp = i - 1;
num = 1;
while ( temp < n ) {
if ( temp + i <= n ) ans += ( i * num );
else ans += ( ( n - temp ) * num );
temp += i;
num ++;
}
}
return ans;
}
| [] | null | [] | COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY | python | [] | def f_gold ( arr , n ) :
result = 0 ;
for i in range ( 0 , n ) :
for j in range ( i + 1 , n ) :
product = arr [ i ] * arr [ j ] ;
for k in range ( 0 , n ) :
if ( arr [ k ] == product ) :
result = result + 1 ;
break ;
return result ;
| code_translation | [
[
"[3, 7, 26, 40, 46, 89, 99], 5",
"0"
],
[
"[98, 42, -24, -60, 74, 86, 6, 8, 72, -58, 38, -20, 6, -6, 8, 48, -34, 30, 60, 66, 38, -54, 8, -94, -8, 0, -64, -94, -94, -72, -84, -36, 88, -62, -88, 46, -4, 88], 24",
"6"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 44",
"946"
],
[
"[37, 97, 57, 82, 29, 68, 94, 38, 81, 48, 13, 84, 57, 5, 27, 87, 11, 35, 82, 53, 67, 31, 15, 99, 6, 93, 91, 92, 3, 23, 90, 27, 6, 33, 78, 3, 19, 19, 27], 36",
"18"
],
[
"[-80, -74, -72, -72, -66, -66, -62, -50, -44, -44, -28, -24, -24, -22, -16, -10, -6, -4, -2, 2, 2, 4, 12, 16, 16, 28, 30, 32, 32, 38, 38, 72, 84, 86, 88, 90, 96], 34",
"15"
],
[
"[0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1], 18",
"153"
],
[
"[25, 67], 1",
"0"
],
[
"[82, 74, -82, 22, -28, -78, -22, -86, -74, 42, -6, 54, -88, -92, -14, -50, 68, 46, -50, 46, -18, 66, -76, -30, 36, 12, 66], 14",
"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], 32",
"496"
],
[
"[50, 23, 56, 9], 3",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
if ( n <= 0 ) return 0;
int fibo [ n + 1 ];
fibo [ 0 ] = 0, fibo [ 1 ] = 1;
int sum = fibo [ 0 ] + fibo [ 1 ];
for ( int i = 2;
i <= n;
i ++ ) {
fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ];
sum += fibo [ i ];
}
return sum;
}
| [] | null | [] | MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1 | python | [] | def f_gold ( str ) :
n = len ( str )
count = 0
res = str [ 0 ]
cur_count = 1
for i in range ( n ) :
if ( i < n - 1 and str [ i ] == str [ i + 1 ] ) :
cur_count += 1
else :
if cur_count > count :
count = cur_count
res = str [ i ]
cur_count = 1
return res
| code_translation | [
[
"'geeekk'",
"'e'"
],
[
"'3786868'",
"'3'"
],
[
"'110'",
"'1'"
],
[
"'aaaabbcbbb'",
"'a'"
],
[
"'11'",
"'1'"
],
[
"'011101'",
"'1'"
],
[
"'WoHNyJYLC'",
"'W'"
],
[
"'3141711779'",
"'1'"
],
[
"'10111101101'",
"'1'"
],
[
"'aabbabababcc'",
"'a'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr1 [ ], int n, int arr2 [ ], int m ) {
int table [ m ];
for ( int j = 0;
j < m;
j ++ ) table [ j ] = 0;
for ( int i = 0;
i < n;
i ++ ) {
int current = 0;
for ( int j = 0;
j < m;
j ++ ) {
if ( arr1 [ i ] == arr2 [ j ] ) if ( current + 1 > table [ j ] ) table [ j ] = current + 1;
if ( arr1 [ i ] > arr2 [ j ] ) if ( table [ j ] > current ) current = table [ j ];
}
}
int result = 0;
for ( int i = 0;
i < m;
i ++ ) if ( table [ i ] > result ) result = table [ i ];
return result;
}
| [] | null | [] | C_PROGRAM_CONCATENATE_STRING_GIVEN_NUMBER_TIMES | python | [] | def f_gold ( s , n ) :
s1 = s
for i in range ( 1 , n ) :
s += s1
return s
| code_translation | [
[
"'LPWsaI', 41",
"'LPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaILPWsaI'"
],
[
"'9037515104', 72",
"'903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104903751510490375151049037515104'"
],
[
"'00100010010111', 95",
"'0010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111001000100101110010001001011100100010010111'"
],
[
"'SbwipuE', 27",
"'SbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuESbwipuE'"
],
[
"'574314109', 5",
"'574314109574314109574314109574314109574314109'"
],
[
"'1101', 70",
"'1101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101110111011101'"
],
[
"'f', 91",
"'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'"
],
[
"'068', 50",
"'068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068068'"
],
[
"'000011001', 38",
"'000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001000011001'"
],
[
"'BWbUtIkC', 79",
"'BWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkCBWbUtIkC'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_set < int > us;
int even_count = 0;
for ( int i = 0;
i < n;
i ++ ) if ( arr [ i ] % 2 == 0 ) us . insert ( arr [ i ] );
unordered_set < int > :: iterator itr;
for ( itr = us . begin ( );
itr != us . end ( );
itr ++ ) even_count ++;
return ( pow ( 2, even_count ) - 1 );
}
| [] | null | [] | COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY | python | [] | def f_gold ( arr , n , x ) :
res = 0
for i in range ( n ) :
if x == arr [ i ] :
res += 1
return res
| code_translation | [
[
"[16, 18, 24, 27, 34, 36, 41, 43, 43, 52, 59, 76, 86, 87, 90, 91, 94, 96, 98, 98], 14, 43",
"2"
],
[
"[64, 66, -36], 1, 64",
"1"
],
[
"[0, 0, 0], 2, 0",
"2"
],
[
"[9, 85, 34, 43, 70, 96, 44, 7, 27, 33, 34, 5, 91, 84, 76, 45, 20, 37, 15, 37, 20, 24, 13, 49, 74, 13, 50, 81, 81, 66, 23, 36, 91, 80, 61, 15, 96, 70, 90, 25, 16, 62, 75, 63, 6, 65, 38, 12], 43, 5",
"1"
],
[
"[-98, -98, -98, -34, -32, -26, -12, 0, 18, 52, 68, 72], 11, -98",
"3"
],
[
"[1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1], 11, 1",
"5"
],
[
"[1, 3, 6, 6, 10, 12, 15, 16, 21, 22, 23, 29, 33, 37, 40, 40, 43, 52, 55, 59, 64, 65, 71, 72, 80, 83, 86, 86, 88, 88], 29, 40",
"2"
],
[
"[-14, -30, -38, -38, -8, 40, -34, 2, -84, 68, -42, 38, -14, 0, -64, 12, -2, -38, -8, -44, -88, -34, -80, -36, 82, 70, 96, -32, 16, -52, -12, -46, -28, -86, 30, -14, 50, -44, 22, 30, -4, 78, 52], 39, 26",
"0"
],
[
"[1, 1, 1, 1], 2, 3",
"0"
],
[
"[11, 50, 1, 93, 12, 7, 55, 35, 36, 62, 61, 71, 16], 11, 8",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int low, int high ) {
if ( high < low ) return 0;
if ( high == low ) return low;
int mid = low + ( high - low ) / 2;
if ( mid < high && arr [ mid + 1 ] < arr [ mid ] ) return ( mid + 1 );
if ( mid > low && arr [ mid ] < arr [ mid - 1 ] ) return mid;
if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr, low, mid - 1 );
return f_gold ( arr, mid + 1, high );
}
| [] | null | [] | FIRST_ELEMENT_OCCURRING_K_TIMES_ARRAY | python | [] | def f_gold ( arr , n , k ) :
count_map = { } ;
for i in range ( 0 , n ) :
if ( arr [ i ] in count_map.keys ( ) ) :
count_map [ arr [ i ] ] += 1
else :
count_map [ arr [ i ] ] = 1
i += 1
for i in range ( 0 , n ) :
if ( count_map [ arr [ i ] ] == k ) :
return arr [ i ]
i += 1
return - 1
| code_translation | [
[
"[2, 3, 4, 4, 7, 18, 20, 23, 27, 30, 31, 31, 32, 35, 36, 43, 45, 46, 49, 50, 53, 55, 59, 60, 64, 64, 65, 68, 78, 80, 80, 85, 95], 30, 2",
"4"
],
[
"[-26, 32, 36, 6, 64, 24, -28, 96], 6, 3",
"-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], 15, 7",
"-1"
],
[
"[38, 40, 43, 70, 20, 40, 95, 96, 81, 82], 9, 1",
"38"
],
[
"[-68, -8, -8, 16, 24, 54], 3, 2",
"-8"
],
[
"[1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1], 6, 4",
"0"
],
[
"[13, 18, 19, 28, 31, 34, 49, 49, 53, 57, 58, 62, 75, 76, 77, 78, 80, 84, 84, 85, 87, 91, 98, 99], 20, 2",
"49"
],
[
"[-4, 24, -86, -84, 30, -16, 12, -92, -68, 22], 6, 5",
"-1"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], 8, 10",
"-1"
],
[
"[55, 44, 75, 97, 25, 65, 76, 53, 20, 78, 25, 59, 61, 29, 81, 35, 15, 78, 41, 44, 31, 33, 39, 93, 26, 67], 23, 20",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int set [ ], int n ) {
if ( n <= 2 ) return n;
int L [ n ] [ n ];
int llap = 2;
for ( int i = 0;
i < n;
i ++ ) L [ i ] [ n - 1 ] = 2;
for ( int j = n - 2;
j >= 1;
j -- ) {
int i = j - 1, k = j + 1;
while ( i >= 0 && k <= n - 1 ) {
if ( set [ i ] + set [ k ] < 2 * set [ j ] ) k ++;
else if ( set [ i ] + set [ k ] > 2 * set [ j ] ) {
L [ i ] [ j ] = 2, i --;
}
else {
L [ i ] [ j ] = L [ j ] [ k ] + 1;
llap = max ( llap, L [ i ] [ j ] );
i --;
k ++;
}
}
while ( i >= 0 ) {
L [ i ] [ j ] = 2;
i --;
}
}
return llap;
}
| [] | null | [] | SPLIT_ARRAY_ADD_FIRST_PART_END | python | [] | def f_gold ( arr , n , k ) :
for i in range ( 0 , k ) :
x = arr [ 0 ]
for j in range ( 0 , n - 1 ) :
arr [ j ] = arr [ j + 1 ]
arr [ n - 1 ] = x
| code_translation | [
[
"[75], 0, 0",
"None"
],
[
"[12, -58, 90, -30, 10, -88, 2, -14, 82, -82, -58, -60, -38, 48, -2, 32, -48, -46, 90, -54, -18, 28, 72, 86, 0, -2, -74, -46, 2, -74], 27, 17",
"None"
],
[
"[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 7, 7",
"None"
],
[
"[51, 26, 36, 10, 62, 62, 56, 61, 67, 86, 97, 31, 93, 32, 1, 14, 25, 24, 30, 1, 44, 7, 45, 98, 56, 68, 53, 59, 30, 90, 79, 22], 23, 24",
"None"
],
[
"[-88, -72, -64, -46, -40, -16, -8, 0, 22, 34, 44], 6, 6",
"None"
],
[
"[1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0], 23, 30",
"None"
],
[
"[83, 8, 17, 20, 23, 31, 32, 37, 37, 44, 45, 48, 64, 64, 67, 69, 71, 75, 77, 78, 81, 87, 89, 92, 94], 21, 20",
"None"
],
[
"[32, 22, 96, -2, 70, 40, -46, 98, 34, 2, -8, -88, -68, 48, 8, 50, 30, -88, 74, -16, 6, 74, 36, 94], 23, 13",
"None"
],
[
"[0, 1, 0, 0, 0, 1, 1, 1, 1], 5, 8",
"None"
],
[
"[95, 32, 80, 14, 35, 25, 60, 86, 45, 29, 94, 6, 63, 66, 38], 9, 7",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int x, int y ) {
int res = 1;
for ( int i = 0;
i < y;
i ++ ) res = ( res * x ) % 10;
return res;
}
| [
"import heapq"
] | null | [] | K_TH_LARGEST_SUM_CONTIGUOUS_SUBARRAY | python | [] | import heapq
def f_gold ( arr , n , k ) :
sum = [ ]
sum.append ( 0 )
sum.append ( arr [ 0 ] )
for i in range ( 2 , n + 1 ) :
sum.append ( sum [ i - 1 ] + arr [ i - 1 ] )
Q = [ ]
heapq.heapify ( Q )
for i in range ( 1 , n + 1 ) :
for j in range ( i , n + 1 ) :
x = sum [ j ] - sum [ i - 1 ]
if len ( Q ) < k :
heapq.heappush ( Q , x )
else :
if Q [ 0 ] < x :
heapq.heappop ( Q )
heapq.heappush ( Q , x )
return Q [ 0 ]
| code_translation | [
[
"[2, 3, 5, 7, 8, 29, 29, 44, 47, 52, 60, 65, 73, 83, 87, 92, 92, 95], 10, 12",
"157"
],
[
"[44, -98, -10, 14, -6, -46, 6, -74, -4, 36, 10, -2, 30, 28, 96, -84, -36, -76, 64, -74, -20, 94, -4, 14, 78, 52, -56, 98, -68, -76, -10, 20, 88, -98, 96, 80, 96, -32, -40, -30, 82], 34, 37",
"166"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 16, 15",
"5"
],
[
"[58, 21, 97, 78, 78, 57, 29, 33, 57, 81, 66, 32, 11, 82, 28, 72, 46, 67, 42, 15, 60, 45, 16, 37], 14, 20",
"508"
],
[
"[-92, -90, -88, -84, -68, -66, -62, -58, -52, -44, -22, -16, -4, -4, 2, 12, 14, 14, 24, 26, 44, 56, 80, 90, 92, 94, 98], 15, 25",
"-86"
],
[
"[1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], 5, 5",
"3"
],
[
"[3, 4, 8, 12, 13, 14, 17, 19, 23, 24, 28, 29, 30, 35, 35, 38, 44, 47, 47, 53, 55, 56, 56, 58, 66, 67, 70, 71, 72, 73, 74, 75, 77, 78, 82, 84, 87, 87, 87, 88, 88, 93, 94, 96], 26, 25",
"721"
],
[
"[20, -58, 94, -70, 18, 16, -46, 38, -44, -92, -20, -70, -30, 50], 11, 7",
"36"
],
[
"[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], 19, 23",
"0"
],
[
"[90, 77, 82, 38, 96, 62, 66, 4, 93, 30, 75, 22, 26, 61, 40, 11, 38, 55, 88, 24, 66, 47, 40, 71, 21, 5, 18, 31, 26, 56, 19, 47, 71, 34], 28, 32",
"1041"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n ) {
unordered_set < int > s ( a, a + n );
int arr_sum = accumulate ( a, a + n, 0 );
int set_sum = accumulate ( s . begin ( ), s . end ( ), 0 );
return ( 3 * set_sum - arr_sum ) / 2;
}
| [] | null | [] | TEMPLE_OFFERINGS | python | [] | def f_gold ( n , templeHeight ) :
sum = 0
for i in range ( n ) :
left = 0
right = 0
for j in range ( i - 1 , - 1 , - 1 ) :
if ( templeHeight [ j ] < templeHeight [ j + 1 ] ) :
left += 1
else :
break
for j in range ( i + 1 , n ) :
if ( templeHeight [ j ] < templeHeight [ j - 1 ] ) :
right += 1
else :
break
sum += max ( right , left ) + 1
return sum
| code_translation | [
[
"12, [3, 11, 12, 15, 16, 21, 24, 29, 32, 39, 42, 44, 51, 68, 79, 81, 81, 85, 92, 94]",
"78"
],
[
"46, [76, 48, 88, 70, -64, 66, -6, -58, 26, -28, -42, -94, 80, -4, -56, -46, 4, 90, -12, -78, 64, 18, -38, 26, 56, -24, 66, -18, -12, 0, -94, 12, -10, 4, -68, -20, 88, 2, -58, 16, 46, -80, -42, 44, -86, 96, -44]",
"92"
],
[
"16, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]",
"17"
],
[
"9, [2, 95, 20, 50, 2, 58, 20, 14, 65, 69, 78, 7]",
"15"
],
[
"0, [-88]",
"0"
],
[
"38, [0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0]",
"50"
],
[
"28, [2, 3, 6, 8, 9, 10, 14, 17, 17, 22, 25, 27, 29, 29, 30, 32, 33, 35, 38, 42, 50, 51, 51, 57, 59, 59, 59, 60, 62, 62, 63, 67, 70, 75, 76, 77, 81, 81, 83, 84]",
"106"
],
[
"9, [-52, 62, 74, -62, -58, 62, 38, 42, -50, 20]",
"16"
],
[
"18, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]",
"19"
],
[
"29, [96, 15, 9, 9, 40, 34, 17, 4, 51, 49, 34, 66, 97, 28, 64, 65, 92, 56, 74, 48, 43, 17, 82, 8, 21, 39, 83, 35, 42, 37, 64, 34, 42, 59, 45, 61, 55, 93, 94, 29, 20, 96, 77, 66]",
"64"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n, int m ) {
return ( m * n * ( n + 1 ) * ( m + 1 ) ) / 4;
}
| [] | null | [] | MINIMUM_NUMBER_OF_JUMPS_TO_REACH_END_OF_A_GIVEN_ARRAY_2 | python | [] | def f_gold ( arr , n ) :
jumps = [ 0 for i in range ( n ) ]
for i in range ( n - 2 , - 1 , - 1 ) :
if ( arr [ i ] == 0 ) :
jumps [ i ] = float ( 'inf' )
elif ( arr [ i ] >= n - i - 1 ) :
jumps [ i ] = 1
else :
min = float ( 'inf' )
for j in range ( i + 1 , n ) :
if ( j <= arr [ i ] + i ) :
if ( min > jumps [ j ] ) :
min = jumps [ j ]
if ( min != float ( 'inf' ) ) :
jumps [ i ] = min + 1
else :
jumps [ i ] = min
return jumps [ 0 ]
| code_translation | [
[
"[1, 6, 7, 14, 22, 32, 42, 42, 43, 48, 54, 57, 59, 69, 84, 92, 98], 11",
"3"
],
[
"[98, -66, -70, -64, -88, -76, -90, 16, 58, 68, -10, -42, -28, 10, 72, 68, -30, 60, 92, -56, 80, -4, -82, 30, 58, 98, -56, 98, -14, -38, -20, -74, -46, -22, 78, 36, -54, -64, 80, -10, -26, 82, 96, -72, -36, -36, -32, -88, 0], 26",
"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], 41",
"inf"
],
[
"[64, 25, 63, 54, 7, 43, 79, 27, 34, 13, 84, 80, 34, 48, 5, 56, 67, 2], 10",
"1"
],
[
"[2, 28, 68], 2",
"1"
],
[
"[1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0], 11",
"inf"
],
[
"[1, 1, 9, 16, 17, 18, 19, 20, 21, 22, 25, 28, 29, 29, 36, 37, 40, 40, 42, 48, 49, 49, 55, 63, 65, 66, 69, 70, 72, 73, 76, 77, 77, 79, 79, 81, 81, 93, 95, 99], 24",
"4"
],
[
"[38, -42, -8, 98, -90, 38, 88, -8, 70, -28, -50, -22, 28, 24, 88, -26, 58, 48, 6, 0, 68, -6, 8, 54, -2, 46, -44, 96, -82, -14, -48, -18, -16, -48, -44, -16, -58, -64], 34",
"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], 14",
"inf"
],
[
"[98, 46, 12, 55, 57, 11, 25, 64, 92, 35, 90, 72, 95, 30, 75, 67, 64, 12, 31, 84, 70, 96, 71, 80, 62, 34, 70, 10, 54], 25",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int x, int y, int n ) {
int dp [ n + 1 ];
dp [ 0 ] = false;
dp [ 1 ] = true;
for ( int i = 2;
i <= n;
i ++ ) {
if ( i - 1 >= 0 and ! dp [ i - 1 ] ) dp [ i ] = true;
else if ( i - x >= 0 and ! dp [ i - x ] ) dp [ i ] = true;
else if ( i - y >= 0 and ! dp [ i - y ] ) dp [ i ] = true;
else dp [ i ] = false;
}
return dp [ n ];
}
| [] | null | [] | MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED | python | [] | def f_gold ( arr , n ) :
dp = [ 0 ] * n
if ( n == 1 ) :
return arr [ 0 ]
if ( n == 2 ) :
return min ( arr [ 0 ] , arr [ 1 ] )
if ( n == 3 ) :
return min ( arr [ 0 ] , min ( arr [ 1 ] , arr [ 2 ] ) )
if ( n == 4 ) :
return min ( min ( arr [ 0 ] , arr [ 1 ] ) , min ( arr [ 2 ] , arr [ 3 ] ) )
dp [ 0 ] = arr [ 0 ]
dp [ 1 ] = arr [ 1 ]
dp [ 2 ] = arr [ 2 ]
dp [ 3 ] = arr [ 3 ]
for i in range ( 4 , n ) :
dp [ i ] = arr [ i ] + min ( min ( dp [ i - 1 ] , dp [ i - 2 ] ) , min ( dp [ i - 3 ] , dp [ i - 4 ] ) )
return min ( min ( dp [ n - 1 ] , dp [ n - 2 ] ) , min ( dp [ n - 4 ] , dp [ n - 3 ] ) )
| code_translation | [
[
"[2, 7, 11, 12, 13, 14, 18, 20, 22, 26, 28, 29, 31, 32, 33, 35, 38, 38, 40, 40, 41, 42, 43, 44, 45, 53, 54, 54, 59, 62, 69, 72, 74, 75, 75, 76, 79, 83, 84, 89, 91, 96, 97, 98, 99, 99], 30",
"227"
],
[
"[50, -22, 90, -40, 46, 86, 50, 44, 12, -42, -58, 6, 52, -16, 4, 46, 44, 0, -64, 78, -14, -80, 30, -66, 78, 24, 28, 10, -72, -44, -28, -32, -30, 94, -22, 26, 16, 20, -52, -16, -80, 2, -56, -70, -76, 60, 62], 40",
"-622"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 14",
"0"
],
[
"[63, 18, 13, 2, 1, 94, 11, 49, 82, 97, 75, 98, 25, 20, 96, 82, 60, 94, 24, 15, 79, 48, 40, 60, 9, 62, 24, 69, 31, 78, 34, 83, 22, 88], 33",
"281"
],
[
"[-74, 16, 96], 1",
"-74"
],
[
"[0, 0, 1, 0, 1, 1], 5",
"0"
],
[
"[2, 5, 6, 8, 10, 16, 18, 19, 20, 21, 24, 30, 34, 36, 39, 42, 52, 53, 54, 55, 56, 57, 70, 71, 72, 73, 75, 75, 77, 78, 82, 85, 87, 88, 89, 91], 25",
"188"
],
[
"[-40, 12, -86, -54, -68, 32, 10, -24, -46, 54, -64, 20, 22, 88, 62, -4, -2, -8, -32, 88, -4, 38, 4, 86, 82, -16, -76, -44, 54, -24, -92, 74, 50, -52, 52], 22",
"-318"
],
[
"[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], 20",
"0"
],
[
"[4, 53, 96, 86, 69, 81, 86, 95, 80, 43, 25, 66, 24, 72], 12",
"153"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
queue < int > q;
sort ( arr, arr + n );
q . push ( arr [ 0 ] );
for ( int i = 1;
i < n;
i ++ ) {
int now = q . front ( );
if ( arr [ i ] >= 2 * now ) q . pop ( );
q . push ( arr [ i ] );
}
return q . size ( );
}
| [] | null | [] | PRODUCT_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING | python | [] | def f_gold ( tree , k ) :
level = - 1
product = 1
n = len ( tree )
for i in range ( 0 , n ) :
if ( tree [ i ] == '(' ) :
level += 1
elif ( tree [ i ] == ')' ) :
level -= 1
else :
if ( level == k ) :
product *= ( int ( tree [ i ] ) - int ( '0' ) )
return product
| code_translation | [
[
"'(0(5(6()())(4()(9()())))(7(1()())(3()())))', 2",
"72"
],
[
"'(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))', 3",
"15"
],
[
"'(0(5(6()())(4()(9()())))(7(1()())(3()())))', 1",
"35"
],
[
"'(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))', 2",
"0"
],
[
"'(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))', 4",
"1"
],
[
"'(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))', 100",
"1"
],
[
"'(0(5(6()())(4()(9()())))(7(1()())(3()())))', 3",
"9"
],
[
"'(0(5(6()())(4()(9()())))(7(1()())(3()())))', 0",
"0"
],
[
"'0010', 12",
"1"
],
[
"'kjtdgmy', 97",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int k ) {
return k * k * k;
}
| [] | null | [] | RECURSIVE_C_PROGRAM_LINEARLY_SEARCH_ELEMENT_GIVEN_ARRAY | python | [] | def f_gold ( arr , l , r , x ) :
if r < l :
return - 1
if arr [ l ] == x :
return l
if arr [ r ] == x :
return r
return f_gold ( arr , l + 1 , r - 1 , x )
| code_translation | [
[
"[10, 74, 5], 0, 2, 1",
"-1"
],
[
"[-90, 72, 36, 96, 42, 0, -66, 5], 0, 7, 96",
"3"
],
[
"[0, 5], 0, 1, -1",
"-1"
],
[
"[99, 70, 67, 5], 0, 3, 3",
"-1"
],
[
"[-98, -98, -26, -26, -24, -18, -16, 80, 5], 0, 8, 80",
"7"
],
[
"[1, 1, 1, 1, 0, 1, 5], 0, 6, 1",
"0"
],
[
"[1, 5, 12, 12, 17, 17, 12, 95, 96, 98, 5], 0, 0, 12",
"-1"
],
[
"[50, -70, -30, -54, 6, -10, 70, 84, 5], 0, 8, 27",
"-1"
],
[
"[0, 1, 5], 0, 2, 14",
"-1"
],
[
"[59, 21, 28, 3, 14, 5], 0, 5, 28",
"2"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > mp;
for ( int i = 0;
i < n;
i ++ ) mp [ arr [ i ] ] ++;
for ( int i = 0;
i < n;
i ++ ) if ( mp [ arr [ i ] ] == 1 ) return arr [ i ];
return - 1;
}
| [] | null | [] | CHECK_POSSIBLE_SORT_ARRAY_CONDITIONAL_SWAPPING_ADJACENT_ALLOWED | python | [] | def f_gold ( arr , n ) :
for i in range ( 0 , n - 1 ) :
if ( arr [ i ] > arr [ i + 1 ] ) :
if ( arr [ i ] - arr [ i + 1 ] == 1 ) :
arr [ i ] , arr [ i + 1 ] = arr [ i + 1 ] , arr [ i ]
else :
return False
return True
| code_translation | [
[
"[1, 4, 12, 16, 37, 44, 47, 51, 55, 57, 57, 62, 62, 62, 64, 69, 69, 70, 72, 81, 81, 88, 89, 97], 15",
"True"
],
[
"[-86, 0, 14, -16, -12, -72, 62, -34, -72, 30, 84, -60, 84, -64, 50, 74, 18, -82, -64, -64, -74, -56, 86, 84, -32, -10, 20, 4, 8, 96, 82, 26, 42], 18",
"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, 1, 1], 31",
"True"
],
[
"[48, 66, 83, 12, 77, 98, 18, 33, 21, 16, 28, 24, 46, 43], 13",
"False"
],
[
"[-92, -58, -36, -28, -6, 2, 4, 26, 48, 58, 60, 62, 62, 98], 10",
"True"
],
[
"[0, 0, 0, 1, 0, 1], 4",
"True"
],
[
"[22, 38, 41, 41, 42, 51, 54, 58, 68, 76, 80, 85], 9",
"True"
],
[
"[84, -38, 52, -72, -24, 82, 54, 74, 0], 8",
"False"
],
[
"[0, 1, 1], 2",
"True"
],
[
"[63, 31, 14, 19, 77, 64, 62, 23, 22, 19, 39, 9, 79, 1, 87, 29, 58, 3, 3, 39, 1, 39, 35, 64, 64], 13",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int A [ n + 1 ], B [ n + 1 ];
A [ 0 ] = 1, A [ 1 ] = 0, B [ 0 ] = 0, B [ 1 ] = 1;
for ( int i = 2;
i <= n;
i ++ ) {
A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ];
B [ i ] = A [ i - 1 ] + B [ i - 2 ];
}
return A [ n ];
}
| [] | null | [] | C_PROGRAM_FACTORIAL_NUMBER_2 | python | [] | def f_gold ( n ) :
return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 )
| code_translation | [
[
"66",
"544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000"
],
[
"93",
"1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000"
],
[
"39",
"20397882081197443358640281739902897356800000000"
],
[
"93",
"1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000"
],
[
"68",
"2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000"
],
[
"20",
"2432902008176640000"
],
[
"37",
"13763753091226345046315979581580902400000000"
],
[
"52",
"80658175170943878571660636856403766975289505440883277824000000000000"
],
[
"52",
"80658175170943878571660636856403766975289505440883277824000000000000"
],
[
"19",
"121645100408832000"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a, int b ) {
if ( a == 0 ) return b;
return f_gold ( b % a, a );
}
| [] | null | [] | SUM_SERIES_23_45_67_89_UPTO_N_TERMS | python | [] | def f_gold ( n ) :
i = 1 ;
res = 0.0 ;
sign = True ;
while ( n > 0 ) :
n = n - 1 ;
if ( sign ) :
sign = False ;
res = res + ( i + 1 ) / ( i + 2 ) ;
i = i + 2 ;
else :
sign = True ;
res = res - ( i + 1 ) / ( i + 2 ) ;
i = i + 2 ;
return res ;
| code_translation | [
[
"49",
"0.7803986631477524"
],
[
"4",
"-0.16507936507936516"
],
[
"60",
"-0.21050375120783382"
],
[
"90",
"-0.21185466678122022"
],
[
"96",
"-0.2120245854859959"
],
[
"29",
"0.7770671416747363"
],
[
"86",
"-0.21172836828074082"
],
[
"47",
"0.780190394898247"
],
[
"77",
"0.7821931668684383"
],
[
"87",
"0.7825573460049735"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int k ) {
if ( k > n ) return - 1;
int sum = arr [ 0 ];
for ( int i = 1;
i < k;
i ++ ) sum += arr [ i ];
int max_sum = sum, max_end = k - 1;
for ( int i = k;
i < n;
i ++ ) {
int sum = sum + arr [ i ] - arr [ i - k ];
if ( sum > max_sum ) {
max_sum = sum;
max_end = i;
}
}
return max_end - k + 1;
}
| [] | null | [] | COUNT_NUMBER_PAIRS_N_B_N_GCD_B_B | python | [] | def f_gold(n):
k = n
imin = 1
ans = 0
while (imin <= n):
imax = n / k
ans += k * (imax - imin + 1)
imin = imax + 1
k = n / imin
return ans
| code_translation | [
[
"17",
"58.47239288489289"
],
[
"72",
"349.9783310569835"
],
[
"43",
"187.0499406858786"
],
[
"55",
"252.6486716559348"
],
[
"62",
"291.1683590456309"
],
[
"22",
"81.19789150478006"
],
[
"17",
"58.47239288489289"
],
[
"68",
"326.67596370158344"
],
[
"20",
"71.95479314287363"
],
[
"29",
"114.88796013002468"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int N ) {
queue < int > q;
q . push ( 1 );
int cnt = 0;
int t;
while ( ! q . empty ( ) ) {
t = q . front ( );
q . pop ( );
if ( t <= N ) {
cnt ++;
q . push ( t * 10 );
q . push ( t * 10 + 1 );
}
}
return cnt;
}
| [
"import math"
] | null | [] | CALCULATE_VOLUME_DODECAHEDRON | python | [] | import math
def f_gold ( side ) :
return ( ( ( 15 + ( 7 * ( math.sqrt ( 5 ) ) ) ) / 4 ) * ( math.pow ( side , 3 ) ) )
| code_translation | [
[
"56",
"1345766.2993890555"
],
[
"73",
"2981083.5487053124"
],
[
"22",
"81596.89069273109"
],
[
"10",
"7663.118960624633"
],
[
"84",
"4541961.260438062"
],
[
"20",
"61304.95168499706"
],
[
"51",
"1016520.3932458181"
],
[
"91",
"5774704.218276865"
],
[
"10",
"7663.118960624633"
],
[
"83",
"4381671.801138677"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > inc, dcr;
int len_inc [ n ], len_dcr [ n ];
int longLen = 0;
for ( int i = 0;
i < n;
i ++ ) {
int len = 0;
if ( inc . find ( arr [ i ] - 1 ) != inc . end ( ) ) len = inc [ arr [ i ] - 1 ];
inc [ arr [ i ] ] = len_inc [ i ] = len + 1;
}
for ( int i = n - 1;
i >= 0;
i -- ) {
int len = 0;
if ( dcr . find ( arr [ i ] - 1 ) != dcr . end ( ) ) len = dcr [ arr [ i ] - 1 ];
dcr [ arr [ i ] ] = len_dcr [ i ] = len + 1;
}
for ( int i = 0;
i < n;
i ++ ) if ( longLen < ( len_inc [ i ] + len_dcr [ i ] - 1 ) ) longLen = len_inc [ i ] + len_dcr [ i ] - 1;
return longLen;
}
| [] | null | [] | SORT_ARRAY_CONTAIN_1_N_VALUES | python | [] | def f_gold ( arr , n ) :
for i in range ( n ) :
arr [ i ] = i + 1
| code_translation | [
[
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 53, 59, 64, 69, 69, 70, 71, 72, 84, 93, 96], 19",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 7, 8, -90, 40, -62], 8",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 26",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 86], 9",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 35, 37, 45, 49, 52, 54, 66, 67, 80, 84, 87, 89, 90], 31",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1, 1, 1], 29",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 89, 90, 94], 21",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 58, 82, -87, -17, -71, -97, -10, 4, 23, 86, -24], 12",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1], 6",
"None"
],
[
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 15, 7, 40, 28, 32, 99, 15, 85], 18",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int A [ ], int arr_size, int sum ) {
int l, r;
for ( int i = 0;
i < arr_size - 2;
i ++ ) {
for ( int j = i + 1;
j < arr_size - 1;
j ++ ) {
for ( int k = j + 1;
k < arr_size;
k ++ ) {
if ( A [ i ] + A [ j ] + A [ k ] == sum ) {
cout << "Triplet is " << A [ i ] << ", " << A [ j ] << ", " << A [ k ];
return true;
}
}
}
}
return false;
}
| [] | null | [] | PROGRAM_CHECK_INPUT_INTEGER_STRING | python | [] | def f_gold ( s ) :
for i in range ( len ( s ) ) :
if s [ i ].isdigit ( ) != True :
return False
return True
| code_translation | [
[
"'MgTOyHo NT'",
"False"
],
[
"'033675175'",
"True"
],
[
"'011001'",
"True"
],
[
"'XLlccG'",
"False"
],
[
"'8223900094410'",
"True"
],
[
"'000'",
"True"
],
[
"'aupp'",
"False"
],
[
"'90202721499'",
"True"
],
[
"'110000100011'",
"True"
],
[
"'MhYHsMQeLhG'",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int n ) {
if ( n <= 1 ) return false;
for ( int i = 2;
i < n;
i ++ ) if ( n % i == 0 ) return false;
return true;
}
| [
"import sys"
] | null | [] | MINIMUM_XOR_VALUE_PAIR_1 | python | [] | import sys
def f_gold ( arr , n ) :
arr.sort ( )
minXor = int ( sys.float_info.max )
val = 0
for i in range ( 0 , n - 1 ) :
val = arr [ i ] ^ arr [ i + 1 ] ;
minXor = min ( minXor , val ) ;
return minXor
| code_translation | [
[
"[8, 11, 12, 27, 32, 32, 36, 56, 57, 66, 68, 70, 74, 78, 82, 83, 96], 10",
"0"
],
[
"[-60, -8, 4, 38, 40, 42, 48, 66], 7",
"-4"
],
[
"[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], 19",
"0"
],
[
"[2, 3, 4, 6, 7, 7, 10, 11, 12, 15, 16, 20, 24, 28, 29, 32, 36, 37, 38, 44, 48, 49, 50, 52, 57, 57, 57, 61, 63, 64, 65, 66, 67, 68, 70, 76, 78, 81, 82, 86, 87, 89, 91, 95, 95, 98], 36",
"0"
],
[
"[-88, -84, -76, -58, -40, -38, -28, -24, -20, -14, -12, 16, 20, 28, 28, 30, 40, 44, 56, 58, 60, 92, 92], 13",
"-28"
],
[
"[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",
"0"
],
[
"[6, 6, 19, 31, 41, 45, 49, 56, 78, 96, 98], 6",
"0"
],
[
"[-90, -84, -4, 22, 62], 3",
"10"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21",
"0"
],
[
"[7, 10, 13, 20, 28, 29, 34, 37, 39, 42, 43, 56, 58, 65, 69, 72, 74, 83, 91, 92, 93, 99], 14",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
return ( n * ( 2 * n - 1 ) * ( 2 * n + 1 ) ) / 3;
}
| [] | null | [] | SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS | python | [] | def f_gold(k):
cur = int((k * (k - 1)) + 1)
sum = 0
while k:
sum += cur
cur += 2
k = k - 1
return sum
| code_translation | [
[
"91",
"753571"
],
[
"52",
"140608"
],
[
"78",
"474552"
],
[
"51",
"132651"
],
[
"65",
"274625"
],
[
"39",
"59319"
],
[
"42",
"74088"
],
[
"12",
"1728"
],
[
"56",
"175616"
],
[
"98",
"941192"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
if ( n < 3 ) return - 1;
sort ( arr, arr + n );
return max ( arr [ 0 ] * arr [ 1 ] * arr [ n - 1 ], arr [ n - 1 ] * arr [ n - 2 ] * arr [ n - 3 ] );
}
| [] | null | [] | FIND_SMALLEST_VALUE_REPRESENTED_SUM_SUBSET_GIVEN_ARRAY | python | [] | def f_gold ( arr , n ) :
res = 1
for i in range ( 0 , n ) :
if arr [ i ] <= res :
res = res + arr [ i ]
else :
break
return res
| code_translation | [
[
"[16, 23, 24, 41, 48, 58, 72, 75], 4",
"1"
],
[
"[-14, -82, 12, -14, -38, 12, 40, 12, -74, 42, -36, 64], 8",
"-95"
],
[
"[0, 0, 1, 1, 1, 1], 5",
"4"
],
[
"[17, 89, 44], 2",
"1"
],
[
"[-94, -92, -84, -82, -72, -58, -56, -40, -34, -34, -24, -22, -8, -8, 12, 14, 16, 16, 22, 22, 34, 46, 54, 58, 68, 72, 74, 78, 88, 96], 25",
"-93"
],
[
"[0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0], 8",
"2"
],
[
"[2, 12, 13, 13, 13, 16, 28, 32, 34, 41, 41, 47, 49, 49, 50, 52, 58, 61, 63, 65, 67, 68, 68, 74, 80, 80, 84, 84, 89, 93, 94, 98, 99, 99], 23",
"1"
],
[
"[-54], 0",
"1"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 33",
"12"
],
[
"[42, 50, 76, 45, 6, 63, 46, 73, 65, 70, 87, 5, 41, 63, 96, 75, 38, 76, 27, 7, 71, 9, 65, 44, 76, 37, 94, 52, 55, 3, 38, 68, 45, 15, 35, 90, 36, 46, 13, 92, 32, 22, 49, 35, 83], 35",
"1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string & str ) {
vector < bool > mark ( 26, false );
int index;
for ( int i = 0;
i < str . length ( );
i ++ ) {
if ( 'A' <= str [ i ] && str [ i ] <= 'Z' ) index = str [ i ] - 'A';
else if ( 'a' <= str [ i ] && str [ i ] <= 'z' ) index = str [ i ] - 'a';
mark [ index ] = true;
}
for ( int i = 0;
i <= 25;
i ++ ) if ( mark [ i ] == false ) return ( false );
return ( true );
}
| [] | null | [] | EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10 | python | [] | def f_gold ( n ) :
return ( n % 15 == 0 )
| code_translation | [
[
"30",
"True"
],
[
"-30",
"True"
],
[
"60",
"True"
],
[
"90",
"True"
],
[
"99",
"False"
],
[
"32",
"False"
],
[
"21",
"False"
],
[
"65",
"False"
],
[
"21",
"False"
],
[
"99",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int N ) {
return ceil ( log2 ( N + 1 ) ) - 1;
}
| [] | null | [] | DYNAMIC_PROGRAMMING_SET_14_MAXIMUM_SUM_INCREASING_SUBSEQUENCE | python | [] | def f_gold ( arr , n ) :
max = 0
msis = [ 0 for x in range ( n ) ]
for i in range ( n ) :
msis [ i ] = arr [ i ]
for i in range ( 1 , n ) :
for j in range ( i ) :
if ( arr [ i ] > arr [ j ] and msis [ i ] < msis [ j ] + arr [ i ] ) :
msis [ i ] = msis [ j ] + arr [ i ]
for i in range ( n ) :
if max < msis [ i ] :
max = msis [ i ]
return max
| code_translation | [
[
"[4, 5, 7, 12, 23, 31, 31, 45, 47, 60, 67, 70, 84, 85, 91, 96], 11",
"301"
],
[
"[-88, -38, -50, -14, 36, -32, 0, -8, -12, -62, -46, 66, -46, -26, 6, -44, 14, -74, -84, 52, -28], 18",
"102"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 39",
"1"
],
[
"[85, 42, 7, 35, 35, 21, 97, 59, 88, 50, 12, 44, 85, 22, 38, 23, 42, 61, 44, 63, 23, 69, 28, 17, 73, 20, 71, 80, 15, 42, 28, 10, 56, 77, 43], 26",
"396"
],
[
"[-92, -82, -82, -74, -72, -68, -68, -66, -60, -54, -42, -38, -36, -32, -30, -16, -14, -12, -10, 14, 24, 28, 34, 34, 38, 42, 44, 52, 70, 72, 80, 84, 86, 94], 32",
"582"
],
[
"[0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0], 8",
"1"
],
[
"[33], 0",
"0"
],
[
"[76, 86, 46, -70, 92, 6, 70, -66, 64, 46, 86, -42, -46, -24, 8, 76, 4, -96, -86, 18, 70, -72, -56, -88, -96, 62, 22, 20, 42], 21",
"254"
],
[
"[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], 24",
"0"
],
[
"[25, 46, 41, 61, 93, 29, 65, 24, 10, 89, 22, 51, 18, 65, 70, 59, 87, 82, 97, 99, 15, 64, 20, 97, 12, 23, 76], 20",
"550"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING | python | [] | def f_gold ( tree , k ) :
level = - 1
sum = 0
n = len ( tree )
for i in range ( n ) :
if ( tree [ i ] == '(' ) :
level += 1
elif ( tree [ i ] == ')' ) :
level -= 1
else :
if ( level == k ) :
sum += ( ord ( tree [ i ] ) - ord ( '0' ) )
return sum
| code_translation | [
[
"'(0(5(6()())(4()(9()())))(7(1()())(3()())))', 2",
"14"
],
[
"'(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))', 3",
"9"
],
[
"'(0(5(6()())(4()(9()())))(7(1()())(3()())))', 1",
"12"
],
[
"'(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))', 2",
"16"
],
[
"'(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))', 4",
"0"
],
[
"'(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))', 100",
"0"
],
[
"'(0(5(6()())(4()(9()())))(7(1()())(3()())))', 3",
"9"
],
[
"'(0(5(6()())(4()(9()())))(7(1()())(3()())))', 0",
"0"
],
[
"'0010', 12",
"0"
],
[
"'kjtdgmy', 97",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int arr [ ], int n ) {
int remainder = 0;
for ( int i = 0;
i < n;
i ++ ) remainder = ( remainder + arr [ i ] ) % 3;
return ( remainder == 0 );
}
| [] | null | [] | PROGRAM_OCTAL_DECIMAL_CONVERSION | python | [] | def f_gold ( n ) :
num = n ;
dec_value = 0 ;
base = 1 ;
temp = num ;
while ( temp ) :
last_digit = temp % 10 ;
temp = int ( temp / 10 ) ;
dec_value += last_digit * base ;
base = base * 8 ;
return dec_value ;
| code_translation | [
[
"37",
"31"
],
[
"25",
"21"
],
[
"63",
"51"
],
[
"66",
"54"
],
[
"32",
"26"
],
[
"5",
"5"
],
[
"41",
"33"
],
[
"82",
"66"
],
[
"54",
"44"
],
[
"5",
"5"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string a, string b ) {
int m = a . length ( );
int n = b . length ( );
int lookup [ m + 1 ] [ n + 1 ] = {
{
0 }
};
for ( int i = 0;
i <= n;
++ i ) lookup [ 0 ] [ i ] = 0;
for ( int i = 0;
i <= m;
++ i ) lookup [ i ] [ 0 ] = 1;
for ( int i = 1;
i <= m;
i ++ ) {
for ( int j = 1;
j <= n;
j ++ ) {
if ( a [ i - 1 ] == b [ j - 1 ] ) lookup [ i ] [ j ] = lookup [ i - 1 ] [ j - 1 ] + lookup [ i - 1 ] [ j ];
else lookup [ i ] [ j ] = lookup [ i - 1 ] [ j ];
}
}
return lookup [ m ] [ n ];
}
| [] | null | [] | REARRANGE_ARRAY_MAXIMUM_MINIMUM_FORM_SET_2_O1_EXTRA_SPACE_1 | python | [] | def f_gold ( arr , n ) :
max_ele = arr [ n - 1 ]
min_ele = arr [ 0 ]
for i in range ( n ) :
if i % 2 == 0 :
arr [ i ] = max_ele
max_ele -= 1
else :
arr [ i ] = min_ele
min_ele += 1
| code_translation | [
[
"[75, 3, 74, 4, 73, 5, 72, 6, 71, 7, 70, 8, 69, 9, 68, 10, 67, 11, 66, 12, 65, 13, 64, 14, 63, 15, 62, 16, 61, 17, 60, 18, 59, 19, 58, 20, 57, 21, 56, 22, 75, 80, 82, 86, 92, 95, 96, 99], 40",
"None"
],
[
"[72, 45, 71, 46, 70, 47, 69, 48, 68, 49, 67, 50, 66, 51, 65, 52, 64, 53, 63, 54, 62, 55, 61, -52, -9, 80, -16, -32, 39, 25, -27, -96, -24, -27, -23, -52], 23",
"None"
],
[
"[1, 0, 0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10, 11, -11, 12, -12, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 28",
"None"
],
[
"[84, 12, 16], 2",
"None"
],
[
"[-6, -85, -7, -84, -8, -83, -9, -82, -10, -81, -11, -80, -12, 77, 87, 90], 13",
"None"
],
[
"[1, 0, 0, 1, -1, 2, -2, 3, -3, 4, -4, 5, 0, 0, 0], 12",
"None"
],
[
"[54, 5, 53, 6, 52, 7, 51, 8, 50, 9, 49, 10, 55, 57, 57, 61, 61, 66, 72, 73, 83, 87, 88, 89, 98], 12",
"None"
],
[
"[-43, 31, -44, 32, -45, 33, -46, 34, -47, 35, -48, 36, -49, -73, 13, 33, -29, -17, -43, 20, -7, -85], 13",
"None"
],
[
"[1, 0, 0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10, 11, -11, 12, -12, 13, -13, 14, -14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 31",
"None"
],
[
"[25, 20, 24, 21, 23, 22, 22, 23, 21, 12], 9",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string num ) {
int n = num . length ( );
if ( n == 0 && num [ 0 ] == '0' ) return true;
if ( n % 3 == 1 ) num = "00" + num;
if ( n % 3 == 2 ) num = "0" + num;
int gSum = 0;
for ( int i = 0;
i < n;
i ++ ) {
int group = 0;
group += ( num [ i ++ ] - '0' ) * 100;
group += ( num [ i ++ ] - '0' ) * 10;
group += num [ i ] - '0';
gSum += group;
}
if ( gSum > 1000 ) {
num = to_string ( gSum );
n = num . length ( );
gSum = f_gold ( num );
}
return ( gSum == 999 );
}
| [] | null | [] | CHECK_IF_STRING_REMAINS_PALINDROME_AFTER_REMOVING_GIVEN_NUMBER_OF_CHARACTERS | python | [] | def f_gold ( str , n ) :
l = len ( str )
if ( l >= n ) :
return True
return False
| code_translation | [
[
"'ZCoQhuM', 2",
"True"
],
[
"'7437725', 53",
"False"
],
[
"'11', 30",
"False"
],
[
"'buGlvR', 1",
"True"
],
[
"'9', 92",
"False"
],
[
"'101101010110', 3",
"True"
],
[
"'YguiM', 18",
"False"
],
[
"'8198', 90",
"False"
],
[
"'11101', 71",
"False"
],
[
"'hUInqJXNdbfP', 4",
"True"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int k ) {
unordered_map < int, int > h;
for ( int i = 0;
i < n;
i ++ ) h [ arr [ i ] ] ++;
if ( h . size ( ) < k ) return - 1;
int dist_count = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( h [ arr [ i ] ] == 1 ) dist_count ++;
if ( dist_count == k ) return arr [ i ];
}
return - 1;
}
| [] | null | [] | NUMBER_INDEXES_EQUAL_ELEMENTS_GIVEN_RANGE | python | [] | def f_gold ( a , n , l , r ) :
count = 0
for i in range ( l , r ) :
if ( a [ i ] == a [ i + 1 ] ) :
count += 1
return count
| code_translation | [
[
"[4, 13, 13, 16, 16, 19, 39, 41, 48, 52, 57, 62, 65, 67, 76, 84, 88, 91, 95, 96, 97, 98], 18, 12, 17",
"0"
],
[
"[62, 76, 86, -8, 84, -6, 72, 84, 6, -50, -18, -94, 54, 90, -74, -64, -26, -14, -32, 62, 10, 4, 70, -28, 8, 18, 4, -62, -76, 84, -78, -4, 84, 98, 58, -68, 42, -6, 34, -38, 52, -84, 78], 32, 38, 23",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 10, 6, 6",
"0"
],
[
"[11, 75, 98, 29, 62, 53, 48, 91, 86, 66, 48, 94], 8, 6, 6",
"0"
],
[
"[-94, -84, -70, -70, -40, -40, -36, -24, 10, 48, 62, 74], 11, 7, 8",
"0"
],
[
"[1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0], 36, 40, 37",
"0"
],
[
"[1, 2, 6, 7, 10, 11, 13, 19, 19, 25, 29, 30, 32, 34, 35, 45, 45, 46, 47, 48, 48, 53, 58, 61, 64, 65, 67, 75, 76, 81, 81, 84, 84, 85, 86, 94, 94, 96, 99], 25, 19, 37",
"4"
],
[
"[-56, 42, -34, -12, -86, 82, -96, -66, 30, 16, -40, 72, 84, 94, -48, -30, 26, 50, 42, -44, -50, 22, -38, 8, 34, 94, 2, 16, -32, 18, -58, 12, -26, 28, -62], 21, 30, 26",
"0"
],
[
"[0, 0, 0, 0, 1, 1, 1], 4, 5, 5",
"0"
],
[
"[6, 29], 1, 1, 1",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string str ) {
int n = str . length ( );
if ( ( str [ n - 1 ] - '0' ) % 2 != 0 ) return false;
int digitSum = 0;
for ( int i = 0;
i < n;
i ++ ) digitSum += ( str [ i ] - '0' );
return ( digitSum % 3 == 0 );
}
| [] | null | [] | COUNT_SET_BITS_IN_AN_INTEGER_2 | python | [] | def f_gold ( n ) :
count = 0
while ( n ) :
n &= ( n - 1 )
count += 1
return count
| code_translation | [
[
"32",
"1"
],
[
"94",
"5"
],
[
"33",
"2"
],
[
"99",
"4"
],
[
"17",
"2"
],
[
"64",
"1"
],
[
"80",
"2"
],
[
"42",
"3"
],
[
"12",
"2"
],
[
"86",
"4"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( int arr [ ], int n ) {
int temp [ n ];
for ( int i = 0;
i < n;
i ++ ) temp [ i ] = arr [ i ];
sort ( temp, temp + n );
int front;
for ( front = 0;
front < n;
front ++ ) if ( temp [ front ] != arr [ front ] ) break;
int back;
for ( back = n - 1;
back >= 0;
back -- ) if ( temp [ back ] != arr [ back ] ) break;
if ( front >= back ) return true;
do {
front ++;
if ( arr [ front - 1 ] < arr [ front ] ) return false;
}
while ( front != back );
return true;
}
| [] | null | [] | TRIANGULAR_NUMBERS | python | [] | def f_gold ( num ) :
if ( num < 0 ) :
return False
sum , n = 0 , 1
while ( sum <= num ) :
sum = sum + n
if ( sum == num ) :
return True
n += 1
return False
| code_translation | [
[
"97",
"False"
],
[
"97",
"False"
],
[
"32",
"False"
],
[
"40",
"False"
],
[
"18",
"False"
],
[
"14",
"False"
],
[
"90",
"False"
],
[
"39",
"False"
],
[
"1",
"True"
],
[
"57",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string num ) {
int series [ ] = {
1, 3, 2, - 1, - 3, - 2 };
int series_index = 0;
int result = 0;
for ( int i = num . size ( ) - 1;
i >= 0;
i -- ) {
int digit = num [ i ] - '0';
result += digit * series [ series_index ];
series_index = ( series_index + 1 ) % 6;
result %= 7;
}
if ( result < 0 ) result = ( result + 7 ) % 7;
return result;
}
| [] | null | [] | ROUND_THE_GIVEN_NUMBER_TO_NEAREST_MULTIPLE_OF_10 | python | [] | def f_gold ( n ) :
a = ( n // 10 ) * 10
b = a + 10
return ( b if n - a > b - n else a )
| code_translation | [
[
"31",
"30"
],
[
"78",
"80"
],
[
"19",
"20"
],
[
"36",
"40"
],
[
"77",
"80"
],
[
"94",
"90"
],
[
"86",
"90"
],
[
"16",
"20"
],
[
"95",
"90"
],
[
"2",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int dp [ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) {
if ( i <= 2 ) dp [ i ] = i;
else dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ];
}
return dp [ n ];
}
| [] | null | [] | SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_1 | python | [] | def f_gold ( n ) :
sum = 0
for i in range ( n ) :
sum += i * ( n - i )
return 2 * sum
| code_translation | [
[
"63",
"83328"
],
[
"72",
"124392"
],
[
"28",
"7308"
],
[
"35",
"14280"
],
[
"6",
"70"
],
[
"70",
"114310"
],
[
"20",
"2660"
],
[
"8",
"168"
],
[
"8",
"168"
],
[
"35",
"14280"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( string str ) {
vector < char > list;
for ( int i = 0;
i < str . length ( );
i ++ ) {
auto pos = find ( list . begin ( ), list . end ( ), str [ i ] );
if ( pos != list . end ( ) ) {
auto posi = find ( list . begin ( ), list . end ( ), str [ i ] );
list . erase ( posi );
}
else list . push_back ( str [ i ] );
}
if ( str . length ( ) % 2 == 0 && list . empty ( ) || ( str . length ( ) % 2 == 1 && list . size ( ) == 1 ) ) return true;
else return false;
}
| [] | null | [] | NUMBER_JUMP_REQUIRED_GIVEN_LENGTH_REACH_POINT_FORM_D_0_ORIGIN_2D_PLANE | python | [] | def f_gold ( a , b , d ) :
temp = a
a = min ( a , b )
b = max ( temp , b )
if ( d >= b ) :
return ( d + b - 1 ) / b
if ( d == 0 ) :
return 0
if ( d == a ) :
return 1
return 2
| code_translation | [
[
"35, 8, 77",
"3.1714285714285713"
],
[
"85, 55, 33",
"2"
],
[
"22, 23, 64",
"3.739130434782609"
],
[
"8, 43, 29",
"2"
],
[
"12, 64, 11",
"2"
],
[
"58, 25, 26",
"2"
],
[
"65, 4, 28",
"2"
],
[
"10, 95, 55",
"2"
],
[
"23, 13, 54",
"3.3043478260869565"
],
[
"5, 50, 71",
"2.4"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
bool f_gold ( unsigned int n ) {
int count = 0;
if ( n && ! ( n & ( n - 1 ) ) ) {
while ( n > 1 ) {
n >>= 1;
count += 1;
}
return ( count % 2 == 0 ) ? 1 : 0;
}
return 0;
}
| [] | null | [] | CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER | python | [] | def f_gold ( x , y ) :
if ( x == 1 ) :
return ( y == 1 )
pow = 1
while ( pow < y ) :
pow = pow * x
return ( pow == y )
| code_translation | [
[
"57, 1",
"True"
],
[
"3, 9",
"True"
],
[
"10, 101",
"False"
],
[
"10, 10000",
"True"
],
[
"6, 46656",
"True"
],
[
"2, 2048",
"True"
],
[
"1, 40",
"False"
],
[
"20, 79",
"False"
],
[
"96, 98",
"False"
],
[
"25, 5",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int N ) {
if ( N == 1 ) return 4;
int countB = 1, countS = 1, prev_countB, prev_countS;
for ( int i = 2;
i <= N;
i ++ ) {
prev_countB = countB;
prev_countS = countS;
countS = prev_countB + prev_countS;
countB = prev_countS;
}
int result = countS + countB;
return ( result * result );
}
| [] | null | [] | MINIMUM_FLIP_REQUIRED_MAKE_BINARY_MATRIX_SYMMETRIC_1 | python | [] | def f_gold ( mat , n ) :
flip = 0
for i in range ( n ) :
for j in range ( i ) :
if mat [ i ] [ j ] != mat [ j ] [ i ] :
flip += 1
return flip
| code_translation | [
[
"[[16, 16, 47, 49, 50, 64, 70, 83, 88], [11, 12, 24, 32, 36, 39, 48, 58, 62], [29, 31, 35, 49, 71, 78, 82, 92, 96], [6, 21, 46, 53, 83, 88, 94, 94, 97], [29, 36, 41, 52, 83, 89, 89, 90, 90], [3, 11, 35, 45, 47, 79, 81, 85, 96], [31, 43, 62, 62, 62, 65, 66, 68, 81], [8, 9, 10, 26, 36, 43, 58, 70, 95], [2, 8, 24, 31, 42, 43, 58, 90, 94]], 8",
"27"
],
[
"[[20, 8, -42, -16, 58, 58, 80], [-28, -20, 54, 94, 62, 22, -86], [-26, 86, 48, -28, 10, 90, -40], [68, 76, 16, -50, -58, 18, -86], [40, -52, 8, -14, -8, 54, 78], [82, 92, 2, 54, 62, 80, 14], [-56, -90, 74, -16, -92, 76, 32]], 6",
"15"
],
[
"[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 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, 75, 69, 34, 25, 54, 87, 49, 62], [9, 20, 35, 98, 95, 57, 51, 64, 72], [66, 38, 22, 59, 82, 49, 40, 46, 64], [31, 15, 63, 84, 6, 18, 93, 36, 62], [96, 13, 34, 87, 16, 6, 91, 65, 13]], 7",
"21"
],
[
"[[-94, -68, -54, -36, -32, -28, -10, 10, 30, 38, 58, 66, 78, 90], [-98, -62, -44, -38, -36, -34, -34, -26, 28, 30, 34, 64, 90, 98], [-90, -88, -84, -62, -54, -24, 4, 6, 30, 32, 40, 50, 56, 68], [-98, -80, -74, -48, -18, -14, -10, 10, 24, 42, 54, 54, 74, 96], [-84, -68, -52, -32, -16, -8, -4, 6, 44, 48, 50, 78, 80, 84], [-96, -84, -78, -42, -38, -36, -16, -14, 2, 14, 16, 24, 28, 40], [-94, -92, -86, -84, -62, -58, -52, -46, -22, -12, 16, 32, 62, 68], [-92, -72, -68, -62, -50, -50, -38, -12, 22, 40, 40, 42, 48, 70], [-90, -72, -42, -28, 16, 22, 26, 36, 42, 50, 68, 82, 90, 94], [-86, -78, -66, -60, -46, -30, -26, -20, -14, 54, 60, 66, 76, 84], [-98, -96, -76, -64, -30, -16, -4, 14, 22, 28, 48, 64, 74, 96], [-88, -68, -58, -50, -28, -16, -8, 2, 18, 20, 28, 58, 60, 82], [-94, -82, -70, 14, 14, 24, 30, 36, 48, 50, 50, 76, 78, 96], [-88, -74, -12, 6, 10, 18, 28, 46, 56, 58, 84, 90, 90, 96]], 11",
"55"
],
[
"[[1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0], [0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 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 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1]], 14",
"46"
],
[
"[[1, 4, 11, 16, 18, 19, 20, 25, 27, 29, 30, 30, 33, 34, 35, 36, 37, 38, 40, 40, 49, 49, 51, 51, 53, 56, 57, 59, 60, 61, 61, 62, 63, 69, 72, 77, 79, 82, 85, 86, 89, 94, 97, 98], [2, 6, 8, 10, 11, 11, 11, 14, 15, 19, 20, 21, 21, 23, 26, 31, 31, 34, 37, 37, 40, 40, 41, 47, 47, 48, 52, 53, 55, 59, 67, 77, 81, 82, 82, 83, 88, 92, 92, 93, 94, 96, 97, 98], [3, 4, 4, 6, 10, 13, 13, 13, 16, 18, 24, 25, 26, 27, 28, 31, 32, 34, 35, 38, 45, 50, 52, 53, 55, 57, 57, 58, 62, 64, 65, 70, 71, 72, 75, 77, 82, 86, 86, 92, 93, 94, 98, 99], [2, 4, 5, 8, 10, 10, 13, 14, 15, 18, 19, 21, 21, 21, 24, 24, 28, 30, 30, 31, 36, 37, 38, 48, 48, 52, 53, 58, 59, 60, 61, 67, 75, 77, 77, 78, 80, 81, 86, 87, 89, 89, 96, 96], [2, 4, 8, 16, 20, 20, 24, 26, 27, 28, 29, 36, 37, 43, 43, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 56, 59, 59, 62, 70, 71, 71, 72, 73, 79, 79, 86, 86, 89, 91, 91, 91, 97], [1, 1, 2, 5, 6, 10, 17, 21, 22, 23, 23, 28, 31, 34, 36, 38, 41, 42, 43, 44, 52, 53, 54, 56, 56, 58, 59, 62, 64, 67, 67, 68, 70, 71, 77, 81, 82, 83, 83, 85, 88, 89, 90, 98], [1, 1, 2, 3, 3, 4, 6, 6, 7, 10, 11, 12, 13, 14, 15, 15, 19, 21, 25, 27, 42, 45, 46, 50, 51, 51, 52, 55, 60, 60, 67, 70, 71, 71, 77, 78, 81, 85, 86, 86, 87, 90, 95, 99], [2, 4, 7, 9, 9, 11, 15, 17, 19, 22, 27, 27, 30, 32, 34, 35, 35, 36, 41, 42, 46, 46, 48, 54, 55, 56, 59, 61, 61, 65, 66, 67, 70, 73, 80, 81, 85, 89, 90, 91, 92, 96, 96, 97], [7, 8, 12, 14, 17, 19, 21, 24, 27, 28, 34, 36, 38, 48, 54, 57, 59, 59, 62, 66, 66, 67, 70, 71, 71, 71, 72, 73, 74, 74, 76, 76, 78, 79, 80, 80, 83, 88, 88, 90, 92, 95, 96, 98], [3, 3, 8, 10, 10, 15, 16, 20, 25, 25, 25, 29, 34, 36, 42, 50, 52, 54, 56, 58, 59, 63, 64, 65, 71, 73, 73, 74, 75, 75, 76, 76, 78, 80, 82, 86, 86, 87, 87, 92, 94, 94, 96, 99], [7, 9, 12, 15, 24, 24, 25, 26, 27, 28, 32, 37, 38, 43, 44, 46, 50, 50, 52, 52, 55, 56, 56, 56, 58, 58, 59, 62, 64, 65, 68, 72, 72, 80, 85, 85, 86, 90, 91, 92, 98, 98, 98, 99], [2, 7, 9, 18, 28, 29, 31, 32, 32, 38, 39, 39, 41, 41, 45, 48, 49, 49, 49, 50, 50, 58, 58, 62, 62, 63, 68, 69, 69, 71, 72, 74, 74, 75, 77, 78, 79, 81, 82, 82, 83, 83, 95, 98], [3, 5, 6, 6, 7, 10, 10, 13, 15, 17, 22, 23, 25, 25, 25, 25, 27, 29, 35, 37, 38, 46, 47, 50, 50, 51, 53, 56, 56, 59, 71, 71, 72, 74, 77, 79, 80, 83, 84, 90, 90, 92, 95, 98], [1, 9, 19, 20, 22, 22, 22, 23, 24, 28, 32, 32, 32, 36, 36, 37, 37, 39, 45, 50, 53, 56, 58, 58, 60, 64, 66, 68, 68, 69, 72, 73, 73, 73, 75, 75, 79, 80, 80, 82, 86, 87, 91, 99], [5, 9, 12, 13, 14, 18, 23, 25, 25, 28, 29, 32, 33, 34, 39, 41, 46, 49, 50, 52, 55, 55, 56, 59, 61, 63, 65, 65, 67, 69, 69, 74, 75, 78, 80, 81, 85, 85, 86, 88, 88, 92, 96, 98], [4, 4, 9, 11, 12, 20, 23, 23, 24, 27, 33, 35, 37, 40, 41, 43, 44, 45, 45, 49, 50, 51, 54, 54, 56, 58, 63, 65, 71, 71, 72, 73, 75, 76, 76, 78, 81, 84, 86, 88, 90, 90, 96, 99], [1, 2, 8, 9, 10, 15, 17, 18, 18, 19, 20, 21, 21, 21, 26, 27, 29, 32, 33, 34, 34, 39, 44, 47, 55, 56, 58, 60, 62, 64, 65, 70, 70, 72, 74, 74, 75, 76, 79, 81, 84, 86, 90, 93], [2, 2, 6, 8, 9, 13, 15, 16, 16, 17, 18, 20, 24, 28, 33, 34, 36, 39, 40, 44, 46, 48, 50, 53, 53, 54, 61, 67, 69, 71, 72, 75, 76, 78, 83, 87, 88, 91, 93, 94, 94, 96, 97, 98], [2, 6, 9, 10, 12, 13, 14, 15, 16, 17, 21, 22, 29, 29, 31, 31, 34, 38, 38, 39, 40, 43, 44, 46, 48, 50, 52, 52, 57, 62, 65, 66, 68, 69, 69, 73, 74, 77, 79, 80, 83, 84, 87, 95], [7, 7, 13, 14, 19, 22, 24, 24, 25, 30, 30, 32, 39, 41, 43, 48, 49, 50, 50, 52, 53, 54, 58, 61, 62, 65, 65, 66, 66, 67, 69, 70, 73, 73, 75, 77, 88, 89, 92, 92, 96, 96, 97, 98], [1, 3, 3, 4, 12, 14, 27, 32, 32, 33, 33, 37, 42, 42, 42, 43, 47, 49, 53, 55, 56, 57, 59, 60, 61, 61, 61, 65, 66, 66, 67, 71, 72, 73, 78, 79, 80, 82, 87, 89, 92, 94, 95, 96], [5, 6, 6, 11, 11, 13, 18, 18, 19, 21, 25, 28, 31, 37, 40, 40, 43, 45, 51, 53, 53, 58, 63, 64, 67, 68, 73, 75, 75, 77, 82, 84, 84, 86, 88, 91, 92, 94, 94, 96, 97, 97, 98, 99], [1, 2, 3, 7, 8, 8, 8, 17, 23, 23, 24, 31, 33, 33, 36, 37, 38, 38, 43, 44, 47, 47, 47, 49, 52, 55, 56, 56, 59, 68, 71, 72, 72, 75, 79, 79, 80, 82, 83, 92, 93, 97, 97, 98], [1, 2, 6, 6, 11, 13, 15, 15, 17, 20, 20, 24, 27, 27, 28, 30, 30, 33, 36, 37, 38, 40, 40, 40, 40, 42, 46, 51, 58, 60, 64, 65, 67, 71, 72, 75, 78, 82, 85, 87, 89, 97, 98, 98], [1, 2, 3, 5, 7, 7, 7, 16, 16, 18, 20, 20, 23, 23, 32, 32, 33, 33, 34, 38, 39, 41, 42, 43, 45, 47, 47, 50, 50, 53, 53, 56, 59, 60, 61, 64, 72, 79, 79, 84, 85, 89, 94, 98], [2, 9, 11, 11, 14, 25, 26, 27, 29, 31, 32, 34, 35, 38, 38, 38, 40, 46, 47, 47, 48, 49, 51, 55, 58, 63, 63, 66, 67, 67, 68, 69, 70, 77, 80, 81, 83, 85, 89, 90, 92, 95, 97, 98], [1, 2, 5, 8, 8, 9, 12, 12, 17, 19, 20, 28, 29, 35, 38, 38, 38, 41, 43, 45, 48, 51, 56, 62, 68, 69, 70, 73, 74, 74, 77, 79, 81, 83, 84, 87, 88, 89, 92, 93, 93, 97, 98, 99], [2, 3, 4, 5, 6, 6, 10, 11, 11, 13, 14, 14, 18, 18, 19, 20, 26, 30, 31, 32, 32, 34, 34, 35, 38, 42, 43, 44, 48, 53, 55, 56, 59, 59, 65, 72, 78, 84, 85, 88, 90, 97, 97, 98], [1, 9, 10, 15, 17, 17, 18, 18, 20, 24, 25, 26, 30, 31, 33, 35, 36, 42, 43, 43, 44, 46, 46, 48, 49, 49, 49, 49, 51, 51, 52, 59, 62, 64, 65, 71, 72, 74, 79, 79, 89, 90, 94, 97], [1, 2, 10, 11, 15, 18, 18, 19, 21, 22, 25, 28, 28, 30, 37, 38, 40, 41, 46, 46, 49, 51, 52, 53, 53, 56, 64, 69, 69, 72, 72, 74, 77, 77, 77, 78, 78, 84, 85, 96, 97, 98, 98, 99], [1, 6, 6, 6, 7, 7, 10, 11, 16, 17, 18, 18, 27, 27, 33, 33, 35, 38, 41, 46, 47, 53, 54, 54, 56, 62, 63, 63, 66, 67, 67, 77, 77, 78, 79, 83, 88, 88, 89, 92, 95, 95, 96, 99], [3, 4, 6, 8, 8, 8, 10, 12, 15, 17, 19, 19, 22, 22, 25, 28, 28, 29, 34, 34, 39, 41, 42, 43, 46, 46, 46, 53, 53, 54, 56, 56, 56, 63, 64, 68, 70, 75, 82, 84, 85, 94, 95, 96], [3, 4, 4, 5, 8, 9, 17, 21, 23, 25, 31, 32, 35, 38, 38, 39, 39, 43, 49, 54, 56, 61, 61, 64, 64, 65, 65, 65, 69, 70, 70, 70, 71, 72, 74, 74, 77, 78, 78, 80, 84, 90, 96, 99], [1, 3, 6, 12, 13, 13, 13, 20, 21, 21, 24, 29, 33, 33, 38, 40, 42, 42, 45, 46, 47, 49, 55, 57, 58, 60, 60, 62, 63, 63, 67, 68, 69, 70, 72, 72, 74, 75, 75, 77, 77, 88, 95, 99], [3, 4, 4, 8, 9, 9, 9, 11, 12, 12, 15, 16, 17, 18, 20, 21, 22, 22, 25, 28, 29, 33, 34, 35, 36, 43, 46, 57, 58, 59, 63, 68, 69, 72, 76, 78, 83, 89, 90, 91, 93, 96, 97, 99], [1, 9, 11, 12, 13, 15, 19, 26, 27, 32, 34, 42, 42, 44, 48, 54, 54, 56, 57, 58, 60, 64, 76, 80, 81, 82, 82, 82, 83, 84, 85, 85, 85, 86, 87, 92, 94, 95, 96, 97, 97, 97, 98, 98], [5, 7, 16, 20, 21, 22, 27, 29, 30, 31, 32, 33, 36, 37, 38, 44, 47, 47, 50, 53, 54, 56, 58, 60, 60, 61, 62, 63, 63, 64, 64, 68, 69, 77, 81, 81, 82, 82, 84, 86, 87, 90, 92, 96], [3, 3, 6, 6, 8, 8, 9, 13, 20, 21, 27, 27, 29, 32, 34, 40, 43, 47, 49, 49, 50, 53, 54, 54, 57, 61, 63, 65, 66, 71, 72, 72, 73, 73, 74, 75, 75, 75, 79, 82, 85, 90, 92, 94], [2, 3, 5, 5, 9, 9, 14, 17, 20, 21, 23, 27, 29, 31, 33, 36, 38, 42, 43, 45, 45, 46, 47, 47, 48, 53, 54, 55, 56, 58, 60, 64, 67, 67, 69, 77, 77, 84, 87, 92, 92, 93, 94, 98], [4, 9, 10, 12, 13, 15, 16, 20, 24, 25, 26, 27, 31, 34, 38, 38, 40, 41, 43, 44, 46, 46, 47, 47, 48, 57, 64, 74, 77, 78, 79, 82, 82, 85, 87, 87, 88, 89, 91, 92, 94, 96, 97, 99], [2, 2, 4, 8, 10, 12, 13, 20, 21, 21, 29, 32, 34, 40, 40, 40, 43, 45, 46, 47, 47, 48, 49, 51, 57, 67, 68, 68, 70, 72, 76, 76, 77, 78, 79, 81, 84, 88, 89, 91, 94, 95, 97, 98], [3, 4, 4, 6, 8, 8, 9, 11, 14, 14, 15, 16, 16, 22, 22, 23, 25, 30, 30, 33, 33, 35, 36, 37, 40, 40, 42, 42, 44, 52, 55, 56, 56, 58, 60, 64, 64, 66, 67, 69, 80, 81, 81, 91], [7, 10, 10, 11, 13, 13, 13, 15, 23, 25, 27, 28, 28, 30, 34, 35, 37, 38, 39, 44, 45, 46, 49, 50, 53, 53, 56, 60, 60, 64, 64, 65, 66, 68, 68, 70, 77, 78, 79, 80, 81, 85, 92, 95], [1, 3, 7, 7, 9, 11, 12, 19, 19, 20, 22, 22, 25, 26, 34, 38, 43, 45, 47, 49, 50, 54, 55, 55, 57, 60, 62, 62, 64, 69, 70, 72, 72, 76, 77, 79, 83, 89, 93, 94, 95, 98, 99, 99]], 22",
"230"
],
[
"[[-6]], 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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0, 0, 0, 0, 0, 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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], 37",
"340"
],
[
"[[57, 35, 39, 48, 79, 25, 49, 44, 40, 59, 90, 18, 4, 14, 32, 39, 2, 15, 34, 91, 11, 16, 23, 1, 7, 3, 40, 93, 14, 33, 51, 35, 78, 35, 67, 3, 38, 71], [57, 4, 10, 9, 40, 48, 47, 9, 33, 91, 47, 12, 66, 45, 90, 89, 94, 69, 71, 43, 83, 23, 30, 15, 52, 78, 42, 34, 65, 45, 35, 9, 48, 4, 6, 1, 40, 13], [58, 15, 43, 30, 58, 15, 58, 90, 96, 92, 80, 66, 14, 16, 79, 49, 91, 19, 1, 64, 21, 27, 41, 48, 21, 21, 21, 26, 70, 97, 63, 35, 92, 96, 61, 3, 86, 47], [92, 91, 51, 18, 77, 83, 67, 81, 77, 78, 53, 40, 53, 35, 43, 16, 39, 69, 10, 38, 19, 3, 33, 94, 60, 84, 95, 76, 23, 52, 72, 67, 14, 61, 26, 52, 81, 62], [27, 60, 67, 50, 57, 97, 65, 22, 57, 91, 71, 61, 5, 56, 59, 55, 67, 23, 89, 88, 61, 21, 70, 69, 63, 59, 36, 29, 63, 60, 82, 33, 60, 83, 24, 22, 69, 96], [89, 59, 51, 55, 68, 44, 41, 11, 19, 44, 14, 47, 14, 3, 23, 84, 76, 95, 19, 69, 67, 62, 42, 69, 43, 18, 93, 93, 6, 18, 16, 37, 28, 46, 53, 82, 5, 64], [73, 22, 7, 71, 4, 28, 4, 43, 3, 28, 82, 66, 45, 52, 59, 66, 80, 50, 84, 82, 22, 52, 98, 13, 48, 33, 58, 15, 44, 79, 91, 80, 30, 67, 72, 23, 14, 1], [70, 78, 31, 58, 42, 81, 50, 88, 23, 99, 7, 59, 1, 63, 60, 8, 69, 81, 19, 96, 61, 16, 37, 47, 69, 83, 70, 77, 72, 45, 41, 34, 78, 71, 71, 6, 94, 53], [38, 46, 91, 77, 24, 94, 98, 68, 4, 23, 30, 65, 12, 71, 20, 21, 84, 39, 83, 98, 79, 72, 76, 71, 99, 73, 27, 47, 55, 43, 4, 10, 38, 93, 14, 65, 18, 98], [66, 76, 94, 19, 66, 43, 17, 53, 69, 25, 48, 29, 70, 65, 90, 93, 6, 85, 21, 33, 12, 90, 66, 32, 14, 88, 13, 6, 12, 5, 57, 75, 87, 44, 72, 45, 66, 48], [66, 44, 52, 38, 99, 65, 41, 88, 18, 93, 96, 39, 45, 19, 35, 53, 68, 76, 14, 6, 74, 30, 18, 28, 39, 67, 20, 48, 9, 77, 25, 45, 72, 48, 36, 24, 36, 16], [14, 90, 11, 65, 5, 97, 61, 91, 5, 47, 11, 85, 83, 39, 69, 12, 76, 44, 52, 24, 35, 99, 23, 94, 56, 55, 71, 19, 3, 86, 7, 1, 44, 20, 95, 81, 77, 43], [10, 93, 48, 53, 66, 88, 68, 58, 67, 17, 7, 54, 16, 33, 46, 15, 34, 56, 84, 18, 46, 93, 54, 99, 63, 47, 28, 48, 35, 94, 77, 34, 56, 36, 43, 12, 73, 90], [8, 56, 60, 26, 78, 18, 28, 30, 65, 81, 84, 40, 74, 17, 52, 46, 28, 4, 14, 41, 2, 91, 9, 16, 85, 82, 59, 58, 63, 35, 1, 13, 48, 39, 1, 12, 31, 34], [48, 3, 7, 11, 44, 41, 4, 35, 30, 23, 86, 98, 35, 82, 72, 49, 58, 32, 71, 58, 92, 49, 88, 84, 80, 3, 86, 37, 65, 91, 12, 7, 44, 74, 50, 65, 52, 16], [27, 21, 48, 22, 70, 83, 45, 34, 84, 45, 39, 9, 33, 76, 51, 19, 82, 27, 30, 83, 93, 62, 21, 84, 13, 24, 22, 95, 86, 33, 18, 74, 88, 95, 41, 91, 51, 7], [62, 22, 26, 38, 15, 3, 28, 93, 54, 23, 46, 10, 36, 83, 66, 14, 32, 80, 73, 58, 79, 51, 34, 94, 70, 24, 7, 64, 76, 96, 3, 85, 93, 79, 12, 37, 94, 93], [33, 20, 76, 50, 37, 56, 92, 79, 66, 76, 28, 69, 38, 6, 90, 30, 51, 95, 34, 15, 40, 24, 47, 99, 50, 3, 5, 8, 50, 35, 27, 30, 44, 31, 64, 79, 13, 73], [69, 56, 99, 12, 4, 16, 97, 89, 62, 15, 41, 67, 82, 6, 20, 80, 98, 42, 78, 86, 77, 59, 21, 11, 96, 96, 34, 69, 84, 67, 91, 64, 67, 75, 50, 47, 59, 79], [82, 78, 57, 77, 3, 60, 27, 93, 26, 98, 24, 38, 49, 31, 57, 44, 23, 33, 68, 66, 26, 17, 4, 76, 11, 10, 7, 98, 73, 57, 55, 37, 41, 57, 82, 29, 80, 86], [78, 61, 89, 44, 96, 59, 79, 39, 55, 23, 94, 23, 59, 4, 37, 19, 10, 94, 72, 90, 25, 86, 50, 68, 71, 34, 56, 72, 46, 45, 28, 85, 91, 50, 34, 71, 49, 68], [46, 60, 27, 21, 44, 61, 86, 9, 64, 78, 53, 97, 30, 57, 24, 67, 38, 30, 61, 87, 79, 40, 20, 59, 31, 20, 2, 22, 96, 63, 9, 8, 81, 96, 19, 60, 97, 40], [61, 59, 30, 75, 21, 33, 92, 89, 85, 72, 98, 3, 23, 61, 87, 93, 92, 83, 9, 82, 44, 89, 68, 54, 14, 76, 49, 29, 44, 33, 94, 23, 17, 46, 45, 50, 1, 88], [53, 90, 59, 33, 63, 59, 94, 93, 7, 61, 96, 16, 51, 52, 3, 42, 9, 10, 94, 66, 14, 89, 72, 94, 99, 14, 74, 45, 78, 99, 54, 53, 80, 19, 87, 48, 12, 38], [9, 17, 96, 94, 10, 97, 46, 40, 35, 37, 16, 11, 88, 65, 94, 87, 75, 42, 16, 32, 95, 4, 54, 42, 62, 10, 90, 31, 79, 45, 42, 88, 96, 47, 88, 4, 10, 76], [1, 14, 14, 41, 6, 62, 47, 66, 23, 51, 65, 6, 16, 47, 32, 22, 93, 54, 72, 82, 40, 24, 94, 62, 25, 61, 41, 14, 95, 50, 98, 30, 65, 22, 85, 79, 3, 10], [64, 40, 52, 51, 32, 35, 71, 5, 89, 12, 91, 33, 78, 88, 39, 68, 44, 30, 5, 57, 18, 30, 58, 57, 22, 44, 12, 16, 50, 42, 80, 85, 53, 29, 5, 56, 14, 92], [35, 81, 5, 71, 97, 39, 34, 19, 78, 75, 51, 49, 39, 12, 80, 2, 90, 35, 25, 48, 87, 75, 23, 92, 33, 78, 39, 37, 70, 74, 62, 92, 12, 99, 18, 33, 89, 28], [79, 82, 20, 51, 35, 70, 24, 9, 34, 25, 27, 53, 84, 45, 31, 20, 58, 55, 12, 51, 78, 45, 48, 66, 92, 7, 93, 72, 93, 59, 70, 66, 67, 11, 10, 95, 57, 65], [56, 23, 53, 92, 41, 98, 86, 27, 56, 38, 95, 34, 5, 83, 80, 49, 10, 71, 54, 40, 81, 44, 91, 61, 96, 22, 53, 7, 60, 35, 65, 93, 2, 59, 92, 60, 80, 70], [58, 75, 10, 84, 37, 32, 71, 91, 66, 98, 51, 28, 17, 91, 45, 22, 13, 19, 93, 85, 19, 11, 66, 2, 87, 58, 24, 42, 15, 21, 95, 59, 67, 27, 39, 48, 94, 53], [48, 39, 19, 44, 34, 20, 42, 38, 95, 24, 69, 5, 12, 75, 17, 5, 72, 70, 91, 24, 20, 45, 14, 29, 43, 10, 27, 98, 93, 21, 89, 23, 40, 38, 36, 99, 90, 82], [38, 1, 96, 18, 20, 6, 20, 88, 73, 92, 41, 90, 2, 18, 78, 89, 7, 81, 34, 8, 36, 88, 60, 64, 56, 70, 53, 27, 41, 54, 35, 94, 30, 20, 90, 47, 18, 75], [49, 44, 96, 84, 67, 89, 40, 83, 21, 42, 41, 3, 19, 59, 94, 65, 56, 16, 79, 61, 59, 63, 35, 32, 2, 8, 73, 65, 87, 56, 83, 16, 85, 83, 80, 11, 92, 74], [59, 63, 9, 66, 85, 47, 15, 81, 41, 75, 3, 5, 73, 2, 99, 89, 87, 67, 10, 2, 97, 20, 57, 75, 18, 77, 66, 36, 78, 43, 5, 76, 31, 3, 87, 62, 13, 38], [68, 88, 92, 3, 70, 43, 61, 91, 7, 17, 56, 91, 74, 15, 31, 8, 17, 25, 75, 5, 55, 46, 73, 48, 21, 53, 9, 23, 45, 30, 63, 67, 29, 53, 30, 68, 58, 41], [14, 51, 22, 93, 95, 99, 28, 63, 48, 48, 31, 5, 8, 96, 86, 98, 21, 34, 16, 31, 2, 27, 25, 34, 30, 68, 27, 86, 30, 24, 25, 14, 72, 6, 28, 5, 30, 97], [93, 73, 8, 62, 72, 47, 31, 64, 16, 42, 84, 12, 40, 49, 52, 62, 96, 3, 95, 10, 35, 62, 69, 77, 31, 90, 51, 13, 91, 58, 6, 77, 5, 86, 81, 19, 76, 12]], 30",
"432"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
long long int f_gold ( int n ) {
long long int multiTerms = n * ( n + 1 ) / 2;
long long int sum = multiTerms;
for ( int i = 2;
i <= n;
i ++ ) {
multiTerms = multiTerms - ( i - 1 );
sum = sum + multiTerms * i;
}
return sum;
}
| [] | null | [] | SUM_SERIES_12_32_52_2N_12 | python | [] | def f_gold ( n ) :
sum = 0
for i in range ( 1 , n + 1 ) :
sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 )
return sum
| code_translation | [
[
"14",
"3654"
],
[
"61",
"302621"
],
[
"37",
"67525"
],
[
"86",
"848046"
],
[
"47",
"138415"
],
[
"98",
"1254890"
],
[
"70",
"457310"
],
[
"24",
"18424"
],
[
"76",
"585276"
],
[
"24",
"18424"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int b [ ], int n, int m ) {
unordered_map < int, int > countA, countB;
for ( int i = 0;
i < n;
i ++ ) countA [ a [ i ] ] ++;
for ( int i = 0;
i < m;
i ++ ) countB [ b [ i ] ] ++;
int res = 0;
for ( auto x : countA ) if ( countB . find ( x . first ) != countB . end ( ) ) res += min ( x . second, countB [ x . first ] );
return res;
}
| [] | null | [] | SWAP_TWO_NUMBERS_WITHOUT_USING_TEMPORARY_VARIABLE | python | [] | def f_gold ( xp , yp ) :
xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ]
yp [ 0 ] = xp [ 0 ] ^ yp [ 0 ]
xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ]
| code_translation | [
[
"[5, 7, 12, 13, 15, 17, 24, 27, 28, 31, 36, 44, 55, 55, 56, 58, 60, 62, 64, 73, 75, 77, 89, 90, 93, 93, 95, 97, 98], [2, 8, 12, 13, 14, 20, 23, 25, 27, 28, 31, 33, 33, 37, 38, 39, 42, 42, 43, 47, 52, 54, 62, 67, 71, 72, 73, 76, 77, 79, 81, 81, 85, 86, 89, 91, 91, 96, 96, 99]",
"None"
],
[
"[-14, 51, 6, 25, 13, -36, 23, 14, -80, -84, 45, -81, 20, 36, 66, -62, 81, -7, 5, 0, -10, 59, -56, 88, -24, 45, -21, -27, 67, 70, 76, 40, -4, -11, 3, 46, -94, 22, 71, 16, 63, 82, -38, 97, 44, 36, -11, -4], [36, 59, 38, 84, 21, -24, -8, -30, 48, 33, -77, 37, -42, 87, 82, -54, -78, 92, -92, 23, -80, 79, -22, -61, -63, 78]",
"None"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1]",
"None"
],
[
"[11, 87, 32, 10, 11, 70, 62, 47, 34, 17, 54, 76, 85, 40, 19, 67, 82, 53, 64, 83, 47, 6, 16, 72, 18, 52, 48, 43, 39, 49, 12, 10, 71, 55, 1, 49, 36, 21, 37, 24, 55, 25, 7, 81, 93, 94, 71, 97, 71], [63, 73, 12, 35, 63, 68, 92, 57, 13, 23, 83, 39, 88, 80, 97, 12, 34, 71, 75, 31, 93, 62, 13, 31]",
"None"
],
[
"[-84, 3], [-85, -71, -66, -63, -25, -23, -19, 3, 67, 94, 96]",
"None"
],
[
"[0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0]",
"None"
],
[
"[5, 3, 4, 5, 6, 8, 14, 16, 16, 17, 19, 21, 21, 25, 26, 26, 29, 33, 36, 39, 46, 53, 55, 56, 66, 77, 81, 84, 84, 86, 86, 88, 89, 89, 92, 97], [2, 13, 22, 24, 27, 33, 46, 67, 74, 77, 78, 82, 86, 90, 91]",
"None"
],
[
"[-40, -37, 13, -6, -52, 91, -88, 56, 72, 71, 45, -60, 77, -15, -43, -13, -16, 92, 85, 21, -26, 7, 24, 98, 0, -57, 19, -77, 55, 86, -63, 34, -35, 34, 78, -78, 5, -12, 53, 25, -21, -10, -49, 76, 2, 98, 6], [15]",
"None"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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]",
"None"
],
[
"[80, 24, 60, 95, 55], [75, 24, 77, 24, 54, 26, 66, 80, 38, 65, 75, 51, 35]",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int nthElement = 19 + ( n - 1 ) * 9;
int outliersCount = ( int ) log10 ( nthElement ) - 1;
nthElement += 9 * outliersCount;
return nthElement;
}
| [] | null | [] | CHECK_IF_ALL_THE_ELEMENTS_CAN_BE_MADE_OF_SAME_PARITY_BY_INVERTING_ADJACENT_ELEMENTS | python | [] | def f_gold ( a , n ) :
count_odd = 0 ; count_even = 0 ;
for i in range ( n ) :
if ( a [ i ] & 1 ) :
count_odd += 1 ;
else :
count_even += 1 ;
if ( count_odd % 2 and count_even % 2 ) :
return False ;
else :
return True ;
| code_translation | [
[
"[1, 1, 1, 7, 7, 8, 10, 10, 10, 14, 15, 18, 20, 23, 24, 24, 26, 30, 32, 32, 33, 36, 42, 43, 46, 48, 51, 51, 52, 53, 58, 58, 59, 59, 59, 60, 67, 71, 72, 74, 76, 77, 83, 84, 86, 90, 91], 30",
"True"
],
[
"[-90, -20, -60, -64, -24, 84, -2, -32, 28, -54, 44, -96, 52, 88, 20, -56, -2], 12",
"True"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 36",
"False"
],
[
"[98, 70, 24, 18, 7, 4, 78, 19, 70, 56, 99, 54, 69, 15, 88, 20, 40, 13, 19, 56, 62], 19",
"True"
],
[
"[-72, -66, -58, -20, 36, 80, 92], 6",
"True"
],
[
"[0, 1], 1",
"True"
],
[
"[6, 13, 14, 16, 21, 26, 26, 28, 29, 35, 38, 42, 47, 47, 62, 67, 77, 81, 81, 83, 84, 88, 90, 96, 97, 98], 17",
"True"
],
[
"[-48, -8, 20, 32, -90, -42, -6, -88, -72, 42, 66, -62, 82, -4, 8, 12, -22, 82, 56, 96, -54, 92, -42, 30, -18, 14, -6, -66, 34, 16, -84, -94, 48, -48, 52, -60, -92, -16], 35",
"True"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 14",
"True"
],
[
"[45, 86, 53, 80, 27, 45, 1, 85, 91, 93, 92, 43, 75, 86, 81, 48, 21, 34, 5, 10, 88, 42, 7, 15, 96, 85, 62, 86, 52, 37], 29",
"True"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int k ) {
if ( k > n ) return - 1;
int * csum = new int [ n ];
csum [ 0 ] = arr [ 0 ];
for ( int i = 1;
i < n;
i ++ ) csum [ i ] = csum [ i - 1 ] + arr [ i ];
int max_sum = csum [ k - 1 ], max_end = k - 1;
for ( int i = k;
i < n;
i ++ ) {
int curr_sum = csum [ i ] - csum [ i - k ];
if ( curr_sum > max_sum ) {
max_sum = curr_sum;
max_end = i;
}
}
delete [ ] csum;
return max_end - k + 1;
}
| [] | null | [] | CHECK_WHETHER_TRIANGLE_VALID_NOT_SIDES_GIVEN | python | [] | def f_gold ( a , b , c ) :
if ( a + b <= c ) or ( a + c <= b ) or ( b + c <= a ) :
return False
else :
return True
| code_translation | [
[
"29, 19, 52",
"False"
],
[
"83, 34, 49",
"False"
],
[
"48, 14, 65",
"False"
],
[
"59, 12, 94",
"False"
],
[
"56, 39, 22",
"True"
],
[
"68, 85, 9",
"False"
],
[
"63, 36, 41",
"True"
],
[
"95, 34, 37",
"False"
],
[
"2, 90, 27",
"False"
],
[
"11, 16, 1",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int n ) {
int count = 0;
for ( int i = 0;
i < n;
i ++ ) {
for ( int j = i + 1;
j < n;
j ++ ) if ( ( a [ i ] & a [ j ] ) == 0 ) count += 2;
}
return count;
}
| [] | null | [] | TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS | python | [] | def f_gold ( n ) :
dp = [ [ 0 for i in range ( n + 1 ) ] for i in range ( 10 ) ]
for i in range ( 10 ) :
dp [ i ] [ 1 ] = 1
for digit in range ( 10 ) :
for len in range ( 2 , n + 1 ) :
for x in range ( digit + 1 ) :
dp [ digit ] [ len ] += dp [ x ] [ len - 1 ]
count = 0
for i in range ( 10 ) :
count += dp [ i ] [ n ]
return count
| code_translation | [
[
"21",
"14307150"
],
[
"40",
"2054455634"
],
[
"83",
"868754947060"
],
[
"93",
"2290415157800"
],
[
"43",
"3679075400"
],
[
"98",
"3585446225075"
],
[
"35",
"708930508"
],
[
"86",
"1174992339235"
],
[
"76",
"411731930610"
],
[
"88",
"1429144287220"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_TWICE | python | [] | def f_gold(price, n):
profit = [0] * n
max_price = price[n - 1]
for i in range(n - 2, 0, - 1):
if price[i] > max_price:
max_price = price[i]
profit[i] = max(profit[i + 1], max_price - price[i])
min_price = price[0]
for i in range(1, n):
if price[i] < min_price:
min_price = price[i]
profit[i] = max(profit[i - 1], profit[i] + (price[i] - min_price))
result = profit[n - 1]
return result
| code_translation | [
[
"[9, 10, 10, 12, 17, 18, 23, 32, 41, 44, 47, 50, 59, 69, 69, 75, 82, 84, 87, 89, 97, 99], 20",
"80"
],
[
"[6, 6, 60, 40, 32, -70, -92, 88, 10, -8, -54, 4, 16, 8, -44, 80, -70, 36, 36, -74, -94, 18, -64, -66, -46, 0, -54, -84, 16, -88, -34, -24, 92, 84, 62], 34",
"366"
],
[
"[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13",
"1"
],
[
"[2, 67, 50, 8, 20, 42, 37, 69, 86, 74, 85, 96, 78, 89, 91], 8",
"126"
],
[
"[-68, -52, -14, -2, 18, 22, 30, 34, 64, 64, 70], 9",
"132"
],
[
"[1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1], 21",
"2"
],
[
"[4, 17, 19, 28, 29, 30, 30, 30, 35, 36, 36, 38, 40, 40, 42, 43, 45, 51, 55, 57, 58, 59, 64, 65, 66, 82, 84, 85, 87, 91, 92, 94, 98, 98], 25",
"62"
],
[
"[52, 88, -40, 60, 30, 8, -96, 66, -96, -28, -56, -14, 76, -92, 56, 58, 64, -60, -90, 26, 64, -2, 54, -24, 54, -46, -44], 14",
"334"
],
[
"[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], 22",
"0"
],
[
"[82, 14, 51, 12, 5, 15, 50, 88, 91, 82, 16, 98, 23, 58, 86, 91, 30, 81, 7, 73, 67, 47, 10, 50, 43, 31, 19, 2, 22], 18",
"168"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( string s, int K ) {
int n = s . length ( );
int C, c1 = 0, c2 = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( s [ i ] == 'a' ) c1 ++;
if ( s [ i ] == 'b' ) {
c2 ++;
C += c1;
}
}
return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2;
}
| [] | null | [] | MAXIMUM_POSSIBLE_SUM_WINDOW_ARRAY_ELEMENTS_WINDOW_ARRAY_UNIQUE | python | [] | def f_gold ( A , B , n ) :
mp = set ( )
result = 0
curr_sum = curr_begin = 0
for i in range ( 0 , n ) :
while A [ i ] in mp :
mp.remove ( A [ curr_begin ] )
curr_sum -= B [ curr_begin ]
curr_begin += 1
mp.add ( A [ i ] )
curr_sum += B [ i ]
result = max ( result , curr_sum )
return result
| code_translation | [
[
"[4, 8, 10, 10, 16, 23, 33, 36, 43, 47, 50, 55, 56, 72, 84, 85, 86, 86, 88, 90, 92, 99], [8, 26, 30, 35, 45, 47, 55, 56, 59, 61, 64, 66, 67, 69, 73, 77, 78, 81, 82, 85, 86, 99], 20",
"852"
],
[
"[48, -22, 84, 76, 50, -14, -82, 28, 86, -50, -40, 10, 48, 20, -48, -84, -64, -48, -32, -84, -32, 10, 42, -10, -68, -16, -94, -76, 42, -96, 16, -64, 60, 8, -88, -62, 82, -24, -28, 40, 18, 8], [82, 94, 34, 12, 18, -68, 14, -16, -30, -16, 6, 74, -68, 76, -76, 52, -32, -38, 78, 64, -60, -46, 82, -60, 98, -70, -52, -96, -6, -44, 66, -66, 22, -42, -66, 4, -2, -48, -94, 72, 56, 88], 30",
"240"
],
[
"[0, 0, 0, 1], [0, 0, 1, 1], 2",
"0"
],
[
"[74, 64, 93, 72, 75, 90, 46, 72, 91, 98, 57, 58, 76, 29, 88, 3, 86, 1, 78, 74, 56, 54, 57, 3, 94, 2, 14, 32, 67, 62, 1, 30, 78, 95, 40], [9, 50, 22, 60, 36, 46, 76, 48, 90, 64, 16, 24, 41, 12, 36, 36, 93, 52, 26, 38, 68, 5, 55, 19, 35, 5, 7, 96, 67, 64, 24, 85, 6, 33, 7], 20",
"734"
],
[
"[-94, -88, -68, -24, 60, 94], [-80, -72, -60, -42, -24, -6], 4",
"0"
],
[
"[0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0], [1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0], 22",
"2"
],
[
"[3, 7, 12, 15, 17, 23, 31, 31, 32, 37, 41, 54, 57, 60, 62, 62, 64, 70, 71, 74, 75, 83, 97, 98], [3, 10, 10, 12, 12, 14, 15, 19, 19, 20, 25, 27, 27, 28, 40, 41, 50, 51, 53, 57, 60, 65, 75, 99], 22",
"377"
],
[
"[-2, 26, -74, 96, -70, 56, 92, -74, -38, -18, 36, 44, -10, -26, 26, -22, -58, 78, 86, 22, 76, 50, 88, -86, -80, -36, -48, 90, -34, 62, 46, -56, -32], [76, 42, 0, 4, -96, -24, -50, -54, 26, -8, -38, -46, 42, -50, 16, -2, -6, 2, -8, 56, 64, -58, -96, 2, -64, -66, -14, 58, -76, -26, 78, -96, 48], 17",
"122"
],
[
"[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], [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], 39",
"1"
],
[
"[86, 30, 87, 99, 8, 1, 24, 46, 12, 21, 43, 73, 28, 3, 35, 49, 14, 37, 63, 98, 65, 43, 86, 69, 27, 60, 45, 88, 25, 86, 11, 9, 86, 73, 40, 70, 49, 50, 95, 69, 94], [27, 66, 77, 34, 98, 75, 43, 27, 79, 32, 54, 40, 29, 47, 63, 15, 23, 33, 59, 76, 27, 31, 92, 43, 12, 20, 97, 67, 11, 12, 83, 79, 52, 46, 51, 36, 87, 96, 90, 6, 62], 34",
"1024"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int msis [ n ], msds [ n ];
int max_sum = INT_MIN;
msis [ 0 ] = arr [ 0 ];
for ( int i = 1;
i < n;
i ++ ) if ( arr [ i ] > arr [ i - 1 ] ) msis [ i ] = msis [ i - 1 ] + arr [ i ];
else msis [ i ] = arr [ i ];
msds [ n - 1 ] = arr [ n - 1 ];
for ( int i = n - 2;
i >= 0;
i -- ) if ( arr [ i ] > arr [ i + 1 ] ) msds [ i ] = msds [ i + 1 ] + arr [ i ];
else msds [ i ] = arr [ i ];
for ( int i = 0;
i < n;
i ++ ) if ( max_sum < ( msis [ i ] + msds [ i ] - arr [ i ] ) ) max_sum = msis [ i ] + msds [ i ] - arr [ i ];
return max_sum;
}
| [] | null | [] | MAXIMUM_WEIGHT_PATH_ENDING_ELEMENT_LAST_ROW_MATRIX | python | [] | def f_gold ( mat , N ) :
dp = [ [ 0 for i in range ( N ) ] for j in range ( N ) ]
dp [ 0 ] [ 0 ] = mat [ 0 ] [ 0 ]
for i in range ( 1 , N ) :
dp [ i ] [ 0 ] = mat [ i ] [ 0 ] + dp [ i - 1 ] [ 0 ]
for i in range ( 1 , N ) :
for j in range ( 1 , min ( i + 1 , N ) ) :
dp [ i ] [ j ] = mat [ i ] [ j ] + \
max ( dp [ i - 1 ] [ j - 1 ] , dp [ i - 1 ] [ j ] )
result = 0
for i in range ( N ) :
if ( result < dp [ N - 1 ] [ i ] ) :
result = dp [ N - 1 ] [ i ]
return result
| code_translation | [
[
"[[1, 3, 17, 22, 24, 29, 36, 38, 41, 42, 44, 44, 47, 48, 49, 51, 52, 54, 64, 69, 70, 77, 79, 82, 86, 86, 87, 88, 97, 99], [5, 6, 17, 21, 27, 27, 37, 39, 47, 48, 48, 52, 53, 54, 57, 59, 61, 63, 68, 72, 75, 77, 78, 81, 88, 89, 91, 95, 95, 97], [2, 8, 10, 16, 17, 18, 18, 18, 20, 27, 33, 35, 36, 42, 48, 51, 56, 66, 72, 72, 75, 76, 76, 76, 84, 85, 91, 94, 96, 98], [1, 2, 4, 11, 12, 12, 14, 21, 24, 26, 30, 33, 37, 42, 43, 47, 54, 56, 62, 64, 67, 68, 69, 71, 72, 73, 86, 86, 90, 93], [1, 1, 3, 7, 9, 10, 11, 12, 14, 14, 15, 17, 21, 25, 26, 40, 45, 46, 46, 48, 49, 54, 56, 60, 64, 68, 68, 73, 93, 93], [8, 11, 12, 13, 13, 15, 19, 20, 24, 27, 29, 31, 32, 33, 34, 37, 39, 42, 45, 50, 51, 61, 65, 68, 75, 81, 84, 85, 87, 94], [12, 16, 17, 24, 34, 34, 35, 40, 43, 48, 50, 51, 53, 55, 60, 60, 62, 66, 68, 70, 71, 73, 77, 83, 84, 86, 88, 95, 96, 97], [1, 5, 7, 18, 18, 22, 32, 36, 38, 38, 40, 43, 46, 49, 50, 54, 58, 61, 71, 74, 78, 78, 79, 82, 86, 87, 87, 88, 90, 95], [4, 11, 22, 26, 28, 35, 35, 37, 39, 42, 45, 46, 51, 57, 60, 61, 62, 63, 65, 65, 79, 79, 79, 82, 83, 87, 89, 90, 91, 98], [6, 7, 7, 8, 9, 11, 13, 16, 18, 23, 29, 37, 38, 41, 44, 46, 50, 50, 51, 56, 58, 67, 71, 74, 77, 79, 80, 90, 91, 97], [3, 7, 10, 15, 19, 20, 22, 28, 28, 32, 33, 36, 36, 38, 41, 49, 51, 54, 63, 66, 66, 70, 72, 79, 87, 88, 89, 92, 93, 98], [3, 8, 10, 14, 21, 25, 33, 35, 37, 37, 43, 44, 45, 50, 59, 62, 63, 75, 79, 79, 79, 84, 85, 86, 87, 87, 88, 90, 91, 96], [2, 4, 7, 12, 13, 18, 23, 23, 28, 29, 32, 34, 37, 37, 37, 38, 41, 44, 45, 47, 48, 49, 59, 64, 72, 75, 87, 92, 93, 98], [2, 4, 5, 5, 11, 14, 18, 23, 24, 27, 32, 35, 35, 37, 39, 40, 45, 48, 49, 52, 60, 66, 68, 71, 72, 74, 78, 81, 91, 92], [4, 4, 4, 6, 11, 18, 20, 23, 24, 29, 32, 33, 37, 40, 42, 47, 51, 52, 58, 59, 62, 67, 68, 75, 77, 78, 80, 85, 89, 95], [5, 5, 19, 21, 22, 23, 29, 30, 32, 39, 42, 42, 44, 44, 45, 46, 52, 55, 59, 63, 65, 76, 78, 80, 81, 82, 84, 93, 94, 97], [3, 4, 6, 8, 10, 15, 15, 17, 27, 28, 34, 36, 39, 42, 53, 54, 59, 63, 65, 66, 70, 71, 72, 80, 80, 91, 92, 94, 95, 99], [1, 7, 12, 13, 16, 25, 32, 32, 36, 46, 46, 49, 52, 55, 61, 61, 67, 68, 69, 72, 74, 76, 77, 78, 79, 81, 85, 90, 90, 92], [2, 12, 12, 13, 18, 20, 25, 28, 31, 31, 34, 36, 38, 39, 42, 43, 44, 47, 54, 60, 75, 76, 77, 80, 82, 83, 86, 90, 91, 91], [3, 8, 9, 11, 12, 14, 14, 14, 19, 25, 27, 29, 43, 45, 48, 50, 50, 56, 58, 61, 63, 65, 68, 71, 73, 81, 83, 83, 86, 93], [11, 15, 15, 15, 15, 18, 28, 29, 33, 33, 36, 43, 44, 48, 50, 50, 53, 55, 59, 59, 60, 61, 62, 63, 75, 78, 81, 82, 87, 94], [4, 7, 8, 10, 11, 12, 19, 24, 31, 36, 36, 37, 40, 41, 46, 48, 49, 51, 57, 62, 73, 75, 78, 81, 82, 86, 86, 91, 97, 97], [5, 5, 7, 8, 10, 14, 15, 17, 19, 21, 22, 23, 31, 34, 36, 43, 46, 58, 60, 72, 72, 75, 77, 81, 83, 84, 86, 91, 96, 98], [6, 10, 13, 15, 22, 27, 28, 29, 30, 31, 32, 35, 35, 36, 37, 39, 39, 43, 44, 47, 55, 68, 68, 69, 77, 83, 94, 94, 98, 99], [4, 4, 5, 6, 6, 10, 18, 27, 28, 29, 31, 33, 34, 41, 43, 44, 54, 56, 63, 74, 76, 77, 80, 80, 83, 89, 89, 90, 98, 99], [2, 7, 15, 19, 23, 23, 36, 41, 44, 46, 47, 49, 53, 58, 58, 60, 60, 66, 70, 73, 76, 77, 78, 80, 80, 88, 88, 91, 93, 94], [3, 3, 9, 9, 10, 13, 15, 19, 20, 23, 25, 33, 36, 37, 47, 54, 58, 60, 60, 65, 71, 73, 81, 88, 89, 90, 92, 94, 94, 96], [6, 7, 11, 19, 22, 27, 27, 31, 31, 33, 34, 44, 46, 47, 47, 48, 49, 53, 53, 56, 60, 60, 70, 72, 79, 80, 86, 93, 94, 96], [2, 7, 7, 7, 8, 10, 13, 15, 17, 18, 27, 27, 30, 33, 33, 34, 37, 41, 43, 47, 55, 55, 59, 71, 71, 75, 78, 78, 84, 85], [5, 6, 7, 7, 14, 21, 24, 26, 29, 31, 32, 34, 40, 42, 43, 45, 46, 53, 57, 58, 67, 73, 74, 77, 81, 85, 88, 91, 91, 92]], 29",
"1387"
],
[
"[[62, 44, 46, 46, -20, -40, 24, 42, -66, -90, 62, -98, 60], [62, 88, -38, -30, 44, -40, 70, -70, 96, 12, 20, -46, -96], [48, 28, -90, 82, 36, -74, 62, 70, -54, 94, 0, 58, 56], [46, -26, -40, 86, -54, -32, 28, 10, 42, -82, -92, 32, 82], [-34, -36, -12, -26, 82, 84, 34, 20, 18, -28, -2, 2, -84], [0, -18, -24, 72, 56, 58, 10, 36, -64, 30, 28, -76, -18], [-16, 20, 0, 62, 66, -28, -4, 42, 46, -84, -50, -86, -84], [76, 62, 52, -38, -76, 14, 32, -76, -46, -8, -86, 22, 16], [16, -74, 6, 30, -2, -30, 88, 90, -66, 44, 34, -80, -32], [72, -92, 92, -42, -8, 50, -8, 54, 18, 22, 36, 32, -32], [72, -90, -82, -60, -58, -66, -76, 84, 64, 34, -90, 20, 6], [4, 56, -4, 80, -62, -66, 8, 36, -30, 76, -18, -74, -34], [-70, 26, -70, -38, -44, -80, 14, 42, -34, -86, -90, 80, 60]], 9",
"452"
],
[
"[[0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 1, 1]], 4",
"0"
],
[
"[[89, 8, 34, 49, 96], [58, 75, 47, 25, 3], [45, 52, 96, 99, 96], [34, 69, 92, 92, 8], [27, 80, 63, 82, 25]], 3",
"260"
],
[
"[[-98, -94, -92, -86, -86, -86, -84, -78, -76, -70, -68, -66, -64, -58, -56, -52, -42, -40, -38, -38, -36, -32, -30, -24, -20, -12, -8, 4, 4, 6, 8, 12, 18, 22, 26, 30, 32, 56, 58, 72, 76, 78, 80, 82, 88, 94, 96, 98], [-94, -94, -92, -84, -84, -82, -80, -80, -80, -78, -78, -76, -74, -68, -64, -64, -58, -54, -48, -46, -40, -38, -36, -30, -22, -22, -12, -12, -6, -2, 2, 4, 6, 22, 22, 22, 24, 24, 24, 24, 26, 42, 44, 50, 52, 54, 66, 80], [-98, -92, -92, -84, -80, -76, -76, -70, -64, -60, -60, -52, -48, -48, -46, -46, -36, -32, -30, -24, -22, -16, -14, -8, -8, -4, -2, 0, 2, 2, 2, 8, 10, 12, 22, 32, 38, 38, 40, 48, 64, 68, 76, 78, 78, 86, 96, 96], [-98, -96, -88, -86, -78, -78, -70, -68, -62, -60, -58, -42, -38, -38, -38, -36, -36, -32, -28, -26, -24, -12, -10, -4, 2, 12, 12, 18, 26, 32, 34, 36, 38, 44, 44, 50, 52, 54, 54, 56, 56, 58, 70, 74, 76, 82, 86, 90], [-98, -96, -96, -94, -90, -90, -90, -86, -82, -78, -76, -74, -72, -68, -66, -60, -52, -46, -44, -44, -38, -38, -34, -32, -22, -20, -18, -14, 8, 8, 12, 12, 12, 16, 20, 38, 40, 44, 52, 76, 78, 80, 82, 86, 90, 90, 96, 98], [-88, -84, -84, -80, -78, -70, -68, -66, -62, -62, -54, -52, -48, -42, -42, -40, -32, -30, -26, -26, -24, -24, -14, -6, -4, -2, -2, 4, 4, 8, 22, 24, 40, 42, 52, 52, 56, 56, 58, 64, 72, 72, 74, 74, 86, 92, 96, 98], [-98, -98, -92, -82, -76, -72, -68, -66, -64, -62, -56, -50, -48, -46, -46, -40, -40, -40, -38, -28, -28, -24, -22, -20, -20, -10, -6, 4, 6, 10, 12, 26, 32, 38, 38, 40, 42, 56, 60, 64, 64, 72, 72, 76, 84, 90, 94, 98], [-98, -86, -72, -72, -66, -66, -64, -58, -56, -54, -54, -50, -44, -44, -36, -32, -30, -28, -26, -18, -14, -6, -4, 6, 6, 10, 10, 14, 22, 28, 38, 40, 46, 46, 50, 52, 54, 56, 60, 68, 68, 72, 76, 90, 90, 92, 92, 98], [-90, -86, -86, -84, -76, -74, -70, -66, -58, -58, -54, -50, -48, -44, -38, -38, -36, -34, -30, -22, -22, -8, -6, 4, 6, 6, 6, 8, 10, 24, 24, 28, 32, 32, 32, 36, 44, 48, 48, 50, 52, 64, 70, 74, 76, 92, 94, 96], [-96, -94, -84, -76, -76, -70, -68, -66, -56, -50, -50, -48, -46, -42, -42, -40, -40, -38, -38, -36, -36, -34, -30, -24, -22, -6, -4, -2, 2, 4, 10, 12, 16, 24, 28, 32, 38, 46, 50, 56, 56, 62, 64, 66, 74, 74, 98, 98], [-98, -96, -92, -88, -88, -84, -82, -78, -68, -66, -54, -52, -52, -50, -44, -40, -40, -38, -34, -34, -30, -26, -26, -24, -18, -14, -10, 4, 6, 6, 16, 20, 24, 26, 26, 32, 36, 38, 56, 66, 70, 78, 78, 84, 86, 88, 88, 90], [-94, -90, -86, -86, -86, -86, -84, -82, -78, -78, -76, -72, -68, -64, -64, -62, -46, -42, -42, -28, -26, -18, -16, -10, -8, -2, 0, 10, 10, 12, 18, 18, 26, 26, 32, 34, 34, 40, 50, 54, 56, 58, 62, 66, 66, 82, 84, 94], [-98, -94, -88, -86, -84, -80, -80, -78, -78, -74, -72, -72, -70, -70, -68, -66, -66, -64, -50, -44, -28, -24, -16, -6, -4, 0, 2, 8, 12, 22, 26, 32, 38, 38, 50, 54, 58, 58, 64, 64, 66, 70, 78, 86, 88, 90, 96, 98], [-96, -94, -90, -82, -78, -76, -76, -72, -64, -62, -54, -52, -50, -46, -44, -36, -30, -28, -28, -28, -22, -14, -12, 0, 0, 2, 6, 6, 10, 18, 22, 22, 24, 28, 28, 30, 34, 36, 36, 42, 46, 48, 54, 66, 72, 76, 86, 96], [-98, -96, -92, -92, -90, -88, -86, -82, -78, -70, -68, -66, -60, -58, -48, -48, -46, -30, -26, -22, -20, -16, -12, -8, -4, -4, 4, 16, 22, 32, 34, 34, 36, 36, 40, 52, 60, 62, 64, 66, 66, 74, 74, 78, 82, 82, 86, 94], [-92, -90, -88, -84, -82, -80, -78, -76, -74, -60, -56, -48, -48, -48, -48, -42, -38, -38, -30, -28, -28, -26, -12, -12, -10, -10, -2, 14, 16, 22, 26, 34, 42, 44, 52, 54, 56, 58, 58, 60, 62, 66, 70, 82, 84, 90, 94, 96], [-96, -92, -92, -84, -80, -76, -74, -74, -72, -70, -66, -66, -62, -60, -58, -56, -56, -50, -36, -34, -26, -10, 2, 2, 10, 10, 10, 10, 12, 18, 22, 22, 34, 34, 40, 60, 62, 62, 68, 72, 76, 78, 82, 82, 82, 82, 94, 96], [-96, -96, -88, -84, -78, -72, -68, -62, -56, -56, -52, -38, -32, -24, -20, -18, -18, -16, -10, -6, 8, 8, 12, 18, 24, 24, 26, 28, 30, 30, 32, 32, 56, 62, 64, 66, 66, 72, 74, 74, 78, 84, 84, 86, 88, 92, 92, 98], [-92, -86, -78, -68, -68, -68, -64, -58, -56, -48, -44, -38, -36, -34, -26, -22, -20, -18, -8, -6, 0, 2, 4, 12, 12, 18, 20, 22, 30, 32, 36, 38, 42, 44, 46, 50, 50, 52, 56, 58, 62, 64, 68, 70, 70, 82, 90, 98], [-94, -92, -92, -90, -88, -84, -80, -76, -74, -72, -72, -68, -62, -62, -56, -54, -50, -44, -42, -42, -30, -20, -16, -6, -6, 12, 14, 16, 18, 30, 30, 40, 42, 44, 54, 58, 58, 68, 74, 74, 80, 84, 84, 86, 88, 94, 96, 96], [-90, -86, -84, -84, -78, -78, -70, -70, -64, -56, -52, -50, -48, -48, -48, -46, -42, -40, -40, -30, -30, -28, -24, -22, -18, -16, -14, -6, -2, 4, 10, 12, 14, 14, 20, 26, 32, 44, 58, 64, 68, 68, 74, 76, 76, 82, 86, 88], [-98, -84, -80, -80, -78, -78, -78, -76, -68, -62, -56, -50, -34, -30, -30, -12, -8, -4, 2, 8, 10, 12, 14, 22, 24, 26, 36, 38, 38, 44, 46, 48, 56, 58, 62, 64, 64, 66, 66, 70, 70, 74, 78, 82, 88, 90, 94, 96], [-96, -96, -96, -96, -94, -94, -90, -86, -84, -80, -78, -74, -64, -60, -56, -54, -42, -38, -38, -38, -36, -34, -18, -16, -14, -14, -10, -10, -10, -6, -4, 8, 14, 20, 32, 42, 44, 48, 54, 54, 56, 70, 70, 72, 74, 80, 84, 94], [-96, -94, -86, -84, -78, -76, -70, -66, -62, -60, -56, -56, -54, -54, -52, -52, -50, -46, -46, -34, -32, -32, -28, -16, -12, -6, 0, 16, 18, 18, 20, 20, 28, 34, 38, 40, 42, 42, 52, 56, 62, 66, 66, 70, 82, 84, 88, 98], [-86, -84, -80, -78, -62, -60, -58, -56, -54, -52, -48, -44, -40, -38, -38, -26, -26, -24, -24, -18, -10, -6, 2, 8, 12, 16, 22, 26, 32, 36, 42, 44, 46, 48, 52, 52, 52, 62, 66, 70, 78, 78, 78, 80, 84, 90, 92, 92], [-98, -96, -88, -86, -82, -78, -78, -72, -72, -70, -64, -64, -60, -58, -54, -52, -46, -42, -30, -18, -14, -2, 2, 2, 6, 12, 20, 24, 24, 28, 32, 38, 38, 48, 54, 58, 60, 66, 68, 70, 70, 74, 78, 80, 82, 84, 86, 90], [-98, -88, -82, -82, -76, -76, -74, -70, -70, -68, -66, -64, -62, -58, -56, -52, -40, -38, -38, -38, -38, -36, -30, -26, -26, -12, -2, 4, 6, 16, 20, 24, 26, 26, 28, 34, 44, 50, 60, 68, 72, 74, 78, 84, 84, 88, 90, 90], [-98, -98, -96, -94, -88, -88, -86, -82, -66, -64, -62, -62, -40, -38, -34, -20, -14, -12, -10, -8, 0, 6, 10, 10, 12, 18, 22, 26, 26, 28, 32, 36, 40, 44, 44, 46, 64, 68, 70, 72, 74, 78, 80, 82, 82, 82, 92, 96], [-94, -94, -92, -88, -88, -84, -82, -78, -78, -76, -72, -64, -60, -56, -54, -54, -50, -48, -46, -42, -32, -28, -28, -24, -22, -22, -16, -14, -12, -12, 4, 10, 16, 16, 16, 28, 30, 40, 48, 56, 62, 64, 68, 76, 88, 90, 92, 98], [-94, -90, -88, -80, -76, -76, -76, -76, -72, -72, -68, -68, -68, -68, -66, -64, -62, -62, -54, -52, -46, -44, -36, -34, -20, -20, -16, -16, -10, -8, 0, 4, 22, 24, 28, 36, 38, 44, 50, 52, 60, 64, 68, 72, 76, 84, 86, 88], [-98, -98, -96, -94, -92, -80, -74, -72, -68, -68, -66, -64, -64, -62, -54, -52, -52, -28, -28, -28, -20, -10, 2, 6, 6, 14, 16, 16, 24, 28, 28, 32, 32, 36, 38, 44, 44, 46, 50, 58, 64, 68, 78, 86, 90, 90, 96, 98], [-96, -92, -80, -78, -68, -56, -54, -54, -44, -44, -36, -34, -34, -32, -30, -26, -22, -12, -8, -2, -2, -2, 6, 8, 8, 20, 20, 24, 28, 32, 36, 36, 38, 40, 42, 44, 44, 46, 48, 52, 54, 56, 60, 68, 70, 76, 80, 86], [-96, -86, -82, -82, -78, -76, -74, -68, -62, -54, -50, -48, -40, -38, -36, -34, -32, -26, -14, -12, -12, -6, -4, 0, 8, 10, 14, 20, 20, 26, 28, 40, 44, 46, 48, 56, 58, 60, 62, 66, 68, 76, 78, 86, 88, 88, 90, 94], [-98, -96, -86, -86, -84, -76, -76, -72, -72, -70, -64, -62, -58, -58, -54, -48, -46, -42, -32, -28, -28, -26, -24, -20, -14, 0, 0, 0, 0, 2, 10, 14, 18, 48, 50, 50, 52, 56, 58, 60, 62, 68, 76, 82, 86, 88, 94, 94], [-96, -92, -86, -82, -82, -80, -80, -78, -76, -74, -72, -62, -62, -56, -56, -50, -40, -30, -28, -18, -18, -12, -10, 0, 4, 10, 12, 12, 16, 18, 18, 18, 22, 30, 34, 42, 68, 74, 82, 86, 86, 90, 90, 90, 92, 92, 94, 94], [-92, -90, -88, -82, -82, -80, -74, -70, -66, -60, -58, -54, -48, -44, -40, -38, -32, -30, -26, -4, 2, 2, 10, 16, 18, 26, 30, 32, 32, 54, 56, 56, 58, 60, 62, 64, 64, 66, 72, 76, 78, 78, 78, 80, 80, 82, 86, 92], [-82, -82, -76, -74, -70, -66, -62, -62, -56, -54, -46, -46, -42, -36, -32, -30, -30, -26, -24, -22, -20, -10, -8, 4, 8, 14, 20, 22, 26, 36, 38, 46, 46, 46, 50, 50, 52, 54, 54, 58, 68, 76, 80, 84, 86, 86, 90, 98], [-98, -92, -92, -82, -78, -76, -62, -56, -54, -50, -50, -48, -48, -46, -44, -44, -34, -26, -24, -20, -16, -2, 16, 16, 22, 28, 28, 30, 36, 36, 38, 38, 40, 42, 42, 44, 50, 56, 56, 60, 62, 74, 78, 90, 92, 94, 96, 98], [-96, -92, -92, -86, -84, -74, -56, -54, -50, -42, -38, -36, -30, -28, -24, -22, -14, -10, -10, -10, -8, -8, 0, 4, 8, 8, 10, 18, 24, 24, 30, 30, 34, 38, 38, 42, 44, 44, 50, 54, 54, 66, 72, 74, 78, 84, 92, 98], [-90, -88, -80, -70, -56, -56, -54, -54, -50, -44, -44, -42, -40, -38, -26, -22, -22, -16, -14, -8, 0, 2, 18, 20, 34, 36, 36, 40, 42, 44, 46, 46, 48, 54, 54, 54, 56, 68, 68, 72, 72, 72, 76, 84, 86, 90, 92, 96], [-98, -96, -94, -86, -82, -76, -76, -70, -70, -68, -64, -48, -38, -38, -36, -28, -28, -26, -20, -18, -6, -2, -2, 2, 4, 6, 8, 8, 12, 12, 14, 16, 26, 30, 30, 34, 44, 44, 48, 48, 56, 72, 80, 80, 84, 84, 92, 94], [-90, -88, -84, -74, -74, -72, -70, -70, -68, -68, -64, -56, -52, -50, -40, -38, -32, -28, -22, -14, -14, -12, -8, -4, -2, 8, 10, 14, 14, 18, 22, 24, 30, 32, 36, 40, 58, 62, 64, 64, 64, 68, 72, 74, 82, 94, 98, 98], [-98, -92, -88, -80, -76, -70, -70, -66, -58, -56, -56, -40, -32, -26, -18, -6, -4, -2, 0, 0, 0, 2, 2, 6, 18, 20, 26, 32, 46, 46, 48, 48, 48, 52, 66, 68, 68, 68, 70, 70, 82, 82, 84, 86, 92, 96, 96, 98], [-98, -96, -92, -92, -92, -82, -72, -68, -66, -62, -46, -44, -44, -42, -38, -34, -32, -26, -26, -16, -12, -12, -10, -6, -6, -2, 0, 0, 4, 10, 12, 12, 14, 30, 36, 42, 46, 54, 58, 58, 66, 68, 68, 70, 90, 92, 96, 98], [-92, -86, -76, -76, -76, -72, -72, -68, -68, -58, -48, -40, -40, -36, -36, -26, -18, -14, -12, -10, -8, -8, 2, 8, 12, 16, 20, 24, 26, 30, 30, 34, 42, 42, 46, 56, 60, 62, 66, 72, 78, 78, 82, 82, 88, 90, 92, 92], [-92, -90, -90, -88, -84, -78, -70, -64, -60, -54, -42, -36, -34, -32, -30, -20, -14, -10, -8, -2, 0, 8, 10, 10, 20, 24, 28, 32, 42, 42, 42, 50, 54, 56, 60, 60, 60, 68, 68, 72, 78, 78, 86, 86, 92, 92, 98, 98], [-98, -98, -96, -96, -94, -90, -88, -86, -80, -78, -76, -72, -58, -52, -48, -34, -34, -28, -28, -24, -24, -18, -16, -12, -8, -8, -6, 8, 10, 12, 12, 12, 12, 26, 30, 30, 38, 52, 52, 64, 68, 72, 74, 80, 80, 82, 88, 90], [-92, -90, -82, -80, -72, -66, -52, -44, -44, -42, -42, -36, -34, -32, -26, -24, -22, -20, -18, -18, -16, -16, -16, -2, 2, 4, 8, 10, 16, 22, 24, 36, 38, 40, 46, 50, 56, 58, 64, 66, 74, 74, 84, 84, 88, 92, 96, 98]], 28",
"48"
],
[
"[[0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0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 87, 92, 93, 93, 94, 95], [1, 2, 2, 3, 4, 5, 5, 6, 8, 8, 9, 11, 15, 16, 19, 20, 20, 22, 22, 25, 33, 36, 37, 39, 40, 41, 41, 44, 54, 60, 62, 65, 67, 68, 68, 70, 72, 77, 77, 78, 78, 79, 85, 86, 87, 88, 93, 99], [1, 1, 1, 1, 3, 5, 6, 7, 7, 10, 12, 13, 13, 15, 17, 20, 21, 21, 22, 25, 31, 33, 37, 40, 41, 41, 46, 50, 53, 54, 55, 57, 61, 63, 64, 65, 68, 69, 76, 76, 81, 81, 82, 82, 84, 87, 89, 90], [1, 1, 1, 1, 4, 6, 19, 19, 19, 20, 21, 21, 22, 22, 23, 23, 25, 25, 26, 26, 29, 30, 34, 34, 35, 37, 48, 48, 50, 52, 59, 60, 62, 63, 64, 66, 68, 68, 75, 85, 88, 89, 91, 92, 94, 95, 97, 99], [2, 3, 7, 12, 15, 16, 18, 20, 20, 23, 24, 27, 29, 31, 33, 36, 36, 37, 38, 44, 47, 52, 52, 54, 55, 61, 62, 62, 64, 66, 66, 73, 74, 75, 76, 80, 81, 81, 83, 83, 84, 87, 87, 89, 92, 92, 96, 99], [1, 4, 4, 5, 6, 8, 12, 12, 14, 16, 21, 24, 24, 27, 29, 34, 35, 39, 41, 44, 44, 46, 48, 50, 52, 52, 53, 56, 60, 62, 64, 67, 72, 77, 78, 80, 81, 83, 84, 84, 85, 88, 91, 93, 93, 94, 94, 95], [3, 3, 4, 11, 11, 12, 15, 15, 17, 17, 18, 20, 24, 24, 27, 27, 29, 32, 35, 37, 39, 39, 41, 43, 43, 44, 48, 49, 53, 60, 69, 70, 73, 74, 75, 76, 76, 84, 85, 85, 85, 87, 87, 89, 90, 91, 93, 93], [1, 11, 11, 12, 15, 15, 16, 16, 17, 17, 18, 19, 20, 23, 27, 27, 31, 32, 32, 35, 37, 39, 39, 41, 43, 45, 47, 49, 49, 49, 56, 60, 61, 64, 67, 71, 73, 78, 79, 79, 81, 82, 83, 85, 87, 89, 92, 98], [5, 6, 9, 13, 14, 16, 17, 20, 20, 22, 22, 23, 28, 29, 29, 30, 32, 33, 36, 37, 45, 47, 49, 49, 50, 50, 52, 56, 60, 62, 65, 66, 69, 70, 71, 77, 78, 78, 80, 82, 83, 86, 86, 88, 88, 90, 90, 99], [3, 11, 12, 13, 14, 14, 15, 19, 19, 20, 26, 27, 28, 31, 32, 32, 32, 35, 35, 39, 39, 42, 43, 49, 54, 55, 57, 58, 59, 60, 61, 62, 62, 65, 65, 67, 73, 74, 81, 82, 83, 86, 88, 88, 93, 95, 95, 97], [1, 3, 3, 5, 7, 11, 17, 20, 20, 21, 21, 23, 24, 25, 26, 26, 30, 32, 35, 37, 38, 39, 42, 44, 47, 47, 48, 49, 51, 57, 57, 59, 60, 61, 62, 63, 66, 69, 70, 73, 78, 80, 84, 84, 89, 92, 96, 97], [1, 1, 2, 11, 12, 13, 15, 17, 19, 21, 22, 24, 27, 28, 28, 29, 30, 34, 39, 40, 40, 44, 45, 48, 57, 58, 58, 59, 61, 63, 63, 64, 66, 66, 68, 69, 70, 71, 74, 78, 79, 82, 84, 86, 89, 90, 94, 97], [2, 3, 7, 10, 10, 12, 13, 13, 17, 17, 19, 21, 36, 47, 48, 48, 51, 51, 52, 55, 57, 61, 61, 61, 65, 70, 71, 73, 74, 74, 75, 75, 76, 78, 79, 80, 80, 85, 86, 87, 87, 89, 91, 94, 95, 97, 97, 97], [1, 2, 2, 8, 9, 9, 9, 14, 16, 17, 23, 24, 27, 29, 30, 30, 34, 35, 36, 43, 44, 44, 47, 49, 50, 54, 56, 57, 58, 63, 67, 68, 69, 70, 72, 76, 77, 80, 81, 84, 84, 86, 88, 90, 93, 96, 96, 96], [2, 3, 3, 5, 5, 7, 7, 11, 18, 19, 19, 20, 23, 24, 27, 27, 28, 30, 30, 36, 38, 39, 40, 48, 50, 51, 53, 57, 57, 66, 67, 68, 73, 77, 78, 79, 82, 84, 85, 87, 88, 89, 95, 96, 97, 98, 99, 99], [3, 8, 10, 10, 12, 13, 13, 15, 16, 16, 17, 21, 21, 22, 23, 24, 26, 26, 27, 29, 32, 34, 35, 37, 42, 42, 52, 54, 61, 61, 65, 65, 66, 70, 73, 74, 76, 79, 83, 83, 85, 89, 91, 93, 94, 96, 97, 97], [3, 5, 6, 7, 9, 10, 13, 16, 16, 19, 23, 24, 24, 26, 28, 29, 30, 32, 33, 36, 37, 37, 41, 41, 41, 42, 42, 44, 45, 49, 50, 52, 55, 57, 58, 60, 61, 63, 75, 77, 77, 79, 80, 81, 86, 89, 94, 99], [1, 10, 13, 14, 15, 17, 18, 20, 21, 22, 23, 25, 26, 28, 32, 37, 39, 44, 46, 47, 47, 47, 47, 50, 51, 52, 55, 55, 58, 61, 69, 72, 73, 77, 77, 78, 80, 81, 82, 84, 88, 91, 93, 94, 95, 96, 97, 98], [1, 5, 5, 13, 13, 17, 26, 28, 30, 32, 34, 41, 43, 44, 45, 45, 46, 46, 49, 52, 53, 56, 57, 61, 61, 62, 63, 63, 63, 64, 65, 67, 69, 70, 73, 76, 77, 80, 80, 81, 82, 87, 87, 88, 89, 89, 93, 96], [5, 11, 12, 12, 18, 19, 19, 22, 24, 26, 26, 26, 30, 32, 33, 35, 35, 36, 38, 39, 42, 44, 46, 48, 52, 56, 57, 58, 59, 65, 65, 66, 67, 67, 68, 70, 73, 73, 75, 76, 77, 78, 80, 83, 84, 88, 92, 99], [5, 6, 9, 13, 17, 20, 20, 21, 22, 24, 25, 26, 30, 32, 33, 36, 37, 38, 38, 40, 44, 45, 48, 53, 55, 58, 58, 58, 59, 61, 63, 63, 63, 65, 67, 72, 75, 75, 75, 77, 77, 77, 79, 82, 88, 93, 97, 97], [9, 13, 14, 16, 17, 18, 21, 22, 22, 23, 24, 25, 33, 37, 40, 41, 42, 46, 49, 49, 51, 54, 57, 58, 58, 60, 67, 71, 73, 74, 74, 75, 77, 78, 80, 82, 85, 85, 86, 86, 86, 87, 91, 92, 93, 95, 97, 98], [1, 3, 10, 11, 14, 18, 18, 19, 23, 24, 26, 28, 33, 36, 37, 42, 42, 47, 47, 48, 48, 52, 53, 56, 57, 59, 61, 63, 63, 64, 65, 67, 69, 71, 75, 77, 78, 79, 83, 83, 83, 85, 86, 86, 92, 96, 97, 97], [3, 5, 6, 7, 7, 9, 13, 13, 18, 25, 27, 28, 29, 30, 32, 34, 37, 43, 44, 51, 52, 53, 54, 59, 63, 63, 64, 66, 68, 70, 70, 72, 72, 73, 77, 78, 80, 82, 83, 83, 84, 85, 85, 93, 95, 97, 99, 99], [4, 6, 7, 9, 9, 20, 20, 22, 31, 33, 34, 35, 35, 38, 40, 41, 42, 42, 44, 46, 47, 50, 52, 54, 57, 58, 60, 61, 62, 63, 63, 64, 65, 70, 72, 74, 80, 81, 87, 87, 88, 88, 92, 92, 95, 99, 99, 99], [3, 5, 9, 10, 10, 15, 18, 20, 21, 21, 23, 25, 28, 29, 37, 38, 40, 40, 40, 46, 51, 53, 55, 57, 59, 59, 60, 67, 68, 71, 72, 73, 75, 76, 79, 79, 81, 83, 86, 87, 88, 90, 90, 90, 92, 95, 96, 98], [5, 7, 8, 9, 9, 12, 14, 16, 18, 18, 18, 24, 25, 26, 28, 28, 29, 30, 32, 37, 38, 44, 44, 45, 46, 48, 51, 55, 55, 56, 58, 58, 62, 63, 64, 67, 71, 74, 76, 81, 86, 87, 88, 90, 90, 91, 95, 97], [4, 5, 13, 13, 16, 19, 19, 20, 22, 26, 27, 28, 30, 30, 31, 32, 33, 39, 39, 41, 41, 43, 45, 49, 50, 51, 64, 66, 67, 71, 73, 75, 78, 78, 79, 82, 84, 86, 87, 87, 88, 90, 91, 91, 92, 93, 96, 97], [2, 3, 5, 11, 16, 20, 21, 21, 25, 29, 31, 34, 36, 36, 37, 37, 38, 38, 44, 45, 46, 54, 60, 60, 61, 61, 67, 67, 67, 70, 71, 72, 76, 77, 79, 80, 83, 84, 84, 87, 87, 88, 90, 92, 93, 98, 99, 99], [1, 2, 5, 5, 12, 13, 13, 15, 18, 19, 24, 25, 25, 26, 28, 29, 30, 33, 34, 35, 35, 36, 36, 37, 38, 42, 44, 49, 50, 53, 58, 58, 58, 60, 65, 67, 72, 75, 77, 78, 81, 84, 88, 88, 90, 91, 94, 97], [5, 5, 6, 7, 8, 11, 11, 13, 19, 23, 25, 35, 37, 40, 40, 46, 47, 48, 48, 49, 51, 58, 60, 61, 63, 65, 67, 68, 71, 72, 76, 77, 79, 80, 84, 87, 88, 88, 89, 90, 92, 94, 94, 96, 96, 97, 97, 99], [1, 2, 3, 3, 5, 5, 13, 18, 19, 23, 31, 32, 34, 35, 36, 38, 39, 40, 42, 49, 51, 53, 54, 56, 62, 64, 64, 64, 66, 67, 67, 67, 69, 72, 74, 74, 80, 81, 83, 83, 84, 85, 91, 91, 94, 95, 96, 98], [1, 2, 5, 9, 10, 11, 14, 15, 16, 16, 24, 27, 30, 32, 35, 37, 39, 39, 40, 43, 48, 49, 50, 54, 57, 57, 58, 59, 60, 63, 63, 64, 64, 64, 68, 70, 76, 77, 80, 82, 85, 87, 88, 90, 91, 94, 94, 97], [10, 14, 15, 17, 17, 18, 22, 22, 28, 29, 29, 32, 32, 34, 36, 36, 38, 39, 40, 42, 43, 45, 45, 45, 54, 54, 55, 55, 59, 63, 67, 68, 74, 75, 75, 77, 77, 79, 80, 86, 86, 87, 87, 87, 87, 88, 93, 96], [2, 2, 5, 5, 9, 14, 17, 17, 20, 22, 22, 23, 25, 32, 32, 32, 35, 37, 37, 38, 39, 40, 47, 52, 55, 56, 60, 62, 63, 63, 63, 63, 64, 69, 73, 73, 74, 75, 77, 79, 82, 85, 88, 88, 90, 92, 92, 93], [3, 4, 4, 6, 8, 10, 12, 15, 16, 16, 17, 20, 21, 21, 24, 26, 27, 28, 28, 29, 30, 32, 38, 44, 49, 49, 50, 54, 59, 59, 61, 62, 64, 64, 65, 70, 70, 71, 72, 72, 73, 74, 75, 80, 83, 90, 92, 92], [4, 5, 9, 9, 13, 15, 16, 16, 17, 23, 25, 27, 28, 29, 29, 37, 37, 40, 43, 45, 49, 50, 51, 51, 53, 55, 56, 60, 61, 61, 64, 67, 68, 73, 74, 75, 76, 77, 79, 80, 85, 89, 89, 89, 91, 97, 97, 97], [2, 5, 9, 10, 11, 11, 11, 15, 15, 16, 18, 20, 21, 22, 23, 24, 40, 41, 47, 47, 48, 48, 49, 51, 53, 53, 54, 55, 61, 63, 65, 68, 70, 73, 74, 74, 77, 78, 79, 80, 82, 83, 85, 85, 86, 87, 98, 99], [1, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 23, 27, 27, 30, 34, 36, 36, 38, 42, 43, 43, 44, 44, 48, 49, 53, 54, 55, 61, 62, 66, 67, 72, 72, 73, 73, 77, 78, 78, 86, 88, 89, 92, 93, 98, 98, 99], [1, 2, 4, 6, 9, 13, 13, 13, 17, 18, 20, 28, 28, 30, 32, 33, 37, 38, 42, 42, 44, 47, 50, 52, 53, 54, 56, 57, 59, 60, 66, 68, 70, 71, 72, 74, 76, 77, 79, 83, 83, 84, 85, 90, 94, 94, 97, 99], [1, 1, 9, 9, 10, 10, 11, 12, 12, 15, 21, 22, 24, 24, 25, 26, 26, 27, 30, 31, 34, 35, 40, 41, 43, 47, 47, 53, 53, 53, 57, 60, 61, 61, 64, 66, 68, 71, 71, 79, 82, 82, 84, 88, 88, 90, 96, 99], [4, 4, 6, 6, 6, 6, 8, 9, 11, 11, 14, 16, 21, 25, 29, 37, 38, 40, 44, 45, 50, 51, 51, 53, 53, 56, 57, 58, 59, 59, 63, 69, 71, 72, 74, 76, 79, 80, 82, 83, 87, 93, 94, 96, 98, 98, 99, 99], [2, 2, 5, 9, 10, 12, 13, 13, 13, 13, 19, 22, 27, 32, 33, 34, 34, 38, 41, 45, 46, 47, 48, 50, 51, 51, 52, 54, 54, 57, 57, 60, 61, 74, 76, 76, 77, 79, 81, 83, 85, 92, 93, 95, 96, 97, 99, 99], [4, 4, 4, 6, 7, 9, 14, 15, 16, 18, 19, 23, 27, 37, 38, 39, 40, 41, 41, 44, 45, 51, 52, 53, 54, 54, 56, 57, 58, 59, 60, 63, 65, 65, 69, 79, 85, 85, 88, 89, 90, 90, 93, 94, 95, 95, 95, 99], [6, 6, 7, 9, 10, 10, 11, 15, 15, 16, 16, 17, 19, 20, 24, 28, 30, 31, 31, 33, 35, 37, 38, 40, 40, 43, 44, 44, 45, 46, 48, 58, 59, 62, 72, 73, 74, 80, 82, 82, 83, 85, 88, 90, 91, 91, 91, 96], [2, 2, 2, 2, 3, 4, 5, 12, 12, 15, 23, 23, 24, 24, 29, 35, 36, 38, 40, 41, 47, 47, 48, 49, 51, 54, 56, 57, 60, 62, 63, 64, 70, 75, 75, 76, 77, 80, 82, 83, 87, 90, 91, 91, 92, 93, 94, 94], [3, 4, 4, 7, 8, 9, 11, 12, 15, 19, 21, 22, 23, 24, 28, 28, 31, 37, 37, 37, 39, 48, 52, 52, 55, 55, 55, 57, 61, 66, 72, 75, 76, 77, 79, 83, 84, 84, 84, 88, 90, 92, 93, 94, 98, 98, 98, 99], [2, 5, 7, 11, 13, 15, 27, 29, 29, 31, 35, 38, 41, 42, 44, 44, 46, 47, 49, 52, 52, 53, 53, 53, 54, 54, 55, 56, 58, 60, 61, 61, 63, 69, 72, 72, 77, 77, 79, 80, 84, 84, 86, 87, 90, 92, 92, 93]], 44",
"2087"
],
[
"[[28, 84, -76, -76, -28, -42, -78, 6, 40, 70, 48, 92, -6, -34, 62, 34, -14, -64], [48, 6, -22, 44, -32, -26, -18, 94, -2, -80, -20, -64, -50, -18, -28, -96, 66, 48], [-2, 34, 6, -62, -48, 8, 2, -50, -66, 48, 22, -8, 10, 0, 50, -78, -76, -20], [-4, 12, -84, 76, -72, 74, 12, 8, -66, -10, -90, -94, -82, 68, -60, 66, -58, 60], [-34, -90, -52, 26, 58, -48, 78, 84, -34, -64, -64, -24, -34, -46, -2, 0, -70, 54], [4, 96, 36, 98, -62, 90, -50, 52, 52, -50, -34, 20, -26, 84, -14, -82, -72, -94], [38, 12, -48, 6, -18, 64, -58, -22, 60, -54, 86, 48, 16, 38, 50, -42, 24, 6], [-10, -46, -32, -72, -18, 48, 20, -16, 2, 50, -78, -30, -62, 76, 30, 52, 22, -6], [-72, 34, 4, -36, 60, -80, -66, -20, 36, 26, -70, 94, -22, 14, -80, 42, 94, -66], [52, -66, -68, 56, -94, 2, 88, -8, 10, 98, -48, 52, -38, 62, 44, -62, 80, 36], [-70, 16, 56, -40, -4, 12, -16, -52, 4, -14, -32, 20, 66, -94, 36, -78, -74, 0], [64, -62, -12, -34, -24, -94, 98, 30, -30, -28, -24, -22, -50, 28, -74, 36, 40, 50], [-98, 44, 8, 96, -82, -28, -26, 18, -58, -60, -98, 98, 18, -44, 42, 12, -82, 30], [-28, 96, -32, 62, -36, 32, -50, 2, 26, 80, -10, -48, -58, 64, 86, 2, -52, 84], [-76, -78, -46, -54, -34, 60, 84, 84, -24, 10, 40, -16, -42, -32, 14, -94, -88, -4], [28, -74, -28, 58, 40, -34, 52, 14, 10, -74, 94, 2, 84, 6, -28, -90, -50, 62], [-26, -62, -30, -32, 8, -8, -88, 66, -98, 42, -32, 12, 66, 94, -48, -16, 82, -24], [-48, 98, 18, 68, -52, -58, 20, 80, -60, -88, 34, -80, -76, 94, -56, 24, 22, 60]], 9",
"328"
],
[
"[[0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]], 5",
"1"
],
[
"[[93, 9, 33, 88, 35, 75, 39, 77, 87, 25], [80, 56, 48, 85, 10, 41, 83, 99, 59, 28], [41, 66, 51, 62, 30, 40, 40, 69, 62, 15], [3, 24, 41, 63, 48, 61, 48, 47, 56, 76], [8, 78, 18, 84, 23, 69, 65, 46, 66, 80], [69, 22, 65, 12, 19, 22, 55, 62, 51, 48], [17, 13, 28, 67, 5, 60, 15, 81, 44, 46], [29, 68, 96, 49, 43, 68, 77, 20, 18, 64], [49, 42, 12, 89, 94, 79, 36, 8, 28, 86], [60, 49, 38, 80, 58, 5, 46, 98, 75, 2]], 5",
"364"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int N ) {
int dp [ N ];
dp [ 0 ] = 1;
dp [ 1 ] = 2;
int i = 2;
do {
dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ];
}
while ( dp [ i ++ ] <= N );
return ( i - 2 );
}
| [] | null | [] | HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP | python | [] | def f_gold ( arr , i , n ) :
if i > int ( ( n - 2 ) / 2 ) :
return True
if ( arr [ i ] >= arr [ 2 * i + 1 ] and arr [ i ] >= arr [ 2 * i + 2 ] and f_gold ( arr , 2 * i + 1 , n ) and f_gold ( arr , 2 * i + 2 , n ) ) :
return True
return False
| code_translation | [
[
"[1, 2, 3, 5, 24, 24, 25, 25, 36, 37, 37, 39, 42, 44, 46, 50, 51, 54, 56, 60, 62, 70, 71, 73, 75, 80, 80, 85, 86, 89, 91, 95, 99], 0, 18",
"False"
],
[
"[-44, -58, 88, -42, 42, -14, -44, 42, 64, 94, -46, -70, 34, -10, -46, -52, -6, -78, 64, 56, 74, 98, -34, -4, -92, 6, -52, -20, 78, -72, -40], 0, 27",
"False"
],
[
"[0, 0, 0, 0, 0, 0, 0, 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, 20",
"False"
],
[
"[10, 2, 1, 34, 21, 37, 49, 31, 70, 97, 87, 50, 76, 55], 0, 8",
"False"
],
[
"[-94, -84, -82, -66, -64, -62, -56, -38, -24, -24, -4, 2, 4, 4, 8, 14, 16, 20, 30, 34, 34, 48, 58, 58, 70, 76, 78, 86, 88, 96, 98], 0, 26",
"False"
],
[
"[1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0], 12, 11",
"True"
],
[
"[5, 20, 30, 5, 10, 21, 5], 0, 7",
"False"
],
[
"[50, 20, 30, 5, 10, 21, 5], 0, 7",
"True"
],
[
"[50, 20, 30, 5, 10, 21, 5], 2, 7",
"True"
],
[
"[50, 20, 30, 5, 10, 21, 5], 4, 7",
"True"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n, int x ) {
int i = 0;
while ( i <= n - 1 ) {
if ( arr [ i ] == x ) return i;
i += abs ( arr [ i ] - x );
}
return - 1;
}
| [] | null | [] | COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION | python | [] | def f_gold ( n , r , p ) :
C = [ 0 for i in range ( r + 1 ) ]
C [ 0 ] = 1
for i in range ( 1 , n + 1 ) :
for j in range ( min ( i , r ) , 0 , - 1 ) :
C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p
return C [ r ]
| code_translation | [
[
"82, 5, 94",
"50"
],
[
"45, 24, 95",
"80"
],
[
"44, 68, 61",
"0"
],
[
"88, 24, 43",
"0"
],
[
"90, 75, 57",
"0"
],
[
"98, 55, 43",
"2"
],
[
"80, 54, 88",
"0"
],
[
"60, 75, 65",
"0"
],
[
"52, 73, 86",
"0"
],
[
"71, 26, 45",
"12"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
if ( n == 0 ) return 0;
else return 1 + f_gold ( n & ( n - 1 ) );
}
| [] | null | [] | SQUARE_ROOT_OF_AN_INTEGER | python | [] | def f_gold ( x ) :
if ( x == 0 or x == 1 ) :
return x
i = 1 ; result = 1
while ( result <= x ) :
i += 1
result = i * i
return i - 1
| code_translation | [
[
"89",
"9"
],
[
"11",
"3"
],
[
"14",
"3"
],
[
"92",
"9"
],
[
"76",
"8"
],
[
"63",
"7"
],
[
"51",
"7"
],
[
"16",
"4"
],
[
"83",
"9"
],
[
"66",
"8"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n, int p ) {
if ( n >= p ) return 0;
int result = 1;
for ( int i = 1;
i <= n;
i ++ ) result = ( result * i ) % p;
return result;
}
| [] | null | [] | MAXIMIZE_VOLUME_CUBOID_GIVEN_SUM_SIDES | python | [] | def f_gold(s):
maxvalue = 0
i = 1
for i in range(s - 1):
j = 1
for j in range(s):
k = s - i - j
maxvalue = max(maxvalue, i * j * k)
return maxvalue
| code_translation | [
[
"67",
"11132"
],
[
"48",
"4096"
],
[
"59",
"7600"
],
[
"22",
"392"
],
[
"14",
"100"
],
[
"66",
"10648"
],
[
"1",
"0"
],
[
"75",
"15625"
],
[
"58",
"7220"
],
[
"78",
"17576"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int b [ ], int n, int k ) {
int diff = 0, res = 0;
int temp;
for ( int i = 0;
i < n;
i ++ ) {
int pro = a [ i ] * b [ i ];
res = res + pro;
if ( pro < 0 && b [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ];
else if ( pro < 0 && a [ i ] < 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ];
else if ( pro > 0 && a [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ];
else if ( pro > 0 && a [ i ] > 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ];
int d = abs ( pro - temp );
if ( d > diff ) diff = d;
}
return res - diff;
}
| [
"import math"
] | null | [] | PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1 | python | [] | import math
def f_gold ( n ) :
return math.pow ( n , 2 )
| code_translation | [
[
"42",
"1764.0"
],
[
"40",
"1600.0"
],
[
"67",
"4489.0"
],
[
"73",
"5329.0"
],
[
"18",
"324.0"
],
[
"16",
"256.0"
],
[
"74",
"5476.0"
],
[
"33",
"1089.0"
],
[
"92",
"8464.0"
],
[
"22",
"484.0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int low, int high ) {
int fact = 1, x = 1;
while ( fact < low ) {
fact = fact * x;
x ++;
}
int res = 0;
while ( fact <= high ) {
res ++;
fact = fact * x;
x ++;
}
return res;
}
| [] | null | [] | REARRANGE_POSITIVE_AND_NEGATIVE_NUMBERS_PUBLISH | python | [] | def f_gold ( arr , n ) :
i = - 1
for j in range ( n ) :
if ( arr [ j ] < 0 ) :
i += 1
arr [ i ] , arr [ j ] = arr [ j ] , arr [ i ]
pos , neg = i + 1 , 0
while ( pos < n and neg < pos and arr [ neg ] < 0 ) :
arr [ neg ] , arr [ pos ] = arr [ pos ] , arr [ neg ]
pos += 1
neg += 2
| code_translation | [
[
"[5, 5, 6, 7, 8, 10, 13, 15, 15, 27, 27, 29, 29, 29, 29, 31, 33, 33, 36, 38, 38, 39, 42, 47, 47, 51, 51, 51, 52, 53, 55, 56, 57, 64, 66, 66, 67, 68, 70, 72, 74, 78, 86, 88, 94, 97, 97], 26",
"None"
],
[
"[73, -64, 15, -5, 64, -74, 30, 55, -57, -73, -31, 48], 8",
"None"
],
[
"[0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 6",
"None"
],
[
"[62, 82, 89, 97, 60, 43, 76, 68, 5, 37, 72, 92, 31], 7",
"None"
],
[
"[1, -89, -71, -60, -59, -54, -49, -99, 51], 8",
"None"
],
[
"[1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1], 21",
"None"
],
[
"[2, 7, 17, 22, 24, 25, 26, 28, 29, 33, 34, 38, 43, 49, 51, 52, 54, 59, 63, 70, 71, 75, 82, 88, 91, 91], 14",
"None"
],
[
"[77, -19, 48, -14, 18, -51, 99, -37, 5, -16, 89, 4, -51, -29, -99, 41, 79, 23, 84, -38, -68], 10",
"None"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 44",
"None"
],
[
"[88, 87, 59], 1",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int ones = 0, twos = 0;
int common_bit_mask;
for ( int i = 0;
i < n;
i ++ ) {
twos = twos | ( ones & arr [ i ] );
ones = ones ^ arr [ i ];
common_bit_mask = ~ ( ones & twos );
ones &= common_bit_mask;
twos &= common_bit_mask;
}
return ones;
}
| [] | null | [] | GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM_1 | python | [] | def f_gold ( arr , n , x ) :
for i in range ( n ) :
if arr [ i ] > arr [ i + 1 ] :
break
l = ( i + 1 ) % n
r = i
cnt = 0
while ( l != r ) :
if arr [ l ] + arr [ r ] == x :
cnt += 1
if l == ( r - 1 + n ) % n :
return cnt
l = ( l + 1 ) % n
r = ( r - 1 + n ) % n
elif arr [ l ] + arr [ r ] < x :
l = ( l + 1 ) % n
else :
r = ( n + r - 1 ) % n
return cnt
| code_translation | [
[
"[24, 54], 1, 1",
"0"
],
[
"[68, -30, -18, -6, 70, -40, 86, 98, -24, -48], 8, 8",
"0"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 33, 28",
"0"
],
[
"[84, 44, 40, 45, 2, 41, 52, 17, 50, 41, 5, 52, 48, 90, 13, 55, 34, 55, 94, 44, 41, 2], 18, 16",
"0"
],
[
"[-92, -76, -74, -72, -68, -64, -58, -44, -44, -38, -26, -24, -20, -12, -8, -8, -4, 10, 10, 10, 20, 20, 26, 26, 28, 50, 52, 54, 60, 66, 72, 74, 78, 78, 78, 80, 86, 88], 29, 30",
"4"
],
[
"[1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1], 19, 10",
"0"
],
[
"[5, 5, 15, 19, 22, 24, 26, 27, 28, 32, 37, 39, 40, 43, 49, 52, 55, 56, 58, 58, 59, 62, 67, 68, 77, 79, 79, 80, 81, 87, 95, 95, 96, 98, 98], 28, 34",
"1"
],
[
"[-98, 28, 54, 44, -98, -70, 48, -98, 56, 4, -18, 26, -8, -58, 30, 82, 4, -38, 42, 64, -28], 17, 14",
"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], 24, 24",
"0"
],
[
"[26, 72, 74, 86, 98, 86, 22, 6, 95, 36, 11, 82, 34, 3, 50, 36, 81, 94, 55, 30, 62, 53, 50, 95, 32, 83, 9, 16], 19, 16",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
long f_gold ( int n, int k ) {
long total = k;
int mod = 1000000007;
int same = 0, diff = k;
for ( int i = 2;
i <= n;
i ++ ) {
same = diff;
diff = total * ( k - 1 );
diff = diff % mod;
total = ( same + diff ) % mod;
}
return total;
}
| [] | null | [] | COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N | python | [] | def f_gold ( n ) :
i = 0
ans = 0
while ( ( 1 << i ) <= n ) :
k = 0
change = 1 << i
for j in range ( 0 , n + 1 ) :
ans += k
if change == 1 :
k = not k
change = 1 << i
else :
change -= 1
i += 1
return ans
| code_translation | [
[
"90",
"279"
],
[
"56",
"159"
],
[
"43",
"112"
],
[
"31",
"80"
],
[
"77",
"231"
],
[
"35",
"88"
],
[
"43",
"112"
],
[
"66",
"197"
],
[
"15",
"32"
],
[
"95",
"304"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int m, int n ) {
int dp [ n ] = {
1 };
dp [ 0 ] = 1;
for ( int i = 0;
i < m;
i ++ ) {
for ( int j = 1;
j < n;
j ++ ) {
dp [ j ] += dp [ j - 1 ];
}
}
return dp [ n - 1 ];
}
| [] | null | [] | CHECK_EXIST_TWO_ELEMENTS_ARRAY_WHOSE_SUM_EQUAL_SUM_REST_ARRAY | python | [] | def f_gold ( arr , n ) :
s = set ( )
sum = 0
for i in range ( n ) :
sum += arr [ i ]
if sum % 2 != 0 :
return False
sum = sum / 2
for i in range ( n ) :
val = sum - arr [ i ]
if arr [ i ] not in s :
s.add ( arr [ i ] )
if val in s :
print ( "Pair elements are" , arr [ i ] , "and" , int ( val ) )
| code_translation | [
[
"[2, 11, 5, 1, 4, 7], 6",
"None"
],
[
"[2, 4, 2, 1, 11, 15], 6",
"False"
],
[
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13",
"None"
],
[
"[69, 6, 24, 30, 75, 37, 61, 76, 19, 18, 90, 9, 49, 24, 58, 97, 18, 85, 24, 93, 71, 98, 92, 59, 75, 75, 75, 70, 35, 58, 50, 1, 64, 66, 33], 18",
"False"
],
[
"[-94, -94, -92, -74, -60, -58, -56, -44, -42, -40, -28, -14, 2, 4, 14, 20, 24, 28, 40, 42, 42, 66, 78, 78, 80, 82, 96], 26",
"None"
],
[
"[1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1], 10",
"False"
],
[
"[21, 26, 26, 27, 61, 62, 96], 6",
"False"
],
[
"[-54, 86, 20, 26], 3",
"None"
],
[
"[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 4",
"None"
],
[
"[44, 35, 26, 15, 56, 6, 36, 53, 15, 66, 20, 53, 99, 96, 51, 12, 61, 19, 79, 40, 99, 42, 86, 8, 11, 54, 93, 46, 23, 47, 41, 26, 66, 5, 86, 52, 64, 51, 4, 21, 63, 14, 7, 53, 31, 8, 9, 63], 31",
"None"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int low, int high ) {
if ( high >= low ) {
int mid = ( low + high ) / 2;
if ( mid == arr [ mid ] ) return mid;
if ( mid > arr [ mid ] ) return f_gold ( arr, ( mid + 1 ), high );
else return f_gold ( arr, low, ( mid - 1 ) );
}
return - 1;
}
| [] | null | [] | CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER | python | [] | def f_gold ( s1 , s2 ) :
n = len ( s1 )
m = len ( s2 )
dp = ( [ [ False for i in range ( m + 1 ) ] for i in range ( n + 1 ) ] )
dp [ 0 ] [ 0 ] = True
for i in range ( len ( s1 ) ) :
for j in range ( len ( s2 ) + 1 ) :
if ( dp [ i ] [ j ] ) :
if ( ( j < len ( s2 ) and ( s1 [ i ].upper ( ) == s2 [ j ] ) ) ) :
dp [ i + 1 ] [ j + 1 ] = True
if ( s1 [ i ].isupper ( ) == False ) :
dp [ i + 1 ] [ j ] = True
return ( dp [ n ] [ m ] )
| code_translation | [
[
"'daBcd', 'ABC'",
"True"
],
[
"'417514', '9'",
"False"
],
[
"'010000', '1111011010'",
"False"
],
[
"'ZcKYguiMrdyn', 'iz'",
"False"
],
[
"'argaju', 'RAJ'",
"True"
],
[
"'1110101101', '110101001'",
"False"
],
[
"'ySOCoSaygi', 'aRhxkYqh'",
"False"
],
[
"'204', '6986871066'",
"False"
],
[
"'10011100000010', '0'",
"True"
],
[
"'nMAioozPmY', 'WZFdDKw'",
"False"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n ) {
int ans = 0;
for ( int i = 1;
i <= n;
i ++ ) for ( int j = 1;
j <= n;
j ++ ) ans += ( i / j );
return ans;
}
| [
"import math"
] | null | [] | FIND_SUM_EVEN_FACTORS_NUMBER | python | [] | import math
def f_gold ( n ) :
if ( n % 2 != 0 ) :
return 0
res = 1
for i in range ( 2 , ( int ) ( math.sqrt ( n ) ) + 1 ) :
count = 0
curr_sum = 1
curr_term = 1
while ( n % i == 0 ) :
count = count + 1
n = n // i
if ( i == 2 and count == 1 ) :
curr_sum = 0
curr_term = curr_term * i
curr_sum = curr_sum + curr_term
res = res * curr_sum
if ( n >= 2 ) :
res = res * ( 1 + n )
return res
| code_translation | [
[
"71",
"0"
],
[
"78",
"112"
],
[
"39",
"0"
],
[
"36",
"78"
],
[
"49",
"0"
],
[
"17",
"0"
],
[
"53",
"0"
],
[
"66",
"96"
],
[
"92",
"144"
],
[
"71",
"0"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
unsigned int f_gold ( unsigned int n ) {
if ( n == 0 || n == 1 ) return 1;
return n * f_gold ( n - 2 );
}
| [
"import math"
] | null | [] | CALCULATE_AREA_TETRAHEDRON | python | [] | import math
def f_gold ( side ) :
volume = ( side ** 3 / ( 6 * math.sqrt ( 2 ) ) )
return round ( volume , 2 )
| code_translation | [
[
"58",
"22994.17"
],
[
"56",
"20696.54"
],
[
"35",
"5052.87"
],
[
"99",
"114350.83"
],
[
"13",
"258.92"
],
[
"45",
"10739.18"
],
[
"40",
"7542.47"
],
[
"92",
"91769.26"
],
[
"7",
"40.42"
],
[
"13",
"258.92"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int n, int m ) {
int count [ n + 1 ];
count [ 0 ] = 0;
for ( int i = 1;
i <= n;
i ++ ) {
if ( i > m ) count [ i ] = count [ i - 1 ] + count [ i - m ];
else if ( i < m ) count [ i ] = 1;
else count [ i ] = 2;
}
return count [ n ];
}
| [] | null | [] | SQUARED_TRIANGULAR_NUMBER_SUM_CUBES | python | [] | def f_gold ( s ) :
_sum = 0
n = 1
while ( _sum < s ) :
_sum += n * n * n
n += 1
n -= 1
if _sum == s :
return n
return - 1
| code_translation | [
[
"15",
"-1"
],
[
"36",
"3"
],
[
"39",
"-1"
],
[
"43",
"-1"
],
[
"75",
"-1"
],
[
"49",
"-1"
],
[
"56",
"-1"
],
[
"14",
"-1"
],
[
"62",
"-1"
],
[
"97",
"-1"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold | null | [] | null | [] | FREQUENT_ELEMENT_ARRAY | python | [] | def f_gold ( arr , n ) :
arr.sort ( )
max_count = 1 ; res = arr [ 0 ] ; curr_count = 1
for i in range ( 1 , n ) :
if ( arr [ i ] == arr [ i - 1 ] ) :
curr_count += 1
else :
if ( curr_count > max_count ) :
max_count = curr_count
res = arr [ i - 1 ]
curr_count = 1
if ( curr_count > max_count ) :
max_count = curr_count
res = arr [ n - 1 ]
return res
| code_translation | [
[
"[1, 1, 3, 11, 11, 11, 18, 20, 26, 26, 27, 30, 33, 39, 39, 42, 42, 48, 51, 51, 51, 51, 60, 66, 66, 68, 68, 69, 71, 72, 73, 76, 76, 77, 77, 77, 78, 90, 96], 25",
"51"
],
[
"[-74, -46, -38, -32, -22, -18, -14, -8, -4, 14, 30, 36, 42, 46, 48, 64, 66, 72, 80, 92, 94, 96, 96], 18",
"-74"
],
[
"[0, 0, 0, 0, 0, 0, 1], 6",
"0"
],
[
"[3, 21, 23, 31, 31, 32, 45, 49, 52, 55, 56, 58, 67, 70, 71, 80, 87, 93, 96, 97], 15",
"31"
],
[
"[-98, -96, -84, -82, -72, -64, -62, -56, -52, -52, -48, -46, -42, -36, -32, -30, -30, -18, -16, -10, -2, 0, 6, 18, 22, 22, 40, 42, 50, 54, 64, 68, 68, 72, 80, 82, 84, 96], 20",
"-52"
],
[
"[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], 29",
"0"
],
[
"[9, 12, 13, 28, 43, 46, 64, 66, 68, 89, 92], 6",
"9"
],
[
"[-94, -88, -82, -80, -72, -60, -56, -52, -46, -42, -42, -40, -40, -32, -32, -26, -24, -22, -22, -12, -12, -8, 4, 6, 18, 18, 22, 22, 32, 36, 36, 38, 40, 46, 48, 50, 54, 68, 76, 78, 80, 86, 86, 90, 92, 92, 94, 96], 41",
"-42"
],
[
"[0, 0, 0, 0, 0, 0, 1, 1, 1], 4",
"0"
],
[
"[2, 4, 4, 5, 9, 16, 25, 29, 31, 32, 40, 41, 41, 43, 54, 61, 62, 63, 64, 65, 74, 74, 76, 80, 81, 81, 85, 86, 95, 96, 97, 97], 16",
"4"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int f_gold [ n ];
f_gold [ 0 ] = 1;
for ( int i = 1;
i < n;
i ++ ) {
f_gold [ i ] = 1;
for ( int j = 0;
j < i;
j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1;
}
return * max_element ( f_gold, f_gold + n );
}
| [] | null | [] | FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS_1 | python | [] | def f_gold ( n ) :
return ( 1 << ( n - 1 ) )
| code_translation | [
[
"56",
"36028797018963968"
],
[
"28",
"134217728"
],
[
"4",
"8"
],
[
"24",
"8388608"
],
[
"72",
"2361183241434822606848"
],
[
"30",
"536870912"
],
[
"48",
"140737488355328"
],
[
"32",
"2147483648"
],
[
"13",
"4096"
],
[
"19",
"262144"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( char symb [ ], char oper [ ], int n ) {
int F [ n ] [ n ], T [ n ] [ n ];
for ( int i = 0;
i < n;
i ++ ) {
F [ i ] [ i ] = ( symb [ i ] == 'F' ) ? 1 : 0;
T [ i ] [ i ] = ( symb [ i ] == 'T' ) ? 1 : 0;
}
for ( int gap = 1;
gap < n;
++ gap ) {
for ( int i = 0, j = gap;
j < n;
++ i, ++ j ) {
T [ i ] [ j ] = F [ i ] [ j ] = 0;
for ( int g = 0;
g < gap;
g ++ ) {
int k = i + g;
int tik = T [ i ] [ k ] + F [ i ] [ k ];
int tkj = T [ k + 1 ] [ j ] + F [ k + 1 ] [ j ];
if ( oper [ k ] == '&' ) {
T [ i ] [ j ] += T [ i ] [ k ] * T [ k + 1 ] [ j ];
F [ i ] [ j ] += ( tik * tkj - T [ i ] [ k ] * T [ k + 1 ] [ j ] );
}
if ( oper [ k ] == '|' ) {
F [ i ] [ j ] += F [ i ] [ k ] * F [ k + 1 ] [ j ];
T [ i ] [ j ] += ( tik * tkj - F [ i ] [ k ] * F [ k + 1 ] [ j ] );
}
if ( oper [ k ] == '^' ) {
T [ i ] [ j ] += F [ i ] [ k ] * T [ k + 1 ] [ j ] + T [ i ] [ k ] * F [ k + 1 ] [ j ];
F [ i ] [ j ] += T [ i ] [ k ] * T [ k + 1 ] [ j ] + F [ i ] [ k ] * F [ k + 1 ] [ j ];
}
}
}
}
return T [ 0 ] [ n - 1 ];
}
| [] | null | [] | PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1 | python | [] | def f_gold ( l , w ) :
return ( 2 * ( l + w ) )
| code_translation | [
[
"58, 39",
"194"
],
[
"37, 49",
"172"
],
[
"56, 52",
"216"
],
[
"22, 43",
"130"
],
[
"77, 12",
"178"
],
[
"34, 31",
"130"
],
[
"74, 54",
"256"
],
[
"37, 52",
"178"
],
[
"21, 37",
"116"
],
[
"75, 30",
"210"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
float f_gold ( float a ) {
float area;
area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4;
return area;
}
| [] | null | [] | LONGEST_REPEATING_AND_NON_OVERLAPPING_SUBSTRING | python | [] | def f_gold ( str ) :
n = len ( str )
LCSRe = [ [ 0 for x in range ( n + 1 ) ] for y in range ( n + 1 ) ]
res = ""
res_length = 0
index = 0
for i in range ( 1 , n + 1 ) :
for j in range ( i + 1 , n + 1 ) :
if ( str [ i - 1 ] == str [ j - 1 ] and LCSRe [ i - 1 ] [ j - 1 ] < ( j - i ) ) :
LCSRe [ i ] [ j ] = LCSRe [ i - 1 ] [ j - 1 ] + 1
if ( LCSRe [ i ] [ j ] > res_length ) :
res_length = LCSRe [ i ] [ j ]
index = max ( i , index )
else :
LCSRe [ i ] [ j ] = 0
if ( res_length > 0 ) :
for i in range ( index - res_length + 1 , index + 1 ) :
res = res + str [ i - 1 ]
return res
| code_translation | [
[
"'fbfHTjE'",
"'f'"
],
[
"'09285256323'",
"'2'"
],
[
"'0011000101110'",
"'001'"
],
[
"'ue JkVZTt'",
"''"
],
[
"'48387612426300'",
"'4'"
],
[
"'010'",
"'0'"
],
[
"'ddRrUz'",
"'d'"
],
[
"'1049162633793'",
"'1'"
],
[
"'100011'",
"'1'"
],
[
"'iJfadiVaQqv'",
"'i'"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_set < int > S;
for ( int i = 0;
i < n;
i ++ ) S . insert ( arr [ i ] );
int ans = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( S . find ( arr [ i ] - 1 ) == S . end ( ) ) {
int j = arr [ i ];
while ( S . find ( j ) != S . end ( ) ) j ++;
ans = max ( ans, j - arr [ i ] );
}
}
return ans;
}
| [] | null | [] | NUMBER_N_DIGIT_STEPPING_NUMBERS | python | [] | def f_gold ( n ) :
dp = [ [ 0 for x in range ( 10 ) ] for y in range ( n + 1 ) ] ;
if ( n == 1 ) :
return 10 ;
for j in range ( 10 ) :
dp [ 1 ] [ j ] = 1 ;
for i in range ( 2 , n + 1 ) :
for j in range ( 10 ) :
if ( j == 0 ) :
dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ] ;
elif ( j == 9 ) :
dp [ i ] [ j ] = dp [ i - 1 ] [ j - 1 ] ;
else :
dp [ i ] [ j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ) ;
sum = 0 ;
for j in range ( 1 , 10 ) :
sum = sum + dp [ n ] [ j ] ;
return sum ;
| code_translation | [
[
"18",
"547810"
],
[
"66",
"21181622535989461745"
],
[
"73",
"2029839041161556077001"
],
[
"70",
"287240945935564706557"
],
[
"26",
"100719775"
],
[
"41",
"1774846161206"
],
[
"20",
"2017126"
],
[
"25",
"52479500"
],
[
"52",
"2306507126768895"
],
[
"13",
"21053"
]
] |
|
transcoder-geeksforgeeks | cpp | f_gold |
using namespace std;
int f_gold ( int a [ ], int size ) {
int max_so_far = a [ 0 ];
int curr_max = a [ 0 ];
for ( int i = 1;
i < size;
i ++ ) {
curr_max = max ( a [ i ], curr_max + a [ i ] );
max_so_far = max ( max_so_far, curr_max );
}
return max_so_far;
}
| [] | null | [] | PROGRAM_FIND_STRING_START_END_GEEKS | python | [] | def f_gold ( str , corner ) :
n = len ( str )
cl = len ( corner )
if ( n < cl ) :
return False
return ( ( str [ : cl ] == corner ) and ( str [ n - cl : ] == corner ) )
| code_translation | [
[
"'geeksmanishgeeks', 'geeks'",
"True"
],
[
"'shreyadhatwalia', 'abc'",
"False"
],
[
"'10000100', '100'",
"True"
],
[
"'abaa', 'a'",
"True"
],
[
"'30645530', '30'",
"True"
],
[
"'0000011011001', '001'",
"False"
],
[
"'dkqEd', 'd'",
"True"
],
[
"'48694119324654', '654'",
"False"
],
[
"'1101010010', '11'",
"False"
],
[
"'Ks', 'KsFLmngGGOmHKs'",
"False"
]
] |
Subsets and Splits