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 pPrevPrev = 1, pPrev = 1, pCurr = 1, pNext = 1; for ( int i = 3; i <= n; i ++ ) { pNext = pPrevPrev + pPrev; pPrevPrev = pPrev; pPrev = pCurr; pCurr = pNext; } return pNext; }
[ "import itertools" ]
null
[]
N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN
python
[]
import itertools def f_gold ( n ) : count = 0 for curr in itertools.count ( ) : sum = 0 x = curr while ( x ) : sum = sum + x % 10 x = x // 10 if ( sum == 10 ) : count = count + 1 if ( count == n ) : return curr return - 1
code_translation
[ [ "37", "406" ], [ "13", "136" ], [ "51", "613" ], [ "69", "1054" ], [ "76", "1126" ], [ "10", "109" ], [ "97", "1360" ], [ "40", "433" ], [ "69", "1054" ], [ "4", "46" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int low, int high, int x ) { int i; if ( x <= arr [ low ] ) return low; for ( i = low; i < high; i ++ ) { if ( arr [ i ] == x ) return i; if ( arr [ i ] < x && arr [ i + 1 ] >= x ) return i + 1; } return - 1; }
[]
null
[]
MINIMUM_COST_SORT_MATRIX_NUMBERS_0_N2_1
python
[]
def f_gold ( mat , n ) : tot_energy = 0 for i in range ( n ) : for j in range ( n ) : q = mat [ i ] [ j ] // n i_des = q j_des = mat [ i ] [ j ] - ( n * q ) tot_energy += ( abs ( i_des - i ) + abs ( j_des - j ) ) return tot_energy
code_translation
[ [ "[[4, 7, 10, 11, 14, 22, 27, 43, 45, 47, 48, 48, 49, 49, 51, 54, 56, 57, 59, 62, 63, 64, 66, 79, 82, 83, 87, 96, 97, 97, 98], [1, 1, 10, 13, 14, 18, 31, 33, 35, 37, 37, 42, 43, 44, 46, 54, 60, 61, 63, 63, 67, 67, 74, 76, 81, 83, 88, 91, 91, 96, 97], [2, 3, 4, 10, 11, 13, 17, 27, 30, 35, 35, 38, 39, 44, 47, 52, 52, 60, 61, 65, 68, 69, 71, 75, 76, 76, 85, 93, 94, 94, 98], [3, 5, 5, 19, 22, 23, 24, 24, 27, 31, 31, 32, 32, 44, 46, 50, 52, 54, 55, 57, 58, 59, 61, 61, 68, 72, 76, 78, 79, 85, 98], [7, 10, 14, 15, 21, 28, 30, 31, 40, 46, 51, 51, 52, 54, 57, 58, 58, 64, 67, 68, 68, 71, 72, 76, 79, 80, 85, 88, 88, 91, 93], [2, 5, 18, 21, 21, 25, 28, 31, 33, 34, 37, 38, 42, 45, 47, 56, 64, 70, 71, 75, 76, 78, 78, 81, 84, 88, 90, 91, 98, 98, 99], [10, 11, 14, 17, 18, 22, 27, 35, 36, 37, 46, 53, 55, 59, 59, 64, 66, 66, 66, 69, 69, 73, 73, 74, 74, 85, 86, 87, 89, 93, 99], [11, 13, 13, 14, 17, 18, 19, 19, 21, 25, 25, 29, 36, 36, 42, 43, 45, 49, 57, 61, 64, 65, 71, 75, 84, 84, 89, 94, 94, 95, 98], [1, 1, 2, 2, 10, 10, 21, 22, 23, 24, 24, 29, 34, 40, 46, 48, 49, 49, 50, 60, 73, 73, 75, 80, 81, 85, 86, 93, 96, 97, 99], [1, 2, 10, 15, 16, 18, 19, 21, 23, 25, 29, 29, 31, 31, 32, 38, 42, 43, 48, 51, 54, 56, 63, 74, 74, 74, 88, 88, 94, 94, 94], [19, 24, 25, 27, 29, 33, 34, 35, 36, 37, 37, 44, 45, 50, 51, 51, 52, 54, 59, 59, 66, 69, 70, 75, 77, 80, 81, 84, 97, 99, 99], [1, 2, 5, 5, 7, 12, 17, 19, 20, 38, 44, 45, 47, 48, 51, 55, 59, 61, 61, 64, 65, 67, 74, 76, 76, 77, 79, 83, 86, 92, 92], [3, 5, 5, 12, 18, 23, 25, 38, 38, 48, 49, 57, 61, 63, 67, 70, 71, 75, 75, 77, 78, 79, 80, 80, 84, 87, 92, 92, 95, 96, 98], [1, 3, 3, 5, 7, 8, 9, 13, 17, 21, 23, 36, 38, 39, 39, 41, 45, 57, 71, 72, 72, 73, 76, 79, 80, 82, 83, 87, 89, 97, 99], [9, 10, 13, 14, 14, 16, 17, 23, 26, 27, 28, 31, 32, 38, 38, 43, 45, 50, 51, 52, 52, 64, 66, 68, 71, 78, 85, 85, 85, 91, 91], [1, 2, 2, 3, 10, 12, 13, 15, 15, 21, 25, 26, 28, 34, 45, 45, 46, 46, 49, 49, 52, 55, 57, 61, 62, 63, 70, 72, 73, 84, 86], [5, 5, 8, 13, 16, 18, 21, 25, 29, 33, 35, 36, 39, 45, 46, 47, 49, 58, 66, 68, 70, 71, 77, 80, 83, 83, 86, 87, 94, 97, 98], [5, 9, 17, 20, 24, 27, 27, 27, 28, 30, 32, 32, 35, 39, 40, 43, 45, 52, 55, 56, 63, 71, 76, 78, 81, 86, 90, 95, 97, 98, 98], [1, 6, 6, 7, 15, 22, 29, 33, 38, 38, 42, 42, 44, 45, 53, 59, 61, 62, 62, 72, 75, 76, 77, 77, 80, 81, 89, 96, 96, 97, 99], [3, 4, 4, 10, 11, 12, 16, 17, 32, 33, 33, 36, 40, 40, 42, 42, 44, 45, 47, 52, 53, 56, 59, 62, 64, 67, 80, 80, 89, 90, 94], [2, 3, 8, 9, 15, 19, 20, 21, 22, 23, 23, 24, 24, 28, 28, 32, 36, 40, 43, 46, 54, 55, 65, 71, 76, 83, 86, 93, 93, 96, 97], [2, 3, 3, 4, 8, 11, 13, 14, 18, 19, 20, 22, 35, 39, 45, 60, 61, 64, 66, 69, 70, 70, 72, 72, 74, 75, 79, 83, 87, 90, 97], [19, 21, 22, 23, 24, 28, 30, 30, 32, 41, 42, 54, 56, 60, 62, 65, 71, 72, 72, 73, 75, 75, 78, 84, 85, 85, 85, 85, 87, 89, 92], [6, 7, 10, 11, 11, 16, 17, 20, 20, 23, 31, 33, 34, 36, 38, 42, 44, 48, 56, 57, 58, 63, 64, 69, 69, 70, 72, 81, 85, 89, 91], [9, 11, 13, 18, 21, 22, 24, 26, 26, 30, 35, 42, 51, 53, 55, 55, 58, 58, 59, 59, 61, 63, 67, 75, 79, 88, 88, 92, 96, 98, 99], [9, 12, 14, 17, 21, 21, 32, 35, 38, 39, 41, 43, 45, 45, 45, 55, 57, 57, 63, 67, 71, 72, 74, 75, 76, 77, 78, 83, 83, 85, 97], [3, 4, 13, 17, 20, 22, 28, 32, 36, 38, 39, 39, 52, 56, 60, 60, 61, 61, 62, 64, 65, 69, 71, 73, 82, 88, 91, 96, 96, 97, 99], [2, 2, 13, 14, 15, 19, 25, 32, 33, 34, 37, 38, 41, 45, 45, 53, 57, 59, 59, 60, 68, 71, 78, 80, 81, 84, 93, 93, 95, 99, 99], [5, 16, 17, 18, 18, 24, 27, 27, 32, 35, 41, 41, 49, 51, 56, 60, 60, 62, 67, 67, 71, 78, 78, 79, 82, 89, 92, 92, 95, 97, 98], [6, 7, 9, 10, 10, 12, 16, 19, 19, 26, 28, 31, 32, 33, 41, 43, 46, 47, 48, 49, 51, 52, 58, 66, 75, 75, 76, 78, 81, 88, 91], [8, 13, 18, 19, 22, 26, 26, 26, 27, 30, 30, 32, 33, 35, 35, 38, 45, 53, 57, 60, 63, 63, 65, 71, 77, 79, 81, 91, 96, 98, 99]], 15", "2436" ], [ "[[-40]], 0", "0" ], [ "[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], 25", "14929" ], [ "[[3, 86, 3, 43, 83, 22, 69, 67, 38, 82, 99, 59, 27, 2, 8, 84, 60, 93, 75, 37, 65, 79, 43, 69, 7, 42, 44, 77, 24, 58], [88, 63, 93, 78, 89, 63, 23, 39, 60, 17, 94, 68, 16, 76, 31, 4, 66, 91, 57, 98, 95, 83, 22, 79, 50, 34, 84, 59, 59, 39], [37, 36, 42, 78, 47, 20, 40, 18, 7, 56, 4, 26, 25, 64, 34, 28, 88, 46, 21, 45, 70, 75, 24, 29, 79, 7, 81, 32, 65, 87], [90, 25, 86, 26, 59, 67, 24, 74, 37, 68, 78, 5, 7, 15, 63, 20, 59, 90, 58, 50, 82, 19, 37, 64, 81, 74, 62, 3, 28, 87], [81, 75, 25, 44, 42, 86, 92, 29, 11, 50, 77, 77, 99, 69, 3, 49, 89, 35, 59, 95, 85, 51, 36, 72, 29, 74, 55, 72, 58, 16], [82, 37, 70, 98, 69, 84, 29, 36, 49, 94, 64, 72, 17, 95, 83, 51, 16, 65, 89, 21, 14, 4, 75, 99, 39, 60, 18, 65, 69, 6], [88, 1, 88, 12, 21, 19, 37, 85, 43, 80, 65, 79, 97, 12, 45, 12, 38, 62, 53, 21, 86, 67, 99, 12, 38, 83, 30, 32, 27, 29], [42, 25, 24, 59, 60, 38, 34, 96, 84, 77, 14, 97, 14, 1, 89, 95, 62, 57, 96, 59, 65, 52, 72, 70, 69, 36, 79, 34, 68, 33], [69, 92, 20, 1, 71, 47, 28, 33, 29, 80, 55, 67, 17, 82, 82, 68, 18, 24, 51, 49, 71, 62, 69, 36, 97, 39, 22, 97, 3, 63], [63, 34, 94, 31, 49, 43, 90, 61, 1, 55, 45, 29, 28, 13, 44, 26, 45, 14, 92, 96, 9, 39, 83, 53, 34, 59, 73, 52, 9, 28], [30, 46, 18, 73, 90, 38, 8, 49, 75, 15, 39, 10, 96, 85, 32, 53, 4, 93, 86, 7, 95, 87, 95, 59, 65, 22, 77, 79, 66, 30], [92, 28, 99, 32, 90, 28, 2, 97, 76, 97, 38, 39, 77, 84, 88, 19, 34, 23, 81, 81, 73, 13, 91, 68, 6, 21, 44, 30, 16, 2], [76, 7, 20, 53, 71, 29, 57, 33, 32, 53, 44, 25, 76, 28, 91, 15, 28, 14, 63, 78, 75, 49, 81, 93, 82, 45, 59, 81, 85, 97], [98, 10, 23, 21, 48, 22, 4, 43, 13, 24, 69, 62, 61, 11, 61, 95, 89, 31, 10, 77, 93, 41, 45, 32, 8, 42, 50, 15, 57, 10], [85, 90, 37, 19, 60, 33, 71, 96, 9, 10, 52, 20, 73, 67, 83, 18, 62, 19, 17, 43, 32, 15, 92, 47, 59, 83, 15, 45, 95, 90], [38, 86, 16, 5, 83, 44, 46, 23, 96, 75, 76, 15, 8, 58, 29, 81, 52, 30, 87, 45, 62, 82, 74, 69, 57, 99, 60, 13, 57, 92], [75, 52, 45, 6, 41, 30, 93, 17, 76, 53, 20, 13, 65, 38, 14, 51, 83, 93, 55, 83, 19, 81, 70, 57, 37, 95, 48, 52, 25, 86], [75, 79, 14, 80, 61, 82, 79, 70, 35, 31, 66, 47, 8, 2, 30, 96, 22, 94, 68, 59, 20, 29, 98, 14, 95, 33, 63, 72, 3, 1], [43, 21, 47, 66, 48, 27, 51, 75, 20, 87, 71, 98, 93, 4, 59, 22, 76, 65, 7, 38, 21, 26, 36, 86, 28, 78, 62, 98, 40, 5], [46, 57, 64, 58, 2, 92, 98, 82, 40, 87, 80, 96, 62, 53, 92, 27, 74, 38, 40, 72, 8, 81, 64, 25, 75, 54, 70, 91, 95, 42], [97, 97, 58, 63, 90, 72, 76, 74, 96, 96, 16, 43, 65, 97, 48, 95, 36, 16, 57, 38, 21, 11, 99, 39, 67, 61, 76, 89, 25, 83], [1, 5, 93, 79, 76, 93, 81, 74, 11, 6, 74, 49, 86, 23, 82, 24, 33, 65, 2, 49, 74, 6, 14, 11, 82, 32, 34, 41, 78, 5], [82, 67, 38, 85, 78, 83, 2, 93, 39, 17, 51, 17, 97, 99, 35, 98, 82, 84, 29, 68, 91, 86, 49, 16, 2, 50, 10, 34, 18, 45], [71, 44, 54, 31, 93, 84, 28, 82, 87, 53, 89, 45, 97, 23, 74, 76, 35, 4, 71, 92, 35, 68, 53, 2, 8, 38, 95, 68, 18, 6], [37, 28, 49, 99, 51, 64, 10, 80, 69, 45, 85, 58, 41, 56, 39, 67, 3, 77, 35, 75, 46, 44, 38, 70, 75, 19, 21, 91, 43, 78], [68, 31, 36, 20, 86, 37, 17, 3, 10, 68, 61, 59, 95, 80, 73, 52, 96, 23, 54, 33, 45, 74, 55, 83, 60, 55, 88, 59, 77, 9], [55, 81, 74, 8, 73, 6, 86, 64, 38, 76, 80, 62, 64, 11, 62, 72, 95, 22, 27, 57, 83, 85, 60, 36, 76, 28, 78, 24, 25, 80], [85, 85, 15, 8, 23, 92, 30, 74, 79, 90, 62, 20, 96, 61, 46, 80, 40, 7, 51, 27, 28, 43, 83, 39, 94, 10, 49, 98, 27, 84], [91, 70, 64, 86, 70, 85, 54, 69, 14, 67, 43, 22, 9, 91, 10, 84, 93, 3, 5, 87, 59, 54, 59, 82, 8, 73, 22, 33, 53, 64], [82, 37, 42, 38, 4, 98, 16, 82, 47, 87, 9, 34, 36, 92, 10, 72, 87, 72, 22, 40, 12, 96, 12, 30, 41, 18, 33, 37, 27, 45]], 29", "18771" ], [ "[[-96, -90, -78, -74, -70, -60, -52, -50, -48, -46, -32, -20, -20, -10, -6, -4, 4, 4, 6, 8, 8, 24, 32, 48, 48, 58, 86, 92, 98], [-68, -60, -58, -54, -40, -38, -22, -16, -16, -16, -12, 0, 4, 4, 30, 30, 42, 46, 48, 48, 50, 52, 52, 52, 66, 68, 76, 78, 96], [-92, -90, -86, -70, -60, -58, -48, -46, -46, -36, -34, -14, -14, -10, -2, 12, 44, 46, 52, 54, 66, 70, 70, 74, 76, 80, 86, 90, 98], [-98, -88, -78, -78, -74, -72, -68, -66, -66, -58, -36, -32, -26, -22, -6, -6, 8, 8, 18, 20, 22, 28, 34, 60, 70, 70, 70, 80, 90], [-98, -96, -96, -88, -86, -86, -72, -66, -64, -62, -54, -52, -52, -46, -42, -22, -20, -14, -10, -4, 8, 14, 22, 64, 74, 78, 88, 96, 96], [-98, -82, -78, -58, -54, -54, -52, -52, -46, -46, -40, -40, -28, -26, -4, 0, 8, 8, 12, 14, 50, 52, 62, 66, 68, 70, 78, 94, 96], [-94, -90, -80, -78, -74, -72, -70, -54, -52, -46, -40, -38, -28, -22, -22, -20, 16, 16, 18, 18, 20, 24, 44, 46, 50, 58, 64, 70, 76], [-96, -94, -92, -86, -80, -80, -76, -76, -72, -68, -52, -32, -26, -18, -14, -10, -2, 0, 4, 10, 12, 18, 22, 30, 44, 70, 76, 78, 82], [-90, -88, -68, -66, -46, -40, -40, -30, -30, -26, -22, -18, -6, -4, -4, 6, 8, 10, 10, 16, 20, 20, 26, 28, 36, 58, 82, 90, 98], [-90, -86, -84, -84, -82, -66, -60, -40, -32, -22, -14, 4, 6, 20, 22, 22, 32, 34, 34, 52, 58, 60, 66, 70, 76, 80, 88, 92, 96], [-96, -90, -80, -80, -66, -66, -46, -36, -36, -28, -20, -10, -4, 0, 14, 20, 24, 26, 32, 38, 38, 44, 60, 70, 70, 76, 78, 86, 94], [-94, -82, -80, -72, -70, -60, -46, -46, -38, -36, -26, -24, -18, -12, -4, 18, 26, 34, 38, 44, 46, 50, 52, 64, 68, 72, 80, 80, 96], [-98, -94, -92, -84, -76, -66, -62, -44, -36, -34, -32, -22, 2, 4, 8, 18, 18, 18, 18, 32, 36, 42, 52, 58, 70, 80, 86, 94, 98], [-98, -96, -92, -82, -74, -72, -72, -28, -2, 0, 4, 20, 32, 32, 34, 34, 36, 38, 50, 52, 58, 60, 62, 62, 80, 84, 88, 88, 90], [-74, -74, -70, -66, -54, -50, -42, -40, -36, -16, -14, -14, -12, -10, -8, -4, 10, 18, 28, 58, 60, 68, 68, 74, 76, 84, 86, 96, 98], [-98, -96, -90, -56, -54, -46, -42, -36, -34, -26, -26, -6, 0, 2, 12, 14, 24, 24, 40, 50, 60, 64, 64, 70, 76, 78, 80, 88, 90], [-92, -92, -84, -80, -80, -64, -56, -50, -44, -42, -32, -18, -16, -14, 14, 24, 26, 26, 30, 36, 44, 46, 46, 50, 56, 64, 86, 86, 86], [-96, -94, -94, -88, -86, -74, -62, -62, -44, -40, -30, -28, -24, -20, 14, 20, 22, 40, 52, 52, 56, 58, 60, 60, 62, 62, 84, 96, 98], [-98, -92, -92, -54, -54, -50, -48, -48, -40, -40, -30, -26, -24, -12, -6, 0, 18, 24, 24, 26, 26, 36, 44, 48, 66, 74, 86, 88, 94], [-98, -98, -94, -90, -88, -80, -76, -68, -60, -58, -56, -42, -38, -28, -26, -4, 0, 20, 22, 28, 36, 50, 56, 56, 60, 60, 68, 86, 86], [-94, -84, -62, -42, -36, -36, -28, -26, -24, -20, -14, -10, 0, 16, 20, 22, 30, 34, 40, 52, 56, 56, 62, 66, 76, 82, 84, 92, 98], [-98, -92, -86, -86, -78, -76, -58, -58, -54, -50, -40, -26, -10, -6, 0, 18, 20, 24, 24, 24, 38, 42, 46, 54, 64, 76, 80, 90, 96], [-86, -84, -78, -76, -66, -62, -60, -56, -46, -32, -22, -18, -18, -10, -2, 4, 10, 14, 28, 36, 42, 42, 56, 60, 62, 68, 74, 82, 88], [-98, -98, -76, -72, -64, -64, -62, -60, -48, -44, -42, -36, -36, -30, -24, -12, -8, 2, 12, 16, 36, 42, 44, 60, 66, 68, 84, 86, 88], [-96, -96, -94, -94, -92, -90, -62, -50, -48, -48, -48, -44, -24, -22, -8, -8, -6, -6, 0, 16, 48, 54, 54, 58, 64, 74, 74, 78, 88], [-98, -96, -84, -74, -54, -52, -40, -34, -24, -16, -14, -10, -6, -6, -4, 12, 16, 18, 46, 46, 48, 48, 56, 62, 64, 78, 82, 86, 90], [-86, -86, -72, -66, -62, -48, -44, -38, -26, -22, -20, -12, -4, 8, 10, 14, 18, 30, 30, 32, 42, 62, 66, 70, 70, 78, 84, 94, 98], [-98, -88, -82, -80, -68, -68, -68, -66, -64, -52, -50, -46, -44, -42, -36, -34, -2, -2, 4, 10, 26, 42, 44, 62, 66, 68, 76, 82, 98], [-98, -92, -88, -88, -86, -62, -50, -46, -32, -28, -20, -4, -2, 0, 12, 20, 34, 38, 42, 60, 64, 64, 64, 66, 66, 72, 74, 88, 98]], 16", "4091" ], [ "[[1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0], [1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1], [0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0], [0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0], [1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0], [1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 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, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0], [1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1], [1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0], [1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0]], 35", "41068" ], [ "[[12, 22, 56, 63, 69], [8, 8, 12, 57, 95], [40, 55, 59, 65, 72], [2, 22, 40, 72, 83], [2, 4, 12, 31, 38]], 4", "147" ], [ "[[-92, -36, 84, 62, -94, -74, 20, 20, 92], [52, -40, -98, -32, 58, 80, -60, 46, 80], [8, 8, 0, -48, -86, 48, -38, -96, 92], [18, -68, -74, 92, -70, -36, -32, -16, -16], [-70, -26, 32, -58, 82, 22, -12, 96, -44], [-68, -54, -94, -84, -68, -70, -30, -76, -52], [-68, 64, 68, 80, 30, 12, -82, 20, -58], [-38, -88, 24, 28, -98, 56, -62, -46, 98], [28, -82, -32, 74, -94, 38, -12, -46, -6]], 4", "225" ], [ "[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], 35", "41068" ], [ "[[78, 96, 83, 94, 61, 52, 86, 42, 64, 39, 8, 48, 87, 31, 77, 72, 9, 9, 3, 83, 2, 79, 20, 84, 50, 85, 32, 15, 14, 70, 7, 19, 43, 6, 71, 16], [35, 5, 20, 49, 27, 85, 22, 1, 99, 13, 57, 86, 70, 34, 34, 11, 50, 22, 60, 58, 31, 45, 64, 3, 74, 95, 85, 46, 32, 94, 13, 90, 94, 56, 25, 94], [52, 7, 25, 18, 38, 42, 26, 83, 41, 20, 38, 29, 71, 38, 99, 53, 76, 61, 98, 56, 74, 46, 62, 1, 1, 98, 7, 36, 87, 66, 77, 52, 81, 27, 44, 54], [12, 17, 86, 71, 29, 39, 95, 71, 53, 32, 65, 93, 66, 62, 97, 63, 99, 48, 33, 7, 28, 20, 68, 98, 45, 92, 9, 94, 29, 43, 24, 99, 9, 99, 39, 88], [25, 71, 58, 33, 26, 76, 27, 56, 55, 60, 28, 36, 10, 18, 71, 98, 61, 83, 18, 62, 43, 57, 23, 61, 43, 34, 66, 76, 25, 82, 73, 79, 76, 13, 6, 31], [79, 36, 81, 72, 22, 53, 90, 82, 99, 10, 42, 11, 36, 80, 30, 95, 90, 71, 57, 62, 38, 97, 73, 47, 66, 15, 59, 62, 26, 7, 25, 93, 35, 24, 4, 19], [49, 55, 96, 83, 54, 53, 41, 35, 52, 83, 46, 58, 50, 48, 53, 41, 69, 36, 93, 27, 7, 42, 95, 90, 7, 29, 93, 23, 43, 18, 78, 13, 70, 18, 19, 91], [74, 42, 96, 90, 95, 25, 48, 8, 19, 48, 59, 79, 64, 90, 67, 76, 33, 60, 25, 32, 92, 12, 38, 12, 52, 73, 84, 62, 72, 82, 76, 30, 95, 15, 22, 30], [61, 90, 92, 47, 62, 34, 56, 90, 12, 81, 48, 3, 37, 43, 78, 41, 42, 78, 22, 35, 36, 98, 77, 70, 22, 32, 88, 22, 66, 64, 81, 88, 63, 67, 48, 51], [39, 21, 32, 61, 54, 32, 98, 87, 66, 71, 31, 81, 68, 3, 60, 67, 1, 71, 24, 64, 52, 99, 25, 85, 60, 3, 17, 93, 61, 74, 44, 27, 74, 42, 70, 22], [98, 61, 8, 13, 47, 31, 11, 99, 47, 3, 21, 28, 67, 3, 35, 67, 71, 32, 85, 62, 6, 94, 99, 41, 34, 7, 81, 22, 74, 15, 78, 48, 86, 38, 54, 21], [57, 49, 87, 34, 93, 5, 91, 89, 46, 63, 13, 89, 59, 56, 67, 24, 12, 57, 96, 66, 44, 32, 90, 23, 14, 10, 28, 12, 66, 74, 17, 4, 82, 92, 27, 62], [3, 62, 20, 85, 22, 98, 38, 68, 57, 37, 98, 22, 82, 34, 65, 99, 61, 66, 8, 36, 92, 50, 12, 73, 64, 4, 61, 31, 25, 2, 59, 68, 47, 28, 86, 93], [28, 6, 38, 36, 93, 72, 39, 55, 30, 76, 96, 54, 5, 73, 15, 14, 12, 74, 65, 44, 94, 91, 6, 33, 42, 87, 35, 81, 57, 10, 11, 33, 86, 73, 89, 94], [8, 10, 9, 84, 30, 9, 35, 86, 49, 37, 43, 23, 43, 13, 36, 82, 61, 34, 12, 73, 4, 70, 32, 17, 34, 35, 64, 80, 19, 50, 58, 77, 44, 66, 1, 46], [99, 72, 9, 61, 48, 92, 58, 68, 33, 52, 8, 47, 14, 9, 13, 2, 11, 49, 3, 64, 60, 95, 64, 59, 36, 52, 10, 50, 86, 9, 31, 80, 31, 91, 9, 25], [74, 65, 81, 28, 88, 58, 49, 92, 17, 14, 31, 27, 61, 52, 15, 40, 33, 38, 28, 92, 71, 56, 34, 49, 2, 55, 33, 3, 3, 61, 66, 95, 79, 62, 79, 91], [47, 87, 29, 43, 72, 14, 76, 93, 41, 18, 65, 2, 17, 20, 48, 59, 97, 43, 94, 59, 61, 79, 71, 54, 93, 8, 86, 4, 73, 10, 66, 98, 29, 48, 11, 72], [32, 79, 33, 43, 27, 60, 73, 55, 27, 84, 4, 97, 39, 5, 25, 23, 98, 1, 7, 4, 48, 47, 34, 79, 17, 89, 87, 8, 37, 22, 80, 21, 81, 74, 73, 31], [97, 59, 19, 17, 65, 65, 21, 37, 30, 76, 41, 86, 84, 30, 33, 32, 38, 7, 30, 56, 19, 80, 86, 62, 47, 19, 45, 80, 16, 82, 44, 27, 7, 38, 6, 30], [64, 83, 75, 9, 41, 8, 61, 89, 61, 49, 40, 67, 75, 27, 80, 9, 30, 12, 99, 20, 93, 42, 99, 88, 76, 1, 56, 10, 34, 41, 50, 97, 66, 62, 52, 49], [64, 54, 22, 65, 92, 84, 27, 42, 10, 69, 67, 18, 75, 24, 38, 71, 52, 79, 18, 38, 70, 94, 91, 77, 38, 74, 91, 3, 1, 85, 82, 1, 52, 40, 44, 60], [83, 17, 61, 43, 30, 62, 60, 35, 39, 95, 91, 71, 2, 50, 7, 32, 51, 44, 24, 18, 66, 87, 62, 3, 92, 87, 77, 1, 25, 46, 77, 15, 59, 46, 88, 86], [83, 66, 34, 2, 59, 29, 65, 98, 55, 93, 66, 26, 75, 36, 64, 60, 45, 19, 75, 40, 16, 34, 52, 25, 8, 52, 29, 39, 92, 17, 70, 29, 42, 33, 23, 80], [22, 11, 32, 56, 48, 20, 32, 33, 49, 59, 13, 53, 79, 4, 33, 11, 6, 71, 86, 14, 98, 61, 20, 80, 2, 53, 68, 9, 50, 26, 73, 20, 87, 60, 96, 99], [96, 64, 95, 64, 34, 73, 24, 52, 46, 28, 94, 82, 26, 1, 74, 47, 14, 48, 5, 33, 65, 84, 72, 21, 10, 60, 69, 65, 57, 16, 73, 2, 28, 42, 14, 44], [57, 72, 10, 97, 89, 71, 74, 20, 5, 82, 52, 86, 39, 67, 93, 19, 81, 53, 21, 72, 64, 6, 61, 47, 89, 54, 72, 47, 18, 97, 53, 48, 75, 65, 99, 33], [61, 22, 43, 17, 71, 62, 73, 94, 48, 51, 85, 46, 41, 66, 31, 43, 7, 29, 3, 61, 28, 62, 56, 34, 61, 59, 49, 38, 14, 33, 64, 94, 14, 27, 42, 28], [93, 66, 93, 79, 99, 47, 2, 8, 26, 82, 73, 3, 5, 43, 80, 74, 29, 94, 11, 16, 31, 89, 16, 74, 95, 87, 43, 15, 77, 80, 57, 27, 92, 74, 6, 69], [64, 88, 68, 15, 45, 85, 22, 39, 62, 24, 92, 7, 61, 69, 51, 32, 81, 81, 62, 68, 39, 26, 38, 97, 62, 70, 84, 80, 42, 3, 60, 89, 2, 61, 39, 90], [29, 39, 6, 62, 21, 87, 37, 64, 88, 68, 5, 75, 96, 72, 37, 39, 23, 97, 58, 57, 81, 74, 72, 91, 58, 52, 68, 47, 64, 46, 60, 60, 65, 31, 65, 46], [81, 39, 17, 69, 41, 21, 62, 88, 29, 31, 3, 73, 28, 99, 30, 39, 48, 28, 52, 62, 57, 5, 9, 5, 24, 77, 22, 2, 44, 74, 59, 68, 37, 65, 94, 34], [47, 49, 70, 54, 77, 78, 41, 1, 63, 45, 9, 34, 18, 74, 57, 70, 75, 86, 67, 5, 35, 92, 10, 40, 59, 83, 29, 16, 37, 16, 80, 4, 95, 26, 23, 17], [80, 56, 23, 61, 92, 5, 29, 39, 82, 8, 30, 80, 66, 62, 31, 20, 63, 75, 65, 80, 63, 89, 14, 22, 45, 81, 9, 97, 99, 5, 41, 96, 24, 90, 98, 67], [50, 69, 72, 14, 34, 42, 75, 83, 23, 33, 14, 49, 59, 98, 29, 44, 87, 18, 79, 26, 32, 33, 63, 53, 37, 1, 71, 66, 12, 30, 46, 69, 6, 45, 45, 18], [21, 55, 93, 44, 14, 50, 63, 41, 47, 23, 15, 25, 63, 19, 31, 63, 76, 32, 79, 18, 47, 93, 98, 43, 79, 60, 43, 8, 15, 94, 56, 34, 41, 74, 75, 15]], 29", "19143" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int ar [ ], int n ) { if ( n <= 4 ) return * min_element ( ar, ar + n ); int sum [ n ]; sum [ 0 ] = ar [ 0 ]; sum [ 1 ] = ar [ 1 ]; sum [ 2 ] = ar [ 2 ]; sum [ 3 ] = ar [ 3 ]; for ( int i = 4; i < n; i ++ ) sum [ i ] = ar [ i ] + ( * min_element ( sum + i - 4, sum + i ) ); return * min_element ( sum + n - 4, sum + n ); }
[]
null
[]
NUMBER_TRIANGLES_N_MOVES
python
[]
def f_gold ( n ) : answer = [ None ] * ( n + 1 ) ; answer [ 0 ] = 1 ; i = 1 while i <= n : answer [ i ] = answer [ i - 1 ] * 3 + 2 ; i = i + 1 return answer [ n ] ;
code_translation
[ [ "33", "11118121133111045" ], [ "72", "45056799089878348823680295749545281" ], [ "81", "886852976486075539896499261238299785605" ], [ "93", "471310032676736470998135463891743276362238245" ], [ "8", "13121" ], [ "76", "3649600726280146254718103955713167841" ], [ "97", "38176112646815654150848972575231205385341297925" ], [ "91", "52367781408526274555348384876860364040248693" ], [ "61", "254346949651297221085766599205" ], [ "6", "1457" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) { int count = 0; for ( int i = 0; i < m; i ++ ) for ( int j = 0; j < n; j ++ ) if ( ( arr1 [ i ] + arr2 [ j ] ) == x ) count ++; return count; }
[]
null
[]
MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES_1
python
[]
def f_gold ( price , n , k ) : profit = [ [ 0 for i in range ( n + 1 ) ] for j in range ( k + 1 ) ] for i in range ( 1 , k + 1 ) : prevDiff = float ( '-inf' ) for j in range ( 1 , n ) : prevDiff = max ( prevDiff , profit [ i - 1 ] [ j - 1 ] - price [ j - 1 ] ) profit [ i ] [ j ] = max ( profit [ i ] [ j - 1 ] , price [ j ] + prevDiff ) return profit [ k ] [ n - 1 ]
code_translation
[ [ "[3, 6, 16, 16, 19, 37, 47, 49, 74, 77, 86, 96], 6, 6", "34" ], [ "[-6, -70, -26, 78, 98, -72, 48, -94, -38, 52, -50, 58, 84, 16, -74, 32, -44, -50, 68, -48, 28, 94, -26, -96, -42, 96, -24, 42, -70, 10, -16, -32, 98, 38, -2, 26, -26, -78, 44, -72, -56, -22], 31, 32", "1272" ], [ "[0, 0, 0, 0, 0, 0, 0, 1, 1, 1], 7, 8", "0" ], [ "[22, 12, 58, 70], 3, 2", "46" ], [ "[-96, -96, -94, -92, -90, -88, -88, -84, -78, -76, -72, -72, -68, -62, -54, -52, -52, -36, -34, -32, -26, -20, -6, -4, -4, 4, 8, 10, 14, 16, 32, 32, 32, 34, 42, 46, 50, 60, 62, 64, 64, 72, 74, 76, 76, 78, 90, 92, 96], 30, 36", "112" ], [ "[1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0], 14, 13", "3" ], [ "[2, 4, 7, 11, 20, 24, 25, 27, 29, 33, 33, 36, 36, 41, 44, 45, 47, 54, 65, 66, 67, 75, 78, 82, 85, 90], 15, 22", "42" ], [ "[56, 2, -10, -44, 68, 10, -32, -2, -68, 12, -34, -36, 0, 40, -16, -36, 92, 8, -40, -10, 46, 98, 76, -2, 98, -20, 6, 68, 32, -26, -12, 70, 16, -34, -50, -76, -34, -18, 0, -44, -76, 58], 24, 35", "564" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 10, 8", "1" ], [ "[78, 39, 2, 76, 20, 21, 3, 21, 32, 80, 28, 89, 51, 2, 88, 19, 99, 71, 68, 38, 8, 76, 48, 81, 90, 71, 31], 14, 24", "213" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( int num ) { if ( num / 10 == 0 ) return true; while ( num != 0 ) { if ( num / 10 == 0 ) return true; int digit1 = num % 10; int digit2 = ( num / 10 ) % 10; if ( abs ( digit2 - digit1 ) > 1 ) return false; num = num / 10; } return true; }
[]
null
[]
COUNT_SUBARRAYS_TOTAL_DISTINCT_ELEMENTS_ORIGINAL_ARRAY
python
[]
def f_gold(arr, n): vis = dict() for i in range(n): vis[arr[i]] = 1 k = len(vis) vid = dict() ans = 0 right = 0 window = 0 for left in range(n): while (right < n and window < k): if arr[right] in vid.keys(): vid[arr[right]] += 1 else: vid[arr[right]] = 1 if (vid[arr[right]] == 1): window += 1 right += 1 if (window == k): ans += (n - right + 1) vid[arr[left]] -= 1 if (vid[arr[left]] == 0): window -= 1 return ans
code_translation
[ [ "[13, 39, 49, 52, 53, 69, 72, 79, 83, 96], 5", "1" ], [ "[-98, -98, 22, -10, -28, 0, 56, 72, 36, 88, 96, 22, 90, 74, -60, -64, 0, 2, -42, 0, 94, -82, -74], 20", "4" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 26", "160" ], [ "[35, 23, 41, 58, 66, 92, 3, 33, 78, 70, 80, 86, 21, 21, 74, 19], 12", "1" ], [ "[-98, -80, -52, -10, 4, 76], 3", "1" ], [ "[1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1], 36", "609" ], [ "[2, 7, 10, 17, 26, 36, 37, 85, 87, 88], 8", "1" ], [ "[64, -2, -94, -84, -48, 86], 5", "1" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 20", "91" ], [ "[91, 49, 94, 81, 64, 5, 13, 70, 82, 9, 80, 82], 9", "1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( string str ) { int checker = 0; for ( int i = 0; i < str . length ( ); ++ i ) { int val = ( str [ i ] - 'a' ); if ( ( checker & ( 1 << val ) ) > 0 ) return i; checker |= ( 1 << val ); } return - 1; }
[]
null
[]
FIND_REPETITIVE_ELEMENT_1_N_1
python
[]
def f_gold ( arr , n ) : return sum ( arr ) - ( ( ( n - 1 ) * n ) // 2 )
code_translation
[ [ "[4, 8, 27, 34, 39, 42, 43, 54, 72], 5", "313" ], [ "[-38, -66, -38, -48, -96, 74, -32, -62, -34, -32, -88, -12, -8, -4], 9", "-520" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], 8", "-23" ], [ "[88, 86, 23, 81, 76, 16, 94, 64, 59, 50, 71, 62, 10, 89, 73, 64, 65, 96, 83, 40, 99, 40, 77, 33, 14, 62, 6, 89, 74, 96, 93, 29, 15, 93, 9, 58, 98, 76, 23, 23, 70, 99], 31", "2101" ], [ "[-96, -94, -82, -64, -56, -40, -36, -34, -32, -24, -24, -22, -20, -20, -20, -18, -18, -12, -10, -6, 16, 20, 20, 22, 26, 30, 36, 46, 46, 50, 50, 52, 64, 64, 64, 68, 72, 74, 76, 92, 96, 98], 28", "76" ], [ "[0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1], 25", "-288" ], [ "[2, 6, 7, 13, 19, 23, 37, 39, 42, 42, 43, 45, 52, 53, 55, 56, 59, 63, 66, 71, 76, 85, 86, 89, 92, 94, 96, 99], 27", "1159" ], [ "[52, -56, -12, 78, 6, 32, 0, 36, 34, -54, -74, -32], 11", "-45" ], [ "[0, 0, 0, 0, 0, 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], 15", "-86" ], [ "[10, 42, 50, 5, 74, 81, 30, 76, 6, 34, 86, 4, 77, 71, 96, 22, 34, 50, 35, 16, 60, 11, 21, 38], 13", "951" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; string f_gold ( string str ) { int n = str . length ( ); int dp [ n + 1 ] [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n; j ++ ) dp [ i ] [ j ] = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = 1; j <= n; j ++ ) if ( str [ i - 1 ] == str [ j - 1 ] && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]; else dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] ); string res = ""; int i = n, j = n; while ( i > 0 && j > 0 ) { if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) { res = res + str [ i - 1 ]; i --; j --; } else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i --; else j --; } reverse ( res . begin ( ), res . end ( ) ); return res; }
[]
null
[]
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS
python
[]
def f_gold(m, n): if m < n: return 0 if n == 0: return 1 res = (f_gold(m - 1, n) + f_gold(m // 2, n - 1)) return res
code_translation
[ [ "38, 34", "0" ], [ "39, 29", "0" ], [ "24, 99", "0" ], [ "90, 23", "0" ], [ "44, 2", "484" ], [ "49, 70", "0" ], [ "58, 84", "0" ], [ "97, 34", "0" ], [ "99, 72", "0" ], [ "19, 67", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int ans = 0; for ( int length = 1; length <= sqrt ( n ); ++ length ) for ( int height = length; height * length <= n; ++ height ) ans ++; return ans; }
[]
null
[]
MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY_1
python
[]
def f_gold ( arr , n ) : s = [ ] first = 0 second = 0 for i in range ( n ) : if arr [ i ] not in s : s.append ( arr [ i ] ) continue if ( arr [ i ] > first ) : second = first first = arr [ i ] elif ( arr [ i ] > second ) : second = arr [ i ] return ( first * second )
code_translation
[ [ "[4, 6, 7, 8, 12, 13, 14, 15, 18, 18, 19, 19, 26, 26, 32, 32, 33, 34, 34, 36, 41, 43, 47, 47, 51, 51, 52, 53, 55, 56, 57, 60, 61, 71, 74, 75, 76, 77, 79, 87, 87, 87, 90, 95, 98, 99], 37", "2397" ], [ "[-64, -72, 6, -62, 54, 14, 28, 60, -96, 14, -32, -2, 80, 8, -56, 68, 86, 64, 86, -12, 82], 12", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 27", "1" ], [ "[99, 7, 14, 50, 94, 24, 79, 13, 19, 29, 22, 2, 77, 36, 38, 18, 51, 15, 99, 52, 17, 77, 22, 54], 15", "0" ], [ "[-96, -92, -86, -84, -84, -80, -70, -70, -68, -64, -64, -48, -46, -24, -22, -20, -8, -8, 0, 0, 4, 8, 8, 22, 28, 36, 46, 50, 52, 54, 60, 62, 66, 70, 80, 84, 86, 94, 96, 96], 25", "0" ], [ "[1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1], 12", "1" ], [ "[98], 0", "0" ], [ "[-88, -24, 8, 20, -46, 60, 24, 26, 98, 82, -30, 16, 22, -28, 84, 12, 34, 14, -18, -38, -94, -24, 6, 4, -52, -48, 84], 21", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21", "0" ], [ "[6, 30, 47, 97, 20, 16, 68, 34, 1, 77, 48, 8, 22, 68], 8", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n, int idx ) { int result = 0; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] < arr [ idx ] ) result ++; if ( arr [ i ] == arr [ idx ] && i < idx ) result ++; } return result; }
[]
null
[]
MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION
python
[]
def f_gold ( N , insrt , remov , cpy ) : if N == 0 : return 0 if N == 1 : return insrt dp = [ 0 ] * ( N + 1 ) for i in range ( 1 , N + 1 ) : if i % 2 == 0 : dp [ i ] = min ( dp [ i - 1 ] + insrt , dp [ i // 2 ] + cpy ) else : dp [ i ] = min ( dp [ i - 1 ] + insrt , dp [ ( i + 1 ) // 2 ] + cpy + remov ) return dp [ N ]
code_translation
[ [ "59, 75, 12, 45", "351" ], [ "66, 68, 32, 41", "382" ], [ "98, 55, 69, 5", "195" ], [ "63, 4, 41, 12", "76" ], [ "99, 37, 98, 55", "460" ], [ "45, 28, 59, 7", "147" ], [ "60, 53, 40, 52", "405" ], [ "11, 96, 50, 50", "392" ], [ "96, 95, 48, 84", "694" ], [ "54, 6, 50, 82", "244" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( char s [ ] ) { int n = strlen ( s ); int count = 0; for ( int i = 0; i < n; ++ i ) if ( s [ i ] == '4' || s [ i ] == '8' || s [ i ] == '0' ) count ++; for ( int i = 0; i < n - 1; ++ i ) { int h = ( s [ i ] - '0' ) * 10 + ( s [ i + 1 ] - '0' ); if ( h % 4 == 0 ) count = count + i + 1; } return count; }
[]
null
[]
POSSIBLE_FORM_TRIANGLE_ARRAY_VALUES
python
[]
def f_gold ( arr , N ) : if N < 3 : return False arr.sort ( ) for i in range ( N - 2 ) : if arr [ i ] + arr [ i + 1 ] > arr [ i + 2 ] : return True
code_translation
[ [ "[2, 6, 8, 10, 14, 15, 16, 19, 21, 26, 26, 26, 28, 29, 30, 33, 33, 35, 36, 36, 41, 44, 45, 45, 45, 49, 51, 54, 57, 59, 61, 64, 68, 70, 70, 72, 73, 74, 76, 78, 87, 89, 89, 91, 92, 93, 94, 95, 97], 25", "True" ], [ "[-96, -94, -90, -86, -78, -78, -74, -72, -64, -64, -58, -56, -50, -46, -44, -36, -26, -14, -12, -10, -4, 4, 10, 16, 18, 22, 30, 32, 38, 46, 46, 50, 54, 56, 72, 74, 82, 86, 86, 88, 90, 96], 23", "None" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10", "None" ], [ "[24, 24, 41, 80, 90, 95], 4", "True" ], [ "[-90, -88, -84, -82, -82, -80, -70, -66, -62, -60, -60, -48, -46, -44, -42, -20, -16, -4, 18, 26, 28, 32, 36, 46, 60, 62, 68, 72, 78, 98], 21", "True" ], [ "[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], 25", "True" ], [ "[3, 9, 14, 16, 16, 26, 30, 31, 32, 37, 42, 42, 43, 49, 51, 56, 64, 69, 76, 77, 77, 79, 85, 88, 89, 91, 94, 95], 19", "True" ], [ "[-90, -84, -74, -68, -66, -60, -60, -60, -58, -52, -50, -42, -38, -34, -30, 6, 30, 42, 60, 80, 94, 98], 11", "None" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 18", "True" ], [ "[1, 3, 5, 8, 13, 15, 16, 22, 24, 26, 30, 31, 31, 33, 34, 39, 39, 40, 46, 49, 50, 51, 52, 59, 66, 69, 77, 80, 88, 90], 23", "True" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
GOOGLE_CASE_GIVEN_SENTENCE
python
[]
def f_gold(s): n = len(s) s1 = "" s1 = s1 + s[0].lower() i = 1 while i < n: if (s[i] == ' ' and i <= n): s1 = s1 + " " + (s[i + 1]).lower() i = i + 1 else: s1 = s1 + (s[i]).upper() i = i + 1 return s1
code_translation
[ [ "'TEYndweqZA'", "'tEYNDWEQZA'" ], [ "'01865'", "'01865'" ], [ "'11001100'", "'11001100'" ], [ "'CzwznJmQet'", "'cZWZNJMQET'" ], [ "'318305446'", "'318305446'" ], [ "'0000001111110'", "'0000001111110'" ], [ "'yzT'", "'yZT'" ], [ "'38630230'", "'38630230'" ], [ "'01101'", "'01101'" ], [ "'zoizI'", "'zOIZI'" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; long f_gold ( long n ) { return ( ( n << 3 ) - n ); }
[]
null
[]
PROGRAM_BINARY_DECIMAL_CONVERSION_1
python
[]
def f_gold ( n ) : num = n ; dec_value = 0 ; base1 = 1 ; len1 = len ( num ) ; for i in range ( len1 - 1 , - 1 , - 1 ) : if ( num [ i ] == '1' ) : dec_value += base1 ; base1 = base1 * 2 ; return dec_value ;
code_translation
[ [ "'uEmIAgF'", "0" ], [ "'753310137'", "20" ], [ "'010011010'", "154" ], [ "'kNi'", "0" ], [ "'04562016903312'", "130" ], [ "'000111101'", "61" ], [ "'bk'", "0" ], [ "'9'", "0" ], [ "'1'", "1" ], [ "'XxT nXLlk'", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int C [ n + 1 ] [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) { for ( int j = 0; j <= min ( i, n ); j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ]; } } int maxvalue = 0; for ( int i = 0; i <= n; i ++ ) maxvalue = max ( maxvalue, C [ n ] [ i ] ); return maxvalue; }
[]
null
[]
MINIMUM_COST_MAKE_ARRAY_SIZE_1_REMOVING_LARGER_PAIRS
python
[]
def f_gold ( a , n ) : return ( ( n - 1 ) * min ( a ) )
code_translation
[ [ "[1, 2, 3, 4, 7, 8, 10, 10, 16, 20, 22, 22, 23, 23, 23, 27, 29, 32, 35, 39, 41, 46, 51, 53, 54, 59, 59, 60, 61, 69, 70, 70, 79, 79, 81, 84, 90, 91, 98], 25", "24" ], [ "[-6, 10], 1", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 15", "0" ], [ "[20, 61, 92, 45, 75, 26, 83, 5, 85, 27, 39, 88, 36, 39, 83, 41, 56, 77, 39, 69, 72, 98, 39, 15, 29, 69, 64, 92, 96, 49, 59, 62, 53, 82, 40, 37, 29, 41], 23", "110" ], [ "[-88, -60, -60, -58, -56, -56, -46, -44, -40, -38, -32, -28, -22, -18, -12, -4, -2, 10, 24, 24, 28, 38, 42, 46, 54, 64, 72, 74, 78, 96, 96], 26", "-2200" ], [ "[0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1], 39", "0" ], [ "[1, 4, 6, 9, 10, 12, 17, 17, 18, 21, 22, 26, 26, 31, 32, 33, 34, 39, 42, 43, 45, 46, 48, 50, 53, 53, 54, 55, 60, 61, 62, 63, 63, 64, 70, 70, 70, 71, 71, 78, 86, 88, 91, 92, 95, 95, 96, 97, 99], 28", "27" ], [ "[-42, 44, -80, -60, 48, 66, 54, -76, 26, -74, -10, 46, -50, 42, -26, -24, -14, 36, -2, -26, 16, -10, 20, -88, -78], 19", "-1584" ], [ "[0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 5", "0" ], [ "[65, 32, 66, 82, 86, 98, 15, 33, 57, 3, 73, 45, 90, 82, 33, 99, 44, 76, 50, 89, 5, 7, 64], 22", "63" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; float f_gold ( float l, float b, float h ) { float volume = ( l * b * h ) / 2; return volume; }
[]
null
[]
MULTIPLY_LARGE_INTEGERS_UNDER_LARGE_MODULO
python
[]
def f_gold ( a , b , mod ) : res = 0 ; a = a % mod ; while ( b ) : if ( b & 1 ) : res = ( res + a ) % mod ; a = ( 2 * a ) % mod ; b >>= 1 ; return res ;
code_translation
[ [ "60, 24, 58", "48" ], [ "46, 43, 29", "6" ], [ "4, 50, 71", "58" ], [ "67, 1, 66", "1" ], [ "93, 35, 73", "43" ], [ "89, 97, 8", "1" ], [ "8, 78, 55", "19" ], [ "53, 73, 22", "19" ], [ "96, 92, 83", "34" ], [ "38, 64, 83", "25" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { if ( n <= 0 ) return 0; int incl = arr [ 0 ]; int excl = 0; for ( int i = 1; i < n; i ++ ) { int incl_new = arr [ i ] + min ( excl, incl ); int excl_new = incl; incl = incl_new; excl = excl_new; } return min ( incl, excl ); }
[ "import math" ]
null
[]
NUMBER_DAYS_TANK_WILL_BECOME_EMPTY
python
[]
import math def f_gold ( C , l ) : if ( l >= C ) : return C eq_root = ( math.sqrt ( 1 + 8 * ( C - l ) ) - 1 ) / 2 return math.ceil ( eq_root ) + l
code_translation
[ [ "91, 29", "40" ], [ "99, 55", "64" ], [ "11, 56", "11" ], [ "23, 56", "23" ], [ "12, 97", "12" ], [ "1, 64", "1" ], [ "18, 5", "10" ], [ "14, 37", "14" ], [ "13, 55", "13" ], [ "36, 99", "36" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; double f_gold ( double side ) { return ( 2 * ( sqrt ( 3 ) ) * ( side * side ) ); }
[]
null
[]
PROGRAM_FOR_DEADLOCK_FREE_CONDITION_IN_OPERATING_SYSTEM
python
[]
def f_gold ( process , need ) : minResources = 0 minResources = process * ( need - 1 ) + 1 return minResources
code_translation
[ [ "38, 37", "1369" ], [ "82, 3", "165" ], [ "2, 26", "51" ], [ "38, 72", "2699" ], [ "31, 85", "2605" ], [ "80, 73", "5761" ], [ "11, 9", "89" ], [ "2, 31", "61" ], [ "26, 59", "1509" ], [ "37, 67", "2443" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( string s, char c ) { bool oneSeen = false; int i = 0, n = s . length ( ); while ( i < n ) { if ( s [ i ] == c ) { if ( oneSeen == true ) return false; while ( i < n && s [ i ] == c ) i ++; oneSeen = true; } else i ++; } return true; }
[]
null
[]
LONGEST_SUBARRAY_COUNT_1S_ONE_COUNT_0S
python
[]
def f_gold ( arr , n ) : um = { i : 0 for i in range ( 10 ) } sum = 0 maxLen = 0 for i in range ( n ) : if arr [ i ] == 0 : sum += - 1 else : sum += 1 if ( sum == 1 ) : maxLen = i + 1 elif ( sum not in um ) : um [ sum ] = i if ( ( sum - 1 ) in um ) : if ( maxLen < ( i - um [ sum - 1 ] ) ) : maxLen = i - um [ sum - 1 ] return maxLen
code_translation
[ [ "[6, 10, 31, 35], 2", "1" ], [ "[4, 88, -72, 28, -54, 32, -34], 6", "5" ], [ "[0, 0, 0, 1, 1, 1, 1, 1, 1], 4", "1" ], [ "[39, 22, 15, 10, 34, 87, 46, 83, 74, 77, 61, 90, 43, 67, 64, 72, 92, 52, 68, 53, 67, 32, 82, 76, 76, 47, 74, 47, 8, 80, 85, 58, 75], 26", "9" ], [ "[-82, -58, -50, -30, -14, -4, -2, -2, 0, 22, 36, 58, 70, 80, 80, 82, 84, 90], 14", "11" ], [ "[1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1], 7", "7" ], [ "[4, 11, 17, 21, 21, 22, 30, 31, 36, 37, 39, 40, 45, 46, 47, 48, 52, 53, 53, 60, 60, 65, 66, 66, 67, 67, 87, 88, 91, 97], 29", "9" ], [ "[-4, -60, -78, -50, 64, 18, 0, 76, 12, 86, -22], 7", "6" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 17", "3" ], [ "[4, 39, 50, 37, 71, 66, 55, 34, 1, 41, 34, 99, 69, 31], 11", "9" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
NEXT_POWER_OF_2
python
[]
def f_gold ( n ) : count = 0 ; if ( n and not ( n & ( n - 1 ) ) ) : return n while ( n != 0 ) : n >>= 1 count += 1 return 1 << count ;
code_translation
[ [ "74", "128" ], [ "70", "128" ], [ "85", "128" ], [ "78", "128" ], [ "71", "128" ], [ "32", "32" ], [ "97", "128" ], [ "90", "128" ], [ "64", "64" ], [ "48", "64" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING
python
[]
def f_gold ( str ) : res = ord ( str [ 0 ] ) - 48 for i in range ( 1 , len ( str ) ) : if ( str [ i ] == '0' or str [ i ] == '1' or res < 2 ) : res += ord ( str [ i ] ) - 48 else : res *= ord ( str [ i ] ) - 48 return res
code_translation
[ [ "'pR'", "2176" ], [ "'9518'", "368" ], [ "'1'", "1" ], [ "'nNMCIXUCpRMmvO'", "6018195974788838400000" ], [ "'3170487'", "6272" ], [ "'0100101010'", "4" ], [ "'Z rONcUqWb'", "-303" ], [ "'00419297'", "5670" ], [ "'00'", "0" ], [ "'r'", "66" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int count = 0, ans = 1; while ( n % 2 == 0 ) { count ++; n /= 2; } if ( count % 2 ) ans *= 2; for ( int i = 3; i <= sqrt ( n ); i += 2 ) { count = 0; while ( n % i == 0 ) { count ++; n /= i; } if ( count % 2 ) ans *= i; } if ( n > 2 ) ans *= n; return ans; }
[]
null
[]
COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_1
python
[]
def f_gold ( arr , n ) : result = 0 Hash = set ( ) for i in range ( n ) : Hash.add ( arr [ i ] ) for i in range ( n ) : for j in range ( i + 1 , n ) : product = arr [ i ] * arr [ j ] if product in ( Hash ) : result += 1 return result
code_translation
[ [ "[7, 10, 17, 17, 18, 20, 27, 28, 29, 29, 31, 32, 41, 43, 45, 46, 63, 66, 69, 69, 70, 75, 87, 95], 17", "0" ], [ "[-60], 0", "0" ], [ "[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 9", "36" ], [ "[52, 83, 36, 57, 93, 11, 32, 91, 52], 8", "0" ], [ "[-98, -94, -90, -88, -76, -76, -64, -62, -60, -50, -46, -32, -24, -22, -20, -16, -4, -2, 6, 10, 20, 28, 30, 32, 34, 38, 40, 42, 54, 64, 72, 76, 82, 82, 86, 92, 92, 98, 98], 22", "2" ], [ "[0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0], 42", "861" ], [ "[2, 3, 10, 12, 15, 23, 26, 28, 29, 30, 31, 31, 33, 33, 35, 41, 45, 48, 50, 50, 53, 53, 56, 65, 66, 67, 68, 68, 72, 72, 75, 76, 79, 82, 90, 94, 94, 95, 97, 99], 35", "9" ], [ "[14, 36, -54, -54], 3", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], 12", "66" ], [ "[5, 69, 37, 80, 21, 98, 70, 70, 74, 95, 6, 67, 44, 55, 52, 89, 84, 99, 65, 52], 12", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { int sum = 0; unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) == s . end ( ) ) { sum += arr [ i ]; s . insert ( arr [ i ] ); } } return sum; }
[]
null
[]
COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1
python
[]
def f_gold ( arr , n ) : invcount = 0 for i in range ( 1 , n - 1 ) : small = 0 for j in range ( i + 1 , n ) : if ( arr [ i ] > arr [ j ] ) : small += 1 great = 0 ; for j in range ( i - 1 , - 1 , - 1 ) : if ( arr [ i ] < arr [ j ] ) : great += 1 invcount += great * small return invcount
code_translation
[ [ "[4, 75, 89], 1", "0" ], [ "[84, -66, -52, 34, -28, -6, 20, 22, -78, -26, 14, 24, -92, -18, 32, -94, -64, -38, 56, 4, -10, 58, -66, -58, -10, -8, -62, -60, -26], 26", "404" ], [ "[0, 0, 0, 1, 1, 1, 1, 1], 7", "0" ], [ "[18, 7, 43, 57, 94, 37, 38, 41, 59, 64, 97, 29, 51, 37, 64, 91, 42, 83, 13, 22, 68], 17", "37" ], [ "[-94, -86, -84, -84, -82, -66, -62, -58, -52, -48, -44, -40, -38, -32, -22, -22, -22, -14, -8, -6, -6, 0, 2, 20, 20, 26, 32, 32, 52, 56, 66, 74, 76, 80, 80, 86, 88, 94], 34", "0" ], [ "[0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0], 9", "0" ], [ "[4, 8, 15, 19, 24, 31, 33, 36, 38, 45, 45, 52, 54, 65, 73, 75, 83, 84, 90, 92, 93], 19", "0" ], [ "[80, -30, -44, 76, -96, 2, 22, -30, 36, -6, 88, -60, -90, -52, 78, 90, -52], 10", "20" ], [ "[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 7", "0" ], [ "[74, 71, 28, 45, 14, 31, 17, 10, 82, 27, 45, 73, 93, 87, 57, 58], 10", "43" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; unsigned int f_gold ( unsigned int n ) { if ( n == 0 ) return 1; return n * f_gold ( n - 1 ); }
[]
null
[]
FIND_INDEX_0_REPLACED_1_GET_LONGEST_CONTINUOUS_SEQUENCE_1S_BINARY_ARRAY
python
[]
def f_gold ( arr , n ) : max_count = 0 max_index = 0 prev_zero = - 1 prev_prev_zero = - 1 for curr in range ( n ) : if ( arr [ curr ] == 0 ) : if ( curr - prev_prev_zero > max_count ) : max_count = curr - prev_prev_zero max_index = prev_zero prev_prev_zero = prev_zero prev_zero = curr if ( n - prev_prev_zero > max_count ) : max_index = prev_zero return max_index
code_translation
[ [ "[2, 8, 9, 13, 13, 19, 19, 21, 21, 24, 28, 28, 29, 29, 29, 32, 34, 38, 39, 43, 45, 46, 57, 59, 62, 63, 67, 67, 68, 69, 70, 70, 71, 72, 74, 74, 76, 78, 79, 81, 90, 90, 95, 96, 98], 36", "-1" ], [ "[28, 92, -16, 0, 6, 12, -88, 42, -48, 72, 2, -38, 80, 82, 96, 32, -42, -38, 62, -76, 20, -10, 2, -48, 4, 88, -24, -72, 32, -42, -48, -62, 38], 20", "3" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 39", "28" ], [ "[70, 83, 9, 51, 11, 81, 27, 26, 37, 46], 7", "-1" ], [ "[50, 88], 1", "-1" ], [ "[0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1], 6", "2" ], [ "[96], 0", "-1" ], [ "[18, 78, 14, 60, -12, -86, 32, 74, 74, 96, 58, 28, -42, 28, -18, -58, -82, -58, 22, 6, 2, -6, -4, -98], 21", "-1" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 19", "8" ], [ "[58, 22, 15, 85, 8, 74, 93, 76, 44, 51, 43, 93, 20, 51, 52, 35, 17, 13, 96, 82, 23, 51, 44, 18, 45, 79, 66, 48, 16, 31, 62, 99, 46, 66, 53, 89, 87, 2, 87, 20, 30], 24", "-1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; string f_gold ( string seq ) { int n = seq . length ( ); if ( n >= 9 ) return "-1"; string result ( n + 1, ' ' ); int count = 1; for ( int i = 0; i <= n; i ++ ) { if ( i == n || seq [ i ] == 'I' ) { for ( int j = i - 1; j >= - 1; j -- ) { result [ j + 1 ] = '0' + count ++; if ( j >= 0 && seq [ j ] == 'I' ) break; } } } return result; }
[]
null
[]
LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE
python
[]
def f_gold ( arr , n ) : lioes = list ( ) maxLen = 0 for i in range ( n ) : lioes.append ( 1 ) i = 1 for i in range ( n ) : for j in range ( i ) : if ( arr [ i ] > arr [ j ] and ( arr [ i ] + arr [ j ] ) % 2 != 0 and lioes [ i ] < lioes [ j ] + 1 ) : lioes [ i ] = lioes [ j ] + 1 for i in range ( n ) : if maxLen < lioes [ i ] : maxLen = lioes [ i ] return maxLen
code_translation
[ [ "[7, 8, 9, 16, 16, 27, 32, 33, 35, 35, 39, 39, 41, 42, 44, 47, 48, 50, 56, 59, 66, 69, 70, 73, 74, 76, 78, 87, 87, 89, 94, 96, 96, 98, 98], 32", "18" ], [ "[40, 76, -54, -92, -28, -96, 8, 60, 28, -38, -62, -40, -16, 16, 52, 28, 70, -56, -50, 46, 68, -16, -56, 46, 42, 70, 52, -34, 86, -32, -50, 64, 36, 54, 20, 82, 84], 25", "1" ], [ "[0, 0, 0, 0, 1, 1, 1], 4", "1" ], [ "[15, 19, 87, 44, 15, 48, 21, 85, 90, 30, 88, 95, 48, 92, 29, 52, 46, 46, 7, 23, 96, 97, 43], 19", "5" ], [ "[-98, -96, -94, -94, -94, -80, -80, -78, -64, -62, -62, -46, -42, -38, -36, -36, -34, -32, -20, -18, -16, -12, -8, -4, -4, -2, -2, 2, 6, 12, 34, 40, 42, 44, 46, 46, 50, 54, 58, 58, 70, 72, 72, 76, 78, 86], 33", "1" ], [ "[0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1], 13", "2" ], [ "[6, 7, 19, 36, 44, 63, 68, 72, 83], 8", "5" ], [ "[-64, 12, 56, 50, 94, 6, 0, 70, -70, 46, -84, -64, 4, 76, 28, 94, -8, 24, 76, 64, -62, -34], 15", "1" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21", "2" ], [ "[71, 57, 20, 8, 90, 69, 15, 62, 45, 14, 65, 20, 48, 9], 10", "3" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int stack1 [ ], int stack2 [ ], int stack3 [ ], int n1, int n2, int n3 ) { int sum1 = 0, sum2 = 0, sum3 = 0; for ( int i = 0; i < n1; i ++ ) sum1 += stack1 [ i ]; for ( int i = 0; i < n2; i ++ ) sum2 += stack2 [ i ]; for ( int i = 0; i < n3; i ++ ) sum3 += stack3 [ i ]; int top1 = 0, top2 = 0, top3 = 0; int ans = 0; while ( 1 ) { if ( top1 == n1 || top2 == n2 || top3 == n3 ) return 0; if ( sum1 == sum2 && sum2 == sum3 ) return sum1; if ( sum1 >= sum2 && sum1 >= sum3 ) sum1 -= stack1 [ top1 ++ ]; else if ( sum2 >= sum3 && sum2 >= sum3 ) sum2 -= stack2 [ top2 ++ ]; else if ( sum3 >= sum2 && sum3 >= sum1 ) sum3 -= stack3 [ top3 ++ ]; } }
[]
null
[]
PROGRAM_BINARY_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 * 2 ; return dec_value ;
code_translation
[ [ "70", "14" ], [ "95", "23" ], [ "41", "9" ], [ "97", "25" ], [ "8", "8" ], [ "16", "8" ], [ "41", "9" ], [ "57", "17" ], [ "81", "17" ], [ "78", "22" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int N, int K ) { int ans = 0; for ( int i = 1; i <= N; i ++ ) ans += ( i % K ); return ans; }
[]
null
[]
COUNT_NATURAL_NUMBERS_WHOSE_PERMUTATION_GREATER_NUMBER
python
[]
def f_gold ( n ) : result = 0 for i in range ( 1 , 10 ) : s = [ ] if ( i <= n ) : s.append ( i ) result += 1 while len ( s ) != 0 : tp = s [ - 1 ] s.pop ( ) for j in range ( tp % 10 , 10 ) : x = tp * 10 + j if ( x <= n ) : s.append ( x ) result += 1 return result
code_translation
[ [ "69", "48" ], [ "72", "48" ], [ "88", "52" ], [ "7", "7" ], [ "66", "45" ], [ "34", "28" ], [ "23", "20" ], [ "37", "31" ], [ "33", "27" ], [ "21", "18" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( string & str ) { int n = str . length ( ); int res = - 1; for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( str [ i ] == str [ j ] ) res = max ( res, abs ( j - i - 1 ) ); return res; }
[]
null
[]
MINIMUM_ROTATIONS_UNLOCK_CIRCULAR_LOCK
python
[]
def f_gold ( input , unlock_code ) : rotation = 0 ; while ( input > 0 or unlock_code > 0 ) : input_digit = input % 10 ; code_digit = unlock_code % 10 ; rotation += min ( abs ( input_digit - code_digit ) , 10 - abs ( input_digit - code_digit ) ) ; input = int ( input / 10 ) ; unlock_code = int ( unlock_code / 10 ) ; return rotation ;
code_translation
[ [ "71, 46", "8" ], [ "90, 65", "8" ], [ "28, 84", "8" ], [ "41, 23", "4" ], [ "32, 58", "6" ], [ "39, 82", "8" ], [ "33, 58", "7" ], [ "89, 32", "8" ], [ "50, 51", "1" ], [ "92, 77", "7" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( int a [ ], int n ) { unordered_map < int, int > mp; for ( int i = 0; i < n; i ++ ) mp [ a [ i ] ] ++; for ( auto x : mp ) if ( x . second >= n / 2 ) return true; return false; }
[]
null
[]
FIND_THE_MISSING_NUMBER_1
python
[]
def f_gold ( a , n ) : i , total = 0 , 1 for i in range ( 2 , n + 2 ) : total += i total -= a [ i - 2 ] return total
code_translation
[ [ "[13, 27, 46, 59, 62, 82, 92], 6", "-261" ], [ "[22, 86, -64, -20, -56, -16, 86, 42, 72, -90, 10, 42, 56, 8, 50, 24, -34, 0, -78, 64, 18, 20, -84, -22, 90, -20, 86, 26, -54, 0, 90, -48, 4, 88, 18, -64, -22, -74, 48, -36, -86, -24, 88, -64, 68, 62, 92], 38", "524" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 15", "131" ], [ "[55, 89, 56, 85, 26, 4, 91, 91, 3, 77, 63, 59, 76, 90, 1, 94, 44, 70, 8, 54, 3, 91, 29, 95, 28, 75, 20], 22", "-954" ], [ "[-94, -84, -80, -78, -66, -62, -54, -52, -26, -8, -8, -6, 4, 4, 8, 14, 26, 58, 60, 62, 62, 76, 78, 86, 92], 18", "694" ], [ "[1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], 25", "341" ], [ "[1, 2, 7, 7, 9, 14, 23, 29, 31, 31, 35, 35, 38, 41, 44, 49, 49, 50, 51, 54, 55, 56, 57, 63, 67, 69, 73, 79, 79, 80, 86, 88, 93], 24", "-506" ], [ "[78, -48, 16, 22, -16, 34, 56, -20, -62, -82, -74, -40, 20, -24, -46, 64, 66, -76, 58, -84, 96, 76, 86, -32, 46], 12", "227" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 29", "463" ], [ "[73, 76, 25, 59, 40, 85, 90, 38, 13, 97, 93, 99, 45, 7], 12", "-697" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int a, int b ) { return ( a + b ) / 2; }
[]
null
[]
LOWER_INSERTION_POINT
python
[]
def f_gold ( arr , n , X ) : if ( X < arr [ 0 ] ) : return 0 ; elif ( X > arr [ n - 1 ] ) : return n lowerPnt = 0 i = 1 while ( i < n and arr [ i ] < X ) : lowerPnt = i i = i * 2 while ( lowerPnt < n and arr [ lowerPnt ] < X ) : lowerPnt += 1 return lowerPnt
code_translation
[ [ "[1, 2, 5, 5, 16, 16, 20, 26, 32, 35, 39, 39, 41, 44, 48, 48, 51, 59, 59, 62, 66, 66, 70, 74, 75, 78, 80, 86, 86, 96], 17, 29", "8" ], [ "[-76, 80, -6, -2, 50, 72, 84, -56, 70, 8, 48, 6, -24, -50, -72], 14, 9", "14" ], [ "[0, 0, 0, 0, 0, 1, 1, 1, 1], 8, 4", "8" ], [ "[74, 65, 84, 71], 2, 3", "0" ], [ "[-96, -92, -90, -86, -84, -76, -76, -62, -58, -54, -50, -50, -44, -42, -38, -34, -14, -8, 6, 12, 24, 38, 40, 50, 62, 84, 86, 92], 19, 19", "19" ], [ "[1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1], 12, 17", "12" ], [ "[6, 10, 14, 14, 16, 19, 23, 23, 25, 26, 29, 34, 42, 42, 43, 45, 47, 49, 50, 51, 51, 56, 59, 65, 69, 72, 75, 78, 79, 80, 82, 82, 82, 84, 85, 91, 98], 31, 24", "8" ], [ "[-90, -2, 22, -2, 58, -2, 96, 38, 36, -66, -98, 22, -80, -32, 22, 0, -34, -16, 82, 76, 12, 84, 66, 8, 32, 18, -98, -10], 22, 16", "2" ], [ "[0, 0, 0, 1, 1, 1, 1], 3, 5", "3" ], [ "[85, 59, 22, 52, 93, 14, 42, 71, 69, 15, 52, 78, 35, 61, 92, 90, 70, 48, 47, 72, 74, 46, 22, 74, 83, 32, 14, 24, 18, 27, 18, 68, 29, 31], 19, 33", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( string s ) { if ( s . length ( ) == 0 ) cout << 0 << endl; int ans = 0; int o = 0, c = 0; for ( int i = 0; i < s . length ( ); i ++ ) { if ( s [ i ] == '(' ) o ++; if ( s [ i ] == ')' ) c ++; } if ( o != c ) return - 1; int a [ s . size ( ) ]; if ( s [ 0 ] == '(' ) a [ 0 ] = 1; else a [ 0 ] = - 1; if ( a [ 0 ] < 0 ) ans += abs ( a [ 0 ] ); for ( int i = 1; i < s . length ( ); i ++ ) { if ( s [ i ] == '(' ) a [ i ] = a [ i - 1 ] + 1; else a [ i ] = a [ i - 1 ] - 1; if ( a [ i ] < 0 ) ans += abs ( a [ i ] ); } return ans; }
[]
null
[]
COUNT_NEGATIVE_NUMBERS_IN_A_COLUMN_WISE_ROW_WISE_SORTED_MATRIX_1
python
[]
def f_gold ( M , n , m ) : count = 0 i = 0 j = m - 1 while j >= 0 and i < n : if M [ i ] [ j ] < 0 : count += ( j + 1 ) i += 1 else : j -= 1 return count
code_translation
[ [ "[[76, 39, 83, 83, 24, 11, 7, 97, 81, 52, 7, 81, 68, 25, 14, 54, 69, 12, 53, 38, 94, 77, 75, 28, 38, 92, 47, 46, 86], [63, 95, 96, 14, 82, 98, 75, 5, 72, 27, 71, 62, 15, 55, 63, 37, 10, 2, 68, 98, 15, 21, 25, 83, 84, 46, 93, 23, 87], [47, 23, 49, 53, 26, 14, 50, 50, 5, 3, 2, 28, 69, 14, 47, 82, 78, 48, 89, 84, 32, 28, 71, 20, 99, 66, 4, 54, 23], [43, 37, 14, 20, 36, 19, 4, 97, 53, 42, 12, 69, 48, 60, 31, 29, 97, 86, 21, 69, 78, 61, 23, 20, 99, 51, 51, 38, 72], [92, 40, 87, 23, 98, 25, 84, 79, 98, 94, 8, 33, 86, 21, 30, 52, 51, 53, 38, 72, 38, 79, 54, 5, 35, 45, 81, 61, 92], [49, 92, 94, 43, 1, 28, 43, 39, 50, 96, 28, 32, 35, 47, 6, 20, 90, 38, 92, 11, 98, 36, 51, 72, 7, 63, 92, 20, 10], [31, 26, 58, 16, 98, 43, 79, 88, 47, 23, 1, 63, 48, 54, 51, 1, 21, 74, 94, 8, 74, 80, 86, 96, 55, 36, 73, 62, 68], [32, 70, 24, 22, 91, 36, 67, 12, 17, 23, 45, 57, 51, 47, 3, 52, 44, 39, 56, 87, 35, 48, 26, 36, 91, 8, 67, 86, 25], [27, 80, 9, 11, 42, 7, 77, 83, 95, 92, 36, 23, 28, 3, 32, 75, 37, 88, 78, 53, 38, 12, 29, 25, 63, 3, 83, 85, 40], [15, 14, 11, 3, 1, 50, 70, 72, 85, 66, 75, 41, 2, 74, 5, 97, 53, 77, 69, 22, 69, 99, 93, 24, 22, 98, 83, 3, 59], [94, 54, 92, 22, 14, 71, 92, 18, 52, 75, 66, 32, 23, 84, 86, 46, 16, 15, 60, 27, 66, 14, 77, 1, 16, 93, 68, 9, 75], [72, 91, 27, 73, 33, 29, 78, 40, 83, 75, 56, 74, 48, 40, 92, 94, 72, 62, 57, 59, 70, 2, 18, 71, 28, 53, 15, 87, 22], [83, 76, 75, 55, 3, 52, 29, 64, 9, 85, 89, 13, 62, 82, 63, 57, 25, 59, 6, 18, 6, 67, 22, 2, 24, 42, 52, 5, 18], [72, 95, 58, 66, 69, 95, 23, 13, 77, 86, 34, 74, 75, 97, 90, 10, 47, 54, 23, 37, 46, 85, 81, 39, 82, 11, 98, 6, 11], [95, 58, 35, 92, 80, 58, 58, 82, 23, 29, 43, 20, 27, 55, 41, 52, 35, 29, 40, 13, 34, 52, 11, 21, 39, 56, 9, 67, 39], [5, 8, 27, 88, 80, 32, 94, 82, 25, 43, 35, 62, 26, 93, 70, 18, 22, 54, 71, 38, 85, 61, 95, 67, 58, 53, 11, 34, 65], [72, 84, 81, 42, 42, 98, 74, 18, 93, 39, 48, 88, 29, 82, 95, 13, 9, 63, 17, 54, 47, 10, 8, 47, 34, 87, 65, 32, 15], [12, 36, 98, 64, 88, 77, 1, 70, 87, 33, 46, 30, 37, 89, 99, 60, 28, 57, 74, 11, 80, 57, 66, 51, 25, 7, 93, 90, 37], [80, 99, 88, 26, 88, 80, 98, 61, 42, 1, 91, 2, 7, 68, 1, 4, 48, 2, 61, 7, 69, 70, 15, 76, 72, 22, 83, 16, 42], [47, 6, 71, 29, 60, 14, 18, 74, 48, 85, 14, 55, 34, 63, 45, 24, 7, 55, 69, 45, 72, 76, 54, 46, 89, 97, 27, 35, 21], [81, 95, 80, 69, 92, 74, 94, 2, 70, 70, 27, 61, 46, 1, 77, 6, 95, 72, 18, 25, 47, 48, 49, 43, 89, 10, 54, 74, 54], [94, 67, 23, 93, 87, 73, 68, 38, 43, 64, 35, 72, 72, 34, 30, 81, 12, 32, 8, 20, 62, 36, 63, 88, 98, 13, 7, 57, 66], [40, 20, 92, 48, 43, 19, 36, 78, 87, 17, 45, 35, 7, 36, 27, 38, 83, 33, 64, 41, 50, 37, 62, 39, 74, 74, 73, 14, 94], [97, 4, 66, 99, 57, 66, 42, 6, 32, 64, 44, 1, 34, 41, 86, 3, 78, 43, 7, 19, 68, 3, 31, 83, 50, 47, 86, 16, 87], [61, 18, 41, 10, 33, 56, 90, 62, 32, 52, 66, 56, 16, 12, 15, 5, 79, 47, 33, 44, 92, 2, 23, 63, 57, 5, 85, 23, 87], [41, 81, 24, 64, 1, 60, 10, 50, 76, 4, 24, 45, 63, 64, 25, 14, 4, 4, 35, 20, 61, 11, 8, 45, 30, 33, 32, 56, 11], [82, 93, 72, 31, 22, 62, 63, 61, 93, 62, 7, 17, 43, 39, 9, 68, 76, 15, 92, 60, 4, 16, 49, 68, 38, 61, 18, 45, 1], [3, 44, 78, 74, 33, 97, 37, 73, 10, 21, 68, 84, 77, 42, 44, 42, 18, 95, 32, 16, 56, 83, 19, 15, 61, 72, 55, 80, 99], [9, 4, 61, 31, 73, 79, 37, 60, 13, 36, 92, 62, 20, 6, 79, 82, 59, 67, 12, 43, 70, 65, 33, 16, 70, 36, 51, 38, 61]], 27, 27", "0" ], [ "[[17, 56], [68, 34]], 1, 1", "0" ], [ "[[63, 21, 24, 76, 7, 94, 21, 23, 39, 45, 23, 2, 16, 42, 23, 6, 15, 37, 47, 64, 18, 55, 99, 5, 74, 66, 9, 82, 40, 13, 2, 14, 34, 11, 47, 56], [20, 30, 34, 53, 49, 37, 11, 29, 58, 85, 94, 81, 88, 50, 61, 5, 72, 5, 58, 86, 98, 77, 72, 35, 2, 53, 11, 29, 84, 27, 25, 40, 90, 52, 69, 90], [10, 24, 96, 55, 26, 55, 47, 7, 75, 42, 43, 29, 46, 78, 74, 32, 16, 82, 42, 42, 59, 78, 68, 82, 32, 31, 8, 27, 18, 7, 22, 70, 27, 9, 86, 83], [91, 89, 31, 11, 33, 34, 47, 34, 18, 39, 82, 4, 92, 89, 8, 89, 83, 24, 56, 46, 92, 50, 76, 20, 58, 69, 17, 98, 97, 37, 38, 76, 1, 87, 2, 97], [64, 35, 17, 29, 96, 12, 57, 8, 12, 47, 65, 48, 97, 10, 26, 4, 70, 28, 10, 79, 81, 82, 60, 70, 44, 59, 83, 75, 29, 19, 27, 74, 4, 6, 67, 67], [54, 41, 10, 15, 57, 80, 50, 86, 25, 2, 45, 7, 37, 77, 55, 72, 37, 94, 93, 69, 6, 79, 95, 73, 68, 77, 47, 80, 77, 55, 38, 80, 7, 90, 60, 92], [56, 85, 53, 32, 16, 26, 43, 24, 24, 7, 47, 52, 99, 90, 76, 35, 63, 2, 48, 36, 63, 23, 14, 69, 65, 22, 90, 87, 5, 22, 35, 86, 19, 72, 97, 6], [30, 68, 46, 51, 93, 74, 58, 6, 79, 93, 31, 6, 81, 16, 29, 31, 1, 26, 82, 1, 51, 71, 89, 85, 39, 93, 6, 4, 22, 96, 94, 61, 58, 4, 40, 89], [57, 39, 35, 96, 86, 55, 55, 45, 51, 20, 67, 50, 39, 73, 73, 64, 92, 49, 89, 73, 45, 87, 46, 73, 45, 27, 23, 91, 49, 99, 21, 2, 16, 76, 14, 8], [26, 56, 59, 26, 75, 99, 7, 86, 47, 8, 90, 8, 36, 52, 76, 62, 21, 39, 12, 8, 9, 63, 29, 41, 7, 77, 28, 93, 51, 11, 87, 60, 65, 4, 28, 65], [82, 47, 44, 19, 27, 71, 36, 9, 13, 48, 5, 87, 29, 74, 88, 64, 77, 94, 82, 54, 14, 42, 93, 63, 9, 76, 70, 63, 19, 81, 19, 78, 94, 41, 52, 18], [25, 55, 1, 99, 50, 76, 42, 89, 35, 3, 55, 35, 26, 99, 47, 50, 74, 90, 61, 61, 12, 49, 87, 98, 81, 44, 46, 77, 13, 77, 75, 73, 19, 36, 14, 53], [77, 73, 1, 49, 66, 56, 54, 46, 6, 62, 67, 94, 83, 41, 65, 66, 22, 67, 66, 30, 57, 71, 19, 65, 33, 29, 72, 72, 90, 19, 82, 50, 89, 75, 81, 9], [50, 61, 36, 63, 82, 74, 2, 12, 79, 88, 25, 21, 75, 81, 25, 74, 68, 81, 24, 98, 49, 99, 35, 2, 69, 34, 57, 35, 85, 35, 98, 1, 83, 52, 32, 98], [58, 19, 70, 53, 75, 93, 19, 63, 29, 73, 69, 63, 30, 84, 56, 7, 48, 45, 41, 53, 20, 44, 97, 53, 85, 6, 35, 93, 74, 81, 58, 98, 93, 31, 7, 30], [35, 59, 63, 40, 37, 2, 79, 35, 70, 50, 29, 78, 5, 15, 34, 50, 76, 60, 39, 23, 67, 80, 62, 26, 51, 64, 83, 59, 78, 56, 52, 45, 5, 85, 56, 62], [18, 97, 81, 30, 57, 26, 64, 52, 52, 21, 18, 67, 49, 69, 40, 5, 25, 96, 19, 67, 15, 31, 52, 35, 43, 97, 74, 60, 85, 54, 58, 91, 13, 3, 2, 69], [79, 23, 13, 11, 51, 54, 53, 5, 37, 75, 81, 14, 13, 38, 93, 40, 42, 23, 81, 49, 83, 86, 99, 96, 96, 23, 68, 60, 91, 48, 7, 24, 58, 3, 54, 80], [80, 93, 37, 66, 75, 96, 96, 8, 17, 64, 40, 74, 41, 44, 41, 93, 38, 38, 77, 31, 49, 76, 23, 90, 1, 80, 70, 30, 13, 81, 44, 31, 71, 75, 33, 83], [9, 7, 91, 42, 85, 39, 95, 24, 78, 52, 37, 76, 64, 75, 65, 23, 91, 47, 98, 55, 66, 72, 14, 52, 12, 99, 80, 54, 8, 87, 56, 60, 39, 80, 2, 79], [64, 11, 70, 65, 36, 63, 89, 63, 15, 62, 56, 23, 43, 31, 3, 79, 36, 75, 69, 92, 64, 67, 48, 44, 72, 64, 84, 74, 48, 99, 53, 84, 83, 38, 43, 51], [50, 14, 8, 82, 83, 80, 14, 3, 37, 24, 75, 34, 29, 36, 87, 16, 76, 79, 64, 35, 50, 39, 88, 13, 72, 91, 60, 28, 71, 95, 68, 50, 76, 55, 68, 3], [54, 55, 22, 6, 97, 76, 3, 9, 29, 33, 54, 68, 89, 35, 36, 72, 34, 43, 29, 34, 56, 23, 65, 2, 86, 80, 78, 69, 12, 66, 52, 47, 34, 61, 54, 82], [70, 76, 28, 63, 71, 56, 43, 38, 9, 46, 20, 12, 81, 36, 1, 48, 77, 22, 57, 51, 74, 63, 18, 75, 50, 59, 8, 63, 35, 27, 79, 66, 69, 81, 11, 33], [38, 24, 37, 49, 70, 31, 11, 2, 30, 34, 86, 1, 3, 48, 71, 41, 23, 11, 4, 65, 16, 42, 48, 38, 9, 12, 50, 9, 17, 60, 58, 82, 90, 88, 82, 72], [61, 89, 15, 40, 61, 85, 26, 9, 67, 62, 73, 28, 7, 76, 13, 89, 28, 43, 41, 36, 95, 17, 25, 26, 59, 66, 83, 35, 8, 46, 86, 20, 49, 29, 73, 74], [11, 42, 44, 98, 98, 9, 24, 16, 58, 43, 28, 68, 57, 44, 94, 50, 37, 31, 44, 18, 50, 27, 50, 10, 25, 54, 43, 31, 38, 84, 20, 21, 91, 30, 63, 89], [71, 27, 83, 1, 75, 71, 77, 29, 69, 12, 45, 59, 82, 5, 30, 40, 74, 16, 69, 51, 99, 97, 93, 30, 61, 3, 23, 1, 84, 31, 69, 27, 27, 79, 66, 46], [46, 15, 23, 88, 71, 27, 77, 24, 69, 23, 36, 95, 67, 69, 15, 38, 27, 8, 69, 18, 82, 61, 28, 14, 43, 73, 46, 99, 41, 4, 66, 32, 88, 27, 21, 67], [59, 42, 75, 62, 2, 89, 77, 88, 8, 39, 42, 63, 89, 52, 41, 69, 38, 54, 64, 11, 8, 82, 10, 16, 72, 88, 16, 25, 75, 81, 8, 18, 50, 63, 78, 32], [94, 64, 54, 48, 64, 92, 80, 19, 47, 75, 25, 48, 79, 9, 84, 59, 4, 9, 98, 23, 99, 90, 4, 42, 55, 41, 5, 99, 9, 19, 19, 70, 8, 41, 21, 32], [36, 34, 6, 11, 51, 7, 72, 53, 85, 49, 55, 96, 96, 42, 22, 69, 44, 32, 30, 1, 31, 90, 51, 7, 54, 43, 80, 66, 43, 53, 68, 5, 1, 97, 88, 14], [87, 13, 21, 98, 41, 36, 79, 99, 44, 55, 94, 65, 2, 35, 28, 88, 14, 42, 28, 15, 27, 62, 72, 98, 79, 59, 58, 34, 64, 53, 18, 36, 59, 23, 76, 66], [77, 16, 17, 9, 27, 67, 43, 78, 57, 38, 50, 27, 4, 30, 8, 68, 18, 36, 4, 57, 90, 29, 37, 56, 3, 95, 8, 75, 75, 49, 63, 10, 34, 20, 67, 11], [76, 91, 51, 58, 73, 99, 42, 93, 3, 65, 79, 51, 51, 67, 90, 62, 45, 50, 67, 61, 17, 90, 85, 22, 85, 3, 3, 17, 65, 80, 89, 68, 59, 78, 16, 82], [8, 66, 57, 91, 66, 68, 17, 15, 33, 36, 37, 62, 36, 39, 99, 57, 15, 97, 46, 15, 47, 20, 87, 63, 88, 86, 66, 1, 46, 4, 78, 80, 34, 91, 17, 93]], 35, 28", "0" ], [ "[[96, 91, 61, 55], [60, 18, 48, 25], [94, 72, 84, 54], [10, 62, 23, 79]], 3, 2", "0" ], [ "[[68, 61, 12, 7, 49, 65, 57, 32, 57, 95, 64, 17, 77, 59], [38, 7, 47, 21, 69, 36, 79, 82, 23, 27, 76, 37, 43, 52], [37, 95, 8, 88, 57, 73, 4, 52, 75, 99, 7, 55, 78, 23], [45, 1, 5, 89, 89, 71, 96, 27, 86, 75, 49, 30, 91, 78], [90, 64, 33, 88, 19, 95, 21, 5, 74, 90, 65, 86, 8, 53], [96, 14, 83, 29, 23, 39, 48, 68, 97, 68, 97, 60, 19, 66], [92, 85, 40, 36, 18, 94, 53, 75, 6, 72, 63, 98, 1, 87], [31, 50, 24, 38, 46, 2, 24, 76, 34, 76, 45, 59, 90, 90], [65, 98, 95, 65, 4, 82, 85, 58, 1, 68, 69, 73, 3, 10], [39, 44, 93, 64, 97, 19, 21, 52, 70, 73, 19, 85, 83, 96], [49, 48, 54, 77, 37, 82, 64, 93, 13, 76, 14, 4, 14, 57], [67, 85, 12, 23, 33, 66, 19, 41, 19, 2, 30, 95, 84, 7], [35, 38, 97, 53, 61, 25, 80, 94, 77, 49, 86, 6, 12, 71], [39, 32, 7, 19, 13, 24, 26, 48, 79, 47, 13, 2, 48, 7]], 13, 13", "0" ], [ "[[52, 24, 47, 92, 56, 78, 13, 64, 21, 58], [97, 6, 75, 14, 88, 68, 7, 23, 39, 50], [17, 67, 52, 78, 74, 63, 61, 47, 65, 66], [45, 47, 94, 50, 82, 16, 11, 94, 83, 61], [91, 81, 3, 52, 62, 85, 27, 82, 83, 58], [90, 5, 40, 91, 76, 16, 88, 65, 94, 47], [63, 83, 38, 72, 5, 18, 89, 42, 39, 14], [23, 18, 89, 8, 80, 67, 23, 35, 69, 14], [83, 83, 45, 73, 40, 8, 26, 90, 27, 38], [36, 11, 82, 87, 50, 1, 24, 90, 52, 78]], 8, 8", "0" ], [ "[[75, 18, 92, 72, 81, 98, 29, 53, 45, 28, 6, 37, 39, 3, 30, 17, 77, 29, 56, 43, 6, 97, 35, 89, 22, 24], [53, 29, 83, 34, 63, 60, 11, 35, 84, 27, 50, 21, 52, 63, 46, 47, 43, 6, 43, 37, 56, 89, 44, 49, 78, 82], [39, 2, 47, 28, 17, 17, 92, 70, 8, 27, 34, 58, 41, 7, 54, 95, 65, 86, 74, 37, 59, 41, 38, 36, 10, 17], [53, 9, 95, 28, 34, 19, 32, 19, 70, 79, 45, 66, 16, 66, 21, 19, 57, 75, 68, 47, 68, 38, 16, 42, 10, 80], [2, 3, 13, 81, 70, 71, 94, 52, 44, 16, 80, 55, 96, 16, 88, 7, 67, 84, 9, 49, 73, 93, 59, 14, 59, 27], [11, 21, 30, 54, 74, 52, 72, 38, 99, 55, 14, 77, 9, 6, 61, 52, 64, 18, 43, 94, 82, 54, 68, 73, 63, 84], [97, 16, 69, 54, 41, 92, 65, 23, 93, 53, 95, 60, 47, 17, 42, 3, 22, 57, 56, 96, 61, 87, 77, 63, 21, 28], [76, 21, 99, 51, 78, 19, 19, 13, 89, 44, 89, 25, 76, 73, 71, 23, 48, 99, 7, 36, 26, 48, 38, 80, 58, 81], [16, 46, 97, 92, 29, 56, 53, 79, 77, 95, 13, 99, 55, 33, 65, 16, 73, 78, 38, 10, 2, 86, 31, 35, 24, 55], [14, 4, 76, 13, 89, 59, 80, 74, 13, 94, 38, 79, 59, 93, 42, 5, 12, 69, 25, 49, 86, 78, 3, 50, 54, 24], [63, 2, 29, 74, 80, 37, 35, 2, 28, 54, 39, 61, 7, 88, 66, 91, 4, 29, 37, 33, 25, 17, 66, 45, 51, 47], [54, 95, 80, 2, 12, 35, 23, 77, 37, 57, 61, 66, 12, 68, 23, 10, 78, 48, 67, 86, 9, 82, 98, 39, 78, 26], [75, 36, 19, 34, 54, 70, 36, 97, 26, 87, 62, 3, 42, 18, 71, 53, 60, 39, 32, 72, 8, 28, 79, 9, 84, 26], [6, 65, 24, 64, 86, 49, 78, 92, 53, 43, 12, 21, 74, 31, 1, 8, 16, 1, 84, 26, 36, 58, 26, 46, 62, 96], [12, 67, 58, 42, 70, 74, 31, 70, 79, 96, 72, 22, 92, 4, 70, 16, 18, 86, 95, 73, 36, 21, 20, 47, 74, 64], [26, 18, 42, 4, 41, 72, 81, 27, 96, 79, 45, 26, 39, 22, 36, 87, 15, 54, 64, 3, 74, 22, 40, 43, 98, 1], [12, 52, 15, 36, 80, 80, 75, 48, 5, 76, 62, 12, 18, 1, 3, 21, 7, 37, 35, 9, 72, 23, 63, 69, 63, 71], [76, 16, 82, 3, 77, 42, 65, 35, 17, 15, 20, 60, 98, 3, 29, 46, 75, 36, 15, 54, 40, 86, 81, 21, 12, 28], [32, 59, 65, 75, 40, 20, 82, 40, 73, 44, 78, 26, 9, 25, 92, 93, 32, 84, 8, 76, 34, 7, 49, 5, 42, 10], [23, 67, 12, 62, 81, 87, 63, 39, 2, 41, 27, 49, 19, 43, 16, 44, 24, 95, 69, 49, 34, 23, 73, 52, 18, 40], [90, 90, 98, 56, 40, 54, 31, 92, 32, 50, 25, 89, 8, 38, 88, 90, 81, 52, 56, 87, 38, 87, 78, 69, 99, 91], [54, 5, 15, 40, 9, 85, 32, 81, 37, 2, 13, 78, 55, 79, 73, 64, 16, 14, 55, 39, 32, 21, 79, 82, 17, 79], [92, 99, 79, 3, 52, 68, 58, 99, 51, 8, 28, 42, 77, 42, 19, 98, 38, 63, 31, 69, 53, 93, 81, 36, 99, 89], [73, 90, 89, 34, 63, 28, 69, 64, 87, 82, 63, 50, 50, 54, 47, 73, 94, 5, 93, 30, 34, 7, 84, 56, 97, 87], [74, 49, 31, 66, 24, 68, 50, 25, 36, 23, 38, 21, 39, 44, 40, 60, 43, 98, 47, 88, 96, 1, 56, 14, 73, 51], [76, 57, 45, 67, 84, 5, 52, 43, 40, 81, 99, 42, 83, 39, 3, 79, 43, 64, 52, 27, 21, 67, 16, 11, 81, 33]], 18, 15", "0" ], [ "[[45, 38, 43, 11, 2, 77, 3, 59, 58, 22, 6, 65, 13, 43, 52, 15], [69, 16, 25, 44, 58, 94, 54, 33, 96, 27, 86, 41, 25, 86, 66, 95], [59, 30, 24, 88, 58, 3, 79, 72, 44, 79, 74, 38, 88, 50, 67, 63], [77, 66, 59, 16, 29, 18, 24, 81, 6, 78, 40, 14, 23, 20, 86, 90], [54, 62, 50, 48, 35, 34, 91, 85, 64, 72, 50, 41, 27, 83, 70, 30], [78, 37, 23, 81, 90, 53, 11, 37, 80, 30, 45, 86, 9, 7, 6, 14], [75, 66, 60, 75, 3, 95, 96, 17, 49, 70, 85, 94, 90, 17, 48, 13], [8, 50, 36, 13, 18, 84, 71, 19, 77, 3, 97, 76, 35, 1, 9, 5], [7, 7, 26, 74, 17, 90, 16, 84, 96, 49, 25, 45, 33, 65, 73, 19], [85, 24, 39, 8, 23, 16, 31, 84, 43, 16, 92, 73, 2, 72, 69, 58], [7, 72, 1, 48, 82, 42, 84, 66, 11, 35, 70, 72, 80, 47, 71, 46], [92, 19, 1, 42, 4, 55, 31, 93, 38, 92, 22, 87, 40, 35, 10, 58], [28, 30, 44, 35, 39, 15, 99, 79, 2, 52, 67, 96, 41, 34, 68, 88], [41, 84, 68, 59, 71, 64, 79, 76, 52, 26, 16, 25, 89, 11, 39, 97], [76, 74, 93, 51, 9, 19, 66, 31, 38, 44, 41, 77, 61, 85, 72, 60], [18, 97, 93, 70, 18, 8, 55, 92, 63, 45, 19, 53, 78, 37, 76, 32]], 11, 11", "0" ], [ "[[88, 45, 19, 4, 98, 22, 59, 11, 85, 88, 3, 46, 20, 27, 14, 92, 24, 45, 89, 7, 84, 55, 54, 65, 95, 92, 10, 97, 41], [50, 92, 97, 19, 60, 78, 38, 90, 54, 69, 35, 95, 78, 27, 7, 19, 31, 16, 26, 23, 39, 21, 39, 4, 69, 3, 95, 4, 48], [50, 96, 8, 79, 99, 92, 99, 70, 68, 51, 29, 3, 56, 9, 98, 2, 24, 79, 37, 27, 86, 34, 31, 74, 23, 48, 78, 9, 70], [62, 93, 53, 48, 89, 17, 47, 17, 46, 31, 63, 63, 2, 25, 59, 59, 30, 55, 95, 32, 73, 54, 31, 7, 59, 42, 7, 45, 13], [64, 8, 35, 71, 49, 38, 83, 47, 7, 70, 53, 16, 96, 33, 97, 62, 87, 5, 16, 96, 26, 66, 73, 24, 97, 46, 77, 71, 43], [80, 43, 36, 54, 65, 85, 9, 88, 43, 53, 6, 27, 75, 32, 51, 36, 88, 79, 2, 45, 46, 59, 73, 78, 12, 66, 84, 64, 54], [61, 5, 44, 80, 52, 38, 85, 41, 91, 64, 3, 59, 12, 10, 83, 6, 91, 4, 17, 63, 78, 86, 61, 80, 60, 81, 16, 91, 56], [58, 25, 51, 21, 69, 32, 68, 5, 93, 92, 79, 17, 83, 60, 21, 11, 6, 60, 42, 13, 75, 59, 60, 70, 8, 92, 58, 12, 63], [56, 42, 60, 3, 1, 3, 21, 66, 11, 14, 77, 77, 76, 43, 64, 14, 71, 54, 9, 52, 92, 84, 21, 92, 35, 97, 18, 99, 4], [17, 46, 28, 48, 45, 50, 85, 2, 73, 1, 26, 8, 95, 42, 53, 40, 45, 94, 30, 37, 61, 16, 44, 25, 36, 9, 56, 36, 90], [90, 32, 51, 10, 22, 17, 53, 22, 37, 32, 43, 40, 26, 42, 29, 45, 70, 53, 56, 28, 58, 6, 83, 70, 40, 90, 75, 81, 28], [20, 70, 17, 6, 63, 59, 87, 3, 22, 17, 88, 45, 12, 86, 98, 42, 51, 52, 35, 3, 47, 93, 5, 46, 59, 37, 93, 36, 75], [76, 66, 33, 20, 53, 44, 81, 5, 12, 13, 78, 27, 82, 94, 6, 2, 97, 60, 13, 27, 51, 59, 34, 22, 60, 35, 16, 55, 66], [79, 89, 28, 6, 35, 23, 55, 27, 71, 89, 97, 7, 20, 41, 48, 97, 23, 83, 17, 9, 59, 34, 49, 66, 63, 47, 28, 59, 24], [98, 48, 63, 80, 29, 81, 60, 76, 22, 46, 71, 98, 18, 44, 14, 90, 12, 54, 29, 27, 23, 2, 88, 65, 75, 76, 69, 22, 34], [98, 19, 77, 51, 45, 43, 39, 81, 9, 82, 38, 43, 39, 62, 83, 94, 66, 4, 69, 14, 84, 13, 96, 71, 18, 7, 91, 2, 25], [49, 42, 78, 9, 52, 81, 43, 29, 96, 56, 71, 95, 52, 63, 70, 23, 58, 8, 50, 91, 74, 19, 54, 89, 28, 86, 8, 71, 26], [9, 42, 86, 62, 16, 55, 89, 70, 37, 4, 73, 48, 25, 75, 24, 55, 32, 84, 3, 27, 46, 63, 79, 61, 2, 88, 26, 64, 46], [14, 23, 36, 97, 88, 37, 26, 53, 96, 91, 10, 62, 34, 5, 45, 5, 25, 12, 17, 42, 47, 64, 63, 28, 70, 26, 67, 98, 12], [16, 54, 94, 32, 17, 6, 35, 73, 50, 74, 39, 45, 31, 30, 7, 13, 44, 56, 30, 33, 40, 82, 85, 52, 46, 29, 81, 31, 99], [69, 62, 61, 40, 63, 96, 52, 95, 16, 74, 74, 3, 49, 76, 88, 90, 76, 26, 33, 40, 75, 83, 11, 38, 7, 66, 57, 45, 33], [62, 48, 8, 10, 28, 79, 60, 78, 26, 82, 13, 16, 52, 99, 15, 67, 53, 15, 81, 12, 77, 83, 84, 61, 44, 40, 94, 66, 24], [51, 76, 56, 42, 98, 20, 96, 37, 32, 41, 28, 55, 65, 43, 98, 24, 28, 26, 64, 69, 48, 24, 3, 74, 68, 48, 8, 24, 7], [48, 84, 58, 83, 45, 84, 81, 27, 9, 37, 36, 80, 93, 90, 2, 43, 28, 54, 34, 5, 64, 33, 56, 20, 99, 99, 49, 29, 69], [19, 80, 60, 22, 1, 42, 35, 37, 14, 46, 87, 12, 70, 25, 54, 80, 13, 6, 98, 15, 24, 77, 80, 20, 54, 4, 22, 74, 5], [80, 3, 20, 93, 99, 9, 88, 6, 72, 99, 6, 93, 69, 27, 90, 62, 41, 38, 4, 21, 21, 33, 57, 91, 96, 10, 40, 8, 23], [56, 44, 68, 36, 33, 58, 79, 25, 13, 72, 51, 37, 92, 30, 62, 23, 13, 57, 87, 49, 3, 49, 95, 68, 36, 6, 78, 21, 58], [60, 9, 7, 99, 19, 48, 62, 8, 43, 71, 83, 35, 51, 79, 4, 59, 79, 39, 5, 91, 35, 77, 51, 30, 84, 92, 72, 16, 27], [22, 58, 62, 3, 99, 42, 88, 86, 42, 55, 9, 55, 61, 36, 11, 47, 19, 21, 82, 82, 35, 66, 70, 28, 59, 27, 75, 36, 5]], 16, 15", "0" ], [ "[[9, 7, 25, 16, 34, 78, 18, 20, 43, 67, 73, 98, 45, 20, 73, 51, 62, 62, 20, 32, 55, 72, 60, 15, 48, 49, 38, 83, 25, 87, 12, 93, 97, 52, 41, 90], [38, 97, 57, 14, 10, 64, 43, 72, 64, 96, 44, 32, 55, 79, 34, 45, 74, 76, 96, 77, 63, 97, 2, 63, 38, 96, 98, 22, 76, 9, 43, 4, 23, 56, 43, 99], [3, 97, 67, 53, 94, 92, 93, 81, 15, 34, 6, 20, 66, 44, 12, 13, 43, 15, 48, 16, 70, 83, 54, 58, 47, 3, 71, 44, 71, 10, 63, 49, 83, 4, 81, 63], [98, 64, 37, 36, 59, 47, 49, 30, 46, 75, 67, 61, 91, 63, 46, 20, 2, 85, 61, 40, 74, 60, 34, 40, 56, 21, 11, 26, 66, 5, 21, 21, 64, 37, 29, 84], [37, 20, 33, 63, 35, 85, 36, 86, 14, 55, 97, 56, 17, 52, 5, 73, 33, 92, 24, 97, 39, 94, 11, 44, 24, 45, 85, 39, 99, 65, 19, 76, 68, 82, 51, 18], [67, 46, 51, 73, 35, 35, 13, 67, 60, 46, 88, 85, 97, 91, 11, 54, 15, 66, 39, 26, 12, 85, 95, 79, 63, 94, 36, 20, 87, 54, 51, 26, 10, 35, 6, 7], [45, 34, 15, 72, 77, 92, 77, 99, 7, 44, 49, 49, 93, 4, 20, 27, 46, 7, 44, 29, 4, 4, 12, 89, 60, 54, 63, 70, 32, 78, 44, 24, 68, 96, 58, 47], [60, 71, 69, 9, 88, 29, 85, 97, 98, 87, 55, 81, 24, 93, 93, 95, 83, 88, 65, 64, 55, 68, 65, 19, 53, 16, 55, 62, 95, 2, 79, 49, 99, 89, 29, 48], [60, 6, 9, 20, 64, 81, 54, 76, 46, 22, 62, 52, 82, 31, 52, 76, 45, 66, 22, 56, 88, 32, 66, 80, 35, 54, 7, 15, 71, 89, 77, 77, 38, 89, 48, 22], [30, 66, 22, 51, 19, 60, 8, 27, 62, 66, 35, 94, 87, 14, 92, 45, 7, 78, 26, 82, 23, 80, 11, 95, 23, 99, 81, 11, 20, 64, 10, 13, 51, 64, 94, 22], [76, 49, 78, 72, 98, 66, 77, 69, 15, 17, 31, 64, 89, 99, 98, 14, 28, 5, 72, 47, 46, 11, 99, 60, 62, 17, 67, 36, 33, 81, 14, 74, 90, 36, 88, 14], [90, 77, 53, 61, 18, 38, 48, 55, 35, 41, 70, 12, 70, 48, 93, 43, 68, 50, 11, 55, 78, 95, 21, 25, 40, 16, 86, 91, 26, 70, 69, 89, 53, 61, 7, 22], [91, 94, 52, 73, 87, 70, 24, 63, 86, 9, 37, 46, 17, 28, 27, 20, 47, 93, 56, 81, 7, 84, 81, 68, 1, 14, 49, 27, 89, 42, 16, 27, 67, 83, 96, 73], [84, 24, 54, 47, 63, 22, 42, 38, 4, 66, 52, 18, 29, 94, 15, 88, 69, 22, 91, 83, 51, 55, 6, 4, 37, 38, 72, 5, 55, 12, 75, 34, 68, 8, 68, 30], [47, 74, 37, 48, 80, 45, 51, 19, 54, 94, 80, 28, 95, 20, 62, 37, 43, 4, 1, 80, 46, 99, 3, 93, 62, 32, 25, 16, 33, 83, 38, 13, 1, 88, 48, 1], [89, 58, 76, 95, 72, 66, 44, 24, 16, 51, 72, 66, 36, 15, 88, 33, 69, 84, 76, 16, 93, 99, 80, 56, 11, 13, 7, 63, 12, 38, 56, 6, 92, 11, 42, 48], [6, 8, 64, 4, 14, 59, 32, 2, 52, 18, 28, 32, 54, 56, 54, 64, 59, 19, 51, 27, 22, 63, 15, 95, 34, 73, 25, 35, 68, 97, 32, 52, 49, 99, 93, 60], [93, 53, 88, 70, 7, 70, 92, 72, 16, 59, 72, 86, 45, 9, 43, 52, 74, 58, 93, 76, 34, 94, 47, 83, 37, 15, 2, 36, 14, 59, 52, 9, 45, 94, 60, 75], [26, 28, 26, 4, 14, 74, 59, 73, 21, 49, 64, 64, 53, 20, 2, 99, 26, 39, 24, 58, 33, 10, 17, 21, 5, 76, 95, 61, 23, 77, 22, 34, 75, 51, 44, 91], [19, 37, 44, 78, 43, 76, 54, 24, 80, 72, 53, 94, 66, 82, 32, 80, 89, 20, 64, 40, 22, 93, 94, 95, 20, 8, 62, 36, 70, 1, 75, 57, 77, 23, 20, 69], [70, 58, 27, 59, 1, 90, 89, 23, 36, 85, 92, 45, 2, 93, 65, 10, 10, 83, 13, 85, 91, 33, 4, 80, 63, 76, 17, 80, 10, 6, 6, 7, 61, 63, 48, 43], [14, 15, 86, 46, 44, 37, 56, 36, 34, 12, 32, 30, 32, 35, 28, 68, 51, 72, 62, 15, 53, 58, 90, 22, 87, 34, 36, 24, 99, 95, 66, 14, 38, 72, 43, 39], [44, 35, 36, 39, 97, 34, 36, 19, 18, 46, 71, 90, 12, 87, 18, 95, 7, 53, 89, 20, 7, 50, 24, 37, 10, 25, 45, 1, 95, 87, 88, 22, 4, 92, 56, 34], [38, 84, 92, 22, 76, 71, 16, 58, 49, 39, 92, 60, 31, 32, 94, 48, 38, 42, 88, 15, 1, 94, 13, 32, 17, 75, 19, 73, 42, 97, 31, 68, 34, 16, 10, 28], [57, 76, 12, 77, 28, 88, 31, 36, 11, 40, 78, 4, 16, 57, 41, 61, 88, 70, 52, 57, 59, 57, 79, 78, 83, 97, 53, 87, 80, 74, 45, 2, 80, 65, 78, 80], [47, 70, 68, 66, 93, 33, 73, 43, 6, 64, 36, 19, 81, 73, 1, 55, 39, 48, 13, 30, 80, 41, 8, 40, 14, 48, 7, 49, 19, 31, 95, 64, 57, 88, 97, 47], [71, 54, 34, 95, 21, 31, 85, 67, 94, 53, 28, 79, 51, 18, 19, 89, 21, 1, 41, 65, 63, 85, 71, 18, 90, 13, 55, 30, 12, 55, 31, 6, 6, 91, 43, 19], [31, 93, 54, 82, 24, 21, 43, 77, 96, 18, 60, 68, 37, 7, 58, 10, 53, 80, 83, 36, 86, 76, 41, 12, 4, 51, 45, 7, 32, 2, 33, 48, 67, 65, 12, 10], [61, 57, 43, 48, 47, 9, 29, 42, 21, 67, 86, 56, 3, 61, 83, 5, 84, 77, 41, 12, 56, 79, 92, 33, 10, 35, 11, 60, 29, 73, 58, 78, 24, 11, 26, 76], [18, 74, 87, 74, 1, 61, 24, 37, 27, 86, 48, 91, 62, 91, 29, 8, 72, 26, 48, 9, 49, 54, 93, 17, 33, 1, 57, 1, 61, 21, 30, 41, 33, 37, 17, 51], [64, 66, 69, 5, 27, 17, 30, 72, 51, 88, 42, 66, 61, 58, 77, 87, 43, 64, 84, 64, 27, 19, 58, 11, 17, 14, 67, 21, 29, 45, 42, 63, 48, 54, 26, 78], [79, 62, 86, 3, 12, 45, 84, 16, 55, 93, 24, 93, 59, 12, 92, 2, 61, 9, 92, 97, 31, 15, 48, 33, 51, 49, 55, 48, 1, 9, 66, 83, 24, 54, 23, 56], [63, 57, 5, 89, 37, 4, 46, 26, 70, 75, 85, 39, 56, 6, 39, 43, 55, 93, 87, 15, 98, 77, 61, 25, 15, 52, 58, 86, 66, 57, 22, 66, 54, 46, 9, 36], [83, 65, 45, 2, 10, 81, 87, 31, 76, 58, 50, 57, 18, 89, 93, 30, 78, 35, 88, 75, 77, 26, 98, 75, 53, 68, 43, 49, 99, 98, 88, 13, 12, 97, 93, 9], [59, 15, 73, 29, 52, 78, 11, 30, 13, 1, 57, 69, 53, 53, 34, 33, 90, 85, 60, 76, 97, 42, 73, 98, 95, 64, 28, 78, 39, 91, 94, 27, 49, 48, 22, 58], [24, 52, 10, 2, 94, 13, 6, 27, 89, 82, 28, 99, 30, 20, 34, 12, 58, 96, 50, 51, 34, 85, 89, 72, 28, 77, 50, 23, 26, 27, 96, 55, 72, 66, 38, 77]], 27, 25", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { int l = 0, sum = 0, ans = 360; for ( int i = 0; i < n; i ++ ) { sum += arr [ i ]; while ( sum >= 180 ) { ans = min ( ans, 2 * abs ( 180 - sum ) ); sum -= arr [ l ]; l ++; } ans = min ( ans, 2 * abs ( 180 - sum ) ); } return ans; }
[]
null
[]
COUNT_SUBARRAYS_EQUAL_NUMBER_1S_0S
python
[]
def f_gold ( arr , n ) : um = dict ( ) curr_sum = 0 for i in range ( n ) : curr_sum += ( - 1 if ( arr [ i ] == 0 ) else arr [ i ] ) if um.get ( curr_sum ) : um [ curr_sum ] += 1 else : um [ curr_sum ] = 1 count = 0 for itr in um : if um [ itr ] > 1 : count += ( ( um [ itr ] * int ( um [ itr ] - 1 ) ) / 2 ) if um.get ( 0 ) : count += um [ 0 ] return int ( count )
code_translation
[ [ "[2, 12, 18, 19, 19, 20, 20, 21, 25, 29, 38, 54, 54, 71, 72, 72, 74, 75, 77, 78, 80, 80, 81, 84, 97, 97], 24", "0" ], [ "[10, 70, 24, -38, 32, -68, 88, -28, -24, -70, -64, 50, -30, 64, 54, -6, 18, -30, -30, -62, -10, 94, -54, -22, -88, 96, 22, 26, -92, -40, -76, 46, 36, 30, 24, -52, 0], 24", "1" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 11", "3" ], [ "[66, 50, 17, 15, 86, 84, 87, 24, 81, 23, 71, 31, 13, 72, 58, 19, 29, 28, 40, 14, 48, 48, 81, 4, 52, 88, 54, 56, 10, 12, 58, 55, 7, 66, 15, 73, 22, 2, 20, 27, 57, 56, 56, 31, 9, 55], 40", "0" ], [ "[-98, -62, -60, 16, 78, 82], 5", "0" ], [ "[1, 0, 1], 2", "1" ], [ "[2, 31, 34, 64], 2", "0" ], [ "[-70, 90, -10, -64, -76, -74, -12, -44, -48, -54, 76, -78, 8, 0, 0, 78, -28, 6, 98, -84, 60, 60, 2, 48, -96, -28, -78, -76, -56, -26, -60, 50, 44, 34, -90, 80, -30, -98, 62, 36, -46, -72], 25", "2" ], [ "[1, 1, 1], 1", "0" ], [ "[37, 70, 80, 61, 86, 10, 17, 98, 54, 89, 87, 84, 11, 55, 3, 52, 4, 90, 98, 31, 20, 62, 71, 58, 58, 6, 92, 5, 99, 99, 72, 40, 82, 54, 23, 19, 85, 91, 62, 98, 62, 72, 93, 74], 27", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME
python
[]
def f_gold ( n ) : if ( n <= 1 ) : return n a = 0 b = 1 c = 1 res = 1 while ( c < n ) : c = a + b res = res + 1 a = b b = c return res
code_translation
[ [ "5", "5" ], [ "19", "8" ], [ "7", "6" ], [ "94", "12" ], [ "58", "11" ], [ "65", "11" ], [ "69", "11" ], [ "96", "12" ], [ "80", "11" ], [ "14", "8" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int count = 0; if ( n % 2 == 0 ) { count ++; while ( n % 2 == 0 ) n = n / 2; } for ( int i = 3; i <= sqrt ( n ); i = i + 2 ) { if ( n % i == 0 ) { count ++; while ( n % i == 0 ) n = n / i; } } if ( n > 2 ) count ++; return count; }
[]
null
[]
POSITIVE_ELEMENTS_EVEN_NEGATIVE_ODD_POSITIONS
python
[]
def f_gold ( a , size ) : positive = 0 negative = 1 while ( True ) : while ( positive < size and a [ positive ] >= 0 ) : positive = positive + 2 while ( negative < size and a [ negative ] <= 0 ) : negative = negative + 2 if ( positive < size and negative < size ) : temp = a [ positive ] a [ positive ] = a [ negative ] a [ negative ] = temp else : break
code_translation
[ [ "[8, 11, 18, 23, 24, 28, 28, 34, 35, 42, 44, 53, 57, 65, 71, 72, 76, 78, 82, 82, 85, 86, 92, 93], 15", "None" ], [ "[0, -95, 27, -2, -70, -28, 3, -37, 75, -74, 85, -63, -93, -51, 68, -8, 67, 90, 3, -47, 32, 8, 12, 53, -93, 56, 97], 15", "None" ], [ "[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], 40", "None" ], [ "[28, 85, 78, 33, 10, 83, 30, 22, 3, 82, 75, 48, 2, 76, 54, 6, 40, 93, 94], 10", "None" ], [ "[11, -94, -7, -3, 1, -98, 11, 83, 88], 7", "None" ], [ "[0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0], 35", "None" ], [ "[8, 35, 37, 38, 39, 46, 49, 54], 6", "None" ], [ "[75, -66, 88, -21, 27, -83, 61, -60, 10, -48, 18, -91, 49, -4, 13, -67, 86, -15, 97, -90, -94, 15, 21, 41, -35, -80, -43, -54], 21", "None" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 1, 1], 5", "None" ], [ "[62, 36, 39, 53, 90, 78, 56, 1, 56, 4, 30], 8", "None" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n, int m ) { return ( n == m ) ? n : 1; }
[]
null
[]
NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING
python
[]
def f_gold ( s ) : n = len ( s ) auxArr = [ 0 for i in range ( n ) ] if ( s [ 0 ] == '1' ) : auxArr [ 0 ] = 1 for i in range ( 0 , n ) : if ( s [ i ] == '1' ) : auxArr [ i ] = auxArr [ i - 1 ] + 1 else : auxArr [ i ] = auxArr [ i - 1 ] count = 0 for i in range ( n - 1 , - 1 , - 1 ) : if ( s [ i ] == '1' ) : count += auxArr [ i ] return count
code_translation
[ [ "'OGiOkJF'", "0" ], [ "'517376'", "1" ], [ "'11'", "3" ], [ "'Ze'", "0" ], [ "'8763644247018'", "1" ], [ "'00111010001'", "15" ], [ "'HGwkBKUOVu'", "0" ], [ "'652'", "0" ], [ "'101000011110'", "21" ], [ "'kvdpG '", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int num ) { int sum = 0; for ( int i = 2; i * i <= num; i ++ ) { while ( num % i == 0 ) { sum += i; num /= i; } } sum += num; return sum; }
[]
null
[]
EVEN_FIBONACCI_NUMBERS_SUM
python
[]
def f_gold ( limit ) : if ( limit < 2 ) : return 0 ef1 = 0 ef2 = 2 sm = ef1 + ef2 while ( ef2 <= limit ) : ef3 = 4 * ef2 + ef1 if ( ef3 > limit ) : break ef1 = ef2 ef2 = ef3 sm = sm + ef2 return sm
code_translation
[ [ "67", "44" ], [ "89", "44" ], [ "12", "10" ], [ "94", "44" ], [ "96", "44" ], [ "25", "10" ], [ "49", "44" ], [ "8", "10" ], [ "33", "10" ], [ "59", "44" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; double f_gold ( int n ) { return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 ); }
[]
null
[]
CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED
python
[]
def f_gold ( arr , n ) : max1 = max ( arr ) min1 = min ( arr ) m = max1 - min1 + 1 if ( m > n ) : return False visited = [ 0 ] * m for i in range ( 0 , n ) : visited [ arr [ i ] - min1 ] = True for i in range ( 0 , m ) : if ( visited [ i ] == False ) : return False return True
code_translation
[ [ "[2, 4, 19, 25, 65, 72, 75, 83, 90, 92], 8", "False" ], [ "[46, 2, 28, -44, 74, -36, -8, 30, -96, 60, 52, -58, 16, -38, 78, 38, -28, 16, 26, -42, 48, 40, 6, 72], 14", "False" ], [ "[0, 1, 1, 1], 2", "True" ], [ "[50, 21, 9, 29, 86, 2, 82, 49, 34, 18, 77, 83, 44, 67, 85, 58, 15, 85, 22, 3, 39, 67, 42, 37, 6, 35, 18, 57, 41, 32, 39, 30, 41, 68, 84, 36, 64, 36], 23", "False" ], [ "[-92, -82, -80, -78, -66, -66, -62, -58, -54, -52, -48, -30, -26, -22, -20, -20, -18, -14, -2, 12, 20, 24, 26, 26, 28, 28, 32, 36, 42, 48, 50, 52, 56, 64, 70, 72, 72, 80, 82, 84, 86, 92], 26", "False" ], [ "[1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0], 43", "True" ], [ "[18, 19, 21, 23, 30, 33, 38, 40, 45, 56, 63, 68, 93, 96], 8", "False" ], [ "[20, -90, -42, 48, 18, -46, 82, -12, -88, 82, 62, 24, 20, 64, -68, -34, -38, 8, -54, -20, -92, 34, -90, 78, 18, 8, -6, 10, 98, -24, 72, -92, 76, -22, 12, -44, 2, 68, -72, 42, 34, 20, -48], 34", "False" ], [ "[0, 0, 0, 0, 0, 1, 1, 1, 1], 8", "True" ], [ "[81, 25, 50, 48, 35, 38, 49, 21, 47, 94, 94, 55, 23, 45, 92, 23, 93, 33, 64, 9, 90, 64, 81, 17, 2, 73, 8, 7, 35, 36, 72], 27", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_2
python
[]
def f_gold ( arr1 , arr2 , m , n , x ) : count , l , r = 0 , 0 , n - 1 while ( l < m and r >= 0 ) : if ( ( arr1 [ l ] + arr2 [ r ] ) == x ) : l += 1 r -= 1 count += 1 elif ( ( arr1 [ l ] + arr2 [ r ] ) < x ) : l += 1 else : r -= 1 return count
code_translation
[ [ "[5, 5, 7, 10, 14, 14, 17, 21, 32, 34, 37, 40, 40, 40, 46, 46, 50, 50, 51, 55, 57, 62, 65, 67, 67, 69, 70, 70, 72, 73, 76, 77, 77, 78, 84, 85, 85, 86, 87, 88, 88, 89, 89, 90, 93, 99], [2, 5, 8, 8, 10, 12, 13, 15, 17, 18, 20, 20, 21, 27, 28, 31, 34, 37, 40, 46, 48, 52, 53, 54, 54, 58, 59, 60, 66, 68, 68, 69, 70, 71, 72, 73, 77, 77, 80, 84, 84, 92, 92, 95, 97, 97], 28, 29, 23", "3" ], [ "[-84, 52, -34, 96, 16, 92, -64, -74], [-22, 26, -12, -54, 66, 86, 38, 76], 6, 5, 7", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 37, 26, 42", "0" ], [ "[60, 92, 42, 83, 55, 76, 29, 62], [71, 2, 74, 42, 80, 71, 26, 76], 4, 7, 7", "0" ], [ "[-94, -94, -58, -40, -40, -26, -24, -22, -22, -22, -2, 0, 4, 8, 12, 16, 16, 18, 22, 32, 42, 44, 50, 58, 64, 78, 80, 90], [-86, -84, -78, -76, -72, -70, -62, -58, -54, -54, -50, -46, -44, -40, -30, -28, -16, -10, 10, 36, 36, 48, 70, 84, 84, 90, 94, 98], 17, 27, 17", "0" ], [ "[0, 0, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0, 0], 5, 8, 9", "0" ], [ "[1, 5, 7, 7, 7, 14, 15, 16, 17, 18, 18, 19, 20, 25, 27, 31, 36, 42, 47, 51, 56, 56, 56, 58, 58, 59, 63, 63, 63, 65, 66, 67, 76, 83, 93, 94, 97], [2, 3, 7, 8, 9, 10, 17, 18, 21, 28, 29, 29, 33, 35, 46, 47, 47, 49, 49, 49, 53, 56, 58, 59, 59, 60, 65, 67, 70, 78, 81, 85, 85, 87, 90, 92, 96], 28, 34, 31", "1" ], [ "[78, -74, 52, 56, -8, 92, 14, 56, -72, -92, 32, -94, -26, -8, -66, 72, -24, 36, -84, -4, -68, 14, 78, 40, -82, -10, 16, 56, 6, -16, 30, 24, -32], [-74, 22, -14, -2, 36, 86, -70, -20, -76, -84, -40, -36, 42, 22, -60, -94, -18, 8, -14, -42, -68, 62, -60, 2, 40, -66, 68, 96, 70, 98, -38, -74, -92], 16, 30, 24", "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], [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], 25, 33, 33", "0" ], [ "[17, 50, 65, 4, 19, 10, 45, 70, 76, 81, 28, 97, 55, 70, 38, 2, 40, 67, 36, 33, 6, 85, 25], [78, 92, 65, 23, 7, 94, 18, 4, 2, 53, 31, 58, 98, 18, 46, 16, 17, 92, 80, 92, 43, 70, 50], 16, 22, 22", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int num ) { int result = 0; for ( int i = 2; i <= sqrt ( num ); i ++ ) { if ( num % i == 0 ) { if ( i == ( num / i ) ) result += i; else result += ( i + num / i ); } } return ( result + 1 ); }
[]
null
[]
CHECK_LINE_PASSES_ORIGIN
python
[]
def f_gold ( x1 , y1 , x2 , y2 ) : return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) )
code_translation
[ [ "1, 28, 2, 56", "True" ], [ "10, 0, 20, 0", "True" ], [ "0, 1, 0, 17", "True" ], [ "1, 1, 10, 10", "True" ], [ "82, 86, 19, 4", "False" ], [ "78, 86, 11, 6", "False" ], [ "13, 46, 33, 33", "False" ], [ "18, 29, 95, 12", "False" ], [ "42, 35, 25, 36", "False" ], [ "29, 17, 45, 35", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n, int m ) { int dp [ n + 1 ] [ m + 1 ]; for ( int i = 0; i <= n; i ++ ) dp [ i ] [ 0 ] = 1; for ( int i = 0; i <= m; i ++ ) dp [ 0 ] [ i ] = 1; for ( int i = 1; i <= n; i ++ ) for ( int j = 1; j <= m; j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i ] [ j - 1 ]; return dp [ n ] [ m ]; }
[]
null
[]
HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER
python
[]
def f_gold ( n , k ) : if ( k <= 0 ) : return n return ( n & ~ ( 1 << ( k - 1 ) ) )
code_translation
[ [ "49, 15", "49" ], [ "59, 69", "59" ], [ "76, 20", "76" ], [ "27, 76", "27" ], [ "61, 60", "61" ], [ "67, 27", "67" ], [ "63, 71", "63" ], [ "85, 25", "85" ], [ "90, 64", "90" ], [ "24, 55", "24" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int f [ n + 1 ]; int i; f [ 0 ] = 0; f [ 1 ] = 1; f [ 2 ] = 1; for ( i = 3; i <= n; i ++ ) f [ i ] = f [ f [ i - 1 ] ] + f [ i - f [ i - 1 ] ]; return f [ n ]; }
[]
null
[]
STRING_K_DISTINCT_CHARACTERS_NO_CHARACTERS_ADJACENT
python
[]
def f_gold ( n , k ) : res = "" for i in range ( k ) : res = res + chr ( ord ( 'a' ) + i ) count = 0 for i in range ( n - k ) : res = res + chr ( ord ( 'a' ) + count ) count += 1 if ( count == k ) : count = 0 ; return res
code_translation
[ [ "60, 71", "'abcdefghijklmnopqrstuvwxyz{|}~\\x7f\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9b\\x9c\\x9d\\x9e\\x9f\\xa0¡¢£¤¥¦§'" ], [ "56, 17", "'abcdefghijklmnopqabcdefghijklmnopqabcdefghijklmnopqabcde'" ], [ "16, 16", "'abcdefghijklmnop'" ], [ "42, 60", "'abcdefghijklmnopqrstuvwxyz{|}~\\x7f\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9b\\x9c'" ], [ "55, 56", "'abcdefghijklmnopqrstuvwxyz{|}~\\x7f\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98'" ], [ "64, 59", "'abcdefghijklmnopqrstuvwxyz{|}~\\x7f\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9babcde'" ], [ "68, 24", "'abcdefghijklmnopqrstuvwxabcdefghijklmnopqrstuvwxabcdefghijklmnopqrst'" ], [ "88, 2", "'abababababababababababababababababababababababababababababababababababababababababababab'" ], [ "64, 94", "'abcdefghijklmnopqrstuvwxyz{|}~\\x7f\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9b\\x9c\\x9d\\x9e\\x9f\\xa0¡¢£¤¥¦§¨©ª«¬\\xad®¯°±²³´µ¶·¸¹º»¼½¾'" ], [ "42, 79", "'abcdefghijklmnopqrstuvwxyz{|}~\\x7f\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9b\\x9c\\x9d\\x9e\\x9f\\xa0¡¢£¤¥¦§¨©ª«¬\\xad®¯'" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int A ) { int n = 2 * A; int dpArray [ n + 1 ] = { 0 }; dpArray [ 0 ] = 1; dpArray [ 2 ] = 1; for ( int i = 4; i <= n; i += 2 ) { for ( int j = 0; j < i - 1; j += 2 ) { dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] ); } } return dpArray [ n ]; }
[]
null
[]
NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES
python
[]
def f_gold ( n , k ) : p = 1 if ( k % 2 ) : p = - 1 return ( pow ( n - 1 , k ) + p * ( n - 1 ) ) / n
code_translation
[ [ "27, 59", "1.1273629712520942e+82" ], [ "70, 87", "1.3638696152410012e+158" ], [ "77, 40", "2.2184669650003853e+73" ], [ "83, 26", "6.919617201200037e+47" ], [ "16, 2", "15.0" ], [ "90, 66", "5.075723187324977e+126" ], [ "39, 72", "1.4234897666391383e+112" ], [ "48, 26", "6.213024539635228e+41" ], [ "56, 77", "1.8186078611726512e+132" ], [ "10, 47", "7.069650490151047e+43" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; long long int f_gold ( int arr [ ], int n ) { int res = 0; unordered_map < int, int > m; for ( int i = 0; i < n; i ++ ) { int sum = 0; for ( int j = i; j < n; j ++ ) { sum += arr [ j ]; m [ sum ] ++; } } for ( auto x : m ) if ( x . second == 1 ) res += x . first; return res; }
[]
null
[]
BINARY_SEARCH
python
[]
def f_gold ( arr , l , r , x ) : if r >= l : mid = l + ( r - l ) // 2 if arr [ mid ] == x : return mid elif arr [ mid ] > x : return f_gold ( arr , l , mid - 1 , x ) else : return f_gold ( arr , mid + 1 , r , x ) else : return - 1
code_translation
[ [ "[3, 4, 4, 8, 9, 13, 13, 15, 18, 27, 30, 32, 42, 48, 50, 52, 56, 66, 69, 69, 77, 84, 84, 93], 19, 12, 22", "-1" ], [ "[52, -58, -22, -80, 44, -52, -34, 94, -34, -74, 42, 60, -62, 70, 98, 32, 10, 94, 26, 56, -48, -50, 42, 2, 46, 28, -68, -16, -96, -12, 66, -46, 74, -60, -52, 28, -92, -78, 32, 28, 16, 34, 30, -60, -14], 40, 35, 44", "-1" ], [ "[0, 1], 1, 1, 1", "1" ], [ "[28, 84, 40, 81], 2, 2, 2", "-1" ], [ "[-66, -62, -60, -56, -56, -2, 40, 44, 50, 74, 82, 94], 8, 6, 8", "-1" ], [ "[1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1], 7, 7, 10", "-1" ], [ "[15, 26, 31, 36, 36, 61, 68, 72, 75, 79, 82, 98], 6, 7, 8", "-1" ], [ "[0, -82, -94, 48, 48, -96, 14, 66, 76, -30, 86, 28, -28, -66, -64, 92, -94, -66, 86, 26, 8, 94, -82, -80, 4, -26, 76, -46, 72, 88, -6, 8, -30, 40, -88, 2, -40, -98, -22, -20, 4, -12, 54, -20, -36, 12], 38, 33, 39", "-1" ], [ "[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 12, 10, 6", "-1" ], [ "[81, 47], 1, 1, 1", "-1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int DP [ n + 1 ]; DP [ 0 ] = 0; DP [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) { if ( i % 2 == 0 ) DP [ i ] = DP [ i / 2 ]; else DP [ i ] = DP [ ( i - 1 ) / 2 ] + DP [ ( i + 1 ) / 2 ]; } return DP [ n ]; }
[]
null
[]
DICE_THROW_PROBLEM
python
[]
def f_gold ( m , n , x ) : table = [ [ 0 ] * ( x + 1 ) for i in range ( n + 1 ) ] for j in range ( 1 , min ( m + 1 , x + 1 ) ) : table [ 1 ] [ j ] = 1 for i in range ( 2 , n + 1 ) : for j in range ( 1 , x + 1 ) : for k in range ( 1 , min ( m + 1 , j ) ) : table [ i ] [ j ] += table [ i - 1 ] [ j - k ] return table [ - 1 ] [ - 1 ]
code_translation
[ [ "94, 4, 69", "50116" ], [ "7, 12, 33", "77635844" ], [ "20, 44, 24", "0" ], [ "90, 94, 88", "0" ], [ "50, 58, 27", "0" ], [ "32, 90, 29", "0" ], [ "46, 25, 6", "0" ], [ "82, 50, 87", "2893740668169934025792700" ], [ "43, 82, 70", "0" ], [ "6, 83, 19", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int res [ n + 1 ]; res [ 0 ] = 0; res [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) res [ i ] = max ( i, ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) ); return res [ n ]; }
[]
null
[]
COUNT_NUMBER_OF_WAYS_TO_FILL_A_N_X_4_GRID_USING_1_X_4_TILES
python
[]
def f_gold ( n ) : dp = [ 0 for _ in range ( n + 1 ) ] for i in range ( 1 , n + 1 ) : if i <= 3 : dp [ i ] = 1 elif i == 4 : dp [ i ] = 2 else : dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ] return dp [ n ]
code_translation
[ [ "61", "188941273" ], [ "22", "657" ], [ "65", "685792227" ], [ "57", "52054840" ], [ "36", "59864" ], [ "25", "1728" ], [ "16", "95" ], [ "26", "2385" ], [ "92", "4123691589365" ], [ "5", "3" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; unsigned int f_gold ( unsigned int n ) { unsigned int p = 1; if ( n && ! ( n & ( n - 1 ) ) ) return n; while ( p < n ) p <<= 1; return p; }
[]
null
[]
K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY
python
[]
def f_gold ( arr , n , k ) : dist_count = 0 for i in range ( n ) : j = 0 while j < n : if ( i != j and arr [ j ] == arr [ i ] ) : break j += 1 if ( j == n ) : dist_count += 1 if ( dist_count == k ) : return arr [ i ] return - 1
code_translation
[ [ "[2, 3, 8, 18, 20, 33, 53, 56, 60, 71, 76, 80, 81, 87, 88, 89, 92, 95], 16, 16", "89" ], [ "[-78, 6, 32, 52, -12, -32, 22, -40, -82, 24, 30, 10, -40], 8, 6", "-32" ], [ "[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 7, 5", "-1" ], [ "[3, 28, 55, 21, 42, 60, 96, 83, 98, 75, 29, 73, 51, 21, 27, 65, 19, 47, 12, 81, 19, 94, 50, 43, 21, 32, 52, 44, 52, 91, 49, 59, 52, 10, 75, 86, 46, 43, 3, 49, 70, 60, 77, 99, 27, 63], 40, 39", "-1" ], [ "[-96, -90, -76, -44, -16, -8, 0, 0, 2, 2, 8, 14, 16, 18, 18, 20, 20, 28, 34, 44, 68, 74, 84, 90], 23, 12", "44" ], [ "[0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0], 10, 8", "-1" ], [ "[3, 4, 5, 8, 9, 15, 26, 26, 26, 35, 39, 40, 42, 43, 45, 45, 48, 52, 54, 56, 57, 67, 74, 77, 79, 80, 81, 86, 87, 92, 95, 97], 26, 24", "-1" ], [ "[-76, -24, -12, 66, -40, 26, 72, 46, -56, 58, -68, 2, -82], 6, 10", "-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], 27, 17", "-1" ], [ "[29, 83, 32, 75, 5, 22, 68, 64, 36, 18, 7, 63, 16, 42, 77, 61, 1, 26, 12, 41, 67, 85, 85, 35, 94, 18, 14, 65, 8, 55, 44, 34, 48, 23, 8, 27, 86, 2, 51, 91], 28, 24", "65" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n, int k ) { int count = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = i + 1; j < n; j ++ ) if ( arr [ i ] - arr [ j ] == k || arr [ j ] - arr [ i ] == k ) count ++; } return count; }
[]
null
[]
COUNT_SUBARRAYS_WITH_SAME_EVEN_AND_ODD_ELEMENTS
python
[]
def f_gold ( arr , n ) : difference = 0 ans = 0 hash_positive = [ 0 ] * ( n + 1 ) hash_negative = [ 0 ] * ( n + 1 ) hash_positive [ 0 ] = 1 for i in range ( n ) : if ( arr [ i ] & 1 == 1 ) : difference = difference + 1 else : difference = difference - 1 if ( difference < 0 ) : ans += hash_negative [ - difference ] hash_negative [ - difference ] = hash_negative [ - difference ] + 1 else : ans += hash_positive [ difference ] hash_positive [ difference ] = hash_positive [ difference ] + 1 return ans
code_translation
[ [ "[7, 8, 12, 13, 14, 19, 20, 22, 28, 30, 31, 31, 32, 34, 34, 39, 39, 43, 45, 46, 47, 62, 63, 63, 65, 66, 69, 69, 71, 76, 79, 82, 83, 88, 89, 92, 93, 95, 97, 97], 26", "50" ], [ "[20, -98, -44, -82, 28, 20, -76, -16, 42, 0, -88, 74, 56, 6, -68, -30, 28, 88, 58, -78, 46, 2], 15", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 24", "11" ], [ "[44, 4, 29, 83, 28, 75, 58, 89, 40, 38, 29, 45, 21, 87, 97, 42, 95, 20, 48, 38, 15, 67, 23, 81, 50, 53, 64, 67, 30, 13, 52, 56, 87, 10, 80, 38, 31, 19], 23", "43" ], [ "[-94, -94, -94, -90, -88, -86, -86, -82, -78, -76, -74, -68, -64, -62, -62, -60, -52, -48, -48, -46, -44, -44, -32, -28, -22, -12, -12, -8, -8, -4, 4, 6, 10, 14, 28, 40, 42, 52, 56, 60, 60, 60, 64, 68, 70, 82, 82, 84, 96], 48", "0" ], [ "[1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1], 27", "68" ], [ "[6, 16, 21, 26, 34, 35, 44, 46, 46, 86], 7", "5" ], [ "[86, 12, 80, 46, -12, 6], 4", "0" ], [ "[0, 0, 0, 0, 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], 15", "4" ], [ "[71, 94, 91, 19, 85, 5, 87, 96, 66, 17, 95, 5, 32, 17, 93, 48, 46, 24], 12", "7" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int table [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) table [ i ] = n - i; for ( int i = n; i >= 1; i -- ) { if ( ! ( i % 2 ) ) table [ i / 2 ] = min ( table [ i ] + 1, table [ i / 2 ] ); if ( ! ( i % 3 ) ) table [ i / 3 ] = min ( table [ i ] + 1, table [ i / 3 ] ); } return table [ 1 ]; }
[ "import sys" ]
null
[]
FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS_1
python
[]
import sys def f_gold ( arr , n , x , y ) : min_dist = sys.maxsize for i in range ( n ) : if arr [ i ] == x or arr [ i ] == y : prev = i break while i < n : if arr [ i ] == x or arr [ i ] == y : if arr [ prev ] != arr [ i ] and ( i - prev ) < min_dist : min_dist = i - prev prev = i else : prev = i i += 1 return min_dist
code_translation
[ [ "[4, 7, 7, 8, 11, 14, 16, 25, 34, 35, 36, 36, 38, 40, 41, 43, 45, 47, 57, 60, 64, 72, 73, 74, 75, 82, 83, 83, 84, 84, 84, 92], 22, 7, 40", "11" ], [ "[96, 70, 88, -64, -42, 58, 92, 66, -14, 90, -66, 12, 88, -12, 48, -4, 90, 24, 98, 14, 32, 38, 98, 78, 2, 26, 12, -36, 90, 80, 40, 58, 88, 64, 16], 25, 58, 70", "4" ], [ "[0, 0, 1], 1, 1, 1", "9223372036854775807" ], [ "[46, 96, 82, 73, 30, 36, 56, 20, 5, 36, 4, 7, 89, 63, 54, 97, 80, 56, 93, 34, 90, 56, 25, 27, 75, 68, 14, 90], 26, 54, 82", "12" ], [ "[-96, -88, -82, -66, -62, -52, -52, -46, -46, -40, -40, -28, -24, -12, 0, 4, 10, 24, 42, 46, 48, 48, 50, 60, 62, 64, 64, 70, 92, 98], 24, 0, 4", "1" ], [ "[0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1], 10, 0, 1", "1" ], [ "[1, 2, 2, 6, 10, 14, 15, 18, 19, 22, 23, 29, 30, 37, 40, 40, 41, 41, 42, 42, 44, 46, 46, 54, 56, 72, 73, 81, 83, 83, 86, 88, 93], 27, 1, 42", "18" ], [ "[46, 86, -52, 18, -32, 86, 2, 38, 72, 72, -60, 70, -58, 66, -66, -72, -74, 58, 52, 58, 16, 64, 62, -62, 80, -70, -96, -44, -20, -74, -10, 14, -32, 48, 30, 76, -16, 80, 66, -46, -92, 26, -86, 28, -76, -24, -98, 54, 50], 30, 25, 45", "9223372036854775807" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 38, 0, 0", "9223372036854775807" ], [ "[32, 65, 10, 72, 17, 58, 79, 28, 67, 36, 18, 35], 7, 10, 7", "9223372036854775807" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; unsigned int f_gold ( unsigned int n ) { int res = 1, i; for ( i = 2; i <= n; i ++ ) res *= i; return res; }
[]
null
[]
SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS_1
python
[]
def f_gold ( x , y , z ) : if ( not ( y / x ) ) : return y if ( not ( y / z ) ) else z return x if ( not ( x / z ) ) else z
code_translation
[ [ "48, 63, 56", "56" ], [ "11, 55, 84", "84" ], [ "50, 89, 96", "96" ], [ "21, 71, 74", "74" ], [ "94, 39, 42", "42" ], [ "22, 44, 86", "86" ], [ "3, 41, 68", "68" ], [ "67, 62, 94", "94" ], [ "59, 2, 83", "83" ], [ "50, 11, 1", "1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > freq; for ( int i = 0; i < n; i ++ ) freq [ arr [ i ] ] ++; int ans = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = 0; j < n; j ++ ) { if ( freq [ arr [ i ] ] > freq [ arr [ j ] ] && arr [ i ] > arr [ j ] ) ans = max ( ans, freq [ arr [ i ] ] - freq [ arr [ j ] ] ); else if ( freq [ arr [ i ] ] < freq [ arr [ j ] ] && arr [ i ] < arr [ j ] ) ans = max ( ans, freq [ arr [ j ] ] - freq [ arr [ i ] ] ); } } return ans; }
[]
null
[]
CHECK_GIVEN_MATRIX_SPARSE_NOT
python
[]
def f_gold ( array , m , n ) : counter = 0 for i in range ( 0 , m ) : for j in range ( 0 , n ) : if ( array [ i ] [ j ] == 0 ) : counter = counter + 1 return ( counter > ( ( m * n ) // 2 ) )
code_translation
[ [ "[[79, 48, 59, 39, 33, 8, 8, 47, 45, 54, 35, 40, 70, 98, 70, 81, 48, 52, 74, 83, 67, 46, 14, 60, 47, 12], [95, 48, 3, 19, 14, 81, 2, 3, 72, 55, 5, 88, 98, 97, 75, 61, 42, 46, 49, 14, 20, 16, 9, 66, 21, 66], [98, 83, 30, 38, 55, 85, 23, 83, 32, 84, 5, 6, 76, 59, 12, 22, 33, 28, 36, 9, 2, 9, 18, 24, 65, 73], [58, 62, 97, 33, 65, 60, 11, 68, 52, 60, 54, 47, 82, 66, 16, 20, 75, 55, 38, 20, 24, 46, 11, 22, 1, 75], [3, 83, 28, 4, 72, 68, 64, 23, 94, 1, 3, 97, 46, 21, 47, 41, 23, 63, 1, 15, 24, 36, 71, 40, 87, 56], [87, 70, 71, 85, 10, 80, 33, 46, 87, 36, 16, 25, 15, 97, 13, 87, 87, 74, 37, 21, 37, 4, 99, 23, 31, 53], [37, 67, 88, 27, 27, 86, 32, 90, 65, 26, 93, 49, 91, 15, 13, 9, 96, 69, 56, 80, 87, 41, 91, 59, 46, 85], [65, 76, 25, 87, 63, 66, 39, 69, 8, 43, 67, 97, 94, 91, 99, 34, 71, 70, 95, 74, 88, 21, 42, 80, 16, 68], [48, 96, 30, 38, 71, 98, 72, 14, 43, 37, 38, 71, 37, 89, 51, 85, 27, 7, 20, 36, 96, 75, 76, 58, 50, 36], [77, 5, 4, 57, 52, 38, 62, 82, 49, 46, 36, 97, 70, 53, 83, 74, 74, 42, 72, 11, 88, 75, 11, 92, 40, 10], [72, 83, 15, 66, 57, 13, 85, 41, 9, 30, 67, 28, 1, 72, 92, 51, 76, 44, 52, 6, 74, 33, 31, 10, 71, 50], [42, 98, 1, 67, 51, 2, 18, 44, 14, 56, 4, 74, 34, 39, 50, 27, 48, 33, 67, 18, 12, 86, 32, 5, 90, 75], [90, 43, 82, 96, 38, 98, 79, 41, 78, 36, 3, 73, 74, 65, 74, 34, 85, 45, 77, 37, 89, 9, 86, 54, 10, 64], [53, 62, 86, 98, 61, 70, 18, 81, 57, 96, 65, 59, 12, 21, 96, 31, 16, 66, 13, 61, 31, 70, 43, 64, 84, 46], [53, 28, 98, 9, 34, 67, 46, 53, 57, 37, 85, 4, 29, 96, 59, 32, 45, 22, 52, 27, 66, 20, 57, 18, 97, 99], [32, 80, 33, 40, 8, 25, 13, 66, 26, 33, 30, 16, 37, 16, 93, 50, 58, 89, 87, 3, 26, 42, 56, 60, 81, 15], [46, 79, 18, 27, 8, 63, 81, 54, 19, 21, 3, 40, 86, 31, 18, 50, 11, 22, 80, 68, 60, 3, 82, 52, 30, 11], [48, 21, 33, 73, 88, 88, 15, 97, 46, 7, 33, 59, 91, 17, 80, 76, 58, 84, 10, 78, 93, 47, 3, 2, 17, 17], [67, 93, 87, 24, 28, 29, 20, 48, 26, 25, 25, 79, 47, 31, 10, 55, 48, 18, 59, 57, 89, 20, 14, 44, 34, 52], [87, 26, 22, 3, 40, 62, 64, 72, 52, 71, 11, 8, 79, 37, 28, 81, 21, 63, 90, 22, 74, 85, 26, 92, 57, 89], [80, 51, 54, 52, 35, 3, 13, 49, 36, 3, 12, 41, 91, 28, 29, 30, 40, 58, 73, 60, 95, 61, 52, 75, 91, 94], [90, 99, 20, 51, 37, 85, 46, 21, 62, 17, 16, 48, 61, 89, 79, 55, 5, 51, 88, 68, 38, 62, 42, 38, 16, 52], [95, 40, 54, 18, 67, 64, 52, 21, 52, 98, 84, 96, 48, 21, 34, 84, 18, 2, 47, 24, 78, 15, 10, 87, 88, 77], [89, 24, 15, 93, 26, 70, 3, 93, 64, 62, 85, 67, 6, 88, 66, 14, 19, 22, 33, 89, 91, 7, 1, 39, 37, 50], [40, 20, 50, 29, 3, 11, 66, 40, 11, 65, 13, 97, 87, 70, 1, 37, 25, 99, 81, 99, 95, 66, 88, 47, 54, 91], [36, 44, 14, 79, 81, 56, 56, 12, 7, 31, 74, 3, 18, 83, 27, 18, 75, 6, 46, 70, 69, 1, 95, 92, 12, 52]], 25, 16", "False" ], [ "[[67, 41, 95, 96, 46, 82, 5, 44, 41, 3, 55, 19, 1, 18, 59, 62, 56, 37, 60, 49, 5, 79, 68], [85, 12, 82, 41, 38, 52, 33, 75, 11, 46, 3, 21, 13, 93, 20, 42, 52, 95, 74, 69, 93, 1, 81], [95, 24, 13, 91, 41, 41, 85, 4, 98, 89, 97, 25, 13, 33, 18, 51, 54, 58, 24, 7, 33, 7, 65], [60, 17, 53, 18, 95, 76, 49, 84, 61, 35, 53, 48, 45, 88, 73, 51, 51, 8, 61, 97, 76, 15, 38], [30, 58, 80, 23, 72, 21, 10, 98, 40, 36, 54, 67, 79, 97, 94, 59, 86, 77, 93, 36, 77, 84, 5], [89, 42, 17, 26, 96, 26, 88, 89, 86, 21, 97, 39, 96, 57, 83, 24, 6, 85, 68, 12, 15, 92, 16], [45, 85, 17, 37, 50, 90, 60, 57, 3, 31, 32, 44, 66, 61, 32, 47, 2, 49, 38, 99, 21, 43, 95], [46, 50, 98, 39, 76, 81, 51, 16, 48, 63, 37, 54, 73, 30, 3, 41, 74, 61, 13, 4, 66, 92, 49], [25, 60, 8, 35, 12, 70, 77, 66, 35, 88, 40, 57, 38, 97, 31, 44, 6, 13, 3, 68, 28, 58, 72], [68, 78, 45, 66, 58, 8, 25, 90, 77, 1, 55, 60, 98, 54, 71, 60, 18, 86, 29, 48, 78, 75, 4], [56, 95, 41, 62, 43, 81, 32, 55, 95, 35, 61, 11, 34, 70, 27, 99, 59, 90, 27, 33, 71, 16, 35], [68, 16, 57, 90, 76, 38, 11, 75, 31, 81, 12, 62, 9, 3, 58, 51, 88, 25, 80, 72, 44, 14, 15], [99, 24, 44, 97, 54, 95, 80, 78, 12, 1, 86, 77, 27, 55, 54, 40, 65, 87, 6, 16, 14, 36, 87], [53, 8, 42, 68, 29, 57, 22, 34, 4, 87, 69, 56, 6, 81, 15, 83, 81, 31, 61, 7, 18, 2, 81], [26, 43, 12, 57, 23, 79, 80, 26, 70, 36, 33, 28, 27, 72, 97, 52, 13, 90, 45, 1, 44, 81, 38], [43, 82, 40, 76, 62, 67, 88, 72, 93, 2, 18, 87, 14, 1, 15, 88, 32, 39, 68, 31, 44, 54, 16], [99, 50, 21, 42, 96, 76, 40, 78, 48, 32, 66, 65, 10, 62, 39, 16, 41, 78, 59, 50, 50, 5, 83], [92, 92, 66, 22, 29, 40, 40, 16, 41, 61, 64, 13, 63, 76, 63, 10, 91, 12, 20, 88, 79, 54, 47], [61, 68, 76, 59, 98, 25, 18, 44, 3, 95, 61, 77, 12, 39, 79, 83, 92, 13, 75, 39, 6, 5, 65], [49, 12, 1, 19, 6, 19, 8, 86, 44, 61, 23, 88, 6, 52, 85, 67, 13, 74, 64, 46, 54, 96, 86], [2, 39, 65, 66, 43, 54, 6, 96, 27, 88, 90, 65, 26, 65, 23, 89, 26, 78, 76, 94, 37, 83, 3], [46, 32, 63, 18, 68, 16, 40, 27, 77, 56, 92, 52, 14, 6, 15, 3, 22, 48, 40, 51, 13, 95, 21], [28, 13, 95, 35, 18, 71, 3, 37, 46, 77, 61, 89, 52, 94, 46, 90, 59, 3, 19, 49, 79, 14, 49]], 22, 12", "False" ], [ "[[54, 80, 87, 13, 57, 54, 87, 86, 35, 80, 99, 77, 74, 67, 40, 17, 2, 58, 15, 68, 51, 81, 39, 80, 19, 51, 2, 90], [91, 30, 51, 84, 38, 71, 75, 65, 72, 14, 2, 93, 22, 1, 32, 18, 39, 41, 69, 18, 94, 21, 5, 12, 50, 10, 89, 85], [47, 9, 38, 92, 12, 34, 4, 35, 7, 80, 82, 20, 97, 74, 6, 41, 22, 60, 39, 84, 81, 73, 79, 73, 73, 36, 17, 6], [7, 58, 59, 11, 60, 12, 79, 26, 93, 56, 6, 87, 74, 91, 87, 6, 5, 35, 80, 73, 16, 81, 40, 92, 98, 30, 73, 39], [60, 35, 37, 72, 3, 55, 13, 47, 47, 87, 50, 33, 52, 15, 76, 10, 24, 24, 77, 62, 57, 66, 61, 28, 33, 40, 45, 65], [71, 80, 22, 56, 73, 49, 79, 4, 8, 73, 27, 16, 27, 35, 47, 36, 73, 19, 86, 37, 95, 73, 46, 57, 29, 19, 44, 9], [62, 34, 21, 35, 50, 13, 75, 34, 74, 12, 95, 30, 75, 30, 10, 48, 49, 8, 75, 31, 15, 95, 65, 86, 69, 4, 59, 46], [55, 27, 65, 56, 88, 34, 92, 9, 71, 38, 35, 64, 72, 19, 25, 82, 80, 77, 46, 33, 51, 55, 35, 74, 24, 76, 16, 14], [7, 7, 61, 69, 10, 36, 34, 91, 47, 37, 52, 23, 46, 16, 65, 85, 1, 85, 58, 61, 61, 15, 36, 62, 39, 88, 85, 35], [62, 81, 60, 3, 16, 7, 82, 42, 49, 99, 49, 10, 67, 87, 10, 33, 63, 71, 1, 33, 93, 98, 48, 58, 21, 26, 82, 47], [3, 5, 47, 13, 28, 79, 22, 51, 58, 41, 74, 52, 88, 43, 84, 70, 40, 24, 29, 83, 59, 23, 63, 58, 2, 32, 32, 81], [86, 20, 78, 78, 53, 93, 60, 99, 51, 87, 70, 30, 99, 16, 52, 14, 99, 21, 96, 48, 5, 86, 89, 48, 15, 79, 55, 57], [92, 16, 18, 8, 89, 97, 99, 62, 26, 58, 19, 25, 3, 87, 56, 45, 94, 76, 80, 23, 93, 56, 61, 63, 33, 5, 83, 91], [54, 92, 96, 19, 75, 7, 54, 70, 29, 40, 35, 11, 21, 41, 72, 65, 41, 60, 58, 58, 81, 11, 44, 32, 50, 71, 48, 58], [36, 34, 49, 92, 54, 31, 67, 69, 91, 4, 23, 34, 43, 5, 47, 66, 93, 20, 40, 19, 80, 57, 77, 24, 31, 21, 7, 20], [64, 55, 68, 71, 33, 93, 9, 44, 10, 50, 92, 24, 66, 88, 72, 92, 11, 55, 67, 33, 61, 29, 88, 76, 58, 14, 42, 34], [17, 23, 25, 42, 98, 72, 96, 14, 43, 38, 14, 96, 30, 93, 14, 86, 43, 17, 16, 57, 52, 22, 47, 63, 11, 76, 3, 39], [45, 3, 94, 41, 65, 72, 49, 18, 42, 81, 49, 8, 19, 8, 5, 47, 47, 71, 23, 13, 20, 62, 43, 44, 49, 61, 83, 97], [15, 97, 29, 80, 77, 46, 44, 71, 86, 75, 45, 76, 70, 44, 41, 68, 78, 76, 60, 13, 75, 37, 49, 34, 2, 94, 43, 86], [23, 12, 73, 12, 86, 62, 39, 61, 9, 26, 31, 73, 97, 48, 74, 10, 31, 55, 6, 39, 3, 80, 38, 48, 99, 35, 47, 93], [84, 75, 94, 3, 7, 20, 17, 77, 30, 36, 45, 68, 98, 73, 17, 29, 87, 69, 19, 38, 71, 86, 84, 36, 55, 51, 85, 44], [60, 12, 36, 49, 28, 96, 10, 20, 61, 87, 4, 68, 46, 19, 94, 49, 96, 96, 16, 69, 19, 51, 92, 59, 78, 2, 34, 40], [13, 54, 9, 18, 58, 3, 33, 77, 52, 93, 97, 12, 8, 71, 6, 69, 11, 71, 54, 6, 80, 64, 28, 82, 19, 98, 28, 46], [54, 68, 45, 43, 98, 63, 32, 70, 81, 32, 31, 39, 23, 32, 84, 87, 99, 91, 43, 97, 96, 42, 65, 98, 74, 5, 94, 88], [17, 29, 96, 93, 95, 20, 40, 37, 56, 74, 98, 15, 22, 83, 18, 75, 81, 99, 6, 27, 38, 29, 72, 57, 40, 26, 94, 49], [79, 96, 80, 43, 95, 44, 13, 62, 30, 10, 98, 65, 59, 46, 90, 56, 93, 38, 68, 40, 76, 19, 30, 20, 19, 80, 56, 5], [75, 90, 50, 89, 77, 6, 72, 68, 73, 94, 5, 21, 80, 36, 36, 88, 7, 49, 69, 16, 44, 78, 86, 59, 86, 49, 26, 33], [94, 79, 16, 65, 95, 4, 84, 59, 56, 78, 36, 5, 47, 40, 4, 17, 21, 17, 57, 27, 26, 35, 26, 1, 32, 13, 88, 72]], 27, 20", "False" ], [ "[[39, 82, 13, 38, 88, 30, 51, 34, 53, 58, 54, 87, 30, 72, 77, 48, 55, 34, 87], [70, 86, 28, 68, 52, 48, 78, 42, 68, 21, 27, 35, 41, 53, 76, 18, 39, 24, 61], [16, 38, 21, 46, 59, 52, 95, 97, 88, 90, 43, 83, 11, 25, 40, 18, 37, 47, 3], [53, 9, 6, 43, 54, 79, 86, 88, 68, 7, 79, 21, 70, 88, 77, 63, 90, 45, 64], [99, 16, 85, 5, 92, 38, 81, 26, 48, 18, 1, 43, 8, 59, 28, 47, 51, 31, 90], [4, 87, 14, 14, 97, 51, 81, 65, 25, 1, 22, 32, 46, 85, 90, 21, 85, 42, 44], [8, 96, 27, 63, 63, 65, 73, 66, 9, 54, 89, 93, 26, 72, 58, 71, 25, 67, 22], [76, 76, 64, 6, 24, 23, 29, 82, 7, 76, 93, 28, 54, 79, 47, 45, 53, 93, 24], [13, 30, 78, 6, 4, 21, 75, 30, 78, 42, 11, 19, 36, 4, 40, 35, 64, 19, 56], [61, 15, 99, 3, 59, 34, 15, 16, 3, 74, 70, 81, 11, 56, 24, 79, 31, 95, 30], [86, 49, 28, 58, 35, 14, 20, 83, 59, 88, 68, 16, 29, 74, 54, 64, 39, 89, 34], [79, 40, 23, 60, 79, 43, 88, 1, 21, 5, 51, 30, 20, 72, 63, 28, 56, 80, 2], [46, 70, 71, 17, 9, 12, 98, 70, 89, 72, 99, 25, 10, 9, 58, 67, 91, 97, 55], [84, 89, 11, 89, 91, 37, 34, 88, 35, 68, 92, 53, 90, 40, 12, 56, 16, 51, 32], [18, 89, 27, 59, 9, 86, 56, 35, 70, 5, 30, 5, 53, 42, 75, 63, 28, 14, 20], [21, 83, 86, 48, 24, 16, 5, 97, 65, 79, 51, 42, 2, 36, 2, 70, 64, 31, 19], [94, 81, 22, 39, 33, 76, 10, 41, 94, 25, 33, 15, 78, 17, 42, 53, 46, 69, 50], [45, 90, 30, 89, 62, 86, 37, 35, 8, 38, 64, 17, 6, 20, 92, 83, 84, 28, 41], [51, 97, 5, 17, 16, 93, 15, 74, 74, 98, 24, 25, 66, 71, 95, 44, 47, 39, 41]], 11, 9", "False" ], [ "[[45, 34, 40, 86, 92, 30, 11, 67, 66, 18, 30, 47, 69, 10, 98, 55, 85, 39, 46, 78], [49, 6, 79, 57, 39, 75, 91, 82, 91, 18, 86, 11, 46, 94, 96, 93, 31, 73, 98, 60], [40, 27, 52, 15, 85, 14, 9, 6, 47, 67, 46, 13, 29, 75, 53, 71, 80, 56, 88, 30], [36, 24, 45, 38, 71, 83, 10, 64, 26, 16, 31, 30, 33, 89, 69, 93, 59, 14, 19, 91], [23, 84, 17, 24, 58, 16, 79, 4, 84, 37, 91, 9, 15, 34, 52, 9, 24, 1, 81, 30], [34, 83, 45, 69, 25, 64, 16, 98, 87, 41, 68, 1, 17, 10, 81, 9, 87, 16, 48, 1], [26, 8, 59, 97, 5, 70, 41, 34, 95, 34, 92, 34, 76, 27, 83, 84, 90, 83, 39, 81], [58, 55, 22, 85, 45, 11, 27, 6, 71, 61, 97, 72, 78, 81, 93, 9, 21, 60, 96, 37], [2, 25, 36, 41, 31, 74, 4, 1, 70, 34, 45, 6, 19, 23, 5, 72, 48, 3, 66, 90], [37, 17, 39, 34, 86, 86, 49, 64, 89, 98, 23, 48, 76, 47, 34, 81, 77, 11, 67, 20], [6, 4, 27, 99, 14, 45, 92, 84, 63, 36, 50, 24, 98, 16, 81, 89, 94, 33, 13, 4], [51, 11, 25, 40, 65, 38, 4, 73, 67, 76, 81, 43, 87, 55, 28, 26, 49, 51, 97, 41], [10, 68, 99, 15, 59, 15, 1, 35, 8, 40, 58, 29, 36, 63, 51, 54, 41, 83, 92, 8], [26, 35, 58, 32, 90, 53, 11, 57, 43, 67, 9, 95, 98, 74, 29, 24, 8, 40, 83, 34], [46, 96, 63, 39, 20, 39, 69, 98, 23, 30, 29, 13, 24, 95, 72, 27, 18, 31, 78, 68], [15, 75, 63, 63, 95, 80, 19, 52, 10, 53, 88, 55, 94, 73, 85, 47, 85, 6, 80, 99], [67, 79, 6, 51, 9, 27, 54, 1, 69, 13, 39, 14, 64, 7, 85, 72, 90, 66, 87, 55], [55, 88, 18, 52, 43, 74, 81, 63, 6, 8, 62, 71, 28, 93, 4, 49, 75, 79, 66, 7], [34, 21, 47, 36, 76, 83, 10, 31, 91, 83, 12, 14, 43, 91, 51, 23, 45, 27, 66, 63], [96, 65, 87, 13, 87, 14, 33, 15, 79, 29, 14, 84, 77, 95, 47, 48, 44, 17, 78, 82]], 14, 14", "False" ], [ "[[42, 12, 11, 27, 59, 79, 58, 6, 82, 98, 65, 11, 95, 88, 36, 77, 61, 28, 50, 28, 70, 14, 95, 80, 20, 65, 34, 20, 88, 46, 82], [1, 96, 71, 86, 2, 9, 74, 20, 86, 87, 24, 96, 26, 21, 1, 69, 81, 31, 10, 37, 36, 39, 1, 27, 75, 69, 30, 36, 72, 28, 98], [18, 65, 21, 19, 89, 33, 81, 88, 43, 82, 73, 24, 95, 93, 47, 28, 17, 84, 14, 83, 26, 60, 11, 59, 10, 88, 15, 56, 70, 87, 6], [66, 16, 52, 35, 8, 58, 36, 40, 75, 53, 58, 99, 56, 22, 72, 14, 68, 44, 41, 64, 8, 50, 37, 36, 15, 19, 45, 15, 43, 53, 88], [73, 21, 71, 14, 86, 73, 13, 23, 69, 2, 31, 46, 92, 48, 21, 1, 90, 16, 38, 69, 86, 43, 49, 64, 6, 67, 78, 26, 55, 14, 57], [82, 84, 40, 95, 26, 69, 81, 37, 37, 83, 31, 49, 24, 25, 55, 95, 60, 16, 31, 51, 68, 54, 21, 67, 88, 72, 67, 88, 60, 43, 52], [44, 44, 36, 89, 17, 72, 6, 53, 12, 96, 46, 89, 63, 84, 33, 17, 61, 24, 53, 7, 51, 32, 98, 74, 86, 38, 31, 72, 95, 97, 81], [85, 45, 94, 87, 79, 71, 68, 12, 22, 58, 22, 85, 14, 7, 37, 88, 36, 92, 47, 34, 5, 72, 97, 54, 65, 46, 12, 66, 25, 46, 8], [58, 48, 97, 83, 67, 99, 28, 41, 80, 28, 94, 82, 76, 16, 59, 78, 65, 11, 28, 7, 95, 29, 58, 68, 14, 38, 47, 12, 69, 66, 18], [53, 14, 30, 70, 31, 44, 10, 1, 79, 76, 33, 79, 65, 54, 25, 96, 51, 80, 53, 66, 10, 42, 46, 57, 41, 39, 51, 13, 4, 28, 44], [54, 45, 31, 12, 11, 54, 5, 58, 36, 27, 84, 18, 78, 61, 49, 31, 31, 88, 10, 13, 19, 43, 28, 9, 34, 51, 17, 83, 15, 49, 62], [71, 83, 64, 18, 74, 48, 19, 52, 99, 50, 98, 49, 8, 73, 43, 85, 52, 19, 77, 83, 81, 43, 73, 63, 80, 45, 43, 80, 63, 6, 52], [47, 20, 16, 17, 59, 58, 56, 14, 39, 1, 66, 15, 76, 22, 23, 53, 97, 17, 76, 24, 66, 62, 46, 63, 87, 9, 31, 72, 14, 68, 50], [64, 94, 13, 2, 45, 48, 57, 13, 11, 31, 34, 7, 24, 90, 24, 66, 26, 61, 9, 15, 8, 28, 86, 76, 37, 4, 92, 35, 72, 93, 93], [58, 80, 95, 77, 7, 36, 55, 28, 37, 2, 85, 62, 43, 9, 46, 14, 29, 63, 16, 14, 40, 80, 94, 86, 32, 1, 45, 48, 43, 44, 47], [94, 14, 6, 63, 92, 78, 80, 77, 40, 19, 74, 67, 13, 14, 25, 74, 76, 76, 62, 25, 55, 23, 61, 98, 32, 39, 61, 86, 4, 47, 69], [20, 46, 96, 16, 79, 16, 86, 10, 30, 20, 25, 69, 74, 88, 15, 91, 74, 97, 2, 5, 13, 37, 92, 8, 99, 14, 46, 19, 19, 74, 67], [26, 34, 34, 85, 1, 51, 34, 55, 91, 6, 24, 45, 7, 94, 21, 77, 88, 14, 36, 59, 10, 26, 6, 33, 18, 40, 9, 13, 53, 42, 24], [46, 40, 59, 19, 6, 86, 68, 5, 55, 32, 75, 24, 8, 90, 1, 58, 83, 20, 23, 33, 5, 76, 13, 52, 87, 6, 35, 28, 2, 1, 94], [42, 82, 23, 86, 81, 20, 39, 5, 51, 50, 92, 87, 74, 50, 40, 87, 39, 9, 82, 71, 15, 81, 8, 99, 36, 16, 40, 8, 10, 74, 96], [5, 36, 89, 45, 15, 98, 24, 17, 30, 40, 27, 73, 31, 71, 56, 30, 92, 84, 18, 29, 22, 32, 41, 22, 54, 94, 87, 93, 78, 87, 75], [59, 94, 45, 80, 53, 46, 25, 43, 26, 66, 24, 35, 93, 77, 76, 88, 48, 63, 86, 59, 84, 12, 50, 91, 30, 51, 33, 95, 56, 91, 73], [90, 74, 86, 27, 96, 47, 7, 33, 42, 67, 94, 71, 10, 49, 19, 46, 49, 12, 91, 86, 43, 34, 87, 35, 71, 24, 10, 89, 6, 19, 48], [50, 66, 60, 59, 81, 36, 45, 77, 60, 2, 24, 89, 58, 34, 38, 90, 92, 63, 80, 85, 47, 1, 1, 35, 21, 11, 78, 39, 42, 65, 74], [1, 87, 40, 86, 74, 21, 38, 82, 16, 26, 8, 16, 44, 92, 83, 64, 79, 2, 75, 95, 40, 35, 57, 56, 55, 12, 59, 94, 94, 35, 94], [35, 64, 13, 52, 28, 88, 14, 55, 63, 81, 51, 1, 98, 97, 42, 13, 24, 33, 40, 85, 88, 4, 86, 63, 34, 82, 70, 42, 76, 57, 36], [82, 10, 12, 74, 92, 50, 4, 74, 42, 91, 76, 86, 97, 6, 92, 64, 83, 2, 64, 15, 59, 43, 24, 48, 95, 16, 36, 69, 21, 11, 88], [23, 19, 93, 9, 85, 70, 28, 44, 28, 79, 48, 78, 38, 24, 77, 41, 46, 73, 97, 50, 81, 7, 44, 66, 98, 7, 17, 99, 27, 98, 16], [98, 24, 28, 57, 76, 91, 95, 14, 27, 87, 68, 78, 75, 5, 61, 43, 86, 36, 1, 48, 11, 36, 92, 5, 4, 44, 32, 72, 18, 61, 82], [74, 52, 92, 80, 86, 94, 3, 63, 40, 42, 69, 93, 95, 57, 55, 88, 47, 23, 92, 24, 92, 16, 35, 73, 40, 76, 98, 25, 29, 18, 99], [54, 18, 49, 72, 31, 41, 51, 75, 72, 54, 76, 74, 42, 72, 63, 89, 4, 3, 19, 34, 63, 25, 93, 77, 45, 46, 5, 85, 30, 93, 18]], 22, 20", "False" ], [ "[[31, 83, 88, 14, 5, 89, 29, 61, 90, 20, 15, 11, 57, 68, 68, 11, 8, 72, 4, 96, 69, 42, 26, 96, 55, 42, 48, 89], [40, 32, 27, 51, 96, 95, 49, 46, 65, 66, 48, 71, 86, 96, 95, 51, 1, 50, 9, 65, 17, 35, 5, 63, 50, 53, 79, 46], [93, 89, 15, 91, 97, 99, 42, 74, 43, 90, 50, 41, 42, 41, 72, 51, 64, 28, 69, 81, 53, 64, 66, 44, 55, 72, 48, 79], [62, 71, 53, 27, 36, 9, 97, 5, 58, 99, 91, 90, 45, 50, 27, 67, 76, 83, 80, 58, 81, 46, 94, 56, 32, 46, 81, 10], [74, 60, 54, 4, 68, 71, 98, 4, 2, 96, 21, 48, 68, 21, 32, 82, 61, 63, 74, 27, 29, 15, 14, 38, 35, 87, 2, 62], [41, 71, 71, 83, 67, 39, 88, 38, 84, 65, 84, 84, 19, 11, 19, 75, 36, 98, 81, 19, 67, 3, 75, 41, 17, 29, 39, 86], [48, 58, 48, 48, 26, 84, 42, 94, 22, 89, 29, 59, 71, 53, 21, 30, 2, 17, 68, 42, 66, 97, 95, 64, 89, 52, 1, 62], [65, 64, 7, 14, 73, 61, 98, 8, 26, 55, 98, 72, 19, 22, 47, 61, 90, 86, 99, 82, 91, 18, 12, 45, 88, 77, 40, 53], [22, 19, 71, 37, 53, 90, 29, 28, 20, 14, 8, 98, 52, 59, 97, 22, 90, 83, 99, 94, 60, 75, 16, 83, 43, 53, 49, 88], [83, 71, 91, 80, 33, 91, 19, 23, 42, 21, 77, 80, 64, 67, 39, 12, 38, 87, 5, 1, 98, 52, 12, 73, 14, 48, 85, 68], [32, 34, 50, 56, 19, 81, 20, 17, 23, 32, 83, 56, 96, 87, 94, 88, 91, 21, 27, 10, 53, 57, 3, 80, 90, 72, 13, 25], [83, 78, 50, 75, 10, 50, 44, 86, 45, 27, 82, 63, 17, 99, 37, 99, 51, 27, 6, 20, 25, 15, 83, 53, 95, 14, 27, 36], [37, 59, 5, 5, 54, 95, 23, 26, 55, 77, 58, 63, 23, 88, 20, 83, 89, 11, 39, 80, 40, 75, 48, 26, 70, 93, 6, 6], [64, 69, 75, 19, 11, 23, 73, 83, 23, 53, 45, 10, 34, 6, 95, 52, 87, 20, 27, 90, 23, 83, 65, 21, 64, 48, 12, 38], [79, 9, 79, 55, 45, 30, 21, 52, 55, 31, 83, 17, 42, 68, 86, 55, 63, 49, 57, 16, 18, 5, 10, 96, 12, 52, 44, 51], [39, 29, 63, 29, 91, 23, 16, 41, 88, 1, 22, 43, 14, 43, 74, 84, 40, 53, 78, 85, 25, 88, 95, 18, 4, 69, 71, 69], [98, 52, 2, 83, 27, 24, 72, 22, 50, 24, 42, 39, 57, 89, 94, 90, 20, 63, 59, 71, 92, 64, 64, 9, 71, 95, 12, 42], [81, 10, 77, 3, 50, 2, 50, 52, 87, 83, 32, 80, 18, 15, 63, 16, 59, 44, 23, 14, 89, 14, 20, 93, 66, 22, 97, 36], [85, 87, 81, 24, 2, 41, 66, 56, 86, 31, 41, 79, 10, 49, 68, 18, 90, 50, 37, 18, 77, 48, 30, 77, 10, 41, 38, 90], [27, 4, 40, 48, 20, 70, 90, 81, 98, 41, 56, 2, 46, 57, 28, 21, 60, 60, 42, 89, 87, 90, 16, 58, 56, 76, 89, 36], [33, 9, 29, 18, 59, 89, 83, 54, 22, 11, 44, 9, 26, 91, 76, 36, 93, 73, 91, 89, 89, 1, 95, 61, 19, 65, 82, 57], [30, 78, 79, 87, 39, 53, 77, 49, 34, 1, 22, 74, 71, 77, 39, 25, 40, 91, 21, 69, 56, 40, 98, 65, 19, 60, 95, 43], [66, 4, 31, 83, 70, 97, 24, 72, 60, 73, 21, 47, 47, 19, 21, 6, 85, 61, 15, 93, 83, 45, 8, 29, 22, 34, 8, 51], [51, 96, 68, 8, 55, 48, 54, 62, 71, 29, 83, 95, 84, 5, 39, 96, 61, 87, 55, 47, 69, 93, 79, 1, 49, 75, 11, 34], [19, 60, 96, 25, 29, 36, 41, 92, 13, 28, 5, 58, 97, 76, 71, 89, 36, 89, 21, 32, 60, 31, 92, 53, 92, 1, 69, 22], [21, 47, 54, 12, 93, 11, 86, 4, 54, 25, 52, 84, 14, 86, 54, 19, 31, 38, 52, 24, 88, 16, 87, 45, 14, 97, 25, 81], [15, 92, 56, 70, 82, 14, 58, 46, 62, 61, 25, 16, 10, 35, 23, 18, 19, 8, 25, 80, 10, 18, 30, 63, 74, 56, 98, 20], [60, 17, 40, 74, 8, 64, 22, 37, 82, 10, 36, 27, 21, 30, 6, 78, 17, 60, 87, 42, 87, 9, 19, 33, 19, 20, 94, 18]], 24, 19", "False" ], [ "[[86, 39, 88, 64, 64, 37, 73, 80, 25, 79, 52, 51, 19, 48, 70, 73, 48, 63, 88, 16, 65, 48, 18, 28, 86, 68, 39, 5, 55, 72, 32, 80, 36, 99, 34], [48, 65, 65, 73, 63, 75, 55, 30, 69, 9, 72, 86, 91, 97, 40, 82, 5, 27, 81, 60, 14, 1, 26, 40, 66, 25, 90, 67, 99, 91, 72, 58, 90, 15, 32], [23, 80, 72, 57, 90, 2, 90, 95, 85, 57, 31, 8, 50, 43, 82, 6, 52, 75, 80, 62, 45, 2, 12, 63, 85, 70, 26, 16, 70, 81, 7, 32, 37, 94, 98], [15, 21, 54, 26, 33, 81, 87, 40, 92, 3, 85, 11, 78, 60, 22, 41, 52, 56, 59, 35, 32, 46, 52, 94, 7, 87, 37, 97, 93, 62, 28, 5, 49, 82, 22], [76, 57, 20, 20, 21, 61, 42, 5, 77, 98, 55, 66, 19, 93, 10, 63, 95, 65, 56, 79, 97, 53, 34, 6, 10, 40, 40, 31, 85, 64, 41, 69, 13, 87, 53], [6, 47, 51, 40, 50, 99, 74, 22, 81, 41, 4, 80, 4, 43, 91, 22, 21, 15, 63, 17, 34, 66, 39, 55, 36, 66, 97, 38, 55, 87, 18, 97, 31, 89, 65], [75, 45, 99, 54, 56, 42, 4, 40, 26, 96, 88, 36, 81, 33, 95, 53, 81, 39, 28, 25, 75, 8, 69, 40, 16, 30, 37, 78, 71, 31, 87, 42, 22, 36, 17], [40, 19, 21, 62, 43, 32, 10, 82, 99, 29, 95, 44, 95, 94, 16, 14, 1, 50, 32, 96, 88, 83, 15, 1, 84, 6, 45, 63, 14, 11, 83, 74, 76, 96, 53], [78, 42, 30, 64, 97, 13, 16, 42, 44, 61, 2, 67, 81, 11, 51, 80, 99, 2, 42, 54, 51, 51, 96, 3, 16, 49, 5, 44, 75, 56, 74, 48, 72, 43, 7], [30, 13, 90, 78, 1, 17, 42, 50, 87, 19, 86, 72, 78, 4, 86, 39, 8, 43, 49, 48, 19, 60, 27, 24, 74, 73, 13, 59, 32, 34, 55, 93, 24, 84, 56], [71, 81, 10, 4, 78, 71, 76, 75, 47, 17, 8, 27, 67, 21, 59, 79, 47, 26, 30, 40, 80, 44, 54, 37, 11, 9, 94, 73, 42, 82, 49, 19, 47, 75, 59], [59, 76, 5, 83, 49, 4, 17, 80, 90, 96, 52, 83, 24, 8, 81, 92, 32, 77, 76, 70, 34, 47, 63, 68, 15, 66, 20, 92, 55, 81, 77, 17, 8, 81, 73], [42, 41, 17, 73, 48, 41, 60, 14, 37, 36, 68, 95, 62, 2, 48, 41, 85, 76, 85, 91, 11, 4, 18, 24, 71, 25, 27, 57, 81, 80, 62, 4, 18, 72, 8], [38, 10, 4, 2, 15, 22, 30, 4, 70, 25, 43, 60, 74, 55, 1, 50, 1, 20, 99, 52, 27, 42, 12, 51, 10, 3, 91, 27, 69, 82, 98, 21, 70, 1, 36], [11, 38, 88, 76, 14, 36, 99, 12, 60, 88, 12, 30, 57, 95, 77, 4, 74, 43, 20, 3, 15, 30, 26, 91, 88, 21, 96, 31, 22, 65, 79, 32, 38, 97, 20], [91, 68, 2, 42, 32, 36, 69, 28, 59, 46, 34, 14, 94, 2, 13, 60, 38, 54, 14, 30, 2, 83, 99, 20, 65, 77, 61, 1, 27, 14, 15, 26, 38, 65, 4], [94, 68, 94, 65, 13, 26, 89, 89, 27, 10, 22, 34, 32, 84, 91, 6, 97, 95, 53, 88, 53, 77, 54, 35, 61, 52, 29, 25, 88, 35, 73, 83, 95, 13, 11], [12, 14, 83, 83, 42, 39, 88, 9, 99, 11, 13, 11, 78, 75, 96, 30, 3, 76, 68, 78, 15, 98, 46, 92, 71, 64, 45, 22, 71, 80, 4, 91, 60, 66, 22], [10, 29, 19, 7, 13, 42, 4, 98, 67, 72, 47, 42, 54, 72, 3, 6, 58, 55, 12, 96, 62, 46, 83, 78, 22, 16, 98, 36, 25, 92, 67, 32, 11, 15, 2], [39, 67, 9, 76, 60, 65, 51, 86, 92, 15, 34, 71, 79, 34, 76, 71, 69, 38, 88, 26, 17, 85, 91, 85, 6, 18, 96, 7, 6, 71, 95, 49, 98, 78, 5], [89, 10, 38, 46, 2, 86, 85, 95, 58, 25, 7, 14, 61, 61, 82, 75, 78, 32, 28, 84, 74, 64, 1, 2, 99, 54, 29, 8, 67, 29, 96, 95, 76, 83, 94], [16, 74, 25, 21, 88, 17, 42, 20, 7, 10, 85, 58, 88, 82, 14, 47, 87, 59, 23, 53, 34, 50, 51, 84, 32, 98, 50, 40, 25, 31, 74, 35, 58, 43, 89], [5, 35, 15, 66, 10, 31, 80, 97, 78, 68, 70, 1, 30, 19, 73, 2, 61, 77, 37, 72, 59, 3, 97, 99, 16, 68, 24, 35, 33, 60, 28, 17, 11, 27, 92], [39, 7, 84, 66, 13, 77, 85, 75, 47, 93, 22, 38, 11, 24, 13, 88, 42, 29, 14, 23, 68, 95, 41, 30, 43, 73, 91, 16, 37, 18, 14, 51, 46, 22, 39], [23, 80, 42, 44, 50, 99, 71, 76, 57, 68, 10, 39, 4, 25, 24, 53, 15, 31, 64, 84, 50, 87, 61, 3, 34, 82, 81, 4, 59, 35, 7, 46, 32, 20, 56], [81, 91, 69, 77, 25, 97, 84, 86, 33, 18, 24, 71, 98, 70, 66, 41, 36, 92, 65, 4, 12, 25, 19, 19, 49, 30, 20, 90, 30, 67, 11, 12, 5, 27, 54], [36, 75, 39, 62, 33, 96, 58, 29, 40, 24, 58, 25, 78, 3, 30, 99, 26, 82, 62, 77, 62, 81, 14, 34, 26, 29, 13, 34, 65, 21, 99, 61, 33, 24, 12], [23, 36, 37, 10, 68, 81, 51, 93, 63, 32, 8, 2, 58, 68, 39, 59, 54, 45, 31, 52, 95, 18, 61, 50, 4, 42, 2, 48, 84, 51, 62, 36, 1, 75, 16], [51, 30, 65, 41, 21, 92, 69, 37, 82, 90, 94, 83, 58, 69, 15, 70, 76, 53, 26, 33, 68, 21, 7, 29, 57, 75, 23, 49, 54, 14, 85, 93, 45, 3, 66], [11, 77, 15, 97, 25, 31, 51, 21, 51, 45, 28, 85, 69, 24, 81, 54, 14, 30, 37, 83, 59, 40, 15, 29, 49, 61, 90, 47, 81, 46, 86, 36, 50, 69, 87], [37, 31, 92, 34, 89, 71, 27, 44, 82, 49, 16, 10, 66, 50, 66, 83, 61, 7, 16, 13, 56, 84, 87, 71, 84, 25, 92, 2, 24, 53, 44, 14, 30, 58, 51], [44, 46, 26, 61, 98, 73, 52, 50, 29, 62, 67, 4, 16, 14, 96, 64, 58, 51, 62, 45, 90, 59, 59, 76, 17, 94, 65, 69, 7, 98, 36, 79, 6, 88, 79], [31, 74, 85, 47, 10, 66, 82, 98, 24, 16, 63, 86, 6, 15, 96, 33, 45, 6, 39, 8, 23, 83, 46, 11, 35, 26, 1, 41, 10, 11, 45, 65, 49, 49, 14], [38, 49, 34, 11, 77, 96, 90, 2, 3, 18, 14, 32, 14, 86, 13, 55, 66, 86, 28, 47, 88, 40, 8, 51, 28, 76, 95, 22, 9, 70, 99, 98, 71, 78, 25], [59, 83, 92, 82, 62, 79, 88, 91, 65, 45, 82, 96, 99, 72, 63, 35, 89, 96, 93, 83, 11, 89, 33, 3, 54, 62, 71, 65, 67, 71, 69, 30, 79, 6, 16]], 20, 22", "False" ], [ "[[93, 31, 15, 23, 44, 84, 3, 83, 86, 47, 93], [79, 70, 36, 92, 40, 24, 18, 39, 41, 97, 9], [11, 36, 96, 6, 22, 15, 34, 56, 34, 68, 34], [52, 69, 93, 9, 63, 72, 7, 78, 84, 87, 16], [53, 5, 78, 45, 85, 29, 33, 32, 34, 93, 78], [41, 43, 9, 62, 60, 66, 82, 69, 35, 97, 64], [34, 33, 87, 61, 11, 92, 47, 56, 60, 85, 3], [32, 44, 45, 55, 46, 6, 67, 16, 12, 34, 11], [24, 47, 38, 60, 54, 10, 71, 86, 75, 86, 4], [80, 33, 53, 67, 42, 69, 3, 87, 73, 15, 96], [22, 38, 56, 60, 17, 44, 73, 96, 75, 3, 27]], 10, 8", "False" ], [ "[[65]], 0, 0", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( int a, int b, int c, int d ) { int sum = a * a + b * b + c * c; if ( d * d == sum ) return true; else return false; }
[]
null
[]
COUNT_CHARACTERS_POSITION_ENGLISH_ALPHABETS
python
[]
def f_gold ( str ) : result = 0 for i in range ( len ( str ) ) : if ( ( i == ord ( str [ i ] ) - ord ( 'a' ) ) or ( i == ord ( str [ i ] ) - ord ( 'A' ) ) ) : result += 1 return result
code_translation
[ [ "'lLkhFeZGcb'", "0" ], [ "'ABcED'", "3" ], [ "'geeksforgeeks'", "1" ], [ "'Alphabetical'", "3" ], [ "'abababab'", "2" ], [ "'bcdefgxyz'", "0" ], [ "'cBzaqx L'", "1" ], [ "' bcd'", "3" ], [ "'11'", "0" ], [ "'MqqKY'", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( int x ) { int temp = x; int n = 0; while ( x != 0 ) { x /= 10; n ++; } x = temp; int sum = 0; while ( x != 0 ) { sum += pow ( x % 10, n ); x /= 10; } return ( sum == temp ); }
[]
null
[]
N_TH_TERM_SERIES_2_12_36_80_150
python
[]
def f_gold ( n ) : return ( n * n ) + ( n * n * n )
code_translation
[ [ "90", "737100" ], [ "95", "866400" ], [ "22", "11132" ], [ "29", "25230" ], [ "62", "242172" ], [ "40", "65600" ], [ "52", "143312" ], [ "21", "9702" ], [ "33", "37026" ], [ "11", "1452" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int a [ ], int n, int k ) { int max_so_far = INT_MIN, max_ending_here = 0; for ( int i = 0; i < n * k; i ++ ) { max_ending_here = max_ending_here + a [ i % n ]; if ( max_so_far < max_ending_here ) max_so_far = max_ending_here; if ( max_ending_here < 0 ) max_ending_here = 0; } return max_so_far; }
[]
null
[]
COUNT_STRINGS_ADJACENT_CHARACTERS_DIFFERENCE_ONE
python
[]
def f_gold ( n ) : dp = [ [ 0 for j in range ( 27 ) ] for i in range ( n + 1 ) ] for i in range ( 0 , 26 ) : dp [ 1 ] [ i ] = 1 for i in range ( 2 , n + 1 ) : for j in range ( 0 , 26 ) : 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 ] ) sum = 0 for i in range ( 0 , 26 ) : sum = sum + dp [ n ] [ i ] return sum
code_translation
[ [ "7", "1468" ], [ "47", "1134264891541288" ], [ "72", "31916931064603434989256" ], [ "66", "519857447751054478104" ], [ "71", "16069407891645913779000" ], [ "56", "544505079089235836" ], [ "61", "16822463903082664816" ], [ "68", "2050766577396174819792" ], [ "78", "1960021838122234746086424" ], [ "22", "41103600" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( int arr1 [ ], int arr2 [ ], int m, int n ) { int i = 0; int j = 0; for ( i = 0; i < n; i ++ ) { for ( j = 0; j < m; j ++ ) { if ( arr2 [ i ] == arr1 [ j ] ) break; } if ( j == m ) return 0; } return 1; }
[]
null
[]
DIVISIBILITY_BY_7
python
[]
def f_gold ( num ) : if num < 0 : return f_gold ( - num ) if ( num == 0 or num == 7 ) : return True if ( num < 10 ) : return False return f_gold ( num / 10 - 2 * ( num - num / 10 * 10 ) )
code_translation
[ [ "0", "True" ], [ "-21", "False" ], [ "7", "True" ], [ "63", "False" ], [ "84", "False" ], [ "73", "False" ], [ "81", "False" ], [ "-10", "False" ], [ "47", "False" ], [ "23", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n, int sum ) { unordered_map < int, int > prevSum; int res = 0; int currsum = 0; for ( int i = 0; i < n; i ++ ) { currsum += arr [ i ]; if ( currsum == sum ) res ++; if ( prevSum . find ( currsum - sum ) != prevSum . end ( ) ) res += ( prevSum [ currsum - sum ] ); prevSum [ currsum ] ++; } return res; }
[]
null
[]
MODULUS_TWO_FLOAT_DOUBLE_NUMBERS
python
[]
def f_gold ( a , b ) : if ( a < 0 ) : a = - a if ( b < 0 ) : b = - b mod = a while ( mod >= b ) : mod = mod - b if ( a < 0 ) : return - mod return mod
code_translation
[ [ "3243.229719038493, 5659.926861939672", "3243.229719038493" ], [ "-4362.665881044217, -9196.507113304497", "4362.665881044217" ], [ "7255.066257575837, 2623.200060506935", "2008.6661365619666" ], [ "-6929.554320261099, -3009.0234530313287", "911.5074141984414" ], [ "3569.942027998315, 6920.809419868375", "3569.942027998315" ], [ "-6513.849053096595, -70.95992406437102", "56.49596323882673" ], [ "7333.183189243961, 580.3500610971768", "368.98245607783906" ], [ "-2856.1752826258803, -9625.97442825802", "2856.1752826258803" ], [ "9787.228111241662, 2419.6844962423256", "108.4901262723597" ], [ "-1722.873699288031, -8370.700544254058", "1722.873699288031" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { int high = 0; for ( int i = 0; i < n; i ++ ) high = max ( high, arr [ i ] ); int divisors [ high + 1 ] = { 0 }; for ( int i = 0; i < n; i ++ ) { for ( int j = 1; j <= sqrt ( arr [ i ] ); j ++ ) { if ( arr [ i ] % j == 0 ) { divisors [ j ] ++; if ( j != arr [ i ] / j ) divisors [ arr [ i ] / j ] ++; } } } for ( int i = high; i >= 1; i -- ) if ( divisors [ i ] > 1 ) return i; }
[]
null
[]
FIND_THREE_ELEMENT_FROM_DIFFERENT_THREE_ARRAYS_SUCH_THAT_THAT_A_B_C_K
python
[]
def f_gold ( a1 , a2 , a3 , n1 , n2 , n3 , sum ) : for i in range ( 0 , n1 ) : for j in range ( 0 , n2 ) : for k in range ( 0 , n3 ) : if ( a1 [ i ] + a2 [ j ] + a3 [ k ] == sum ) : return True return False
code_translation
[ [ "[4, 9, 10, 19, 24, 25, 26, 30, 36, 43, 44, 49, 52, 62, 66, 69, 72, 77, 80, 80, 82, 84, 90, 93, 94, 98], [4, 8, 17, 20, 22, 25, 27, 30, 31, 33, 35, 35, 38, 41, 49, 51, 60, 61, 66, 67, 69, 82, 84, 85, 86, 88], [12, 14, 17, 20, 22, 27, 29, 31, 32, 38, 41, 43, 56, 59, 59, 64, 66, 67, 68, 69, 71, 76, 83, 83, 85, 99], 25, 18, 16, 222", "False" ], [ "[-24, -80, -72, 80, -96, -94, 64, 18, 12, 16, 74, 16, 54, 66, -96, -90, 54, 72, -32, -2, 90, -18, -98, 12, -42, -30, -82, -56, -86, 40], [30, -60, -24, 18, 40, 44, -40, 62, 66, -38, 50, -74, -42, -86, -82, -8, 50, -72, -2, -48, -38, -20, -8, 56, -32, 68, 94, 80, -48, 0], [-24, 80, 50, -56, -92, 20, 86, -42, -30, 96, 40, -32, -64, 54, -38, -72, -70, 54, -28, 98, 60, 98, -12, -30, -30, 68, -66, 68, -58, 52], 26, 22, 20, 21", "False" ], [ "[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 14, 14, 14, 2", "True" ], [ "[28, 15, 21, 28, 85, 68, 24], [57, 46, 47, 49, 16, 81, 60], [76, 49, 6, 44, 71, 24, 57], 6, 5, 5, 73", "True" ], [ "[-86, -82, -66, -44, -44, -38, -22, -6, -2, 14, 26, 40, 54, 58, 60, 66, 72, 80, 94, 96, 98], [-96, -86, -74, -56, -52, -42, -32, -22, -16, -10, -4, -4, 10, 42, 48, 52, 58, 62, 84, 90, 96], [-92, -92, -90, -82, -62, -44, -42, -40, -38, -36, -22, -20, -8, 12, 22, 26, 30, 44, 54, 64, 86], 13, 20, 17, 6", "True" ], [ "[1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0], 25, 25, 23, 0", "True" ], [ "[44, 53, 85, 85, 86, 88, 93], [4, 5, 8, 15, 29, 40, 91], [30, 53, 71, 75, 76, 82, 84], 5, 3, 4, 3", "False" ], [ "[70, -38, 62, -34, 74, -32, -58, -34, -54], [48, -86, -18, 14, 88, 92, -56, -8, -74], [8, 8, 32, 76, 76, 94, 22, -60, -42], 6, 6, 6, 7", "False" ], [ "[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, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 15, 14, 10, 13", "False" ], [ "[41, 64, 39, 96, 54, 54, 57, 4, 82, 43, 44, 56, 1], [44, 58, 40, 87, 22, 82, 8, 81, 88, 42, 15, 14, 81], [64, 20, 24, 42, 37, 46, 6, 47, 12, 93, 8, 5, 11], 7, 8, 6, 10", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n, greater < int > ( ) ); int dimension [ 2 ] = { 0, 0 }; for ( int i = 0, j = 0; i < n - 1 && j < 2; i ++ ) if ( arr [ i ] == arr [ i + 1 ] ) dimension [ j ++ ] = arr [ i ++ ]; return ( dimension [ 0 ] * dimension [ 1 ] ); }
[ "import math" ]
null
[]
FIND_UNIT_DIGIT_X_RAISED_POWER_Y_1
python
[]
import math def f_gold ( x , y ) : x = x % 10 if y != 0 : y = y % 4 + 4 return ( ( ( int ) ( math.pow ( x , y ) ) ) % 10 )
code_translation
[ [ "37, 17", "7" ], [ "70, 52", "0" ], [ "26, 23", "6" ], [ "9, 96", "1" ], [ "82, 71", "8" ], [ "95, 36", "5" ], [ "43, 40", "1" ], [ "7, 27", "3" ], [ "19, 56", "1" ], [ "49, 28", "1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { int neg = 0, pos = 0; int sum = 0; for ( int i = 0; i < n; i ++ ) { sum += arr [ i ]; if ( arr [ i ] < 0 ) neg ++; else pos ++; } return ( sum / abs ( neg - pos ) ); }
[]
null
[]
MAXIMUM_NUMBER_2X2_SQUARES_CAN_FIT_INSIDE_RIGHT_ISOSCELES_TRIANGLE
python
[]
def f_gold ( base ) : base = ( base - 2 ) base = base / 2 return base * ( base + 1 ) / 2
code_translation
[ [ "95", "1104.375" ], [ "49", "287.875" ], [ "10", "10.0" ], [ "73", "647.875" ], [ "74", "666.0" ], [ "40", "190.0" ], [ "10", "10.0" ], [ "94", "1081.0" ], [ "64", "496.0" ], [ "16", "28.0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int count = 0; for ( int curr = 1; ; curr ++ ) { int sum = 0; for ( int x = curr; x > 0; x = x / 10 ) sum = sum + x % 10; if ( sum == 10 ) count ++; if ( count == n ) return curr; } return - 1; }
[]
null
[]
PRIMALITY_TEST_SET_5USING_LUCAS_LEHMER_SERIES
python
[]
def f_gold ( p ) : checkNumber = 2 ** p - 1 nextval = 4 % checkNumber for i in range ( 1 , p - 1 ) : nextval = ( nextval * nextval - 2 ) % checkNumber if ( nextval == 0 ) : return True else : return False
code_translation
[ [ "11", "False" ], [ "27", "False" ], [ "31", "True" ], [ "47", "False" ], [ "3", "True" ], [ "14", "False" ], [ "41", "False" ], [ "72", "False" ], [ "39", "False" ], [ "22", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1
python
[]
def f_gold ( m , n ) : T = [ [ 0 for i in range ( n + 1 ) ] for i in range ( m + 1 ) ] for i in range ( m + 1 ) : for j in range ( n + 1 ) : if i == 0 or j == 0 : T [ i ] [ j ] = 0 elif i < j : T [ i ] [ j ] = 0 elif j == 1 : T [ i ] [ j ] = i else : T [ i ] [ j ] = T [ i - 1 ] [ j ] + T [ i // 2 ] [ j - 1 ] return T [ m ] [ n ]
code_translation
[ [ "10, 4", "4" ], [ "5, 2", "6" ], [ "2, 8", "0" ], [ "83, 7", "330" ], [ "91, 0", "0" ], [ "18, 53", "0" ], [ "83, 41", "0" ], [ "98, 53", "0" ], [ "43, 37", "0" ], [ "31, 20", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
MEDIAN_OF_TWO_SORTED_ARRAYS
python
[]
def f_gold ( ar1 , ar2 , n ) : i = 0 j = 0 m1 = - 1 m2 = - 1 count = 0 while count < n + 1 : count += 1 if i == n : m1 = m2 m2 = ar2 [ 0 ] break elif j == n : m1 = m2 m2 = ar1 [ 0 ] break if ar1 [ i ] < ar2 [ j ] : m1 = m2 m2 = ar1 [ i ] i += 1 else : m1 = m2 m2 = ar2 [ j ] j += 1 return ( m1 + m2 ) / 2
code_translation
[ [ "[2, 6, 18, 21, 23, 27, 44, 44, 69, 72, 78, 88, 90, 98], [6, 12, 16, 18, 26, 34, 48, 48, 49, 56, 61, 79, 81, 89], 12", "39.0" ], [ "[90, 54, 24, -10, -84, -74, 58, 96, -28, -92, -18, 90, 70, -60, 72, 78, 10, 42, -2, -18, -38, -16, 18, -86, 40, -46, -38, 66, 20, -16, 48], [-72, -62, 14, -58, 70, 54, 88, -40, -94, 4, 60, -16, -38, -98, -70, -46, 66, 42, 26, 36, 56, -4, 32, 30, -46, -42, -72, 44, 16, 4, 24], 16", "22.0" ], [ "[0, 1, 1], [0, 1, 1], 2", "0.5" ], [ "[53, 17, 94, 21, 16, 75, 67, 51, 44, 71, 65, 82], [98, 50, 8, 11, 80, 41, 59, 24, 94, 41, 75, 78], 10", "84.5" ], [ "[-96, -92, -80, -68, -64, -64, -60, -56, -52, -50, -50, -22, -20, -4, -2, 0, 6, 20, 22, 28, 38, 40, 48, 50, 56, 58, 64, 64, 80, 82, 90, 92, 92, 92], [-88, -72, -72, -58, -54, -50, -48, -34, -24, -14, -14, -14, -10, -6, 4, 12, 16, 18, 26, 30, 32, 34, 40, 46, 52, 54, 58, 62, 62, 72, 82, 82, 92, 98], 25", "-12.0" ], [ "[0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1], 40", "0.5" ], [ "[8, 15, 17, 19, 21, 32, 34, 38, 41, 41, 49, 49, 51, 54, 54, 56, 56, 57, 59, 63, 70, 74, 79, 79, 84, 84, 86, 88, 89, 93, 98], [5, 6, 17, 18, 22, 29, 32, 33, 36, 44, 45, 47, 59, 59, 60, 65, 67, 68, 69, 71, 72, 76, 78, 81, 84, 85, 85, 86, 86, 87, 92], 29", "56.5" ], [ "[96, -42, -94, -46, -68, 76, 8, 16, -54, -94, 76, 24, 94, 10, 34, 78, -30, 0, -52, 80, 98, -58, 92, 12, 26, 64], [88, 78, -26, 10, 84, 34, 56, -8, -30, 46, 48, 20, 26, -78, 96, 44, 92, -44, -86, 24, -58, -96, -86, -12, -98, 18], 17", "94.0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 17", "0.0" ], [ "[61, 69, 66, 3], [39, 84, 97, 15], 3", "67.5" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
STEINS_ALGORITHM_FOR_FINDING_GCD_1
python
[]
def f_gold ( a , b ) : if ( a == b ) : return a if ( a == 0 ) : return b if ( b == 0 ) : return a if ( ( ~ a & 1 ) == 1 ) : if ( ( b & 1 ) == 1 ) : return f_gold ( a >> 1 , b ) else : return ( f_gold ( a >> 1 , b >> 1 ) << 1 ) if ( ( ~ b & 1 ) == 1 ) : return f_gold ( a , b >> 1 ) if ( a > b ) : return f_gold ( ( a - b ) >> 1 , b ) return f_gold ( ( b - a ) >> 1 , a )
code_translation
[ [ "52, 29", "1" ], [ "36, 94", "2" ], [ "12, 6", "6" ], [ "69, 7", "1" ], [ "45, 11", "1" ], [ "7, 51", "1" ], [ "45, 55", "5" ], [ "62, 86", "2" ], [ "96, 63", "3" ], [ "89, 12", "1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int answer [ n + 1 ] = { 0 }; answer [ 0 ] = 1; for ( int i = 1; i <= n; i ++ ) answer [ i ] = answer [ i - 1 ] * 3 + 2; return answer [ n ]; }
[]
null
[]
GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM
python
[]
def f_gold ( arr , n , x ) : for i in range ( 0 , n - 1 ) : if ( arr [ i ] > arr [ i + 1 ] ) : break ; l = ( i + 1 ) % n 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 ;
code_translation
[ [ "[3, 8, 10, 15, 18, 19, 20, 20, 21, 22, 26, 30, 32, 34, 43, 45, 50, 50, 51, 52, 53, 56, 57, 58, 62, 63, 65, 82, 86, 91, 91, 92, 92, 93, 97], 17, 30", "False" ], [ "[30, -34, 86, -30, -26, 2, 90, 8, 26, -8, -8, 0, -86, 68, 22, 72, -76, 48, -24, 90, -22, -58, -54, 90, -12, -12, 88, 72, -58, 68, 84, 22, 60, 66, -52, -38, -90, 62, 30, -26, 88, -36, 92, 32, -32, -42, -90, -40, -10], 41, 10", "False" ], [ "[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], 26, 1", "True" ], [ "[20, 68, 40, 19, 74, 69], 4, 88", "False" ], [ "[-98, -94, -94, -94, -90, -88, -88, -78, -74, -70, -68, -66, -64, -62, -54, -50, -40, -40, -40, -40, -28, -22, -22, -18, -14, -12, 0, 6, 6, 8, 12, 20, 22, 26, 28, 36, 42, 44, 48, 52, 56, 60, 68, 84], 28, 94", "False" ], [ "[1, 1, 0], 2, 60", "False" ], [ "[12, 22, 38, 76, 80, 86], 4, 3", "False" ], [ "[-36, -10, -26, 34, -50, 66, -2, -14, -62, 60, -48, 94, -70, 6, -60, -90, 28, -4, -20, -52, 40, -76, -92, -14, 54, 4, -58, 38, -74, -96, -88, 86, -54, 98, 48, 68, 78, -28, -80, -46], 26, 37", "False" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 17, 20", "False" ], [ "[69, 99, 25, 52, 41, 51, 7, 33, 42, 91, 85, 57, 91, 89, 86, 11, 70, 67, 30, 92, 81, 23, 51, 98, 85, 5, 50, 44], 21, 27", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int price [ ], int n, int k ) { int profit [ k + 1 ] [ n + 1 ]; for ( int i = 0; i <= k; i ++ ) profit [ i ] [ 0 ] = 0; for ( int j = 0; j <= n; j ++ ) profit [ 0 ] [ j ] = 0; for ( int i = 1; i <= k; i ++ ) { int prevDiff = INT_MIN; for ( int j = 1; j < n; j ++ ) { prevDiff = max ( prevDiff, profit [ i - 1 ] [ j - 1 ] - price [ j - 1 ] ); profit [ i ] [ j ] = max ( profit [ i ] [ j - 1 ], price [ j ] + prevDiff ); } } return profit [ k ] [ n - 1 ]; }
[ "import math" ]
null
[]
CIRCLE_LATTICE_POINTS
python
[]
import math def f_gold ( r ) : if ( r <= 0 ) : return 0 result = 4 for x in range ( 1 , r ) : ySquare = r * r - x * x y = int ( math.sqrt ( ySquare ) ) if ( y * y == ySquare ) : result += 4 return result
code_translation
[ [ "34", "12" ], [ "56", "4" ], [ "90", "12" ], [ "47", "4" ], [ "36", "4" ], [ "63", "4" ], [ "21", "4" ], [ "76", "4" ], [ "18", "4" ], [ "75", "20" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > vis; for ( int i = 0; i < n; ++ i ) vis [ arr [ i ] ] = 1; int k = vis . size ( ); vis . clear ( ); int ans = 0, right = 0, window = 0; for ( int left = 0; left < n; ++ left ) { while ( right < n && window < k ) { ++ vis [ arr [ right ] ]; if ( vis [ arr [ right ] ] == 1 ) ++ window; ++ right; } if ( window == k ) ans += ( n - right + 1 ); -- vis [ arr [ left ] ]; if ( vis [ arr [ left ] ] == 0 ) -- window; } return ans; }
[]
null
[]
LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_1
python
[]
def f_gold ( arr , n ) : hash_map = { } ; curr_sum = 0 ; max_len = 0 ; ending_index = - 1 ; for i in range ( 0 , n ) : if ( arr [ i ] == 0 ) : arr [ i ] = - 1 ; else : arr [ i ] = 1 ; for i in range ( 0 , n ) : curr_sum = curr_sum + arr [ i ] ; if ( curr_sum == 0 ) : max_len = i + 1 ; ending_index = i ; if ( curr_sum + n ) in hash_map : max_len = max ( max_len , i - hash_map [ curr_sum + n ] ) else : hash_map [ curr_sum ] = i ; for i in range ( 0 , n ) : if ( arr [ i ] == - 1 ) : arr [ i ] = 0 ; else : arr [ i ] = 1 ; print ( ending_index - max_len + 1 , end = " " ) ; print ( "to" , end = " " ) ; print ( ending_index ) ; return max_len ;
code_translation
[ [ "[1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 60, 66, 69, 70, 70, 73, 74, 80, 99], 9", "0" ], [ "[1, -66], 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], 19", "0" ], [ "[1, 1, 1, 1, 1, 1, 1, 1, 26, 44, 32], 8", "0" ], [ "[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 74, 86, 92, 94], 34", "0" ], [ "[1, 1, 1, 1, 1, 1, 0, 0, 0], 4", "0" ], [ "[1, 64, 86], 1", "0" ], [ "[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -68, 12, -44, 62, 60, -34, -52, 18], 17", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], 9", "0" ], [ "[1, 1, 1, 1, 1, 1, 1, 1, 53], 8", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { return accumulate ( arr, arr + n, 0 ) - ( ( n - 1 ) * n / 2 ); }
[]
null
[]
MAXIMUM_AVERAGE_SUM_PARTITION_ARRAY
python
[]
def f_gold ( A , K ) : n = len ( A ) ; pre_sum = [ 0 ] * ( n + 1 ) ; pre_sum [ 0 ] = 0 ; for i in range ( n ) : pre_sum [ i + 1 ] = pre_sum [ i ] + A [ i ] ; dp = [ 0 ] * n ; sum = 0 ; for i in range ( n ) : dp [ i ] = ( pre_sum [ n ] - pre_sum [ i ] ) / ( n - i ) ; for k in range ( K - 1 ) : for i in range ( n ) : for j in range ( i + 1 , n ) : dp [ i ] = max ( dp [ i ] , ( pre_sum [ j ] - pre_sum [ i ] ) / ( j - i ) + dp [ j ] ) ; return int ( dp [ 0 ] ) ;
code_translation
[ [ "[4, 11, 14, 27, 32, 37, 39, 49, 52, 53, 57, 62, 67, 67, 68, 69, 76, 77, 78, 81, 85, 85, 87, 91, 91, 91, 99, 99, 99], 24", "1742" ], [ "[80, 12, 32, 44, 24, 82, -40, 42, 26, 36, 58, 52, -34, 44, 12, -18, -72, 52, 2, -8, 22, -18, 98, -60, 62, 92, -46, 20, 20, -46, 52, 94, 0, -28, -22, 80, 26, -92, -50, 48, -80], 26", "856" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 15", "11" ], [ "[32, 16, 67, 53, 99, 56, 80, 92, 84, 21, 36, 46, 94, 31, 63, 67, 59, 88, 41, 17, 74, 47, 95, 12, 27, 99, 32, 4, 82, 31, 65, 40, 93, 72, 23, 33, 93, 9, 62, 47], 36", "2092" ], [ "[-92, -86, -80, -78, -72, -70, -70, -68, -66, -62, -60, -54, -54, -52, -52, -40, -36, -32, -28, -26, -22, -22, -20, -16, -16, -8, 0, 6, 8, 10, 14, 18, 20, 42, 46, 52, 60, 66, 68, 70, 74, 86, 88, 88, 92, 94, 98], 36", "1052" ], [ "[1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0], 16", "10" ], [ "[1, 1, 3, 3, 6, 7, 10, 11, 12, 13, 16, 16, 22, 23, 24, 27, 28, 30, 30, 30, 31, 33, 35, 35, 39, 40, 41, 52, 52, 58, 59, 60, 61, 61, 66, 66, 71, 73, 74, 75, 75, 76, 80, 83, 85, 95, 96, 97, 97], 34", "1996" ], [ "[28, -52, 48, 96, 54, 94, 60, 18], 7", "358" ], [ "[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], 31", "22" ], [ "[26, 80, 12, 87, 90, 98, 46, 91, 38, 46, 20, 64, 53, 4, 60, 87, 44, 88, 22, 30], 19", "1060" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int m, int n ) { if ( m < n ) return 0; if ( n == 0 ) return 1; return f_gold ( m - 1, n ) + f_gold ( m / 2, n - 1 ); }
[]
null
[]
FRIENDS_PAIRING_PROBLEM_2
python
[]
def f_gold ( n ) : a , b , c = 1 , 2 , 0 ; if ( n <= 2 ) : return n ; for i in range ( 3 , n + 1 ) : c = b + ( i - 1 ) * a ; a = b ; b = c ; return c ;
code_translation
[ [ "24", "17492190577600" ], [ "1", "1" ], [ "91", "18723846887829931303684501424840972787050559847800270957087312926249844736" ], [ "90", "1867720278882863552220974741341446038725782674583207163689731410452545536" ], [ "89", "187290295654967419460705852038883630536941968591300708815528683508858880" ], [ "29", "101990226254706560" ], [ "3", "4" ], [ "60", "27287539950459819893102799433172013791543296" ], [ "75", "3503996813308558782507146826867285964030021884205755006976" ], [ "14", "2390480" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { unordered_set < int > s; int first = 0, second = 0; for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) == s . end ( ) ) { s . insert ( arr [ i ] ); continue; } if ( arr [ i ] > first ) { second = first; first = arr [ i ]; } else if ( arr [ i ] > second ) second = arr [ i ]; } return ( first * second ); }
[]
null
[]
MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K
python
[]
def f_gold ( a , n , k ) : result = 0 for i in range ( n ) : if ( a [ i ] != 1 and a [ i ] > k ) : result = ( result + min ( a [ i ] % k , k - a [ i ] % k ) ) else : result = result + k - a [ i ] return result
code_translation
[ [ "[3, 7, 27, 32, 36, 37, 44, 48, 50, 64, 86], 5, 10", "19" ], [ "[-22, 6, -20, 60, -74, 98, 52, -22], 5, 4", "130" ], [ "[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], 23, 29", "661" ], [ "[77, 11, 51, 11, 84, 79, 43, 12, 14, 50, 15, 6, 85, 32, 74, 49, 7, 2, 58], 9, 17", "43" ], [ "[-90, -66, -64, -58, -46, -44, -32, -30, -30, -22, -18, -14, 12, 12, 18, 34, 44, 60, 70, 70, 74, 76, 86, 98, 98], 12, 22", "778" ], [ "[1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1], 36, 31", "1096" ], [ "[9, 22, 27, 27, 37, 53, 53, 56, 63, 73, 76, 81, 82], 10, 11", "28" ], [ "[-46, 60, 80, 80, 42, -98, 30, -48, 4, -32, -78, 40, 52, 26, 88, 4, 22, 62, 88, -94, 2, 0, 58, 38, 52, -50, -52, 58, -62, 30, -38, -8, -82, -66], 18, 19", "479" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 19, 22", "413" ], [ "[42, 69, 93, 82, 8, 23, 73, 1, 77, 39, 49, 4, 95, 85], 12, 13", "51" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int N, int insert, int remove, int copy ) { if ( N == 0 ) return 0; if ( N == 1 ) return insert; int dp [ N + 1 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 1; i <= N; i ++ ) { if ( i % 2 == 0 ) dp [ i ] = min ( dp [ i - 1 ] + insert, dp [ i / 2 ] + copy ); else dp [ i ] = min ( dp [ i - 1 ] + insert, dp [ ( i + 1 ) / 2 ] + copy + remove ); } return dp [ N ]; }
[]
null
[]
COUNT_PALINDROME_SUB_STRINGS_STRING
python
[]
def f_gold ( str , n ) : dp = [ [ 0 for x in range ( n ) ] for y in range ( n ) ] P = [ [ False for x in range ( n ) ] for y in range ( n ) ] for i in range ( n ) : P [ i ] [ i ] = True for i in range ( n - 1 ) : if ( str [ i ] == str [ i + 1 ] ) : P [ i ] [ i + 1 ] = True dp [ i ] [ i + 1 ] = 1 for gap in range ( 2 , n ) : for i in range ( n - gap ) : j = gap + i ; if ( str [ i ] == str [ j ] and 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 ]
code_translation
[ [ "['E', 'E', 'J', 'P', 'T', 'U', 'X', 'Y', 'Z', 'e', 'f', 'h', 'l', 'm', 'n', 'o', 'z'], 11", "1" ], [ "['8', '7', '3', '4', '9', '5', '3', '1', '4', '0', '6', '8', '2', '5', '8', '3', '5', '2', '8', '6', '6', '3', '5', '7', '5', '5', '3', '7'], 27", "3" ], [ "['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'], 23", "211" ], [ "['f', 'E', 'e', 'z', 'B', 'o', 'i', 'v', 'K', 'u', 'P', 'C', 'z', 'f', 'k', 'J', 't', 'R', 't', 'A', 'f', 'G', 'D', 'X', 'H', 'e', 'p', 'l', 'l', 'k', 'Z', 'Y', 'u', 'g', 'H', 'C', 'f', 'J', 'H', 'W'], 27", "1" ], [ "['0', '0', '0', '1', '1', '1', '1', '1', '1', '2', '2', '2', '3', '3', '3', '3', '3', '4', '4', '4', '4', '4', '4', '5', '5', '5', '5', '6', '6', '7', '7', '9', '9', '9', '9', '9', '9'], 35", "60" ], [ "['1', '0', '1', '1', '0', '0', '1', '1', '1', '0', '1', '0', '1', '1', '0', '1', '0', '1', '1', '1', '1', '1', '0', '1', '1', '0', '1', '0', '1', '1', '0', '0', '1', '0', '1', '0', '0', '0', '0', '0', '1', '1', '0', '1', '0', '1'], 43", "72" ], [ "['C', 'C', 'D', 'F', 'L', 'M', 'P', 'X', 'a', 'f', 'i', 'j', 'w'], 9", "1" ], [ "['7', '9', '0', '2', '8', '0', '7', '5', '9', '4', '5', '4', '8', '1', '9', '5', '3', '2', '4', '1', '2'], 16", "1" ], [ "['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], 32", "289" ], [ "['m', 'X', 'N', 'M'], 3", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( int arr [ ], int N ) { if ( N < 3 ) return false; sort ( arr, arr + N ); for ( int i = 0; i < N - 2; i ++ ) if ( arr [ i ] + arr [ i + 1 ] > arr [ i + 2 ] ) return true; }
[]
null
[]
MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS
python
[]
def f_gold ( a , b , c ) : if ( ( a < b and b < c ) or ( c < b and b < a ) ) : return b ; if ( ( b < a and a < c ) or ( c < a and a < b ) ) : return a ; else : return c
code_translation
[ [ "56, 5, 82", "56" ], [ "56, 60, 17", "56" ], [ "36, 56, 51", "51" ], [ "71, 54, 6", "54" ], [ "3, 70, 81", "70" ], [ "84, 57, 47", "57" ], [ "30, 80, 85", "80" ], [ "82, 54, 32", "54" ], [ "90, 70, 55", "70" ], [ "38, 4, 5", "5" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; string f_gold ( string s ) { int n = s . length ( ); s [ 0 ] = tolower ( s [ 0 ] ); for ( int i = 1; i < n; i ++ ) { if ( s [ i ] == ' ' && i < n ) { s [ i + 1 ] = tolower ( s [ i + 1 ] ); i ++; } else s [ i ] = toupper ( s [ i ] ); } return s; }
[]
null
[]
SWAP_TWO_NIBBLES_BYTE
python
[]
def f_gold ( x ) : return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 )
code_translation
[ [ "57", "147" ], [ "99", "54" ], [ "66", "36" ], [ "97", "22" ], [ "95", "245" ], [ "42", "162" ], [ "95", "245" ], [ "89", "149" ], [ "3", "48" ], [ "84", "69" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( string n ) { string num = n; int dec_value = 0; int base = 1; int len = num . length ( ); for ( int i = len - 1; i >= 0; i -- ) { if ( num [ i ] == '1' ) dec_value += base; base = base * 2; } return dec_value; }
[]
null
[]
SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_1
python
[]
def f_gold ( n ) : ans = 0 ; temp = 0 ; for i in range ( 1 , n + 1 ) : if temp < n : temp = i - 1 num = 1 while temp < n : if temp + i <= n : ans += i * num else : ans += ( n - temp ) * num temp += i num += 1 return ans
code_translation
[ [ "35", "630" ], [ "93", "4371" ], [ "7", "28" ], [ "81", "3321" ], [ "80", "3240" ], [ "47", "1128" ], [ "7", "28" ], [ "41", "861" ], [ "59", "1770" ], [ "34", "595" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int a [ ], int n ) { return ( n - 1 ) * ( * min_element ( a, a + n ) ); }
[]
null
[]
SUM_FIBONACCI_NUMBERS
python
[]
def f_gold ( n ) : if ( n <= 0 ) : return 0 fibo = [ 0 ] * ( n + 1 ) fibo [ 1 ] = 1 sm = fibo [ 0 ] + fibo [ 1 ] for i in range ( 2 , n + 1 ) : fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ] sm = sm + fibo [ i ] return sm
code_translation
[ [ "9", "88" ], [ "50", "32951280098" ], [ "7", "33" ], [ "21", "28656" ], [ "21", "28656" ], [ "91", "12200160415121876737" ], [ "11", "232" ], [ "25", "196417" ], [ "62", "10610209857722" ], [ "4", "7" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; long long f_gold ( long long a, long long b, long long mod ) { long long res = 0; a %= mod; while ( b ) { if ( b & 1 ) res = ( res + a ) % mod; a = ( 2 * a ) % mod; b >>= 1; } return res; }
[]
null
[]
LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS
python
[]
def f_gold ( arr1 , n , arr2 , m ) : table = [ 0 ] * m for j in range ( m ) : table [ j ] = 0 for i in range ( n ) : current = 0 for j in range ( m ) : 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 ] result = 0 for i in range ( m ) : if ( table [ i ] > result ) : result = table [ i ] return result
code_translation
[ [ "[1, 7, 9, 35, 43, 51, 51, 66, 88], 5, [10, 21, 38, 50, 65, 67, 87, 93, 99], 8", "0" ], [ "[-52, 52, -92, -46, -94, 30, -36, 18, -98, 22, -36, 96, -88, -50, 50], 7, [-58, 40, 56, -62, -92, -94, 40, 18, -2, -76, -78, -14, 44, 84, 4], 10", "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], 36, [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], 22", "2" ], [ "[5, 74, 29], 1, [57, 33, 48], 1", "0" ], [ "[-84, -74, -70, -62, -56, -56, -52, -2, 6, 24, 28, 44, 44, 52], 8, [-98, -96, -88, -66, -32, -26, -24, -20, -4, 20, 48, 74, 90, 96], 12", "0" ], [ "[0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0], 17, [1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0], 15", "2" ], [ "[3, 4, 4, 7, 15, 15, 16, 22, 32, 32, 37, 39, 39, 41, 43, 46, 47, 47, 49, 75, 79, 80, 86, 88, 93], 19, [9, 12, 15, 20, 22, 27, 28, 28, 30, 31, 35, 39, 47, 58, 58, 60, 73, 74, 76, 78, 80, 86, 95, 96, 98], 14", "4" ], [ "[70, -64, 0, 52, 32, -98, 38, -8, 34, 70, 98, 58, -48, -60, -28, -22, -72, 82, -98, -36], 16, [-18, 88, -40, -52, 30, -10, -18, -56, 84, -22, -64, 80, -14, -64, 40, 92, 48, -8, 24, 82], 12", "1" ], [ "[0, 0, 1, 1, 1, 1, 1, 1], 7, [0, 1, 1, 1, 1, 1, 1, 1], 7", "2" ], [ "[46, 87, 98], 2, [67, 31, 54], 2", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int C, int l ) { if ( l >= C ) return C; double eq_root = ( std :: sqrt ( 1 + 8 * ( C - l ) ) - 1 ) / 2; return std :: ceil ( eq_root ) + l; }
[]
null
[]
FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_1
python
[]
def f_gold ( arr , low , high ) : if ( high < low ) : return 0 if ( high == low ) : return low mid = low + ( high - low ) / 2 ; mid = int ( mid ) if ( mid < high and arr [ mid + 1 ] < arr [ mid ] ) : return ( mid + 1 ) if ( mid > low and 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 )
code_translation
[ [ "[4, 16, 38, 39, 48, 74, 79], 6, 6", "6" ], [ "[-46, 72, 72, -66, 96, 92, 40, 8, 94, -84, 6, -90, 38, -6, 48, -20, -86, -76, 88, -50, -44, -14, 54, -6, -2, 72, 8, -64, -46, 44, -88, 50, 86, 38, 42, -56], 32, 21", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 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], 16, 29", "29" ], [ "[48, 74, 59, 57, 95, 11, 25, 61, 46, 54, 34, 84, 7, 97, 62, 57, 99, 93, 76, 5, 76, 93, 35, 84, 37, 60, 65, 16, 30, 73, 42, 61, 74, 77, 48, 62, 84, 93, 64, 57, 68, 46, 28, 77], 24, 26", "24" ], [ "[-72, -68, -66, -66, -62, -62, -52, -48, -42, -42, -42, -38, -30, -22, -20, -20, -16, -16, -14, 0, 2, 2, 2, 4, 12, 20, 22, 26, 32, 34, 46, 46, 64, 64, 64, 66, 68, 68, 68, 74, 80, 84, 84, 88, 88, 90, 96, 98], 29, 43", "31" ], [ "[1], 0, 0", "0" ], [ "[7, 11, 20, 21, 22, 27, 30, 30, 34, 35, 36, 37, 38, 60, 61, 63, 63, 69, 70, 75, 80, 84, 88, 97], 23, 22", "0" ], [ "[-2, 70, -40], 2, 1", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 30, 17", "0" ], [ "[71, 71, 27, 10, 97, 43, 55, 71, 6, 6, 77, 48, 77, 2, 83, 51, 61, 19, 2, 51, 26, 70, 20, 23, 54, 15, 6, 92, 35, 75, 8, 57, 50, 49, 88, 21, 36], 24, 22", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int process, int need ) { int minResources = 0; minResources = process * ( need - 1 ) + 1; return minResources; }
[]
null
[]
LENGTH_OF_THE_LONGEST_ARITHMATIC_PROGRESSION_IN_A_SORTED_ARRAY
python
[]
def f_gold ( set , n ) : if ( n <= 2 ) : return n L = [ [ 0 for x in range ( n ) ] for y in range ( n ) ] llap = 2 for i in range ( n ) : L [ i ] [ n - 1 ] = 2 for j in range ( n - 2 , 0 , - 1 ) : i = j - 1 k = j + 1 while ( i >= 0 and k <= n - 1 ) : if ( set [ i ] + set [ k ] < 2 * set [ j ] ) : k += 1 elif ( set [ i ] + set [ k ] > 2 * set [ j ] ) : L [ i ] [ j ] = 2 i -= 1 else : L [ i ] [ j ] = L [ j ] [ k ] + 1 llap = max ( llap , L [ i ] [ j ] ) i -= 1 k += 1 while ( i >= 0 ) : L [ i ] [ j ] = 2 i -= 1 return llap
code_translation
[ [ "[3, 4, 4, 7, 8, 19, 21, 22, 25, 27, 28, 29, 38, 40, 41, 42, 43, 46, 50, 50, 53, 53, 54, 55, 60, 64, 64, 69, 70, 75, 77, 81, 81, 82, 86, 87, 87, 88, 91, 94, 97], 27", "4" ], [ "[40, -6, 50, -18, 42, 78, 38, -90, -44, -42, -86, 78, -68, 2, -32, -20, -44, 54, 80, 54, 70, 26, 82, -14, -74, -20, 74, 82], 21", "2" ], [ "[0, 0, 0, 0, 1, 1, 1], 5", "4" ], [ "[76, 80], 1", "1" ], [ "[-92, -90, -88, -76, -76, -60, -46, -40, -24, -8, -8, -6, 2, 12, 36, 38, 58, 76, 80], 13", "3" ], [ "[1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1], 15", "4" ], [ "[5, 8, 11, 27, 27, 32, 32, 37, 50, 51, 55, 61, 62, 68, 73, 83], 8", "3" ], [ "[52, -74, -32, -64, -52, -60, -70, 36, 70, 40, 40, -18, 90, -70, -82, -64, -8, -6, 36, 4, -58, 62, -96, 78, 36, 90, -70, -6, -84, 24, 84, 32, -90, 36, 70, -60, -56, 78, 48, 34, -16, 80, 82, 58, 14, -6, -8, 76], 29", "2" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 27", "15" ], [ "[11, 21, 76, 45, 8, 49, 97, 66, 17, 11, 87, 4, 34, 89, 79, 88, 6, 91, 19, 56, 91, 25, 17, 90, 26, 59, 34, 32, 43, 17, 98, 39, 72, 78, 93, 43], 26", "2" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > um; int sum = 0, maxLen = 0; for ( int i = 0; i < n; i ++ ) { sum += arr [ i ] == 0 ? - 1 : 1; if ( sum == 1 ) maxLen = i + 1; else if ( um . find ( sum ) == um . end ( ) ) um [ sum ] = i; if ( um . find ( sum - 1 ) != um . end ( ) ) { if ( maxLen < ( i - um [ sum - 1 ] ) ) maxLen = i - um [ sum - 1 ]; } } return maxLen; }
[]
null
[]
FIND_UNIT_DIGIT_X_RAISED_POWER_Y
python
[]
def f_gold ( x , y ) : res = 1 for i in range ( y ) : res = ( res * x ) % 10 return res
code_translation
[ [ "33, 55", "7" ], [ "95, 7", "5" ], [ "21, 63", "1" ], [ "3, 62", "9" ], [ "40, 53", "0" ], [ "64, 24", "6" ], [ "17, 23", "3" ], [ "58, 74", "4" ], [ "44, 13", "4" ], [ "27, 54", "9" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; unsigned int f_gold ( unsigned int n ) { unsigned count = 0; if ( n && ! ( n & ( n - 1 ) ) ) return n; while ( n != 0 ) { n >>= 1; count += 1; } return 1 << count; }
[]
null
[]
NUMBER_RECTANGLES_NM_GRID
python
[]
def f_gold ( n , m ) : return ( m * n * ( n + 1 ) * ( m + 1 ) ) // 4
code_translation
[ [ "86, 70", "9296385" ], [ "33, 65", "1203345" ], [ "3, 5", "90" ], [ "91, 12", "326508" ], [ "33, 27", "212058" ], [ "13, 75", "259350" ], [ "75, 36", "1898100" ], [ "58, 64", "3558880" ], [ "50, 51", "1690650" ], [ "4, 44", "9900" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( string str ) { int res = str [ 0 ] - '0'; for ( int i = 1; i < str . length ( ); i ++ ) { if ( str [ i ] == '0' || str [ i ] == '1' || res < 2 ) res += ( str [ i ] - '0' ); else res *= ( str [ i ] - '0' ); } return res; }
[]
null
[]
COIN_GAME_WINNER_EVERY_PLAYER_THREE_CHOICES
python
[]
def f_gold ( x , y , n ) : dp = [ 0 for i in range ( n + 1 ) ] dp [ 0 ] = False dp [ 1 ] = True for i in range ( 2 , n + 1 ) : if ( i - 1 >= 0 and not dp [ i - 1 ] ) : dp [ i ] = True elif ( i - x >= 0 and not dp [ i - x ] ) : dp [ i ] = True elif ( i - y >= 0 and not dp [ i - y ] ) : dp [ i ] = True else : dp [ i ] = False return dp [ n ]
code_translation
[ [ "6, 27, 51", "False" ], [ "32, 88, 69", "True" ], [ "99, 18, 48", "False" ], [ "22, 1, 74", "True" ], [ "26, 78, 95", "False" ], [ "67, 51, 27", "True" ], [ "69, 57, 91", "True" ], [ "39, 8, 9", "False" ], [ "7, 82, 41", "True" ], [ "91, 56, 7", "True" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( string & isbn ) { int n = isbn . length ( ); if ( n != 10 ) return false; int sum = 0; for ( int i = 0; i < 9; i ++ ) { int digit = isbn [ i ] - '0'; if ( 0 > digit || 9 < digit ) return false; sum += ( digit * ( 10 - i ) ); } char last = isbn [ 9 ]; if ( last != 'X' && ( last < '0' || last > '9' ) ) return false; sum += ( ( last == 'X' ) ? 10 : ( last - '0' ) ); return ( sum % 11 == 0 ); }
[ "import collections" ]
null
[]
NUMBER_VISIBLE_BOXES_PUTTING_ONE_INSIDE_ANOTHER
python
[]
import collections def f_gold ( arr , n ) : q = collections.deque ( [ ] ) arr.sort ( ) q.append ( arr [ 0 ] ) for i in range ( 1 , n ) : now = q [ 0 ] if ( arr [ i ] >= 2 * now ) : q.popleft ( ) q.append ( arr [ i ] ) return len ( q )
code_translation
[ [ "[2, 3, 17, 17, 18, 28, 28, 29, 34, 43, 44, 52, 54, 80, 84, 84, 91, 92, 97], 12", "7" ], [ "[-94, -90, -90, -78, -34, -26, -10, 4, 24, 28, 64, 70, 72, 74, 80, 82], 10", "2" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 40", "15" ], [ "[2, 3, 5, 8, 12, 16, 20, 30, 37, 53, 55, 62, 76, 81, 83, 87, 88, 96], 9", "3" ], [ "[-94, -92, -60, -58, -54, -42, -36, -12, -8, -2, 8, 14, 18, 20, 26, 32, 38, 56, 58, 60, 70, 78, 80, 86, 98], 18", "4" ], [ "[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 9", "4" ], [ "[1, 1, 2, 3, 3, 11, 16, 18, 19, 21, 21, 22, 22, 24, 27, 28, 29, 43, 43, 52, 55, 57, 60, 62, 62, 63, 65, 66, 70, 70, 73, 77, 78, 79, 79, 80, 85, 85, 86, 88, 89, 90, 97, 98], 30", "13" ], [ "[-94, -82, -80, -78, -68, -60, -58, -44, -44, -42, -30, -30, -22, -18, -18, -14, -14, -10, -8, -6, 4, 4, 6, 12, 12, 14, 18, 30, 44, 48, 50, 52, 54, 80, 86, 88, 88], 21", "1" ], [ "[0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 7", "3" ], [ "[3, 5, 5, 10, 12, 16, 22, 31, 31, 32, 39, 43, 43, 47, 49, 50, 51, 52, 52, 56, 59, 59, 62, 69, 69, 71, 75, 81, 82, 83, 83, 86, 89, 90, 90, 96], 28", "17" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { int result = 0; set < int > Hash; for ( int i = 0; i < n; i ++ ) Hash . insert ( arr [ i ] ); for ( int i = 0; i < n; i ++ ) { for ( int j = i + 1; j < n; j ++ ) { int product = arr [ i ] * arr [ j ]; if ( Hash . find ( product ) != Hash . end ( ) ) result ++; } } return result; }
[]
null
[]
SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1
python
[]
def f_gold ( k ) : return k * k * k
code_translation
[ [ "57", "185193" ], [ "96", "884736" ], [ "14", "2744" ], [ "64", "262144" ], [ "24", "13824" ], [ "74", "405224" ], [ "85", "614125" ], [ "27", "19683" ], [ "78", "474552" ], [ "1", "1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { int invcount = 0; for ( int i = 1; i < n - 1; i ++ ) { int small = 0; for ( int j = i + 1; j < n; j ++ ) if ( arr [ i ] > arr [ j ] ) small ++; int great = 0; for ( int j = i - 1; j >= 0; j -- ) if ( arr [ i ] < arr [ j ] ) great ++; invcount += great * small; } return invcount; }
[]
null
[]
TILING_WITH_DOMINOES
python
[]
def f_gold ( n ) : A = [ 0 ] * ( n + 1 ) B = [ 0 ] * ( n + 1 ) A [ 0 ] = 1 A [ 1 ] = 0 B [ 0 ] = 0 B [ 1 ] = 1 for i in range ( 2 , n + 1 ) : A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ] B [ i ] = A [ i - 1 ] + B [ i - 2 ] return A [ n ]
code_translation
[ [ "29", "0" ], [ "13", "0" ], [ "25", "0" ], [ "65", "0" ], [ "27", "0" ], [ "42", "808717138331" ], [ "19", "0" ], [ "50", "156886956080403" ], [ "59", "0" ], [ "13", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
BASIC_AND_EXTENDED_EUCLIDEAN_ALGORITHMS
python
[]
def f_gold ( a , b ) : if a == 0 : return b return f_gold ( b % a , a )
code_translation
[ [ "46, 89", "1" ], [ "26, 82", "2" ], [ "40, 12", "4" ], [ "58, 4", "2" ], [ "25, 44", "1" ], [ "2, 87", "1" ], [ "8, 65", "1" ], [ "21, 87", "3" ], [ "82, 10", "2" ], [ "17, 61", "1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { int lioes [ n ]; int maxLen = 0; for ( int i = 0; i < n; i ++ ) lioes [ i ] = 1; for ( int i = 1; i < n; i ++ ) for ( int j = 0; j < i; j ++ ) if ( arr [ i ] > arr [ j ] && ( arr [ i ] + arr [ j ] ) % 2 != 0 && lioes [ i ] < lioes [ j ] + 1 ) lioes [ i ] = lioes [ j ] + 1; for ( int i = 0; i < n; i ++ ) if ( maxLen < lioes [ i ] ) maxLen = lioes [ i ]; return maxLen; }
[]
null
[]
FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH_1
python
[]
def f_gold ( arr , n , k ) : if ( k > n ) : return - 1 sum = arr [ 0 ] for i in range ( 1 , k ) : sum += arr [ i ] max_sum = sum max_end = k - 1 for i in range ( k , n ) : sum = sum + arr [ i ] - arr [ i - k ] if ( sum > max_sum ) : max_sum = sum max_end = i return max_end - k + 1
code_translation
[ [ "[2, 5, 11, 37, 41, 49, 49, 63, 98], 8, 7", "1" ], [ "[84, -72, 12, 0, 86, -32, -18, 48, 60, 42, 8, -6, -10, -6, -52, -84, -98, 76, -10, -14, -94, -48, 94, -10, -20, 40, -52, 0, 94, -68, 44, -34, -26, -6, -94, 34, -80, -62, -40, 56, 52, -20, 74, -46, -88, -26, 22], 34, 43", "-1" ], [ "[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11, 18", "-1" ], [ "[94, 97, 74, 88, 14, 66, 65, 50, 76, 55, 70, 93, 53, 30, 2, 60, 65, 24, 80, 73, 84, 95, 49, 32, 55, 70, 17, 26, 96, 20, 36, 2, 89, 49, 83, 67, 42, 51, 71, 11, 61, 78, 17, 78, 94, 68], 35, 33", "0" ], [ "[-98, -90, -60, -38, 38, 42], 3, 5", "-1" ], [ "[1, 0, 0, 1, 1, 1, 1], 3, 4", "-1" ], [ "[4, 9, 17, 17, 19, 32, 35, 36, 37, 40, 44, 45, 47, 48, 48, 56, 56, 60, 61, 65, 66, 79, 83, 91, 93, 99], 22, 24", "-1" ], [ "[78, 82, -92, -46, -16, -64, 28, 60, 64, 52, 54, -84, 70, 22, 24, 0, -14, 20, -90, 30, 0, 86, 12, 72, -64, -52, 86, 16, -42], 25, 27", "-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], 25, 20", "5" ], [ "[81, 77, 6, 3, 72, 24, 75, 47, 17, 29, 69, 15, 15, 50, 30, 83, 11, 7, 59, 7, 12, 82, 45, 76, 9, 48, 98, 49, 29, 66, 3, 53, 37, 13, 72, 58, 37, 87, 55], 34, 23", "4" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int weight [ ], int n, int c ) { int res = 0, bin_rem = c; for ( int i = 0; i < n; i ++ ) { if ( weight [ i ] > bin_rem ) { res ++; bin_rem = c - weight [ i ]; } else bin_rem -= weight [ i ]; } return res; }
[]
null
[]
LENGTH_LONGEST_STRICT_BITONIC_SUBSEQUENCE
python
[]
def f_gold ( arr , n ) : inc , dcr = dict ( ) , dict ( ) len_inc , len_dcr = [ 0 ] * n , [ 0 ] * n longLen = 0 for i in range ( n ) : len = 0 if inc.get ( arr [ i ] - 1 ) in inc.values ( ) : len = inc.get ( arr [ i ] - 1 ) inc [ arr [ i ] ] = len_inc [ i ] = len + 1 for i in range ( n - 1 , - 1 , - 1 ) : len = 0 if dcr.get ( arr [ i ] - 1 ) in dcr.values ( ) : len = dcr.get ( arr [ i ] - 1 ) dcr [ arr [ i ] ] = len_dcr [ i ] = len + 1 for i in range ( n ) : if longLen < ( len_inc [ i ] + len_dcr [ i ] - 1 ) : longLen = len_inc [ i ] + len_dcr [ i ] - 1 return longLen
code_translation
[ [ "[78], 0", "0" ], [ "[-6, -18, -48, 58, -54, 76, 80, -56, 86, 58, -86, -86, -88, 32, 12, 58, 58, -16, 86, -24, 84, 86, 36, 18, 30, -32, -4, -36, -72, -4, 42, 94], 18", "1" ], [ "[0, 1], 1", "1" ], [ "[92, 26, 72, 8, 66, 28, 34, 61, 28], 5", "1" ], [ "[-86, -82, -76, -68, -66, -64, -62, -56, -48, -42, -38, -30, -22, -18, -10, -10, -4, -2, 4, 28, 42, 44, 50, 50, 56, 58, 60, 76, 82, 86, 86, 98], 25", "1" ], [ "[0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0], 17", "3" ], [ "[3, 4, 8, 9, 12, 13, 16, 19, 23, 25, 29, 31, 34, 36, 38, 41, 42, 47, 49, 50, 51, 51, 58, 63, 66, 70, 73, 74, 75, 75, 75, 76, 76, 80, 82, 83, 83, 84, 86, 89, 90, 91, 91, 95, 96], 44", "4" ], [ "[4, -76, 60, 48, -14, 72], 3", "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], 17", "2" ], [ "[66, 80, 79, 72, 1, 67, 20, 67, 32, 40, 22, 64, 58, 67, 10, 21, 37, 49], 15", "2" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int num = n; int dec_value = 0; int base = 1; int temp = num; while ( temp ) { int last_digit = temp % 10; temp = temp / 10; dec_value += last_digit * base; base = base * 2; } return dec_value; }
[]
null
[]
FIND_A_TRIPLET_THAT_SUM_TO_A_GIVEN_VALUE
python
[]
def f_gold ( A , arr_size , sum ) : for i in range ( 0 , arr_size - 2 ) : for j in range ( i + 1 , arr_size - 1 ) : for k in range ( j + 1 , arr_size ) : if A [ i ] + A [ j ] + A [ k ] == sum : print ( "Triplet is" , A [ i ] , ", " , A [ j ] , ", " , A [ k ] ) return True return False
code_translation
[ [ "[15, 18, 38, 47, 75, 88], 5, 4", "False" ], [ "[28, -2, 62, 38, 86, -86, 56, 58, 96, 6, -28, 8, 68, -16, -80, -4, 98, -92, 4, -4, 58, -62, 46, 64], 22, 18", "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], 27, 23", "False" ], [ "[19, 77, 17, 91, 6, 35, 22, 4, 30, 23, 97, 56, 78, 16, 22, 23, 95, 57, 43, 27, 47, 44, 23, 10, 3, 94, 55, 22, 93, 32, 89, 28, 64, 22, 13, 24, 38, 44, 6, 1, 80], 22, 29", "True" ], [ "[-98, -98, -94, -88, -80, -74, -68, -68, -64, -44, -36, -24, -10, -8, -8, 0, 4, 6, 8, 8, 12, 14, 16, 38, 50, 52, 54, 56, 66, 68, 76, 88], 18, 19", "False" ], [ "[1, 1, 0, 0, 1, 0, 1, 1], 4, 5", "False" ], [ "[7, 22, 24, 30, 42, 44, 49, 49, 65, 70, 70, 74, 74, 75, 90, 95, 96], 8, 13", "False" ], [ "[40, -76, -68, -86, -14, 82, -20, 54, -26, 56, -24, -44, 44, 60, 52, -20, 80, -24, -90, -30, -2], 11, 18", "True" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 15, 17", "False" ], [ "[33, 92, 6, 99, 83, 97, 49, 97, 85, 52], 6, 7", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { int result = 0; for ( int i = 1; i <= 9; i ++ ) { stack < int > s; if ( i <= n ) { s . push ( i ); result ++; } while ( ! s . empty ( ) ) { int tp = s . top ( ); s . pop ( ); for ( int j = tp % 10; j <= 9; j ++ ) { int x = tp * 10 + j; if ( x <= n ) { s . push ( x ); result ++; } } } } return result; }
[]
null
[]
PRIME_NUMBERS
python
[]
def f_gold ( n ) : if ( n <= 1 ) : return False for i in range ( 2 , n ) : if ( n % i == 0 ) : return False return True
code_translation
[ [ "2", "True" ], [ "74", "False" ], [ "46", "False" ], [ "38", "False" ], [ "51", "False" ], [ "48", "False" ], [ "6", "False" ], [ "14", "False" ], [ "31", "True" ], [ "10", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int input, int unlock_code ) { int rotation = 0; int input_digit, code_digit; while ( input || unlock_code ) { input_digit = input % 10; code_digit = unlock_code % 10; rotation += min ( abs ( input_digit - code_digit ), 10 - abs ( input_digit - code_digit ) ); input /= 10; unlock_code /= 10; } return rotation; }
[]
null
[]
SUM_SERIES_12_32_52_2N_12_1
python
[]
def f_gold ( n ) : return int ( ( n * ( 2 * n - 1 ) * ( 2 * n + 1 ) ) / 3 )
code_translation
[ [ "84", "790244" ], [ "74", "540274" ], [ "91", "1004731" ], [ "34", "52394" ], [ "36", "62196" ], [ "28", "29260" ], [ "70", "457310" ], [ "7", "455" ], [ "24", "18424" ], [ "47", "138415" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int a [ ], int n ) { int i, total = 1; for ( i = 2; i <= ( n + 1 ); i ++ ) { total += i; total -= a [ i - 2 ]; } return total; }
[]
null
[]
FIND_MAXIMUM_PRODUCT_OF_A_TRIPLET_IN_ARRAY_1
python
[]
def f_gold ( arr , n ) : if n < 3 : return - 1 arr.sort ( ) return max ( arr [ 0 ] * arr [ 1 ] * arr [ n - 1 ] , arr [ n - 1 ] * arr [ n - 2 ] * arr [ n - 3 ] )
code_translation
[ [ "[5, 8, 14, 15, 18, 21, 21, 21, 27, 29, 30, 33, 34, 34, 35, 37, 40, 41, 44, 44, 46, 49, 54, 58, 60, 61, 61, 63, 66, 69, 69, 70, 81, 82, 82, 90, 90, 90, 91, 92, 92, 96, 97, 99], 39", "737100" ], [ "[-98, -98, -90, -88, -76, -66, -60, -58, -56, -52, -50, -32, -32, -22, -2, 12, 18, 28, 32, 48, 50, 56, 68, 70, 70, 72], 18", "268912" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 17", "1" ], [ "[2, 5, 5, 6, 17, 18, 18, 31, 38, 49, 53, 62, 63, 66, 69, 72, 74, 76, 76, 77, 81, 86, 91, 94, 95, 99, 99], 21", "474012" ], [ "[-92, -58, -8, 20, 24, 24, 42, 98], 4", "106720" ], [ "[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], 38", "1" ], [ "[46, 64, 81], 1", "-1" ], [ "[-96, -92, -80, -40, -26, -18, -14, -8, -4, 4, 20, 34, 34, 42, 44, 58, 60, 68, 76, 92, 94, 96], 17", "529920" ], [ "[0, 0, 0, 1, 1, 1, 1, 1], 7", "1" ], [ "[1, 1, 4, 6, 17, 17, 18, 23, 28, 41, 46, 52, 58, 61, 70, 73, 75, 79, 79, 83, 94, 97, 98], 19", "468075" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n, int X ) { if ( X < arr [ 0 ] ) return 0; else if ( X > arr [ n - 1 ] ) return n; int lowerPnt = 0; int i = 1; while ( i < n && arr [ i ] < X ) { lowerPnt = i; i = i * 2; } while ( lowerPnt < n && arr [ lowerPnt ] < X ) lowerPnt ++; return lowerPnt; }
[ "import math" ]
null
[]
HEIGHT_COMPLETE_BINARY_TREE_HEAP_N_NODES
python
[]
import math def f_gold(N): return math.ceil(math.log2(N + 1)) - 1
code_translation
[ [ "65", "6" ], [ "94", "6" ], [ "52", "5" ], [ "31", "4" ], [ "9", "3" ], [ "1", "0" ], [ "41", "5" ], [ "98", "6" ], [ "45", "5" ], [ "24", "4" ] ]
transcoder-geeksforgeeks
cpp
f_gold
null
[]
null
[]
HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_2
python
[]
def f_gold ( no ) : return 0 if no == 0 else int ( no % 10 ) + f_gold ( int ( no / 10 ) )
code_translation
[ [ "73", "10" ], [ "91", "10" ], [ "27", "9" ], [ "79", "16" ], [ "31", "4" ], [ "84", "12" ], [ "68", "14" ], [ "9", "9" ], [ "85", "13" ], [ "35", "8" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > um; int curr_sum = 0; for ( int i = 0; i < n; i ++ ) { curr_sum += ( arr [ i ] == 0 ) ? - 1 : arr [ i ]; um [ curr_sum ] ++; } int count = 0; for ( auto itr = um . begin ( ); itr != um . end ( ); itr ++ ) { if ( itr -> second > 1 ) count += ( ( itr -> second * ( itr -> second - 1 ) ) / 2 ); } if ( um . find ( 0 ) != um . end ( ) ) count += um [ 0 ]; return count; }
[]
null
[]
POSSIBLE_TO_MAKE_A_DIVISIBLE_BY_3_NUMBER_USING_ALL_DIGITS_IN_AN_ARRAY
python
[]
def f_gold ( arr , n ) : remainder = 0 for i in range ( 0 , n ) : remainder = ( remainder + arr [ i ] ) % 3 return ( remainder == 0 )
code_translation
[ [ "[2, 4, 9, 11, 12, 15, 16, 19, 21, 21, 23, 23, 24, 30, 31, 31, 32, 34, 37, 41, 41, 43, 45, 46, 47, 54, 58, 60, 62, 66, 66, 74, 74, 75, 75, 77, 77, 85, 89, 90, 92, 92, 93, 95, 98], 30", "False" ], [ "[0, 66, 92, 24, -8, 88, -92, 86, 80, 82, 42, -20, -56, -2, -84, 32], 14", "False" ], [ "[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], 29", "True" ], [ "[99, 83, 11, 99, 80, 76, 32, 12, 94, 66, 76], 5", "True" ], [ "[-88, -84, -80, -80, -80, -80, -72, -68, -64, -62, -60, -52, -48, -44, -36, -24, -20, -18, -14, -8, -6, -6, -4, 6, 10, 14, 18, 24, 26, 26, 50, 50, 52, 60, 76, 90, 96, 98], 19", "True" ], [ "[0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1], 14", "False" ], [ "[6, 6, 8, 8, 10, 24, 24, 26, 27, 30, 34, 34, 36, 36, 39, 40, 41, 44, 45, 50, 52, 53, 57, 62, 64, 64, 70, 71, 72, 78, 78, 79, 80, 82, 89, 95, 96], 28", "False" ], [ "[-28, -84, -14, -20, -14, -26, 28, -66, 48, 82, -46, -10, -94, 76, 56, -6, 72, -92, -32, 66, 50, -72, 64, 12, 48, 88, -36, -12, -6, -18, -36, -34, 44, 40, -54], 25", "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, 1, 1, 1], 19", "False" ], [ "[17, 47, 89, 75, 57, 69, 70, 57, 83, 79, 57, 49], 8", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n ) { if ( n <= 1 ) return n; int a = 0, b = 1, c = 1; int res = 1; while ( c < n ) { c = a + b; res ++; a = b; b = c; } return res; }
[]
null
[]
FIND_NUMBER_TIMES_STRING_OCCURS_GIVEN_STRING_1
python
[]
def f_gold ( a , b ) : m = len ( a ) n = len ( b ) lookup = [ [ 0 ] * ( n + 1 ) for i in range ( m + 1 ) ] for i in range ( n + 1 ) : lookup [ 0 ] [ i ] = 0 for i in range ( m + 1 ) : lookup [ i ] [ 0 ] = 1 for i in range ( 1 , m + 1 ) : for j in range ( 1 , n + 1 ) : 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 ]
code_translation
[ [ "'fZOKCdZ Lav', 'fKA'", "0" ], [ "'2', '187012'", "0" ], [ "'1000001110', '0'", "6" ], [ "'IAOyBzgIWHo', 'oA'", "0" ], [ "'211806', '10'", "2" ], [ "'1', '001011100'", "0" ], [ "'CVaQTG', 'CT'", "1" ], [ "'6265187228', '628'", "6" ], [ "'10111101101000', '01111'", "35" ], [ "'vEi', 'bigsvkQG'", "0" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; void f_gold ( int a [ ], int size ) { int positive = 0, negative = 1; while ( true ) { while ( positive < size && a [ positive ] >= 0 ) positive += 2; while ( negative < size && a [ negative ] <= 0 ) negative += 2; if ( positive < size && negative < size ) swap ( a [ positive ], a [ negative ] ); else break; } }
[]
null
[]
K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY_1
python
[]
def f_gold ( arr , size , KthIndex ) : dict = { } vect = [ ] for i in range ( size ) : if ( arr [ i ] in dict ) : dict [ arr [ i ] ] = dict [ arr [ i ] ] + 1 else : dict [ arr [ i ] ] = 1 for i in range ( size ) : if ( dict [ arr [ i ] ] > 1 ) : continue else : KthIndex = KthIndex - 1 if ( KthIndex == 0 ) : return arr [ i ] return - 1
code_translation
[ [ "[17, 25, 27, 27, 73, 91], 5, 3", "73" ], [ "[-86, -74, -88, 28, -32, 20, -34, 32], 5, 6", "-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], 33, 32", "-1" ], [ "[5, 11, 36, 27, 6, 24, 58, 44, 14, 68], 7, 5", "6" ], [ "[-98, -98, -94, -92, -86, -86, -70, -66, -64, -64, -58, -52, -46, -44, -44, -38, -38, -28, -24, -12, -10, -4, -2, 2, 8, 10, 12, 20, 22, 26, 26, 36, 42, 52, 54, 60, 60, 68, 82, 82, 92, 98], 27, 27", "-1" ], [ "[0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1], 27, 20", "-1" ], [ "[3, 8, 9, 10, 10, 13, 14, 16, 18, 23, 24, 25, 27, 28, 30, 33, 36, 39, 42, 42, 44, 45, 45, 48, 52, 52, 55, 55, 59, 59, 59, 60, 61, 61, 66, 66, 67, 68, 71, 72, 75, 76, 79, 80, 94, 94], 44, 26", "79" ], [ "[-12, 56, -48, 52, -96, -84, 32, -12, -6, 82, 70, 18, 66, -6, -22, -46, -54, 18, -14, -32, 68, 82, -44, -42, 10, 56, 8, -56, 24, 20, -38, 30, -52, -66, 82, -64, 68, -82, 52, -88, -34, -26, 94, 58, -4, -84, -60], 37, 46", "-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], 22, 21", "-1" ], [ "[1, 23, 75, 84, 28, 34, 15, 13, 51, 69, 94, 45, 38, 38], 13, 12", "45" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( string s ) { int n = s . length ( ); int auxArr [ n ] = { 0 }; if ( s [ 0 ] == '1' ) auxArr [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { if ( s [ i ] == '1' ) auxArr [ i ] = auxArr [ i - 1 ] + 1; else auxArr [ i ] = auxArr [ i - 1 ]; } int count = 0; for ( int i = n - 1; i >= 0; i -- ) if ( s [ i ] == '1' ) count += auxArr [ i ]; return count; }
[]
null
[]
CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED
python
[]
def f_gold ( arr , n ) : temp = [ 0 ] * n for i in range ( n ) : temp [ i ] = arr [ i ] temp.sort ( ) for front in range ( n ) : if temp [ front ] != arr [ front ] : break for back in range ( n - 1 , - 1 , - 1 ) : if temp [ back ] != arr [ back ] : break if front >= back : return True while front != back : front += 1 if arr [ front - 1 ] < arr [ front ] : return False return True
code_translation
[ [ "[5, 9, 9, 16, 17, 22, 32, 40, 45, 53, 57, 58, 66, 69, 76, 80, 91, 93, 94], 10", "True" ], [ "[52, -76, -18, 86, 56], 3", "False" ], [ "[0, 0, 1], 1", "True" ], [ "[66, 44, 98, 44], 2", "True" ], [ "[-96, -62, -56, -46, -44, -38, -38, -26, -22, -22, -16, -12, -6, 12, 22, 34, 36, 44, 44, 68, 70, 74, 94], 14", "True" ], [ "[1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1], 27", "False" ], [ "[5, 9, 11, 12, 13, 16, 19, 23, 23, 23, 25, 27, 27, 28, 31, 36, 40, 44, 48, 59, 60, 63, 66, 66, 67, 67, 69, 69, 70, 71, 73, 76, 76, 79, 86, 86, 92, 92, 93, 93], 34", "True" ], [ "[6, 82, -88, -46, -60, 70, -54, -96, -94, 46, -52, 48, -26, -50, -92, -92, 6, -6, 42, 0, -66, -96, 66, 6, -68, -30, -54, 76, 60, 30, 72, -66, -12, -74], 28", "False" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13", "True" ], [ "[62, 54, 36, 35, 36, 91, 45, 87, 74, 49, 15, 15, 73, 77, 63, 70, 74, 65, 11, 18], 16", "False" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int limit ) { if ( limit < 2 ) return 0; long long int ef1 = 0, ef2 = 2; long long int sum = ef1 + ef2; while ( ef2 <= limit ) { long long int ef3 = 4 * ef2 + ef1; if ( ef3 > limit ) break; ef1 = ef2; ef2 = ef3; sum += ef2; } return sum; }
[]
null
[]
REMAINDER_7_LARGE_NUMBERS
python
[]
def f_gold ( num ) : series = [ 1 , 3 , 2 , - 1 , - 3 , - 2 ] ; series_index = 0 ; result = 0 ; for i in range ( ( len ( num ) - 1 ) , - 1 , - 1 ) : digit = ord ( num [ i ] ) - 48 ; result += digit * series [ series_index ] ; series_index = ( series_index + 1 ) % 6 ; result %= 7 ; if ( result < 0 ) : result = ( result + 7 ) % 7 ; return result ;
code_translation
[ [ "'K'", "6" ], [ "'850076'", "3" ], [ "'00111'", "6" ], [ "'X'", "5" ], [ "'1'", "1" ], [ "'10010001100'", "1" ], [ "' pgPeLz'", "0" ], [ "'53212456821275'", "3" ], [ "'101'", "3" ], [ "'V'", "3" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( int arr [ ], int n ) { int max = * max_element ( arr, arr + n ); int min = * min_element ( arr, arr + n ); int m = max - min + 1; if ( m > n ) return false; bool visited [ m ]; memset ( visited, false, sizeof ( visited ) ); for ( int i = 0; i < n; i ++ ) visited [ arr [ i ] - min ] = true; for ( int i = 0; i < m; i ++ ) if ( visited [ i ] == false ) return false; return true; }
[]
null
[]
FRIENDS_PAIRING_PROBLEM
python
[]
def f_gold ( n ) : dp = [ 0 for i in range ( n + 1 ) ] for i in range ( n + 1 ) : if ( i <= 2 ) : dp [ i ] = i else : dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ] return dp [ n ]
code_translation
[ [ "99", "2293787513721395580144886572049456639156084025485931929781630885397779219218432000" ], [ "62", "1890816383932031941325296356597295736721047552" ], [ "87", "1913739316913202783355790595270439314300178051408817240769643782602752" ], [ "87", "1913739316913202783355790595270439314300178051408817240769643782602752" ], [ "61", "226276446953982927846025591173802895436906496" ], [ "88", "18881235766605574525396279655084970878526300067324791627800030639816704" ], [ "73", "42173037345553914225478986054839828767802782862349697024" ], [ "62", "1890816383932031941325296356597295736721047552" ], [ "98", "219793534592041246196742895666452284583919553534682361162298301263785577859252224" ], [ "57", "50175735550281498556347163152384239583232" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr [ ], int n, int x ) { for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] == x ) return i; } return - 1; }
[]
null
[]
FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1
python
[]
def f_gold ( n ) : count = 0 if ( n and ( not ( n & ( n - 1 ) ) ) ) : while ( n > 1 ) : n >>= 1 count += 1 if ( count % 2 == 0 ) : return True else : return False
code_translation
[ [ "1", "True" ], [ "4", "True" ], [ "64", "True" ], [ "-64", "None" ], [ "128", "False" ], [ "1024", "True" ], [ "45", "None" ], [ "33", "None" ], [ "66", "None" ], [ "74", "None" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) { int count = 0; int l = 0, r = n - 1; while ( l < m && r >= 0 ) { if ( ( arr1 [ l ] + arr2 [ r ] ) == x ) { l ++; r --; count ++; } else if ( ( arr1 [ l ] + arr2 [ r ] ) < x ) l ++; else r --; } return count; }
[]
null
[]
COUNT_POSSIBLE_WAYS_TO_CONSTRUCT_BUILDINGS
python
[]
def f_gold ( N ) : if ( N == 1 ) : return 4 countB = 1 countS = 1 for i in range ( 2 , N + 1 ) : prev_countB = countB prev_countS = countS countS = prev_countB + prev_countS countB = prev_countS result = countS + countB return ( result * result )
code_translation
[ [ "17", "17480761" ], [ "66", "5288701670462944237293955881" ], [ "53", "19483654655064681378025" ], [ "97", "47927278105176659888288635888015429788676" ], [ "34", "222915410843904" ], [ "54", "51008870112024444436089" ], [ "9", "7921" ], [ "99", "328498451097686799925900568301054106978201" ], [ "59", "6273676290102962523005521" ], [ "87", "3168326721400483374766289471577927721" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; bool f_gold ( int x1, int y1, int x2, int y2 ) { return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) ); }
[]
null
[]
SUM_PAIRWISE_PRODUCTS_1
python
[]
def f_gold ( n ) : multiTerms = n * ( n + 1 ) // 2 sm = multiTerms for i in range ( 2 , n + 1 ) : multiTerms = multiTerms - ( i - 1 ) sm = sm + multiTerms * i return sm
code_translation
[ [ "41", "382571" ], [ "50", "834275" ], [ "67", "2645897" ], [ "18", "15675" ], [ "60", "1711355" ], [ "6", "266" ], [ "27", "74907" ], [ "46", "601036" ], [ "50", "834275" ], [ "20", "23485" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; int f_gold ( int n, int k ) { if ( k <= 0 ) return n; return ( n & ~ ( 1 << ( k - 1 ) ) ); }
[]
null
[]
REMOVE_MINIMUM_NUMBER_ELEMENTS_NO_COMMON_ELEMENT_EXIST_ARRAY
python
[]
def f_gold ( a , b , n , m ) : countA = dict ( ) countB = dict ( ) for i in range ( n ) : countA [ a [ i ] ] = countA.get ( a [ i ] , 0 ) + 1 for i in range ( n ) : countB [ b [ i ] ] = countB.get ( b [ i ] , 0 ) + 1 res = 0 for x in countA : if x in countB.keys ( ) : res += min ( countA [ x ] , countB [ x ] ) return res
code_translation
[ [ "[4, 7, 10, 12, 12, 24, 29, 38, 45, 51, 53, 54, 59, 68, 72, 73, 85, 86, 88, 92, 92, 95], [7, 9, 17, 23, 25, 26, 29, 32, 35, 56, 56, 58, 59, 59, 62, 63, 72, 82, 85, 86, 95, 97], 15, 13", "3" ], [ "[-6, 48, -70, 14, -86, 56, 80, -64, 64, -88, -14, 78, 14, -18, 52, 2, 22, 88], [-62, -58, 60, -30, 42, 8, 66, -48, -18, 64, -76, -90, -48, -90, -24, 64, -88, -98], 15, 9", "2" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10", "9" ], [ "[10, 93, 2, 16, 36, 49, 36, 86, 6, 99, 95, 2], [99, 28, 7, 21, 62, 89, 82, 41, 43, 77, 8, 14], 6, 10", "0" ], [ "[-98, -96, -80, -64, -42, -30, -6, 10, 62, 66, 82], [-62, -50, -42, 24, 44, 46, 52, 54, 60, 72, 72], 9, 6", "1" ], [ "[1, 1, 0, 1, 1], [1, 1, 1, 0, 0], 4, 2", "4" ], [ "[7, 11, 13, 15, 21, 33, 36, 39, 66, 99], [23, 36, 42, 44, 62, 65, 70, 78, 82, 89], 9, 9", "1" ], [ "[-40], [-98], 0, 0", "0" ], [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 31, 26", "24" ], [ "[79, 91, 31, 16, 28, 45, 37, 43, 73, 73, 76, 28, 71, 60, 64, 60, 99, 36, 47, 38, 65, 34, 22, 94, 84, 51, 72, 45, 71, 2], [58, 94, 12, 27, 98, 38, 75, 20, 94, 43, 32, 90, 23, 41, 88, 2, 62, 96, 53, 57, 48, 79, 6, 16, 11, 46, 73, 57, 67, 7], 18, 18", "1" ] ]
transcoder-geeksforgeeks
cpp
f_gold
using namespace std; string f_gold ( int n, int k ) { string res = ""; for ( int i = 0; i < k; i ++ ) res = res + ( char ) ( 'a' + i ); int count = 0; for ( int i = 0; i < n - k; i ++ ) { res = res + ( char ) ( 'a' + count ); count ++; if ( count == k ) count = 0; } return res; }
[ "import math" ]
null
[]
N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_2
python
[]
import math def f_gold ( n ) : nthElement = 19 + ( n - 1 ) * 9 outliersCount = int ( math.log10 ( nthElement ) ) - 1 nthElement += 9 * outliersCount return nthElement
code_translation
[ [ "68", "631" ], [ "70", "649" ], [ "69", "640" ], [ "93", "856" ], [ "99", "910" ], [ "44", "415" ], [ "91", "838" ], [ "8", "82" ], [ "83", "766" ], [ "51", "478" ] ]